Only create INDEX 'added' when it does not already exist
This commit is contained in:
1 parent
6c0dd4a5b3
commit
68881df2a4
1 file changed
+1
-2
@@ -172,8 +172,7 @@ class DatabaseMigration {
|
||||
}
|
||||
|
||||
if (version < 2) {
|
||||
queries.push(`ALTER TABLE statistics
|
||||
ADD INDEX added (added);`);
|
||||
queries.push(`CREATE INDEX IF NOT EXISTS added ON statistics (added);`);
|
||||
}
|
||||
|
||||
return queries;
|
||||
|
||||
Reference in new issue
Block a user