1
0
Fork 1
mirror of https://example.com synced 2024-11-27 07:16:38 +09:00
firefish/packages/backend/migration/1669288094000-AddMovedToAndKnownAs.js
Kainoa Kanter 7fb130b06e formatting
2023-04-06 18:56:46 -07:00

21 lines
706 B
JavaScript

export class addMovedToAndKnownAs1669288094000 {
name = "addMovedToAndKnownAs1669288094000";
async up(queryRunner) {
await queryRunner.query(
`ALTER TABLE "user" ADD "movedToUri" character varying(512)`,
);
await queryRunner.query(`ALTER TABLE "user" ADD "alsoKnownAs" TEXT`);
await queryRunner.query(
`COMMENT ON COLUMN "user"."movedToUri" IS 'The URI of the new account of the User'`,
);
await queryRunner.query(
`COMMENT ON COLUMN "user"."alsoKnownAs" IS 'URIs the user is known as too'`,
);
}
async down(queryRunner) {
await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "movedToUri"`);
await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "alsoKnownAs"`);
}
}