From c06775634acd9ed361ef9cc653176d8522704b45 Mon Sep 17 00:00:00 2001 From: Kittapath Date: Wed, 12 Jun 2024 17:38:58 +0700 Subject: [PATCH] migrate --- ...2070-update_table_profilechage_add_birthdate.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/migration/1718188662070-update_table_profilechage_add_birthdate.ts diff --git a/src/migration/1718188662070-update_table_profilechage_add_birthdate.ts b/src/migration/1718188662070-update_table_profilechage_add_birthdate.ts new file mode 100644 index 00000000..545d13c6 --- /dev/null +++ b/src/migration/1718188662070-update_table_profilechage_add_birthdate.ts @@ -0,0 +1,14 @@ +import { MigrationInterface, QueryRunner } from "typeorm"; + +export class UpdateTableProfilechageAddBirthdate1718188662070 implements MigrationInterface { + name = 'UpdateTableProfilechageAddBirthdate1718188662070' + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE \`profileChangePosition\` ADD \`birthDate\` datetime NULL COMMENT 'วันเกิด'`); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE \`profileChangePosition\` DROP COLUMN \`birthDate\``); + } + +}