Fix a potential upgrade error due to the initial 1.5 migration step not adding a UNIQUE index to key
in syncDeleteLog
This commit is contained in:
parent
38be4790a1
commit
2468ad5dfc
1 changed files with 1 additions and 1 deletions
|
@ -2150,7 +2150,7 @@ Zotero.Schema = new function(){
|
|||
Zotero.DB.query("DROP INDEX syncDeleteLog_timestamp");
|
||||
Zotero.DB.query("CREATE TABLE syncDeleteLog (\n syncObjectTypeID INT NOT NULL,\n key TEXT NOT NULL UNIQUE,\n timestamp INT NOT NULL,\n FOREIGN KEY (syncObjectTypeID) REFERENCES syncObjectTypes(syncObjectTypeID)\n);");
|
||||
Zotero.DB.query("CREATE INDEX syncDeleteLog_timestamp ON syncDeleteLog(timestamp);");
|
||||
Zotero.DB.query("INSERT INTO syncDeleteLog SELECT syncObjectTypeID, key, timestamp FROM syncDeleteLogOld");
|
||||
Zotero.DB.query("INSERT IGNORE INTO syncDeleteLog SELECT syncObjectTypeID, key, timestamp FROM syncDeleteLogOld ORDER BY timestamp DESC");
|
||||
Zotero.DB.query("DROP TABLE syncDeleteLogOld");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue