summary refs log tree commit diff
path: root/src/util/migrations/postgres
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2022-08-31 21:57:36 +0200
committerGitHub <noreply@github.com>2022-08-31 21:57:36 +0200
commit932348cb8813c98c30e44c2ea34459ed5a65490a (patch)
treecb581f1795758530a6826dbcfe46d30a18ce5e52 /src/util/migrations/postgres
parentMerge pull request #866 from FSG-Cat/Bug-Report-Template (diff)
parentMerge branch 'staging' into feat/guild-profiles (diff)
downloadserver-932348cb8813c98c30e44c2ea34459ed5a65490a.tar.xz
Merge pull request #872 from Puyodead1/feat/guild-profiles
implement guild profiles and fix user profiles
Diffstat (limited to 'src/util/migrations/postgres')
-rw-r--r--src/util/migrations/postgres/1661885830688-guild-member-profiles.ts40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/util/migrations/postgres/1661885830688-guild-member-profiles.ts b/src/util/migrations/postgres/1661885830688-guild-member-profiles.ts
new file mode 100644
index 00000000..b774743b
--- /dev/null
+++ b/src/util/migrations/postgres/1661885830688-guild-member-profiles.ts
@@ -0,0 +1,40 @@
+import { MigrationInterface, QueryRunner } from "typeorm";
+
+export class guildMemberProfiles1661885830688 implements MigrationInterface {
+    name = 'guildMemberProfiles1661885830688'
+
+    public async up(queryRunner: QueryRunner): Promise<void> {
+        await queryRunner.query(`
+            ALTER TABLE "members"
+            ADD "avatar" character varying
+        `);
+        await queryRunner.query(`
+            ALTER TABLE "members"
+            ADD "banner" character varying
+        `);
+        await queryRunner.query(`
+            ALTER TABLE "members"
+            ADD "bio" character varying NOT NULL
+        `);
+        await queryRunner.query(`
+            ALTER TABLE "members"
+            ADD "communication_disabled_until" TIMESTAMP
+        `);
+    }
+
+    public async down(queryRunner: QueryRunner): Promise<void> {
+        await queryRunner.query(`
+            ALTER TABLE "members" DROP COLUMN "communication_disabled_until"
+        `);
+        await queryRunner.query(`
+            ALTER TABLE "members" DROP COLUMN "bio"
+        `);
+        await queryRunner.query(`
+            ALTER TABLE "members" DROP COLUMN "banner"
+        `);
+        await queryRunner.query(`
+            ALTER TABLE "members" DROP COLUMN "avatar"
+        `);
+    }
+
+}