feat(utils,currency): Migrate currency to use DML (#7807)
This commit is contained in:
@@ -42,7 +42,7 @@
|
||||
},
|
||||
"decimal_digits": {
|
||||
"name": "decimal_digits",
|
||||
"type": "int",
|
||||
"type": "integer",
|
||||
"unsigned": false,
|
||||
"autoincrement": false,
|
||||
"primary": false,
|
||||
@@ -90,6 +90,16 @@
|
||||
"length": 6,
|
||||
"default": "now()",
|
||||
"mappedType": "datetime"
|
||||
},
|
||||
"deleted_at": {
|
||||
"name": "deleted_at",
|
||||
"type": "timestamptz",
|
||||
"unsigned": false,
|
||||
"autoincrement": false,
|
||||
"primary": false,
|
||||
"nullable": true,
|
||||
"length": 6,
|
||||
"mappedType": "datetime"
|
||||
}
|
||||
},
|
||||
"name": "currency",
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
import { Migration } from "@mikro-orm/migrations"
|
||||
|
||||
export class Migration20240624082354 extends Migration {
|
||||
async up(): Promise<void> {
|
||||
this.addSql(
|
||||
'alter table if exists "currency" add column if not exists "deleted_at" timestamptz null;'
|
||||
)
|
||||
}
|
||||
|
||||
async down(): Promise<void> {
|
||||
this.addSql(
|
||||
'alter table if exists "currency" drop column if exists "deleted_at";'
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user