Permalink
Browse files

Remove secondary key from scannerpath due to key length issues.

This will require users to revert their database, or more easily `drop
table scannerfile` if they attempted and failed updating the schema
previously.

Note, this may cause future problems, as at least my system did not
reject the key, and there may be inconsistencies between users running
master branch.
  • Loading branch information...
wagnerrp committed Jul 8, 2012
1 parent 8cdf5da commit dea4880ac87967182dfc0c34cc57cab1b3528301
Showing with 3 additions and 1 deletion.
  1. +3 −1 mythtv/libs/libmythtv/dbcheck.cpp
@@ -2260,7 +2260,6 @@ NULL
" `storagegroup` VARCHAR(32) NOT NULL DEFAULT 'Default',"
" `filename` VARCHAR(255) NOT NULL DEFAULT '',"
" PRIMARY KEY (`fileid`),"
-" UNIQUE KEY path (`storagegroup`, `hostname`, `filename`)"
") ENGINE=MyISAM DEFAULT CHARSET=utf8;",
"CREATE TABLE videopart ("
" `fileid` BIGINT(20) UNSIGNED NOT NULL,"
@@ -2271,6 +2270,9 @@ NULL
NULL
};
+// removed "UNIQUE KEY path (`storagegroup`, `hostname`, `filename`)" from
+// scannerpath as a quick fix for key length constraints
+
if (!performActualUpdate(&updates[0], "1307", dbver))
return false;
}

0 comments on commit dea4880

Please sign in to comment.