summary refs log tree commit diff
path: root/util/src/migrations/1633864260873-EmojiRoles.ts
diff options
context:
space:
mode:
Diffstat (limited to 'util/src/migrations/1633864260873-EmojiRoles.ts')
-rw-r--r--util/src/migrations/1633864260873-EmojiRoles.ts13
1 files changed, 13 insertions, 0 deletions
diff --git a/util/src/migrations/1633864260873-EmojiRoles.ts b/util/src/migrations/1633864260873-EmojiRoles.ts
new file mode 100644
index 00000000..f0d709f2
--- /dev/null
+++ b/util/src/migrations/1633864260873-EmojiRoles.ts
@@ -0,0 +1,13 @@
+import { MigrationInterface, QueryRunner } from "typeorm";
+
+export class EmojiRoles1633864260873 implements MigrationInterface {
+	name = "EmojiRoles1633864260873";
+
+	public async up(queryRunner: QueryRunner): Promise<void> {
+		await queryRunner.query(`ALTER TABLE "emojis" ADD "roles" text NOT NULL DEFAULT ''`);
+	}
+
+	public async down(queryRunner: QueryRunner): Promise<void> {
+		await queryRunner.query(`ALTER TABLE "emojis" DROP COLUMN column_name "roles"`);
+	}
+}