@@ -3,10 +3,6 @@ import { Migration } from '@mikro-orm/migrations';
|
||||
export class Migration20260626140000 extends Migration {
|
||||
|
||||
override async up(): Promise<void> {
|
||||
this.addSql(`
|
||||
alter table "invoices"
|
||||
add column "confirm_status" text check ("confirm_status" in ('pending', 'partially_confirmed', 'confirmed')) not null default 'pending';
|
||||
`);
|
||||
|
||||
this.addSql(`
|
||||
CREATE OR REPLACE FUNCTION recalc_invoice_totals()
|
||||
@@ -153,7 +149,6 @@ export class Migration20260626140000 extends Migration {
|
||||
this.addSql(`DROP TRIGGER IF EXISTS trg_payments_recalc ON payments;`);
|
||||
this.addSql(`DROP FUNCTION IF EXISTS recalc_invoice_totals();`);
|
||||
this.addSql(`DROP FUNCTION IF EXISTS recalc_invoice_payments();`);
|
||||
this.addSql(`alter table "invoices" drop column if exists "confirm_status";`);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user