Skip to content

Commit

Permalink
Skip renaming Pads to Maps if Maps already exists
Browse files Browse the repository at this point in the history
Fixes starting v5 after starting v4 after starting v5
  • Loading branch information
cdauth committed Jul 13, 2024
1 parent 21dd79d commit 83c38cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/src/database/migrations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default class DatabaseMigrations {
async _renamePadsTableMigration(): Promise<void> {
const queryInterface = this._db._conn.getQueryInterface();

if (await queryInterface.tableExists("Pads")) {
if (await queryInterface.tableExists("Pads") && !await queryInterface.tableExists("Maps")) {
console.log("DB migration: Rename Pads table to Maps");

await queryInterface.renameTable("Pads", "Maps");
Expand Down

0 comments on commit 83c38cd

Please sign in to comment.