From 008e3fb37e417a55cfbe41b1d18933a7d5298208 Mon Sep 17 00:00:00 2001
From: syuilo <Syuilotan@yahoo.co.jp>
Date: Sat, 8 Apr 2023 14:20:40 +0900
Subject: [PATCH] Create 1680931179228-account-move.js

---
 .../migration/1680931179228-account-move.js     | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 packages/backend/migration/1680931179228-account-move.js

diff --git a/packages/backend/migration/1680931179228-account-move.js b/packages/backend/migration/1680931179228-account-move.js
new file mode 100644
index 0000000000..821318d1bc
--- /dev/null
+++ b/packages/backend/migration/1680931179228-account-move.js
@@ -0,0 +1,17 @@
+export class AccountMove1680931179228 {
+    name = 'AccountMove1680931179228'
+
+    async up(queryRunner) {
+        await queryRunner.query(`ALTER TABLE "user" ADD "movedToUri" character varying(512)`);
+        await queryRunner.query(`COMMENT ON COLUMN "user"."movedToUri" IS 'The URI of the new account of the User'`);
+        await queryRunner.query(`ALTER TABLE "user" ADD "alsoKnownAs" text`);
+        await queryRunner.query(`COMMENT ON COLUMN "user"."alsoKnownAs" IS 'URIs the user is known as too'`);
+    }
+
+    async down(queryRunner) {
+        await queryRunner.query(`COMMENT ON COLUMN "user"."alsoKnownAs" IS 'URIs the user is known as too'`);
+        await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "alsoKnownAs"`);
+        await queryRunner.query(`COMMENT ON COLUMN "user"."movedToUri" IS 'The URI of the new account of the User'`);
+        await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "movedToUri"`);
+    }
+}
-- 
GitLab