add: title to bill
This commit is contained in:
@@ -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";`);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user