feat(utils,currency): Migrate currency to use DML (#7807)

This commit is contained in:
Riqwan Thamir
2024-06-24 19:07:26 +02:00
committed by GitHub
parent 7414034ac4
commit 96fb7a962e
21 changed files with 312 additions and 116 deletions
@@ -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";'
)
}
}