18 lines
682 B
TypeScript
18 lines
682 B
TypeScript
import { Migration } from '@mikro-orm/migrations';
|
|
|
|
export class Migration20260404082727 extends Migration {
|
|
|
|
override async up(): Promise<void> {
|
|
this.addSql(`alter table "credit_transactions" drop constraint if exists "credit_transactions_type_check";`);
|
|
|
|
this.addSql(`alter table "credit_transactions" add constraint "credit_transactions_type_check" check("type" in (''));`);
|
|
}
|
|
|
|
override async down(): Promise<void> {
|
|
this.addSql(`alter table "credit_transactions" drop constraint if exists "credit_transactions_type_check";`);
|
|
|
|
this.addSql(`alter table "credit_transactions" add constraint "credit_transactions_type_check" check("type" in (''));`);
|
|
}
|
|
|
|
}
|