add: title to bill

This commit is contained in:
2026-02-18 09:01:35 +03:30
parent a9c6854772
commit a3be4e9ea9
6 changed files with 58 additions and 9 deletions
@@ -321,6 +321,15 @@
"length": 6,
"mappedType": "datetime"
},
"title": {
"name": "title",
"type": "text",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": false,
"mappedType": "text"
},
"type": {
"name": "type",
"type": "text",
@@ -0,0 +1,12 @@
import { Migration } from "@mikro-orm/migrations";
export class Migration20250218120000_add_bill_title extends Migration {
override async up(): Promise<void> {
this.addSql(`alter table "bill" add column "title" text not null default '';`);
this.addSql(`alter table "bill" alter column "title" drop default;`);
}
override async down(): Promise<void> {
this.addSql(`alter table "bill" drop column "title";`);
}
}