summary refs log tree commit diff
path: root/src/util/migrations/mariadb/1661885910534-guild-member-profiles.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/migrations/mariadb/1661885910534-guild-member-profiles.ts')
-rw-r--r--src/util/migrations/mariadb/1661885910534-guild-member-profiles.ts40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/util/migrations/mariadb/1661885910534-guild-member-profiles.ts b/src/util/migrations/mariadb/1661885910534-guild-member-profiles.ts
new file mode 100644
index 00000000..6e1ac3f8
--- /dev/null
+++ b/src/util/migrations/mariadb/1661885910534-guild-member-profiles.ts
@@ -0,0 +1,40 @@
+import { MigrationInterface, QueryRunner } from "typeorm";
+
+export class guildMemberProfiles1661885910534 implements MigrationInterface {
+    name = 'guildMemberProfiles1661885910534'
+
+    public async up(queryRunner: QueryRunner): Promise<void> {
+        await queryRunner.query(`
+            ALTER TABLE \`members\`
+            ADD \`avatar\` varchar(255) NULL
+        `);
+        await queryRunner.query(`
+            ALTER TABLE \`members\`
+            ADD \`banner\` varchar(255) NULL
+        `);
+        await queryRunner.query(`
+            ALTER TABLE \`members\`
+            ADD \`bio\` varchar(255) NOT NULL
+        `);
+        await queryRunner.query(`
+            ALTER TABLE \`members\`
+            ADD \`communication_disabled_until\` datetime NULL
+        `);
+    }
+
+    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\`
+        `);
+    }
+
+}