summary refs log tree commit diff
path: root/src/util/migrations/1633864669243-EmojiUser.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/migrations/1633864669243-EmojiUser.ts')
-rw-r--r--src/util/migrations/1633864669243-EmojiUser.ts12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/util/migrations/1633864669243-EmojiUser.ts b/src/util/migrations/1633864669243-EmojiUser.ts
index 982405d7..9610216b 100644
--- a/src/util/migrations/1633864669243-EmojiUser.ts
+++ b/src/util/migrations/1633864669243-EmojiUser.ts
@@ -7,17 +7,21 @@ export class EmojiUser1633864669243 implements MigrationInterface {
 		await queryRunner.query(`ALTER TABLE "emojis" ADD "user_id" varchar`);
 		try {
 			await queryRunner.query(
-				`ALTER TABLE "emojis" ADD CONSTRAINT FK_fa7ddd5f9a214e28ce596548421 FOREIGN KEY (user_id) REFERENCES users(id)`
+				`ALTER TABLE "emojis" ADD CONSTRAINT FK_fa7ddd5f9a214e28ce596548421 FOREIGN KEY (user_id) REFERENCES users(id)`,
 			);
 		} catch (error) {
 			console.error(
-				"sqlite doesn't support altering foreign keys: https://stackoverflow.com/questions/1884818/how-do-i-add-a-foreign-key-to-an-existing-sqlite-table"
+				"sqlite doesn't support altering foreign keys: https://stackoverflow.com/questions/1884818/how-do-i-add-a-foreign-key-to-an-existing-sqlite-table",
 			);
 		}
 	}
 
 	public async down(queryRunner: QueryRunner): Promise<void> {
-		await queryRunner.query(`ALTER TABLE "emojis" DROP COLUMN column_name "user_id"`);
-		await queryRunner.query(`ALTER TABLE "emojis" DROP CONSTRAINT FK_fa7ddd5f9a214e28ce596548421`);
+		await queryRunner.query(
+			`ALTER TABLE "emojis" DROP COLUMN column_name "user_id"`,
+		);
+		await queryRunner.query(
+			`ALTER TABLE "emojis" DROP CONSTRAINT FK_fa7ddd5f9a214e28ce596548421`,
+		);
 	}
 }