From 934b1fe894a88a48727ff2179d16dd2cdd85a871 Mon Sep 17 00:00:00 2001 From: Marigold Date: Mon, 16 Oct 2023 16:10:36 +0200 Subject: [PATCH] :sparkles: add displayOrder column to posts_gdocs_variables_faqs table --- ...97464705200-PostsGdocsLinksDisplayOrder.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 db/migration/1697464705200-PostsGdocsLinksDisplayOrder.ts diff --git a/db/migration/1697464705200-PostsGdocsLinksDisplayOrder.ts b/db/migration/1697464705200-PostsGdocsLinksDisplayOrder.ts new file mode 100644 index 00000000000..bc82f758c35 --- /dev/null +++ b/db/migration/1697464705200-PostsGdocsLinksDisplayOrder.ts @@ -0,0 +1,19 @@ +import { MigrationInterface, QueryRunner } from "typeorm" + +export class PostsGdocsLinksDisplayOrder1697464705200 + implements MigrationInterface +{ + public async up(queryRunner: QueryRunner): Promise { + queryRunner.query( + `ALTER TABLE posts_gdocs_variables_faqs + ADD COLUMN displayOrder SMALLINT NOT NULL DEFAULT 0;` + ) + } + + public async down(queryRunner: QueryRunner): Promise { + queryRunner.query( + `ALTER TABLE posts_gdocs_variables_faqs + DROP COLUMN display_order;` + ) + } +}