barname
This commit is contained in:
@@ -6411,17 +6411,7 @@
|
||||
"unsigned": false,
|
||||
"autoincrement": false,
|
||||
"primary": false,
|
||||
"nullable": false,
|
||||
"length": 255,
|
||||
"mappedType": "string"
|
||||
},
|
||||
"weight": {
|
||||
"name": "weight",
|
||||
"type": "varchar(255)",
|
||||
"unsigned": false,
|
||||
"autoincrement": false,
|
||||
"primary": false,
|
||||
"nullable": false,
|
||||
"nullable": true,
|
||||
"length": 255,
|
||||
"mappedType": "string"
|
||||
},
|
||||
@@ -6451,7 +6441,7 @@
|
||||
"unsigned": false,
|
||||
"autoincrement": false,
|
||||
"primary": false,
|
||||
"nullable": false,
|
||||
"nullable": true,
|
||||
"length": 255,
|
||||
"mappedType": "string"
|
||||
},
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
import { Migration } from '@mikro-orm/migrations';
|
||||
|
||||
export class Migration20260307082551 extends Migration {
|
||||
|
||||
override async up(): Promise<void> {
|
||||
this.addSql(`alter table "barname" alter column "description" type varchar(255) using ("description"::varchar(255));`);
|
||||
this.addSql(`alter table "barname" alter column "description" drop not null;`);
|
||||
}
|
||||
|
||||
override async down(): Promise<void> {
|
||||
this.addSql(`alter table "barname" add column "weight" varchar(255) not null;`);
|
||||
this.addSql(`alter table "barname" alter column "description" type varchar(255) using ("description"::varchar(255));`);
|
||||
this.addSql(`alter table "barname" alter column "description" set not null;`);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
import { Migration } from '@mikro-orm/migrations';
|
||||
|
||||
export class Migration20260307082850 extends Migration {
|
||||
|
||||
override async up(): Promise<void> {
|
||||
this.addSql(`alter table "barname" alter column "origin" type varchar(255) using ("origin"::varchar(255));`);
|
||||
this.addSql(`alter table "barname" alter column "origin" drop not null;`);
|
||||
}
|
||||
|
||||
override async down(): Promise<void> {
|
||||
this.addSql(`alter table "barname" alter column "origin" type varchar(255) using ("origin"::varchar(255));`);
|
||||
this.addSql(`alter table "barname" alter column "origin" set not null;`);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user