Fix #205 (run update.js)
This commit is contained in:
parent
86df9775ac
commit
68146043ad
|
@ -168,7 +168,7 @@ function init() {
|
|||
"`contents` MEDIUMTEXT NOT NULL,",
|
||||
"`count` INT NOT NULL,",
|
||||
"`time` INT NOT NULL,",
|
||||
"PRIMARY KEY (`name`))",
|
||||
"PRIMARY KEY (`user`, `name`))",
|
||||
"ENGINE = MyISAM;"].join("");
|
||||
results = db.querySync(query);
|
||||
if(!results) {
|
||||
|
|
|
@ -20,6 +20,15 @@ if(!db.querySync(query)) {
|
|||
populateChannelOwners();
|
||||
}
|
||||
}
|
||||
|
||||
console.log("Fixing user playlist bug");
|
||||
query = "ALTER TABLE user_playlists DROP PRIMARY KEY, ADD PRIMARY KEY (user, name)";
|
||||
if(!db.querySync(query)) {
|
||||
console.log("Something went wrong");
|
||||
}
|
||||
else {
|
||||
console.log("fixed");
|
||||
}
|
||||
db.closeSync();
|
||||
process.exit(0);
|
||||
|
||||
|
|
Loading…
Reference in a new issue