summaryrefslogtreecommitdiff
path: root/migration
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2021-05-04 21:15:57 +0900
committerGitHub <noreply@github.com>2021-05-04 21:15:57 +0900
commit18e1efc7ecd3f5a6d774c16f17526d12ae46b2f5 (patch)
tree8f2cb50644bb3679eafd29fb9e7448ed5069321c /migration
parentメールアドレスの設定を促すように (diff)
downloadsharkey-18e1efc7ecd3f5a6d774c16f17526d12ae46b2f5.tar.gz
sharkey-18e1efc7ecd3f5a6d774c16f17526d12ae46b2f5.tar.bz2
sharkey-18e1efc7ecd3f5a6d774c16f17526d12ae46b2f5.zip
Ad (#7495)
* wip * Update ad.vue * Update default.widgets.vue * wip * Create 1620019354680-ad.ts * wip * Update ads.vue * wip * Update ad.vue
Diffstat (limited to 'migration')
-rw-r--r--migration/1620019354680-ad.ts18
1 files changed, 18 insertions, 0 deletions
diff --git a/migration/1620019354680-ad.ts b/migration/1620019354680-ad.ts
new file mode 100644
index 0000000000..27fb99f181
--- /dev/null
+++ b/migration/1620019354680-ad.ts
@@ -0,0 +1,18 @@
+import {MigrationInterface, QueryRunner} from "typeorm";
+
+export class ad1620019354680 implements MigrationInterface {
+ name = 'ad1620019354680'
+
+ public async up(queryRunner: QueryRunner): Promise<void> {
+ await queryRunner.query(`CREATE TABLE "ad" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "expiresAt" TIMESTAMP WITH TIME ZONE NOT NULL, "place" character varying(32) NOT NULL, "priority" character varying(32) NOT NULL, "url" character varying(1024) NOT NULL, "imageUrl" character varying(1024) NOT NULL, "memo" character varying(8192) NOT NULL, CONSTRAINT "PK_0193d5ef09746e88e9ea92c634d" PRIMARY KEY ("id")); COMMENT ON COLUMN "ad"."createdAt" IS 'The created date of the Ad.'; COMMENT ON COLUMN "ad"."expiresAt" IS 'The expired date of the Ad.'`);
+ await queryRunner.query(`CREATE INDEX "IDX_1129c2ef687fc272df040bafaa" ON "ad" ("createdAt") `);
+ await queryRunner.query(`CREATE INDEX "IDX_2da24ce20ad209f1d9dc032457" ON "ad" ("expiresAt") `);
+ }
+
+ public async down(queryRunner: QueryRunner): Promise<void> {
+ await queryRunner.query(`DROP INDEX "IDX_2da24ce20ad209f1d9dc032457"`);
+ await queryRunner.query(`DROP INDEX "IDX_1129c2ef687fc272df040bafaa"`);
+ await queryRunner.query(`DROP TABLE "ad"`);
+ }
+
+}