mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-21 16:33:48 +01:00
[baackend] Move migrations to typescript
This commit is contained in:
parent
b335fda4b0
commit
1927151aed
@ -253,7 +253,7 @@ MongoDBは`null`で返してきてたので、その感覚で`if (x === null)`
|
|||||||
### Migration作成方法
|
### Migration作成方法
|
||||||
packages/backendで:
|
packages/backendで:
|
||||||
```sh
|
```sh
|
||||||
pnpm dlx typeorm migration:generate -d ormconfig.js -o <migration name>
|
yarn workspace backend run generatemigration src/migration/<migration name>
|
||||||
```
|
```
|
||||||
|
|
||||||
- 生成後、ファイルをmigration下に移してください
|
- 生成後、ファイルをmigration下に移してください
|
||||||
|
@ -1,10 +0,0 @@
|
|||||||
export class PinnedUsers1557476068003 {
|
|
||||||
async up(queryRunner) {
|
|
||||||
await queryRunner.query(
|
|
||||||
`ALTER TABLE "meta" ADD "pinnedUsers" character varying(256) array NOT NULL DEFAULT '{}'::varchar[]`,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
async down(queryRunner) {
|
|
||||||
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "pinnedUsers"`);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,10 +0,0 @@
|
|||||||
export class UserListJoining1558266512381 {
|
|
||||||
async up(queryRunner) {
|
|
||||||
await queryRunner.query(
|
|
||||||
`CREATE UNIQUE INDEX "IDX_90f7da835e4c10aca6853621e1" ON "user_list_joining" ("userId", "userListId") `,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
async down(queryRunner) {
|
|
||||||
await queryRunner.query(`DROP INDEX "IDX_90f7da835e4c10aca6853621e1"`);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,12 +0,0 @@
|
|||||||
export class PasswordLessLogin1562422242907 {
|
|
||||||
async up(queryRunner) {
|
|
||||||
await queryRunner.query(
|
|
||||||
`ALTER TABLE "user_profile" ADD COLUMN "usePasswordLessLogin" boolean DEFAULT false NOT NULL`,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
async down(queryRunner) {
|
|
||||||
await queryRunner.query(
|
|
||||||
`ALTER TABLE "user_profile" DROP COLUMN "usePasswordLessLogin"`,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,12 +0,0 @@
|
|||||||
export class PageTitleHideOption1562448332510 {
|
|
||||||
async up(queryRunner) {
|
|
||||||
await queryRunner.query(
|
|
||||||
`ALTER TABLE "page" ADD "hideTitleWhenPinned" boolean NOT NULL DEFAULT false`,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
async down(queryRunner) {
|
|
||||||
await queryRunner.query(
|
|
||||||
`ALTER TABLE "page" DROP COLUMN "hideTitleWhenPinned"`,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,10 +0,0 @@
|
|||||||
export class room1565634203341 {
|
|
||||||
async up(queryRunner) {
|
|
||||||
await queryRunner.query(
|
|
||||||
`ALTER TABLE "user_profile" ADD "room" jsonb NOT NULL DEFAULT '{}'`,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
async down(queryRunner) {
|
|
||||||
await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "room"`);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,14 +0,0 @@
|
|||||||
export class CustomEmojiCategory1571220798684 {
|
|
||||||
async up(queryRunner) {
|
|
||||||
await queryRunner.query(
|
|
||||||
`ALTER TABLE "emoji" ADD "category" character varying(128)`,
|
|
||||||
undefined,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
async down(queryRunner) {
|
|
||||||
await queryRunner.query(
|
|
||||||
`ALTER TABLE "emoji" DROP COLUMN "category"`,
|
|
||||||
undefined,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,13 +0,0 @@
|
|||||||
export class ad21620364649428 {
|
|
||||||
constructor() {
|
|
||||||
this.name = "ad21620364649428";
|
|
||||||
}
|
|
||||||
async up(queryRunner) {
|
|
||||||
await queryRunner.query(
|
|
||||||
`ALTER TABLE "ad" ADD "ratio" integer NOT NULL DEFAULT '1'`,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
async down(queryRunner) {
|
|
||||||
await queryRunner.query(`ALTER TABLE "ad" DROP COLUMN "ratio"`);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,9 +0,0 @@
|
|||||||
export class deleteLog1634902659689 {
|
|
||||||
constructor() {
|
|
||||||
this.name = "deleteLog1634902659689";
|
|
||||||
}
|
|
||||||
async up(queryRunner) {
|
|
||||||
await queryRunner.query(`DROP TABLE "log"`);
|
|
||||||
}
|
|
||||||
async down(queryRunner) {}
|
|
||||||
}
|
|
@ -1,13 +0,0 @@
|
|||||||
export class removeViaMobile1636697408073 {
|
|
||||||
name = "removeViaMobile1636697408073";
|
|
||||||
|
|
||||||
async up(queryRunner) {
|
|
||||||
await queryRunner.query(`ALTER TABLE "note" DROP COLUMN "viaMobile"`);
|
|
||||||
}
|
|
||||||
|
|
||||||
async down(queryRunner) {
|
|
||||||
await queryRunner.query(
|
|
||||||
`ALTER TABLE "note" ADD "viaMobile" boolean NOT NULL DEFAULT false`,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,13 +0,0 @@
|
|||||||
export class instanceThemeColor1644395759931 {
|
|
||||||
name = "instanceThemeColor1644395759931";
|
|
||||||
|
|
||||||
async up(queryRunner) {
|
|
||||||
await queryRunner.query(
|
|
||||||
`ALTER TABLE "meta" ADD "themeColor" character varying(512)`,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
async down(queryRunner) {
|
|
||||||
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "themeColor"`);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,10 +0,0 @@
|
|||||||
export class CustomMOTD1658939464003 {
|
|
||||||
async up(queryRunner) {
|
|
||||||
await queryRunner.query(
|
|
||||||
`ALTER TABLE "meta" ADD "customMOTD" character varying(256) array NOT NULL DEFAULT '{}'::varchar[]`,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
async down(queryRunner) {
|
|
||||||
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "customMOTD"`);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,12 +0,0 @@
|
|||||||
export class CustomSplashIcons1658941974648 {
|
|
||||||
async up(queryRunner) {
|
|
||||||
await queryRunner.query(
|
|
||||||
`ALTER TABLE "meta" ADD "customSplashIcons" character varying(256) array NOT NULL DEFAULT '{}'::varchar[]`,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
async down(queryRunner) {
|
|
||||||
await queryRunner.query(
|
|
||||||
`ALTER TABLE "meta" DROP COLUMN "customSplashIcons"`,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,10 +0,0 @@
|
|||||||
export class Page1668828368510 {
|
|
||||||
async up(queryRunner) {
|
|
||||||
await queryRunner.query(
|
|
||||||
`ALTER TABLE "page" ADD "isPublic" boolean NOT NULL DEFAULT true`,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
async down(queryRunner) {
|
|
||||||
await queryRunner.query(`ALTER TABLE "page" DROP COLUMN "isPublic"`);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,15 +0,0 @@
|
|||||||
export class FixFirefishAgain1668831378728 {
|
|
||||||
name = "FixFirefishAgain1668831378728";
|
|
||||||
|
|
||||||
async up(queryRunner) {
|
|
||||||
await queryRunner.query(
|
|
||||||
`UPDATE "meta" SET "useStarForReactionFallback" = TRUE`,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
async down(queryRunner) {
|
|
||||||
await queryRunner.query(
|
|
||||||
`UPDATE "meta" SET "useStarForReactionFallback" = FALSE`,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,13 +0,0 @@
|
|||||||
export class addPropsForCustomEmoji1678945242650 {
|
|
||||||
name = "addPropsForCustomEmoji1678945242650";
|
|
||||||
|
|
||||||
async up(queryRunner) {
|
|
||||||
await queryRunner.query(
|
|
||||||
`ALTER TABLE "emoji" ADD "license" character varying(1024)`,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
async down(queryRunner) {
|
|
||||||
await queryRunner.query(`ALTER TABLE "emoji" DROP COLUMN "license"`);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,10 +0,0 @@
|
|||||||
export class IndexNoteUrl1695748502971 {
|
|
||||||
name = "IndexNoteUrl1695748502971";
|
|
||||||
async up(queryRunner) {
|
|
||||||
await queryRunner.query(`CREATE INDEX IF NOT EXISTS "IDX_note_url" ON "note" ("url") `);
|
|
||||||
}
|
|
||||||
|
|
||||||
async down(queryRunner) {
|
|
||||||
await queryRunner.query(`DROP INDEX IF EXISTS "IDX_note_url"`);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,10 +0,0 @@
|
|||||||
export class IndexNoteUserId1695861526125 {
|
|
||||||
name = "IndexNoteUserId1695861526125";
|
|
||||||
async up(queryRunner) {
|
|
||||||
await queryRunner.query(`CREATE INDEX "IDX_note_userId_id" ON "note" ("userId", "id")`);
|
|
||||||
}
|
|
||||||
|
|
||||||
async down(queryRunner) {
|
|
||||||
await queryRunner.query(`DROP INDEX "IDX_note_userId_id"`);
|
|
||||||
}
|
|
||||||
}
|
|
@ -6,10 +6,9 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node ./built/index.js",
|
"start": "node ./built/index.js",
|
||||||
"start:test": "NODE_ENV=test node ./built/index.js",
|
"start:test": "NODE_ENV=test node ./built/index.js",
|
||||||
"migrate": "yarn migrate:typeorm",
|
"migrate": "typeorm migration:run -d built/ormconfig.js",
|
||||||
"migrate:typeorm": "typeorm migration:run -d ormconfig.js",
|
"revertmigration": "typeorm migration:revert -d built/ormconfig.js",
|
||||||
"revertmigration": "yarn revertmigration:typeorm",
|
"generatemigration": "yarn build && typeorm migration:generate -d built/ormconfig.js",
|
||||||
"revertmigration:typeorm": "typeorm migration:revert -d ormconfig.js",
|
|
||||||
"check:connect": "node ./check_connect.js",
|
"check:connect": "node ./check_connect.js",
|
||||||
"build": "swc src -d built -D",
|
"build": "swc src -d built -D",
|
||||||
"build:debug": "swc src -d built -s -D",
|
"build:debug": "swc src -d built -s -D",
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
export class Init1000000000000 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
async up(queryRunner) {
|
export class Init1000000000000 implements MigrationInterface {
|
||||||
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`CREATE TYPE "log_level_enum" AS ENUM('error', 'warning', 'info', 'success', 'debug')`,
|
`CREATE TYPE "log_level_enum" AS ENUM('error', 'warning', 'info', 'success', 'debug')`,
|
||||||
);
|
);
|
||||||
@ -712,7 +713,7 @@ export class Init1000000000000 {
|
|||||||
`ALTER TABLE "user_profile" ADD CONSTRAINT "FK_51cb79b5555effaf7d69ba1cff9" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
`ALTER TABLE "user_profile" ADD CONSTRAINT "FK_51cb79b5555effaf7d69ba1cff9" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "user_profile" DROP CONSTRAINT "FK_51cb79b5555effaf7d69ba1cff9"`,
|
`ALTER TABLE "user_profile" DROP CONSTRAINT "FK_51cb79b5555effaf7d69ba1cff9"`,
|
||||||
);
|
);
|
@ -1,5 +1,6 @@
|
|||||||
export class Pages1556348509290 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
async up(queryRunner) {
|
export class Pages1556348509290 implements MigrationInterface {
|
||||||
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`CREATE TYPE "page_visibility_enum" AS ENUM('public', 'followers', 'specified')`,
|
`CREATE TYPE "page_visibility_enum" AS ENUM('public', 'followers', 'specified')`,
|
||||||
);
|
);
|
||||||
@ -31,7 +32,7 @@ export class Pages1556348509290 {
|
|||||||
`ALTER TABLE "page" ADD CONSTRAINT "FK_3126dd7c502c9e4d7597ef7ef10" FOREIGN KEY ("eyeCatchingImageId") REFERENCES "drive_file"("id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
`ALTER TABLE "page" ADD CONSTRAINT "FK_3126dd7c502c9e4d7597ef7ef10" FOREIGN KEY ("eyeCatchingImageId") REFERENCES "drive_file"("id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "page" DROP CONSTRAINT "FK_3126dd7c502c9e4d7597ef7ef10"`,
|
`ALTER TABLE "page" DROP CONSTRAINT "FK_3126dd7c502c9e4d7597ef7ef10"`,
|
||||||
);
|
);
|
@ -1,5 +1,6 @@
|
|||||||
export class UserProfile1556746559567 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
async up(queryRunner) {
|
export class UserProfile1556746559567 implements MigrationInterface {
|
||||||
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "user_profile" ALTER COLUMN "githubId" TYPE VARCHAR(64) USING "githubId"::VARCHAR(64)`,
|
`ALTER TABLE "user_profile" ALTER COLUMN "githubId" TYPE VARCHAR(64) USING "githubId"::VARCHAR(64)`,
|
||||||
);
|
);
|
||||||
@ -7,7 +8,7 @@ export class UserProfile1556746559567 {
|
|||||||
`ALTER TABLE "user_profile" ALTER COLUMN "discordExpiresDate" TYPE VARCHAR(64) USING "discordExpiresDate"::VARCHAR(64)`,
|
`ALTER TABLE "user_profile" ALTER COLUMN "discordExpiresDate" TYPE VARCHAR(64) USING "discordExpiresDate"::VARCHAR(64)`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`UPDATE "user_profile" SET github = FALSE, discord = FALSE`,
|
`UPDATE "user_profile" SET github = FALSE, discord = FALSE`,
|
||||||
);
|
);
|
11
packages/backend/src/migration/1557476068003-PinnedUsers.ts
Normal file
11
packages/backend/src/migration/1557476068003-PinnedUsers.ts
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class PinnedUsers1557476068003 implements MigrationInterface {
|
||||||
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(
|
||||||
|
`ALTER TABLE "meta" ADD "pinnedUsers" character varying(256) array NOT NULL DEFAULT '{}'::varchar[]`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "pinnedUsers"`);
|
||||||
|
}
|
||||||
|
}
|
@ -1,5 +1,6 @@
|
|||||||
export class AddSomeUrls1557761316509 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
async up(queryRunner) {
|
export class AddSomeUrls1557761316509 implements MigrationInterface {
|
||||||
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "meta" ADD "ToSUrl" character varying(512)`,
|
`ALTER TABLE "meta" ADD "ToSUrl" character varying(512)`,
|
||||||
);
|
);
|
||||||
@ -10,7 +11,7 @@ export class AddSomeUrls1557761316509 {
|
|||||||
`ALTER TABLE "meta" ADD "feedbackUrl" character varying(512) DEFAULT 'https://codeberg.org/firefish/firefish/issues'`,
|
`ALTER TABLE "meta" ADD "feedbackUrl" character varying(512) DEFAULT 'https://codeberg.org/firefish/firefish/issues'`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "feedbackUrl"`);
|
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "feedbackUrl"`);
|
||||||
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "repositoryUrl"`);
|
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "repositoryUrl"`);
|
||||||
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "ToSUrl"`);
|
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "ToSUrl"`);
|
@ -1,5 +1,6 @@
|
|||||||
export class ObjectStorageSetting1557932705754 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
async up(queryRunner) {
|
export class ObjectStorageSetting1557932705754 implements MigrationInterface {
|
||||||
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "meta" ADD "useObjectStorage" boolean NOT NULL DEFAULT false`,
|
`ALTER TABLE "meta" ADD "useObjectStorage" boolean NOT NULL DEFAULT false`,
|
||||||
);
|
);
|
||||||
@ -31,7 +32,7 @@ export class ObjectStorageSetting1557932705754 {
|
|||||||
`ALTER TABLE "meta" ADD "objectStorageUseSSL" boolean NOT NULL DEFAULT true`,
|
`ALTER TABLE "meta" ADD "objectStorageUseSSL" boolean NOT NULL DEFAULT true`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "meta" DROP COLUMN "objectStorageUseSSL"`,
|
`ALTER TABLE "meta" DROP COLUMN "objectStorageUseSSL"`,
|
||||||
);
|
);
|
@ -1,5 +1,6 @@
|
|||||||
export class PageLike1558072954435 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
async up(queryRunner) {
|
export class PageLike1558072954435 implements MigrationInterface {
|
||||||
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`CREATE TABLE "page_like" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "pageId" character varying(32) NOT NULL, CONSTRAINT "PK_813f034843af992d3ae0f43c64c" PRIMARY KEY ("id"))`,
|
`CREATE TABLE "page_like" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "pageId" character varying(32) NOT NULL, CONSTRAINT "PK_813f034843af992d3ae0f43c64c" PRIMARY KEY ("id"))`,
|
||||||
);
|
);
|
||||||
@ -19,7 +20,7 @@ export class PageLike1558072954435 {
|
|||||||
`ALTER TABLE "page_like" ADD CONSTRAINT "FK_cf8782626dced3176038176a847" FOREIGN KEY ("pageId") REFERENCES "page"("id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
`ALTER TABLE "page_like" ADD CONSTRAINT "FK_cf8782626dced3176038176a847" FOREIGN KEY ("pageId") REFERENCES "page"("id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "page_like" DROP CONSTRAINT "FK_cf8782626dced3176038176a847"`,
|
`ALTER TABLE "page_like" DROP CONSTRAINT "FK_cf8782626dced3176038176a847"`,
|
||||||
);
|
);
|
@ -1,5 +1,6 @@
|
|||||||
export class UserGroup1558103093633 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
async up(queryRunner) {
|
export class UserGroup1558103093633 implements MigrationInterface {
|
||||||
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`CREATE TABLE "user_group" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "name" character varying(256) NOT NULL, "userId" character varying(32) NOT NULL, "isPrivate" boolean NOT NULL DEFAULT false, CONSTRAINT "PK_3c29fba6fe013ec8724378ce7c9" PRIMARY KEY ("id"))`,
|
`CREATE TABLE "user_group" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "name" character varying(256) NOT NULL, "userId" character varying(32) NOT NULL, "isPrivate" boolean NOT NULL DEFAULT false, CONSTRAINT "PK_3c29fba6fe013ec8724378ce7c9" PRIMARY KEY ("id"))`,
|
||||||
);
|
);
|
||||||
@ -46,7 +47,7 @@ export class UserGroup1558103093633 {
|
|||||||
`ALTER TABLE "user_group_joining" ADD CONSTRAINT "FK_67dc758bc0566985d1b3d399865" FOREIGN KEY ("userGroupId") REFERENCES "user_group"("id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
`ALTER TABLE "user_group_joining" ADD CONSTRAINT "FK_67dc758bc0566985d1b3d399865" FOREIGN KEY ("userGroupId") REFERENCES "user_group"("id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "user_group_joining" DROP CONSTRAINT "FK_67dc758bc0566985d1b3d399865"`,
|
`ALTER TABLE "user_group_joining" DROP CONSTRAINT "FK_67dc758bc0566985d1b3d399865"`,
|
||||||
);
|
);
|
@ -1,5 +1,6 @@
|
|||||||
export class UserGroupInvite1558257926829 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
async up(queryRunner) {
|
export class UserGroupInvite1558257926829 implements MigrationInterface {
|
||||||
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`CREATE TABLE "user_group_invite" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "userGroupId" character varying(32) NOT NULL, CONSTRAINT "PK_3893884af0d3a5f4d01e7921a97" PRIMARY KEY ("id"))`,
|
`CREATE TABLE "user_group_invite" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "userGroupId" character varying(32) NOT NULL, CONSTRAINT "PK_3893884af0d3a5f4d01e7921a97" PRIMARY KEY ("id"))`,
|
||||||
);
|
);
|
||||||
@ -22,7 +23,7 @@ export class UserGroupInvite1558257926829 {
|
|||||||
`ALTER TABLE "user_group_invite" ADD CONSTRAINT "FK_e10924607d058004304611a436a" FOREIGN KEY ("userGroupId") REFERENCES "user_group"("id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
`ALTER TABLE "user_group_invite" ADD CONSTRAINT "FK_e10924607d058004304611a436a" FOREIGN KEY ("userGroupId") REFERENCES "user_group"("id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "user_group_invite" DROP CONSTRAINT "FK_e10924607d058004304611a436a"`,
|
`ALTER TABLE "user_group_invite" DROP CONSTRAINT "FK_e10924607d058004304611a436a"`,
|
||||||
);
|
);
|
@ -0,0 +1,11 @@
|
|||||||
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class UserListJoining1558266512381 implements MigrationInterface {
|
||||||
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(
|
||||||
|
`CREATE UNIQUE INDEX "IDX_90f7da835e4c10aca6853621e1" ON "user_list_joining" ("userId", "userListId") `,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(`DROP INDEX "IDX_90f7da835e4c10aca6853621e1"`);
|
||||||
|
}
|
||||||
|
}
|
@ -1,5 +1,6 @@
|
|||||||
export class webauthn1561706992953 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
async up(queryRunner) {
|
export class webauthn1561706992953 implements MigrationInterface {
|
||||||
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`CREATE TABLE "attestation_challenge" ("id" character varying(32) NOT NULL, "userId" character varying(32) NOT NULL, "challenge" character varying(64) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "registrationChallenge" boolean NOT NULL DEFAULT false, CONSTRAINT "PK_d0ba6786e093f1bcb497572a6b5" PRIMARY KEY ("id", "userId"))`,
|
`CREATE TABLE "attestation_challenge" ("id" character varying(32) NOT NULL, "userId" character varying(32) NOT NULL, "challenge" character varying(64) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "registrationChallenge" boolean NOT NULL DEFAULT false, CONSTRAINT "PK_d0ba6786e093f1bcb497572a6b5" PRIMARY KEY ("id", "userId"))`,
|
||||||
);
|
);
|
||||||
@ -28,7 +29,7 @@ export class webauthn1561706992953 {
|
|||||||
`ALTER TABLE "user_security_key" ADD CONSTRAINT "FK_ff9ca3b5f3ee3d0681367a9b447" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
`ALTER TABLE "user_security_key" ADD CONSTRAINT "FK_ff9ca3b5f3ee3d0681367a9b447" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "user_security_key" DROP CONSTRAINT "FK_ff9ca3b5f3ee3d0681367a9b447"`,
|
`ALTER TABLE "user_security_key" DROP CONSTRAINT "FK_ff9ca3b5f3ee3d0681367a9b447"`,
|
||||||
);
|
);
|
@ -1,5 +1,6 @@
|
|||||||
export class ChartIndexes1561873850023 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
async up(queryRunner) {
|
export class ChartIndexes1561873850023 implements MigrationInterface {
|
||||||
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`CREATE INDEX "IDX_0ad37b7ef50f4ddc84363d7ccc" ON "__chart__active_users" ("date") `,
|
`CREATE INDEX "IDX_0ad37b7ef50f4ddc84363d7ccc" ON "__chart__active_users" ("date") `,
|
||||||
);
|
);
|
||||||
@ -271,7 +272,7 @@ export class ChartIndexes1561873850023 {
|
|||||||
`CREATE INDEX "IDX_a770a57c70e668cc61590c9161" ON "__chart__users" ("span", "date", "group") `,
|
`CREATE INDEX "IDX_a770a57c70e668cc61590c9161" ON "__chart__users" ("span", "date", "group") `,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(`DROP INDEX "IDX_a770a57c70e668cc61590c9161"`);
|
await queryRunner.query(`DROP INDEX "IDX_a770a57c70e668cc61590c9161"`);
|
||||||
await queryRunner.query(`DROP INDEX "IDX_337e9599f278bd7537fe30876f"`);
|
await queryRunner.query(`DROP INDEX "IDX_337e9599f278bd7537fe30876f"`);
|
||||||
await queryRunner.query(`DROP INDEX "IDX_f091abb24193d50c653c6b77fc"`);
|
await queryRunner.query(`DROP INDEX "IDX_f091abb24193d50c653c6b77fc"`);
|
@ -0,0 +1,13 @@
|
|||||||
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class PasswordLessLogin1562422242907 implements MigrationInterface {
|
||||||
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(
|
||||||
|
`ALTER TABLE "user_profile" ADD COLUMN "usePasswordLessLogin" boolean DEFAULT false NOT NULL`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(
|
||||||
|
`ALTER TABLE "user_profile" DROP COLUMN "usePasswordLessLogin"`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
@ -1,5 +1,6 @@
|
|||||||
export class PinnedPage1562444565093 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
async up(queryRunner) {
|
export class PinnedPage1562444565093 implements MigrationInterface {
|
||||||
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "user_profile" ADD "pinnedPageId" character varying(32)`,
|
`ALTER TABLE "user_profile" ADD "pinnedPageId" character varying(32)`,
|
||||||
);
|
);
|
||||||
@ -10,7 +11,7 @@ export class PinnedPage1562444565093 {
|
|||||||
`ALTER TABLE "user_profile" ADD CONSTRAINT "FK_6dc44f1ceb65b1e72bacef2ca27" FOREIGN KEY ("pinnedPageId") REFERENCES "page"("id") ON DELETE SET NULL ON UPDATE NO ACTION`,
|
`ALTER TABLE "user_profile" ADD CONSTRAINT "FK_6dc44f1ceb65b1e72bacef2ca27" FOREIGN KEY ("pinnedPageId") REFERENCES "page"("id") ON DELETE SET NULL ON UPDATE NO ACTION`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "user_profile" DROP CONSTRAINT "FK_6dc44f1ceb65b1e72bacef2ca27"`,
|
`ALTER TABLE "user_profile" DROP CONSTRAINT "FK_6dc44f1ceb65b1e72bacef2ca27"`,
|
||||||
);
|
);
|
@ -0,0 +1,13 @@
|
|||||||
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class PageTitleHideOption1562448332510 implements MigrationInterface {
|
||||||
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(
|
||||||
|
`ALTER TABLE "page" ADD "hideTitleWhenPinned" boolean NOT NULL DEFAULT false`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(
|
||||||
|
`ALTER TABLE "page" DROP COLUMN "hideTitleWhenPinned"`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
@ -1,5 +1,6 @@
|
|||||||
export class ModerationLog1562869971568 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
async up(queryRunner) {
|
export class ModerationLog1562869971568 implements MigrationInterface {
|
||||||
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`CREATE TABLE "moderation_log" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "type" character varying(128) NOT NULL, "info" jsonb NOT NULL, CONSTRAINT "PK_d0adca6ecfd068db83e4526cc26" PRIMARY KEY ("id"))`,
|
`CREATE TABLE "moderation_log" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "type" character varying(128) NOT NULL, "info" jsonb NOT NULL, CONSTRAINT "PK_d0adca6ecfd068db83e4526cc26" PRIMARY KEY ("id"))`,
|
||||||
);
|
);
|
||||||
@ -10,7 +11,7 @@ export class ModerationLog1562869971568 {
|
|||||||
`ALTER TABLE "moderation_log" ADD CONSTRAINT "FK_a08ad074601d204e0f69da9a954" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
`ALTER TABLE "moderation_log" ADD CONSTRAINT "FK_a08ad074601d204e0f69da9a954" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "moderation_log" DROP CONSTRAINT "FK_a08ad074601d204e0f69da9a954"`,
|
`ALTER TABLE "moderation_log" DROP CONSTRAINT "FK_a08ad074601d204e0f69da9a954"`,
|
||||||
);
|
);
|
@ -1,10 +1,11 @@
|
|||||||
export class UsedUsername1563757595828 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
async up(queryRunner) {
|
export class UsedUsername1563757595828 implements MigrationInterface {
|
||||||
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`CREATE TABLE "used_username" ("username" character varying(128) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, CONSTRAINT "PK_78fd79d2d24c6ac2f4cc9a31a5d" PRIMARY KEY ("username"))`,
|
`CREATE TABLE "used_username" ("username" character varying(128) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, CONSTRAINT "PK_78fd79d2d24c6ac2f4cc9a31a5d" PRIMARY KEY ("username"))`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(`DROP TABLE "used_username"`);
|
await queryRunner.query(`DROP TABLE "used_username"`);
|
||||||
}
|
}
|
||||||
}
|
}
|
11
packages/backend/src/migration/1565634203341-room.ts
Normal file
11
packages/backend/src/migration/1565634203341-room.ts
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class room1565634203341 implements MigrationInterface {
|
||||||
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(
|
||||||
|
`ALTER TABLE "user_profile" ADD "room" jsonb NOT NULL DEFAULT '{}'`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "room"`);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class CustomEmojiCategory1571220798684 implements MigrationInterface {
|
||||||
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(
|
||||||
|
`ALTER TABLE "emoji" ADD "category" character varying(128)`,
|
||||||
|
undefined,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(
|
||||||
|
`ALTER TABLE "emoji" DROP COLUMN "category"`,
|
||||||
|
undefined,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
@ -1,5 +1,6 @@
|
|||||||
export class nodeinfo1572760203493 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
async up(queryRunner) {
|
export class nodeinfo1572760203493 implements MigrationInterface {
|
||||||
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "instance" DROP COLUMN "system"`,
|
`ALTER TABLE "instance" DROP COLUMN "system"`,
|
||||||
undefined,
|
undefined,
|
||||||
@ -37,7 +38,7 @@ export class nodeinfo1572760203493 {
|
|||||||
undefined,
|
undefined,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "instance" DROP COLUMN "infoUpdatedAt"`,
|
`ALTER TABLE "instance" DROP COLUMN "infoUpdatedAt"`,
|
||||||
undefined,
|
undefined,
|
@ -1,14 +1,15 @@
|
|||||||
export class TalkFederationId1576269851876 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class TalkFederationId1576269851876 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "TalkFederationId1576269851876";
|
this.name = "TalkFederationId1576269851876";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "messaging_message" ADD "uri" character varying(512)`,
|
`ALTER TABLE "messaging_message" ADD "uri" character varying(512)`,
|
||||||
undefined,
|
undefined,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "messaging_message" DROP COLUMN "uri"`,
|
`ALTER TABLE "messaging_message" DROP COLUMN "uri"`,
|
||||||
undefined,
|
undefined,
|
@ -1,14 +1,15 @@
|
|||||||
export class ProxyRemoteFiles1576869585998 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class ProxyRemoteFiles1576869585998 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "ProxyRemoteFiles1576869585998";
|
this.name = "ProxyRemoteFiles1576869585998";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "meta" ADD "proxyRemoteFiles" boolean NOT NULL DEFAULT false`,
|
`ALTER TABLE "meta" ADD "proxyRemoteFiles" boolean NOT NULL DEFAULT false`,
|
||||||
undefined,
|
undefined,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "meta" DROP COLUMN "proxyRemoteFiles"`,
|
`ALTER TABLE "meta" DROP COLUMN "proxyRemoteFiles"`,
|
||||||
undefined,
|
undefined,
|
@ -1,8 +1,9 @@
|
|||||||
export class v121579267006611 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class v121579267006611 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "v121579267006611";
|
this.name = "v121579267006611";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`CREATE TABLE "announcement" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "text" character varying(8192) NOT NULL, "title" character varying(256) NOT NULL, "imageUrl" character varying(1024), CONSTRAINT "PK_e0ef0550174fd1099a308fd18a0" PRIMARY KEY ("id"))`,
|
`CREATE TABLE "announcement" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "text" character varying(8192) NOT NULL, "title" character varying(256) NOT NULL, "imageUrl" character varying(1024), CONSTRAINT "PK_e0ef0550174fd1099a308fd18a0" PRIMARY KEY ("id"))`,
|
||||||
undefined,
|
undefined,
|
||||||
@ -48,7 +49,7 @@ export class v121579267006611 {
|
|||||||
undefined,
|
undefined,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "announcement_read" DROP CONSTRAINT "FK_603a7b1e7aa0533c6c88e9bfafe"`,
|
`ALTER TABLE "announcement_read" DROP CONSTRAINT "FK_603a7b1e7aa0533c6c88e9bfafe"`,
|
||||||
undefined,
|
undefined,
|
@ -1,14 +1,15 @@
|
|||||||
export class v1221579270193251 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class v1221579270193251 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "v1221579270193251";
|
this.name = "v1221579270193251";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "announcement_read" ADD "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL`,
|
`ALTER TABLE "announcement_read" ADD "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL`,
|
||||||
undefined,
|
undefined,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "announcement_read" DROP COLUMN "createdAt"`,
|
`ALTER TABLE "announcement_read" DROP COLUMN "createdAt"`,
|
||||||
undefined,
|
undefined,
|
@ -1,14 +1,15 @@
|
|||||||
export class v1231579282808087 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class v1231579282808087 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "v1231579282808087";
|
this.name = "v1231579282808087";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "announcement" ADD "updatedAt" TIMESTAMP WITH TIME ZONE`,
|
`ALTER TABLE "announcement" ADD "updatedAt" TIMESTAMP WITH TIME ZONE`,
|
||||||
undefined,
|
undefined,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "announcement" DROP COLUMN "updatedAt"`,
|
`ALTER TABLE "announcement" DROP COLUMN "updatedAt"`,
|
||||||
undefined,
|
undefined,
|
@ -1,8 +1,9 @@
|
|||||||
export class v1241579544426412 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class v1241579544426412 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "v1241579544426412";
|
this.name = "v1241579544426412";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "notification" ADD "followRequestId" character varying(32)`,
|
`ALTER TABLE "notification" ADD "followRequestId" character varying(32)`,
|
||||||
undefined,
|
undefined,
|
||||||
@ -12,7 +13,7 @@ export class v1241579544426412 {
|
|||||||
undefined,
|
undefined,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "notification" DROP CONSTRAINT "FK_bd7fab507621e635b32cd31892c"`,
|
`ALTER TABLE "notification" DROP CONSTRAINT "FK_bd7fab507621e635b32cd31892c"`,
|
||||||
undefined,
|
undefined,
|
@ -1,8 +1,9 @@
|
|||||||
export class v1251579977526288 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class v1251579977526288 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "v1251579977526288";
|
this.name = "v1251579977526288";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`CREATE TABLE "clip" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "name" character varying(128) NOT NULL, "isPublic" boolean NOT NULL DEFAULT false, CONSTRAINT "PK_f0685dac8d4dd056d7255670b75" PRIMARY KEY ("id"))`,
|
`CREATE TABLE "clip" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "name" character varying(128) NOT NULL, "isPublic" boolean NOT NULL DEFAULT false, CONSTRAINT "PK_f0685dac8d4dd056d7255670b75" PRIMARY KEY ("id"))`,
|
||||||
undefined,
|
undefined,
|
||||||
@ -85,7 +86,7 @@ export class v1251579977526288 {
|
|||||||
undefined,
|
undefined,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "antenna_note" DROP CONSTRAINT "FK_0d775946662d2575dfd2068a5f5"`,
|
`ALTER TABLE "antenna_note" DROP CONSTRAINT "FK_0d775946662d2575dfd2068a5f5"`,
|
||||||
undefined,
|
undefined,
|
@ -1,8 +1,9 @@
|
|||||||
export class v1261579993013959 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class v1261579993013959 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "v1261579993013959";
|
this.name = "v1261579993013959";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "antenna" DROP COLUMN "hasNewNote"`,
|
`ALTER TABLE "antenna" DROP COLUMN "hasNewNote"`,
|
||||||
undefined,
|
undefined,
|
||||||
@ -16,7 +17,7 @@ export class v1261579993013959 {
|
|||||||
undefined,
|
undefined,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`DROP INDEX "IDX_9937ea48d7ae97ffb4f3f063a4"`,
|
`DROP INDEX "IDX_9937ea48d7ae97ffb4f3f063a4"`,
|
||||||
undefined,
|
undefined,
|
@ -1,8 +1,9 @@
|
|||||||
export class v1271580069531114 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class v1271580069531114 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "v1271580069531114";
|
this.name = "v1271580069531114";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "antenna" ADD "users" character varying(1024) array NOT NULL DEFAULT '{}'::varchar[]`,
|
`ALTER TABLE "antenna" ADD "users" character varying(1024) array NOT NULL DEFAULT '{}'::varchar[]`,
|
||||||
undefined,
|
undefined,
|
||||||
@ -25,7 +26,7 @@ export class v1271580069531114 {
|
|||||||
);
|
);
|
||||||
await queryRunner.query(`DROP TYPE "antenna_src_enum_old"`, undefined);
|
await queryRunner.query(`DROP TYPE "antenna_src_enum_old"`, undefined);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`CREATE TYPE "antenna_src_enum_old" AS ENUM('home', 'all', 'list')`,
|
`CREATE TYPE "antenna_src_enum_old" AS ENUM('home', 'all', 'list')`,
|
||||||
undefined,
|
undefined,
|
@ -1,8 +1,9 @@
|
|||||||
export class v1281580148575182 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class v1281580148575182 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "v1281580148575182";
|
this.name = "v1281580148575182";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "note" DROP CONSTRAINT "FK_ec5c201576192ba8904c345c5cc"`,
|
`ALTER TABLE "note" DROP CONSTRAINT "FK_ec5c201576192ba8904c345c5cc"`,
|
||||||
undefined,
|
undefined,
|
||||||
@ -12,7 +13,7 @@ export class v1281580148575182 {
|
|||||||
undefined,
|
undefined,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "note" ADD "appId" character varying(32)`,
|
`ALTER TABLE "note" ADD "appId" character varying(32)`,
|
||||||
undefined,
|
undefined,
|
@ -1,14 +1,15 @@
|
|||||||
export class v1291580154400017 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class v1291580154400017 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "v1291580154400017";
|
this.name = "v1291580154400017";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "antenna" ADD "withReplies" boolean NOT NULL DEFAULT false`,
|
`ALTER TABLE "antenna" ADD "withReplies" boolean NOT NULL DEFAULT false`,
|
||||||
undefined,
|
undefined,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "antenna" DROP COLUMN "withReplies"`,
|
`ALTER TABLE "antenna" DROP COLUMN "withReplies"`,
|
||||||
undefined,
|
undefined,
|
@ -1,8 +1,9 @@
|
|||||||
export class v12101580276619901 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class v12101580276619901 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "v12101580276619901";
|
this.name = "v12101580276619901";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(`TRUNCATE TABLE "notification"`, undefined);
|
await queryRunner.query(`TRUNCATE TABLE "notification"`, undefined);
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "notification" DROP COLUMN "type"`,
|
`ALTER TABLE "notification" DROP COLUMN "type"`,
|
||||||
@ -17,7 +18,7 @@ export class v12101580276619901 {
|
|||||||
undefined,
|
undefined,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "notification" DROP COLUMN "type"`,
|
`ALTER TABLE "notification" DROP COLUMN "type"`,
|
||||||
undefined,
|
undefined,
|
@ -1,8 +1,9 @@
|
|||||||
export class v12111580331224276 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class v12111580331224276 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "v12111580331224276";
|
this.name = "v12111580331224276";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "instance" DROP COLUMN "isMarkedAsClosed"`,
|
`ALTER TABLE "instance" DROP COLUMN "isMarkedAsClosed"`,
|
||||||
undefined,
|
undefined,
|
||||||
@ -16,7 +17,7 @@ export class v12111580331224276 {
|
|||||||
undefined,
|
undefined,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`DROP INDEX "IDX_34500da2e38ac393f7bb6b299c"`,
|
`DROP INDEX "IDX_34500da2e38ac393f7bb6b299c"`,
|
||||||
undefined,
|
undefined,
|
@ -1,8 +1,9 @@
|
|||||||
export class v12121580508795118 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class v12121580508795118 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "v12121580508795118";
|
this.name = "v12121580508795118";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "user_profile" DROP COLUMN "twitter"`,
|
`ALTER TABLE "user_profile" DROP COLUMN "twitter"`,
|
||||||
undefined,
|
undefined,
|
||||||
@ -72,7 +73,7 @@ export class v12121580508795118 {
|
|||||||
undefined,
|
undefined,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "user_profile" DROP COLUMN "integrations"`,
|
`ALTER TABLE "user_profile" DROP COLUMN "integrations"`,
|
||||||
undefined,
|
undefined,
|
@ -1,14 +1,15 @@
|
|||||||
export class v12131580543501339 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class v12131580543501339 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "v12131580543501339";
|
this.name = "v12131580543501339";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`CREATE INDEX "IDX_NOTE_TAGS" ON "note" USING gin ("tags")`,
|
`CREATE INDEX "IDX_NOTE_TAGS" ON "note" USING gin ("tags")`,
|
||||||
undefined,
|
undefined,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(`DROP INDEX "IDX_NOTE_TAGS"`, undefined);
|
await queryRunner.query(`DROP INDEX "IDX_NOTE_TAGS"`, undefined);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,8 +1,9 @@
|
|||||||
export class v12141580864313253 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class v12141580864313253 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "v12141580864313253";
|
this.name = "v12141580864313253";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "meta" RENAME COLUMN "proxyAccount" TO "proxyAccountId"`,
|
`ALTER TABLE "meta" RENAME COLUMN "proxyAccount" TO "proxyAccountId"`,
|
||||||
undefined,
|
undefined,
|
||||||
@ -20,7 +21,7 @@ export class v12141580864313253 {
|
|||||||
undefined,
|
undefined,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "meta" DROP CONSTRAINT "FK_ab1bc0c1e209daa77b8e8d212ad"`,
|
`ALTER TABLE "meta" DROP CONSTRAINT "FK_ab1bc0c1e209daa77b8e8d212ad"`,
|
||||||
undefined,
|
undefined,
|
@ -1,8 +1,9 @@
|
|||||||
export class userGroupInvitation1581526429287 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class userGroupInvitation1581526429287 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "userGroupInvitation1581526429287";
|
this.name = "userGroupInvitation1581526429287";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`CREATE TABLE "user_group_invitation" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "userGroupId" character varying(32) NOT NULL, CONSTRAINT "PK_160c63ec02bf23f6a5c5e8140d6" PRIMARY KEY ("id"))`,
|
`CREATE TABLE "user_group_invitation" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "userGroupId" character varying(32) NOT NULL, CONSTRAINT "PK_160c63ec02bf23f6a5c5e8140d6" PRIMARY KEY ("id"))`,
|
||||||
undefined,
|
undefined,
|
||||||
@ -56,7 +57,7 @@ export class userGroupInvitation1581526429287 {
|
|||||||
undefined,
|
undefined,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "notification" DROP CONSTRAINT "FK_8fe87814e978053a53b1beb7e98"`,
|
`ALTER TABLE "notification" DROP CONSTRAINT "FK_8fe87814e978053a53b1beb7e98"`,
|
||||||
undefined,
|
undefined,
|
@ -1,8 +1,9 @@
|
|||||||
export class userGroupAntenna1581695816408 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class userGroupAntenna1581695816408 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "userGroupAntenna1581695816408";
|
this.name = "userGroupAntenna1581695816408";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "antenna" ADD "userGroupJoiningId" character varying(32)`,
|
`ALTER TABLE "antenna" ADD "userGroupJoiningId" character varying(32)`,
|
||||||
undefined,
|
undefined,
|
||||||
@ -33,7 +34,7 @@ export class userGroupAntenna1581695816408 {
|
|||||||
undefined,
|
undefined,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "antenna" DROP CONSTRAINT "FK_ccbf5a8c0be4511133dcc50ddeb"`,
|
`ALTER TABLE "antenna" DROP CONSTRAINT "FK_ccbf5a8c0be4511133dcc50ddeb"`,
|
||||||
undefined,
|
undefined,
|
@ -1,14 +1,15 @@
|
|||||||
export class driveUserFolderIdIndex1581708415836 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class driveUserFolderIdIndex1581708415836 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "driveUserFolderIdIndex1581708415836";
|
this.name = "driveUserFolderIdIndex1581708415836";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`CREATE INDEX "IDX_55720b33a61a7c806a8215b825" ON "drive_file" ("userId", "folderId", "id") `,
|
`CREATE INDEX "IDX_55720b33a61a7c806a8215b825" ON "drive_file" ("userId", "folderId", "id") `,
|
||||||
undefined,
|
undefined,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`DROP INDEX "IDX_55720b33a61a7c806a8215b825"`,
|
`DROP INDEX "IDX_55720b33a61a7c806a8215b825"`,
|
||||||
undefined,
|
undefined,
|
@ -1,8 +1,9 @@
|
|||||||
export class promo1581979837262 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class promo1581979837262 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "promo1581979837262";
|
this.name = "promo1581979837262";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`CREATE TABLE "promo_note" ("noteId" character varying(32) NOT NULL, "expiresAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, CONSTRAINT "REL_e263909ca4fe5d57f8d4230dd5" UNIQUE ("noteId"), CONSTRAINT "PK_e263909ca4fe5d57f8d4230dd5c" PRIMARY KEY ("noteId"))`,
|
`CREATE TABLE "promo_note" ("noteId" character varying(32) NOT NULL, "expiresAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, CONSTRAINT "REL_e263909ca4fe5d57f8d4230dd5" UNIQUE ("noteId"), CONSTRAINT "PK_e263909ca4fe5d57f8d4230dd5c" PRIMARY KEY ("noteId"))`,
|
||||||
undefined,
|
undefined,
|
||||||
@ -36,7 +37,7 @@ export class promo1581979837262 {
|
|||||||
undefined,
|
undefined,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "promo_read" DROP CONSTRAINT "FK_a46a1a603ecee695d7db26da5f4"`,
|
`ALTER TABLE "promo_read" DROP CONSTRAINT "FK_a46a1a603ecee695d7db26da5f4"`,
|
||||||
undefined,
|
undefined,
|
@ -1,14 +1,15 @@
|
|||||||
export class featuredInjecttion1582019042083 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class featuredInjecttion1582019042083 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "featuredInjecttion1582019042083";
|
this.name = "featuredInjecttion1582019042083";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "user_profile" ADD "injectFeaturedNote" boolean NOT NULL DEFAULT true`,
|
`ALTER TABLE "user_profile" ADD "injectFeaturedNote" boolean NOT NULL DEFAULT true`,
|
||||||
undefined,
|
undefined,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "user_profile" DROP COLUMN "injectFeaturedNote"`,
|
`ALTER TABLE "user_profile" DROP COLUMN "injectFeaturedNote"`,
|
||||||
undefined,
|
undefined,
|
@ -1,14 +1,15 @@
|
|||||||
export class antennaExclude1582210532752 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class antennaExclude1582210532752 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "antennaExclude1582210532752";
|
this.name = "antennaExclude1582210532752";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "antenna" ADD "excludeKeywords" jsonb NOT NULL DEFAULT '[]'`,
|
`ALTER TABLE "antenna" ADD "excludeKeywords" jsonb NOT NULL DEFAULT '[]'`,
|
||||||
undefined,
|
undefined,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "antenna" DROP COLUMN "excludeKeywords"`,
|
`ALTER TABLE "antenna" DROP COLUMN "excludeKeywords"`,
|
||||||
undefined,
|
undefined,
|
@ -1,14 +1,15 @@
|
|||||||
export class noteReactionLength1582875306439 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class noteReactionLength1582875306439 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "noteReactionLength1582875306439";
|
this.name = "noteReactionLength1582875306439";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "note_reaction" ALTER COLUMN "reaction" TYPE character varying(130)`,
|
`ALTER TABLE "note_reaction" ALTER COLUMN "reaction" TYPE character varying(130)`,
|
||||||
undefined,
|
undefined,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "note_reaction" ALTER COLUMN "reaction" TYPE character varying(128)`,
|
`ALTER TABLE "note_reaction" ALTER COLUMN "reaction" TYPE character varying(128)`,
|
||||||
undefined,
|
undefined,
|
@ -1,8 +1,9 @@
|
|||||||
export class miauth1585361548360 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class miauth1585361548360 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "miauth1585361548360";
|
this.name = "miauth1585361548360";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "access_token" ADD "lastUsedAt" TIMESTAMP WITH TIME ZONE DEFAULT null`,
|
`ALTER TABLE "access_token" ADD "lastUsedAt" TIMESTAMP WITH TIME ZONE DEFAULT null`,
|
||||||
undefined,
|
undefined,
|
||||||
@ -52,7 +53,7 @@ export class miauth1585361548360 {
|
|||||||
undefined,
|
undefined,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "access_token" DROP CONSTRAINT "FK_a3ff16c90cc87a82a0b5959e560"`,
|
`ALTER TABLE "access_token" DROP CONSTRAINT "FK_a3ff16c90cc87a82a0b5959e560"`,
|
||||||
undefined,
|
undefined,
|
@ -1,8 +1,9 @@
|
|||||||
export class customNotification1585385921215 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class customNotification1585385921215 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "customNotification1585385921215";
|
this.name = "customNotification1585385921215";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "notification" ADD "customBody" character varying(2048)`,
|
`ALTER TABLE "notification" ADD "customBody" character varying(2048)`,
|
||||||
undefined,
|
undefined,
|
||||||
@ -76,7 +77,7 @@ export class customNotification1585385921215 {
|
|||||||
undefined,
|
undefined,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "notification" DROP CONSTRAINT "FK_e22bf6bda77b6adc1fd9e75c8c9"`,
|
`ALTER TABLE "notification" DROP CONSTRAINT "FK_e22bf6bda77b6adc1fd9e75c8c9"`,
|
||||||
undefined,
|
undefined,
|
@ -1,14 +1,15 @@
|
|||||||
export class apUrl1585772678853 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class apUrl1585772678853 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "apUrl1585772678853";
|
this.name = "apUrl1585772678853";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "note" ADD "url" character varying(512)`,
|
`ALTER TABLE "note" ADD "url" character varying(512)`,
|
||||||
undefined,
|
undefined,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(`ALTER TABLE "note" DROP COLUMN "url"`, undefined);
|
await queryRunner.query(`ALTER TABLE "note" DROP COLUMN "url"`, undefined);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,14 +1,15 @@
|
|||||||
export class AddObjectStorageUseProxy1586624197029 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class AddObjectStorageUseProxy1586624197029 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "AddObjectStorageUseProxy1586624197029";
|
this.name = "AddObjectStorageUseProxy1586624197029";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "meta" ADD "objectStorageUseProxy" boolean NOT NULL DEFAULT true`,
|
`ALTER TABLE "meta" ADD "objectStorageUseProxy" boolean NOT NULL DEFAULT true`,
|
||||||
undefined,
|
undefined,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "meta" DROP COLUMN "objectStorageUseProxy"`,
|
`ALTER TABLE "meta" DROP COLUMN "objectStorageUseProxy"`,
|
||||||
undefined,
|
undefined,
|
@ -1,14 +1,15 @@
|
|||||||
export class remoteReaction1586641139527 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class remoteReaction1586641139527 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "remoteReaction1586641139527";
|
this.name = "remoteReaction1586641139527";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "note_reaction" ALTER COLUMN "reaction" TYPE character varying(260)`,
|
`ALTER TABLE "note_reaction" ALTER COLUMN "reaction" TYPE character varying(260)`,
|
||||||
undefined,
|
undefined,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "note_reaction" ALTER COLUMN "reaction" TYPE character varying(130)`,
|
`ALTER TABLE "note_reaction" ALTER COLUMN "reaction" TYPE character varying(130)`,
|
||||||
undefined,
|
undefined,
|
@ -1,14 +1,15 @@
|
|||||||
export class pageAiScript1586708940386 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class pageAiScript1586708940386 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "pageAiScript1586708940386";
|
this.name = "pageAiScript1586708940386";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "page" ADD "script" character varying(16384) NOT NULL DEFAULT ''`,
|
`ALTER TABLE "page" ADD "script" character varying(16384) NOT NULL DEFAULT ''`,
|
||||||
undefined,
|
undefined,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "page" DROP COLUMN "script"`,
|
`ALTER TABLE "page" DROP COLUMN "script"`,
|
||||||
undefined,
|
undefined,
|
@ -1,8 +1,9 @@
|
|||||||
export class hCaptcha1588044505511 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class hCaptcha1588044505511 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "hCaptcha1588044505511";
|
this.name = "hCaptcha1588044505511";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "meta" ADD "enableHcaptcha" boolean NOT NULL DEFAULT false`,
|
`ALTER TABLE "meta" ADD "enableHcaptcha" boolean NOT NULL DEFAULT false`,
|
||||||
undefined,
|
undefined,
|
||||||
@ -16,7 +17,7 @@ export class hCaptcha1588044505511 {
|
|||||||
undefined,
|
undefined,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "meta" DROP COLUMN "hcaptchaSecretKey"`,
|
`ALTER TABLE "meta" DROP COLUMN "hcaptchaSecretKey"`,
|
||||||
undefined,
|
undefined,
|
@ -1,8 +1,9 @@
|
|||||||
export class pubRelay1589023282116 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class pubRelay1589023282116 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "pubRelay1589023282116";
|
this.name = "pubRelay1589023282116";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`CREATE TYPE "relay_status_enum" AS ENUM('requesting', 'accepted', 'rejected')`,
|
`CREATE TYPE "relay_status_enum" AS ENUM('requesting', 'accepted', 'rejected')`,
|
||||||
undefined,
|
undefined,
|
||||||
@ -16,7 +17,7 @@ export class pubRelay1589023282116 {
|
|||||||
undefined,
|
undefined,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`DROP INDEX "IDX_0d9a1738f2cf7f3b1c3334dfab"`,
|
`DROP INDEX "IDX_0d9a1738f2cf7f3b1c3334dfab"`,
|
||||||
undefined,
|
undefined,
|
@ -1,13 +1,14 @@
|
|||||||
export class blurhash1595075960584 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class blurhash1595075960584 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "blurhash1595075960584";
|
this.name = "blurhash1595075960584";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "drive_file" ADD "blurhash" character varying(128)`,
|
`ALTER TABLE "drive_file" ADD "blurhash" character varying(128)`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(`ALTER TABLE "drive_file" DROP COLUMN "blurhash"`);
|
await queryRunner.query(`ALTER TABLE "drive_file" DROP COLUMN "blurhash"`);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,8 +1,9 @@
|
|||||||
export class blurhashForAvatarBanner1595077605646 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class blurhashForAvatarBanner1595077605646 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "blurhashForAvatarBanner1595077605646";
|
this.name = "blurhashForAvatarBanner1595077605646";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "avatarColor"`);
|
await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "avatarColor"`);
|
||||||
await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "bannerColor"`);
|
await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "bannerColor"`);
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
@ -12,7 +13,7 @@ export class blurhashForAvatarBanner1595077605646 {
|
|||||||
`ALTER TABLE "user" ADD "bannerBlurhash" character varying(128)`,
|
`ALTER TABLE "user" ADD "bannerBlurhash" character varying(128)`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "bannerBlurhash"`);
|
await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "bannerBlurhash"`);
|
||||||
await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "avatarBlurhash"`);
|
await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "avatarBlurhash"`);
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
@ -1,13 +1,14 @@
|
|||||||
export class instanceIconUrl1595676934834 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class instanceIconUrl1595676934834 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "instanceIconUrl1595676934834";
|
this.name = "instanceIconUrl1595676934834";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "instance" ADD "iconUrl" character varying(256) DEFAULT null`,
|
`ALTER TABLE "instance" ADD "iconUrl" character varying(256) DEFAULT null`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(`ALTER TABLE "instance" DROP COLUMN "iconUrl"`);
|
await queryRunner.query(`ALTER TABLE "instance" DROP COLUMN "iconUrl"`);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,8 +1,9 @@
|
|||||||
export class wordMute1595771249699 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class wordMute1595771249699 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "wordMute1595771249699";
|
this.name = "wordMute1595771249699";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`CREATE TABLE "muted_note" ("id" character varying(32) NOT NULL, "noteId" character varying(32) NOT NULL, "userId" character varying(32) NOT NULL, CONSTRAINT "PK_897e2eff1c0b9b64e55ca1418a4" PRIMARY KEY ("id"))`,
|
`CREATE TABLE "muted_note" ("id" character varying(32) NOT NULL, "noteId" character varying(32) NOT NULL, "userId" character varying(32) NOT NULL, CONSTRAINT "PK_897e2eff1c0b9b64e55ca1418a4" PRIMARY KEY ("id"))`,
|
||||||
);
|
);
|
||||||
@ -31,7 +32,7 @@ export class wordMute1595771249699 {
|
|||||||
`ALTER TABLE "muted_note" ADD CONSTRAINT "FK_d8e07aa18c2d64e86201601aec1" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
`ALTER TABLE "muted_note" ADD CONSTRAINT "FK_d8e07aa18c2d64e86201601aec1" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "muted_note" DROP CONSTRAINT "FK_d8e07aa18c2d64e86201601aec1"`,
|
`ALTER TABLE "muted_note" DROP CONSTRAINT "FK_d8e07aa18c2d64e86201601aec1"`,
|
||||||
);
|
);
|
@ -1,8 +1,9 @@
|
|||||||
export class wordMute21595782306083 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class wordMute21595782306083 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "wordMute21595782306083";
|
this.name = "wordMute21595782306083";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`CREATE TYPE "muted_note_reason_enum" AS ENUM('word', 'manual', 'spam', 'other')`,
|
`CREATE TYPE "muted_note_reason_enum" AS ENUM('word', 'manual', 'spam', 'other')`,
|
||||||
);
|
);
|
||||||
@ -13,7 +14,7 @@ export class wordMute21595782306083 {
|
|||||||
`CREATE INDEX "IDX_636e977ff90b23676fb5624b25" ON "muted_note" ("reason") `,
|
`CREATE INDEX "IDX_636e977ff90b23676fb5624b25" ON "muted_note" ("reason") `,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(`DROP INDEX "IDX_636e977ff90b23676fb5624b25"`);
|
await queryRunner.query(`DROP INDEX "IDX_636e977ff90b23676fb5624b25"`);
|
||||||
await queryRunner.query(`ALTER TABLE "muted_note" DROP COLUMN "reason"`);
|
await queryRunner.query(`ALTER TABLE "muted_note" DROP COLUMN "reason"`);
|
||||||
await queryRunner.query(`DROP TYPE "muted_note_reason_enum"`);
|
await queryRunner.query(`DROP TYPE "muted_note_reason_enum"`);
|
@ -1,8 +1,9 @@
|
|||||||
export class channel1596548170836 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class channel1596548170836 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "channel1596548170836";
|
this.name = "channel1596548170836";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`CREATE TABLE "channel" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "lastNotedAt" TIMESTAMP WITH TIME ZONE, "userId" character varying(32) NOT NULL, "name" character varying(128) NOT NULL, "description" character varying(2048), "bannerId" character varying(32), "notesCount" integer NOT NULL DEFAULT 0, "usersCount" integer NOT NULL DEFAULT 0, CONSTRAINT "PK_590f33ee6ee7d76437acf362e39" PRIMARY KEY ("id"))`,
|
`CREATE TABLE "channel" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "lastNotedAt" TIMESTAMP WITH TIME ZONE, "userId" character varying(32) NOT NULL, "name" character varying(128) NOT NULL, "description" character varying(2048), "bannerId" character varying(32), "notesCount" integer NOT NULL DEFAULT 0, "usersCount" integer NOT NULL DEFAULT 0, CONSTRAINT "PK_590f33ee6ee7d76437acf362e39" PRIMARY KEY ("id"))`,
|
||||||
);
|
);
|
||||||
@ -73,7 +74,7 @@ export class channel1596548170836 {
|
|||||||
`ALTER TABLE "channel_note_pining" ADD CONSTRAINT "FK_10b19ef67d297ea9de325cd4502" FOREIGN KEY ("noteId") REFERENCES "note"("id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
`ALTER TABLE "channel_note_pining" ADD CONSTRAINT "FK_10b19ef67d297ea9de325cd4502" FOREIGN KEY ("noteId") REFERENCES "note"("id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "channel_note_pining" DROP CONSTRAINT "FK_10b19ef67d297ea9de325cd4502"`,
|
`ALTER TABLE "channel_note_pining" DROP CONSTRAINT "FK_10b19ef67d297ea9de325cd4502"`,
|
||||||
);
|
);
|
@ -1,13 +1,14 @@
|
|||||||
export class channel21596786425167 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class channel21596786425167 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "channel21596786425167";
|
this.name = "channel21596786425167";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "channel_following" ADD "readCursor" TIMESTAMP WITH TIME ZONE NOT NULL`,
|
`ALTER TABLE "channel_following" ADD "readCursor" TIMESTAMP WITH TIME ZONE NOT NULL`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "channel_following" DROP COLUMN "readCursor"`,
|
`ALTER TABLE "channel_following" DROP COLUMN "readCursor"`,
|
||||||
);
|
);
|
@ -1,13 +1,14 @@
|
|||||||
export class objectStorageSetPublicRead1597230137744 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class objectStorageSetPublicRead1597230137744 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "objectStorageSetPublicRead1597230137744";
|
this.name = "objectStorageSetPublicRead1597230137744";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "meta" ADD "objectStorageSetPublicRead" boolean NOT NULL DEFAULT false`,
|
`ALTER TABLE "meta" ADD "objectStorageSetPublicRead" boolean NOT NULL DEFAULT false`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "meta" DROP COLUMN "objectStorageSetPublicRead"`,
|
`ALTER TABLE "meta" DROP COLUMN "objectStorageSetPublicRead"`,
|
||||||
);
|
);
|
@ -1,8 +1,9 @@
|
|||||||
export class IncludingNotificationTypes1597236229720 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class IncludingNotificationTypes1597236229720 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "IncludingNotificationTypes1597236229720";
|
this.name = "IncludingNotificationTypes1597236229720";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`CREATE TYPE "user_profile_includingnotificationtypes_enum" AS ENUM('follow', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollVote', 'receiveFollowRequest', 'followRequestAccepted', 'groupInvited', 'app')`,
|
`CREATE TYPE "user_profile_includingnotificationtypes_enum" AS ENUM('follow', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollVote', 'receiveFollowRequest', 'followRequestAccepted', 'groupInvited', 'app')`,
|
||||||
);
|
);
|
||||||
@ -10,7 +11,7 @@ export class IncludingNotificationTypes1597236229720 {
|
|||||||
`ALTER TABLE "user_profile" ADD "includingNotificationTypes" "user_profile_includingnotificationtypes_enum" array`,
|
`ALTER TABLE "user_profile" ADD "includingNotificationTypes" "user_profile_includingnotificationtypes_enum" array`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "user_profile" DROP COLUMN "includingNotificationTypes"`,
|
`ALTER TABLE "user_profile" DROP COLUMN "includingNotificationTypes"`,
|
||||||
);
|
);
|
@ -1,13 +1,14 @@
|
|||||||
export class addSensitiveIndex1597385880794 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class addSensitiveIndex1597385880794 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "addSensitiveIndex1597385880794";
|
this.name = "addSensitiveIndex1597385880794";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`CREATE INDEX "IDX_a7eba67f8b3fa27271e85d2e26" ON "drive_file" ("isSensitive") `,
|
`CREATE INDEX "IDX_a7eba67f8b3fa27271e85d2e26" ON "drive_file" ("isSensitive") `,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(`DROP INDEX "IDX_a7eba67f8b3fa27271e85d2e26"`);
|
await queryRunner.query(`DROP INDEX "IDX_a7eba67f8b3fa27271e85d2e26"`);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,8 +1,9 @@
|
|||||||
export class channelUnread1597459042300 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class channelUnread1597459042300 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "channelUnread1597459042300";
|
this.name = "channelUnread1597459042300";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(`TRUNCATE TABLE "note_unread"`, undefined);
|
await queryRunner.query(`TRUNCATE TABLE "note_unread"`, undefined);
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "channel_following" DROP COLUMN "readCursor"`,
|
`ALTER TABLE "channel_following" DROP COLUMN "readCursor"`,
|
||||||
@ -26,7 +27,7 @@ export class channelUnread1597459042300 {
|
|||||||
`CREATE INDEX "IDX_6a57f051d82c6d4036c141e107" ON "note_unread" ("noteChannelId") `,
|
`CREATE INDEX "IDX_6a57f051d82c6d4036c141e107" ON "note_unread" ("noteChannelId") `,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(`DROP INDEX "IDX_6a57f051d82c6d4036c141e107"`);
|
await queryRunner.query(`DROP INDEX "IDX_6a57f051d82c6d4036c141e107"`);
|
||||||
await queryRunner.query(`DROP INDEX "IDX_29e8c1d579af54d4232939f994"`);
|
await queryRunner.query(`DROP INDEX "IDX_29e8c1d579af54d4232939f994"`);
|
||||||
await queryRunner.query(`DROP INDEX "IDX_89a29c9237b8c3b6b3cbb4cb30"`);
|
await queryRunner.query(`DROP INDEX "IDX_89a29c9237b8c3b6b3cbb4cb30"`);
|
@ -1,14 +1,15 @@
|
|||||||
export class ChannelNoteIdDescIndex1597893996136 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class ChannelNoteIdDescIndex1597893996136 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "ChannelNoteIdDescIndex1597893996136";
|
this.name = "ChannelNoteIdDescIndex1597893996136";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(`DROP INDEX "IDX_f22169eb10657bded6d875ac8f"`);
|
await queryRunner.query(`DROP INDEX "IDX_f22169eb10657bded6d875ac8f"`);
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`CREATE INDEX "IDX_note_on_channelId_and_id_desc" ON "note" ("channelId", "id" desc)`,
|
`CREATE INDEX "IDX_note_on_channelId_and_id_desc" ON "note" ("channelId", "id" desc)`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(`DROP INDEX "IDX_note_on_channelId_and_id_desc"`);
|
await queryRunner.query(`DROP INDEX "IDX_note_on_channelId_and_id_desc"`);
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`CREATE INDEX "IDX_f22169eb10657bded6d875ac8f" ON "note" ("channelId") `,
|
`CREATE INDEX "IDX_f22169eb10657bded6d875ac8f" ON "note" ("channelId") `,
|
@ -1,8 +1,9 @@
|
|||||||
export class mutingNotificationTypes1600353287890 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class mutingNotificationTypes1600353287890 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "mutingNotificationTypes1600353287890";
|
this.name = "mutingNotificationTypes1600353287890";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "user_profile" DROP COLUMN "includingNotificationTypes"`,
|
`ALTER TABLE "user_profile" DROP COLUMN "includingNotificationTypes"`,
|
||||||
);
|
);
|
||||||
@ -16,7 +17,7 @@ export class mutingNotificationTypes1600353287890 {
|
|||||||
`ALTER TABLE "user_profile" ADD "mutingNotificationTypes" "user_profile_mutingnotificationtypes_enum" array NOT NULL DEFAULT '{}'`,
|
`ALTER TABLE "user_profile" ADD "mutingNotificationTypes" "user_profile_mutingnotificationtypes_enum" array NOT NULL DEFAULT '{}'`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "user_profile" DROP COLUMN "mutingNotificationTypes"`,
|
`ALTER TABLE "user_profile" DROP COLUMN "mutingNotificationTypes"`,
|
||||||
);
|
);
|
@ -1,8 +1,9 @@
|
|||||||
export class refineAbuseUserReport1603094348345 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class refineAbuseUserReport1603094348345 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "refineAbuseUserReport1603094348345";
|
this.name = "refineAbuseUserReport1603094348345";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "abuse_user_report" DROP CONSTRAINT "FK_d049123c413e68ca52abe734203"`,
|
`ALTER TABLE "abuse_user_report" DROP CONSTRAINT "FK_d049123c413e68ca52abe734203"`,
|
||||||
);
|
);
|
||||||
@ -30,7 +31,7 @@ export class refineAbuseUserReport1603094348345 {
|
|||||||
`ALTER TABLE "abuse_user_report" ADD CONSTRAINT "FK_08b883dd5fdd6f9c4c1572b36de" FOREIGN KEY ("assigneeId") REFERENCES "user"("id") ON DELETE SET NULL ON UPDATE NO ACTION`,
|
`ALTER TABLE "abuse_user_report" ADD CONSTRAINT "FK_08b883dd5fdd6f9c4c1572b36de" FOREIGN KEY ("assigneeId") REFERENCES "user"("id") ON DELETE SET NULL ON UPDATE NO ACTION`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "abuse_user_report" DROP CONSTRAINT "FK_08b883dd5fdd6f9c4c1572b36de"`,
|
`ALTER TABLE "abuse_user_report" DROP CONSTRAINT "FK_08b883dd5fdd6f9c4c1572b36de"`,
|
||||||
);
|
);
|
@ -1,8 +1,9 @@
|
|||||||
export class refineAbuseUserReport21603095701770 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class refineAbuseUserReport21603095701770 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "refineAbuseUserReport21603095701770";
|
this.name = "refineAbuseUserReport21603095701770";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "abuse_user_report" ADD "targetUserHost" character varying(128)`,
|
`ALTER TABLE "abuse_user_report" ADD "targetUserHost" character varying(128)`,
|
||||||
);
|
);
|
||||||
@ -16,7 +17,7 @@ export class refineAbuseUserReport21603095701770 {
|
|||||||
`CREATE INDEX "IDX_f8d8b93740ad12c4ce8213a199" ON "abuse_user_report" ("reporterHost") `,
|
`CREATE INDEX "IDX_f8d8b93740ad12c4ce8213a199" ON "abuse_user_report" ("reporterHost") `,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(`DROP INDEX "IDX_f8d8b93740ad12c4ce8213a199"`);
|
await queryRunner.query(`DROP INDEX "IDX_f8d8b93740ad12c4ce8213a199"`);
|
||||||
await queryRunner.query(`DROP INDEX "IDX_4ebbf7f93cdc10e8d1ef2fc6cd"`);
|
await queryRunner.query(`DROP INDEX "IDX_4ebbf7f93cdc10e8d1ef2fc6cd"`);
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
@ -1,13 +1,14 @@
|
|||||||
export class instanceThemeColor1603776877564 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class instanceThemeColor1603776877564 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "instanceThemeColor1603776877564";
|
this.name = "instanceThemeColor1603776877564";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "instance" ADD "themeColor" character varying(64) DEFAULT null`,
|
`ALTER TABLE "instance" ADD "themeColor" character varying(64) DEFAULT null`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(`ALTER TABLE "instance" DROP COLUMN "themeColor"`);
|
await queryRunner.query(`ALTER TABLE "instance" DROP COLUMN "themeColor"`);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,13 +1,14 @@
|
|||||||
export class instanceFavicon1603781553011 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class instanceFavicon1603781553011 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "instanceFavicon1603781553011";
|
this.name = "instanceFavicon1603781553011";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "instance" ADD "faviconUrl" character varying(256) DEFAULT null`,
|
`ALTER TABLE "instance" ADD "faviconUrl" character varying(256) DEFAULT null`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(`ALTER TABLE "instance" DROP COLUMN "faviconUrl"`);
|
await queryRunner.query(`ALTER TABLE "instance" DROP COLUMN "faviconUrl"`);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,13 +1,14 @@
|
|||||||
export class deleteAutoWatch1604821689616 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class deleteAutoWatch1604821689616 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "deleteAutoWatch1604821689616";
|
this.name = "deleteAutoWatch1604821689616";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "user_profile" DROP COLUMN "autoWatch"`,
|
`ALTER TABLE "user_profile" DROP COLUMN "autoWatch"`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "user_profile" ADD "autoWatch" boolean NOT NULL DEFAULT false`,
|
`ALTER TABLE "user_profile" ADD "autoWatch" boolean NOT NULL DEFAULT false`,
|
||||||
);
|
);
|
@ -1,13 +1,14 @@
|
|||||||
export class clipDescription1605408848373 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class clipDescription1605408848373 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "clipDescription1605408848373";
|
this.name = "clipDescription1605408848373";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "clip" ADD "description" character varying(2048) DEFAULT null`,
|
`ALTER TABLE "clip" ADD "description" character varying(2048) DEFAULT null`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(`ALTER TABLE "clip" DROP COLUMN "description"`);
|
await queryRunner.query(`ALTER TABLE "clip" DROP COLUMN "description"`);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,8 +1,9 @@
|
|||||||
export class comments1605408971051 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class comments1605408971051 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "comments1605408971051";
|
this.name = "comments1605408971051";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`COMMENT ON COLUMN "log"."createdAt" IS 'The created date of the Log.'`,
|
`COMMENT ON COLUMN "log"."createdAt" IS 'The created date of the Log.'`,
|
||||||
);
|
);
|
||||||
@ -621,7 +622,7 @@ export class comments1605408971051 {
|
|||||||
`COMMENT ON COLUMN "channel_note_pining"."createdAt" IS 'The created date of the ChannelNotePining.'`,
|
`COMMENT ON COLUMN "channel_note_pining"."createdAt" IS 'The created date of the ChannelNotePining.'`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`COMMENT ON COLUMN "channel_note_pining"."createdAt" IS NULL`,
|
`COMMENT ON COLUMN "channel_note_pining"."createdAt" IS NULL`,
|
||||||
);
|
);
|
@ -1,13 +1,14 @@
|
|||||||
export class instancePinnedPages1605585339718 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class instancePinnedPages1605585339718 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "instancePinnedPages1605585339718";
|
this.name = "instancePinnedPages1605585339718";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "meta" ADD "pinnedPages" character varying(512) array NOT NULL DEFAULT '{"/featured", "/channels", "/explore", "/pages", "/about-misskey"}'::varchar[]`,
|
`ALTER TABLE "meta" ADD "pinnedPages" character varying(512) array NOT NULL DEFAULT '{"/featured", "/channels", "/explore", "/pages", "/about-misskey"}'::varchar[]`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "pinnedPages"`);
|
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "pinnedPages"`);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,8 +1,9 @@
|
|||||||
export class instanceImages1605965516823 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class instanceImages1605965516823 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "instanceImages1605965516823";
|
this.name = "instanceImages1605965516823";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "meta" ADD "backgroundImageUrl" character varying(512)`,
|
`ALTER TABLE "meta" ADD "backgroundImageUrl" character varying(512)`,
|
||||||
);
|
);
|
||||||
@ -10,7 +11,7 @@ export class instanceImages1605965516823 {
|
|||||||
`ALTER TABLE "meta" ADD "logoImageUrl" character varying(512)`,
|
`ALTER TABLE "meta" ADD "logoImageUrl" character varying(512)`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "logoImageUrl"`);
|
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "logoImageUrl"`);
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "meta" DROP COLUMN "backgroundImageUrl"`,
|
`ALTER TABLE "meta" DROP COLUMN "backgroundImageUrl"`,
|
@ -1,8 +1,9 @@
|
|||||||
export class noCrawle1606191203881 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class noCrawle1606191203881 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "noCrawle1606191203881";
|
this.name = "noCrawle1606191203881";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "user_profile" ADD "noCrawle" boolean NOT NULL DEFAULT false`,
|
`ALTER TABLE "user_profile" ADD "noCrawle" boolean NOT NULL DEFAULT false`,
|
||||||
);
|
);
|
||||||
@ -10,7 +11,7 @@ export class noCrawle1606191203881 {
|
|||||||
`COMMENT ON COLUMN "user_profile"."noCrawle" IS 'Whether reject index by crawler.'`,
|
`COMMENT ON COLUMN "user_profile"."noCrawle" IS 'Whether reject index by crawler.'`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`COMMENT ON COLUMN "user_profile"."noCrawle" IS 'Whether reject index by crawler.'`,
|
`COMMENT ON COLUMN "user_profile"."noCrawle" IS 'Whether reject index by crawler.'`,
|
||||||
);
|
);
|
@ -1,13 +1,14 @@
|
|||||||
export class instancePinnedClip1607151207216 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class instancePinnedClip1607151207216 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "instancePinnedClip1607151207216";
|
this.name = "instancePinnedClip1607151207216";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "meta" ADD "pinnedClipId" character varying(32)`,
|
`ALTER TABLE "meta" ADD "pinnedClipId" character varying(32)`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "pinnedClipId"`);
|
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "pinnedClipId"`);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,8 +1,9 @@
|
|||||||
export class isExplorable1607353487793 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class isExplorable1607353487793 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "isExplorable1607353487793";
|
this.name = "isExplorable1607353487793";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "user" ADD "isExplorable" boolean NOT NULL DEFAULT true`,
|
`ALTER TABLE "user" ADD "isExplorable" boolean NOT NULL DEFAULT true`,
|
||||||
);
|
);
|
||||||
@ -13,7 +14,7 @@ export class isExplorable1607353487793 {
|
|||||||
`CREATE INDEX "IDX_d5a1b83c7cab66f167e6888188" ON "user" ("isExplorable") `,
|
`CREATE INDEX "IDX_d5a1b83c7cab66f167e6888188" ON "user" ("isExplorable") `,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(`DROP INDEX "IDX_d5a1b83c7cab66f167e6888188"`);
|
await queryRunner.query(`DROP INDEX "IDX_d5a1b83c7cab66f167e6888188"`);
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`COMMENT ON COLUMN "user"."isExplorable" IS 'Whether the User is explorable.'`,
|
`COMMENT ON COLUMN "user"."isExplorable" IS 'Whether the User is explorable.'`,
|
@ -1,8 +1,9 @@
|
|||||||
export class registry1610277136869 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class registry1610277136869 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "registry1610277136869";
|
this.name = "registry1610277136869";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`CREATE TABLE "registry_item" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "updatedAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "key" character varying(1024) NOT NULL, "scope" character varying(1024) array NOT NULL DEFAULT '{}'::varchar[], "domain" character varying(512), CONSTRAINT "PK_64b3f7e6008b4d89b826cd3af95" PRIMARY KEY ("id")); COMMENT ON COLUMN "registry_item"."createdAt" IS 'The created date of the RegistryItem.'; COMMENT ON COLUMN "registry_item"."updatedAt" IS 'The updated date of the RegistryItem.'; COMMENT ON COLUMN "registry_item"."userId" IS 'The owner ID.'; COMMENT ON COLUMN "registry_item"."key" IS 'The key of the RegistryItem.'`,
|
`CREATE TABLE "registry_item" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "updatedAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "key" character varying(1024) NOT NULL, "scope" character varying(1024) array NOT NULL DEFAULT '{}'::varchar[], "domain" character varying(512), CONSTRAINT "PK_64b3f7e6008b4d89b826cd3af95" PRIMARY KEY ("id")); COMMENT ON COLUMN "registry_item"."createdAt" IS 'The created date of the RegistryItem.'; COMMENT ON COLUMN "registry_item"."updatedAt" IS 'The updated date of the RegistryItem.'; COMMENT ON COLUMN "registry_item"."userId" IS 'The owner ID.'; COMMENT ON COLUMN "registry_item"."key" IS 'The key of the RegistryItem.'`,
|
||||||
);
|
);
|
||||||
@ -19,7 +20,7 @@ export class registry1610277136869 {
|
|||||||
`ALTER TABLE "registry_item" ADD CONSTRAINT "FK_fb9d21ba0abb83223263df6bcb3" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
`ALTER TABLE "registry_item" ADD CONSTRAINT "FK_fb9d21ba0abb83223263df6bcb3" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "registry_item" DROP CONSTRAINT "FK_fb9d21ba0abb83223263df6bcb3"`,
|
`ALTER TABLE "registry_item" DROP CONSTRAINT "FK_fb9d21ba0abb83223263df6bcb3"`,
|
||||||
);
|
);
|
@ -1,8 +1,9 @@
|
|||||||
export class registry21610277585759 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class registry21610277585759 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "registry21610277585759";
|
this.name = "registry21610277585759";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "registry_item" ADD "value" jsonb NOT NULL DEFAULT '{}'`,
|
`ALTER TABLE "registry_item" ADD "value" jsonb NOT NULL DEFAULT '{}'`,
|
||||||
);
|
);
|
||||||
@ -10,7 +11,7 @@ export class registry21610277585759 {
|
|||||||
`COMMENT ON COLUMN "registry_item"."value" IS 'The value of the RegistryItem.'`,
|
`COMMENT ON COLUMN "registry_item"."value" IS 'The value of the RegistryItem.'`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`COMMENT ON COLUMN "registry_item"."value" IS 'The value of the RegistryItem.'`,
|
`COMMENT ON COLUMN "registry_item"."value" IS 'The value of the RegistryItem.'`,
|
||||||
);
|
);
|
@ -1,13 +1,14 @@
|
|||||||
export class registry31610283021566 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class registry31610283021566 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "registry31610283021566";
|
this.name = "registry31610283021566";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "registry_item" ALTER COLUMN "value" DROP NOT NULL`,
|
`ALTER TABLE "registry_item" ALTER COLUMN "value" DROP NOT NULL`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "registry_item" ALTER COLUMN "value" SET NOT NULL`,
|
`ALTER TABLE "registry_item" ALTER COLUMN "value" SET NOT NULL`,
|
||||||
);
|
);
|
@ -1,8 +1,9 @@
|
|||||||
export class followersUri1611354329133 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class followersUri1611354329133 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "followersUri1611354329133";
|
this.name = "followersUri1611354329133";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "user" ADD "followersUri" varchar(512) DEFAULT NULL`,
|
`ALTER TABLE "user" ADD "followersUri" varchar(512) DEFAULT NULL`,
|
||||||
);
|
);
|
||||||
@ -10,7 +11,7 @@ export class followersUri1611354329133 {
|
|||||||
`COMMENT ON COLUMN "user"."followersUri" IS 'The URI of the user Follower Collection. It will be null if the origin of the user is local.'`,
|
`COMMENT ON COLUMN "user"."followersUri" IS 'The URI of the user Follower Collection. It will be null if the origin of the user is local.'`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`COMMENT ON COLUMN "user"."followersUri" IS 'The URI of the user Follower Collection. It will be null if the origin of the user is local.'`,
|
`COMMENT ON COLUMN "user"."followersUri" IS 'The URI of the user Follower Collection. It will be null if the origin of the user is local.'`,
|
||||||
);
|
);
|
@ -1,8 +1,9 @@
|
|||||||
export class gallery1611397665007 {
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
export class gallery1611397665007 implements MigrationInterface {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.name = "gallery1611397665007";
|
this.name = "gallery1611397665007";
|
||||||
}
|
}
|
||||||
async up(queryRunner) {
|
async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`CREATE TABLE "gallery_post" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "updatedAt" TIMESTAMP WITH TIME ZONE NOT NULL, "title" character varying(256) NOT NULL, "description" character varying(2048), "userId" character varying(32) NOT NULL, "fileIds" character varying(32) array NOT NULL DEFAULT '{}'::varchar[], "isSensitive" boolean NOT NULL DEFAULT false, "likedCount" integer NOT NULL DEFAULT '0', "tags" character varying(128) array NOT NULL DEFAULT '{}'::varchar[], CONSTRAINT "PK_8e90d7b6015f2c4518881b14753" PRIMARY KEY ("id")); COMMENT ON COLUMN "gallery_post"."createdAt" IS 'The created date of the GalleryPost.'; COMMENT ON COLUMN "gallery_post"."updatedAt" IS 'The updated date of the GalleryPost.'; COMMENT ON COLUMN "gallery_post"."userId" IS 'The ID of author.'; COMMENT ON COLUMN "gallery_post"."isSensitive" IS 'Whether the post is sensitive.'`,
|
`CREATE TABLE "gallery_post" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "updatedAt" TIMESTAMP WITH TIME ZONE NOT NULL, "title" character varying(256) NOT NULL, "description" character varying(2048), "userId" character varying(32) NOT NULL, "fileIds" character varying(32) array NOT NULL DEFAULT '{}'::varchar[], "isSensitive" boolean NOT NULL DEFAULT false, "likedCount" integer NOT NULL DEFAULT '0', "tags" character varying(128) array NOT NULL DEFAULT '{}'::varchar[], CONSTRAINT "PK_8e90d7b6015f2c4518881b14753" PRIMARY KEY ("id")); COMMENT ON COLUMN "gallery_post"."createdAt" IS 'The created date of the GalleryPost.'; COMMENT ON COLUMN "gallery_post"."updatedAt" IS 'The updated date of the GalleryPost.'; COMMENT ON COLUMN "gallery_post"."userId" IS 'The ID of author.'; COMMENT ON COLUMN "gallery_post"."isSensitive" IS 'Whether the post is sensitive.'`,
|
||||||
);
|
);
|
||||||
@ -46,7 +47,7 @@ export class gallery1611397665007 {
|
|||||||
`ALTER TABLE "gallery_like" ADD CONSTRAINT "FK_b1cb568bfe569e47b7051699fc8" FOREIGN KEY ("postId") REFERENCES "gallery_post"("id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
`ALTER TABLE "gallery_like" ADD CONSTRAINT "FK_b1cb568bfe569e47b7051699fc8" FOREIGN KEY ("postId") REFERENCES "gallery_post"("id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`ALTER TABLE "gallery_like" DROP CONSTRAINT "FK_b1cb568bfe569e47b7051699fc8"`,
|
`ALTER TABLE "gallery_like" DROP CONSTRAINT "FK_b1cb568bfe569e47b7051699fc8"`,
|
||||||
);
|
);
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user