Skip to content

Commit

Permalink
fix db name in migration
Browse files Browse the repository at this point in the history
  • Loading branch information
Tschonti committed Mar 29, 2024
1 parent 8462e88 commit 68b5d83
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export class EventState1705779906213 implements MigrationInterface {
name = 'EventState1705779906213'

public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`EXEC sp_rename "pontozo-db.dbo.event.rateable", "state"`)
await queryRunner.query(`EXEC sp_rename "pontozo-dtu-db.dbo.event.rateable", "state"`)
await queryRunner.query(`ALTER TABLE "event" DROP CONSTRAINT "DF_60718ea2c6e6abd42b982dd321a"`)
await queryRunner.query(`ALTER TABLE "event" ADD CONSTRAINT "DF_5bcb4691305a70a213f794665c2" DEFAULT 1 FOR "state"`)
await queryRunner.query(`ALTER TABLE "event" DROP CONSTRAINT "DF_5bcb4691305a70a213f794665c2"`)
Expand All @@ -25,6 +25,6 @@ export class EventState1705779906213 implements MigrationInterface {
await queryRunner.query(`ALTER TABLE "event" ADD CONSTRAINT "DF_5bcb4691305a70a213f794665c2" DEFAULT 1 FOR "state"`)
await queryRunner.query(`ALTER TABLE "event" DROP CONSTRAINT "DF_5bcb4691305a70a213f794665c2"`)
await queryRunner.query(`ALTER TABLE "event" ADD CONSTRAINT "DF_60718ea2c6e6abd42b982dd321a" DEFAULT 1 FOR "state"`)
await queryRunner.query(`EXEC sp_rename "pontozo-db.dbo.event.state", "rateable"`)
await queryRunner.query(`EXEC sp_rename "pontozo-dtu-db.dbo.event.state", "rateable"`)
}
}

0 comments on commit 68b5d83

Please sign in to comment.