Ticket #6802: mythplugins-mythmusic-mythmusic-dbcheck_cpp.patch

File mythplugins-mythmusic-mythmusic-dbcheck_cpp.patch, 1.4 KB (added by Jonathan Martens <jonathan@…>, 15 years ago)

Patch removing default value for fields with TEXT type

  • mythmusic/mythmusic/dbcheck.cpp

     
    373373"CREATE TABLE music_playlists ("
    374374"    playlist_id int(11) unsigned NOT NULL auto_increment PRIMARY KEY,"
    375375"    playlist_name varchar(255) NOT NULL default '',"
    376 "    playlist_songs text NOT NULL default '',"
     376"    playlist_songs text,"
    377377"    last_accessed timestamp NOT NULL,"
    378378"    length int(11) unsigned NOT NULL default '0',"
    379379"    songcount smallint(8) unsigned NOT NULL default '0',"
     
    381381");",
    382382"CREATE TABLE music_songs ("
    383383"    song_id int(11) unsigned NOT NULL auto_increment PRIMARY KEY,"
    384 "    filename text NOT NULL default '',"
     384"    filename text,"
    385385"    name varchar(255) NOT NULL default '',"
    386386"    track smallint(6) unsigned NOT NULL default '0',"
    387387"    artist_id int(11) unsigned NOT NULL default '0',"
     
    479479        const QString updates[] = {
    480480"ALTER TABLE music_songs MODIFY lastplay DATETIME DEFAULT NULL;",
    481481"CREATE TABLE music_directories (directory_id int(20) NOT NULL AUTO_INCREMENT "
    482 "PRIMARY KEY, path TEXT NOT NULL DEFAULT '', "
     482"PRIMARY KEY, path TEXT, "
    483483"parent_id INT(20) NOT NULL DEFAULT '0') ;",
    484484"INSERT IGNORE INTO music_directories (path) SELECT DISTINCT"
    485485" SUBSTRING(filename FROM 1 FOR INSTR(filename, "