DROP -> DROP IF EXISTS

This commit is contained in:
nymkappa
2022-01-21 00:08:51 +09:00
parent fea0b94b67
commit dcf613e065
2 changed files with 9 additions and 2 deletions

View File

@@ -87,7 +87,7 @@ class DatabaseMigration {
await this.$executeQuery(connection, this.getCreatePoolsTableQuery(), await this.$checkIfTableExists('pools'));
}
if (databaseSchemaVersion < 4) {
await this.$executeQuery(connection, 'DROP table blocks;');
await this.$executeQuery(connection, 'DROP table IF EXISTS blocks;');
await this.$executeQuery(connection, this.getCreateBlocksTableQuery(), await this.$checkIfTableExists('blocks'));
}
connection.release();