diff --git a/hosts/titan/configuration.nix b/hosts/titan/configuration.nix index adf9ed4..fc2342a 100644 --- a/hosts/titan/configuration.nix +++ b/hosts/titan/configuration.nix @@ -113,7 +113,7 @@ in { # Enable sound with pipewire. - sound.enable = true; + # sound.enable = true; hardware.pulseaudio.enable = false; security.rtkit.enable = true; services.pipewire = { @@ -192,6 +192,12 @@ in { variables = { NIX_AUTO_RUN = "!"; }; + shells = with pkgs; [ + bashInteractive + zsh + fish + /run/current-system/sw/bin/nologin + ]; }; programs = { dconf.enable = true; @@ -345,7 +351,7 @@ in { anonymousUserNoPassword = true; anonymousUploadEnable = false; # Anyone uploading files wouldn't be so secure, would it? anonymousMkdirEnable = false; # Neither would them creating directories. - writeEnable = false; + writeEnable = true; }; snowflake-proxy.enable = true; diff --git a/hosts/titan/hardware/nvidia.nix b/hosts/titan/hardware/nvidia.nix index e06df1e..e63c943 100644 --- a/hosts/titan/hardware/nvidia.nix +++ b/hosts/titan/hardware/nvidia.nix @@ -14,6 +14,7 @@ inputs: { config, pkgs, lib, ... }: { powerManagement.enable = true; #open = true; nvidiaSettings = true; + open = true; }; }; boot = { diff --git a/hosts/titan/services/Sharkey/docker-compose.yml b/hosts/titan/services/Sharkey/docker-compose.yml index 74c4b9c..05194b0 100644 --- a/hosts/titan/services/Sharkey/docker-compose.yml +++ b/hosts/titan/services/Sharkey/docker-compose.yml @@ -1,7 +1,7 @@ services: web: # image: git.joinsharkey.org/sharkey/sharkey:latest # - VULNERABLE - image: registry.activitypub.software/transfem-org/sharkey:develop + image: registry.activitypub.software/transfem-org/sharkey:2024.8.2 # image: ghcr.io/transfem-org/sharkey:stable # build: . restart: always diff --git a/hosts/titan/services/Sharkey/sharkey.log b/hosts/titan/services/Sharkey/sharkey.log new file mode 100644 index 0000000..31c673f --- /dev/null +++ b/hosts/titan/services/Sharkey/sharkey.log @@ -0,0 +1,5776 @@ +db-1 | +db-1 | PostgreSQL Database directory appears to contain a database; Skipping initialization +db-1 | +db-1 | 2024-10-31 22:39:52.198 UTC [1] LOG: starting PostgreSQL 15.7 (Debian 15.7-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit +db-1 | 2024-10-31 22:39:52.198 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432 +db-1 | 2024-10-31 22:39:52.198 UTC [1] LOG: listening on IPv6 address "::", port 5432 +db-1 | 2024-10-31 22:39:52.201 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" +db-1 | 2024-10-31 22:39:52.356 UTC [26] FATAL: the database system is starting up +redis-1 | 1:C 31 Oct 2024 22:39:52.108 * oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo +redis-1 | 1:C 31 Oct 2024 22:39:52.108 * Redis version=7.2.4, bits=64, commit=00000000, modified=0, pid=1, just started +db-1 | 2024-10-31 22:39:52.428 UTC [25] LOG: database system was interrupted; last known up at 2024-10-31 22:33:31 UTC +redis-1 | 1:C 31 Oct 2024 22:39:52.108 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf +redis-1 | 1:M 31 Oct 2024 22:39:52.108 * monotonic clock: POSIX clock_gettime +redis-1 | 1:M 31 Oct 2024 22:39:52.109 * Running mode=standalone, port=6379. +redis-1 | 1:M 31 Oct 2024 22:39:52.110 * Server initialized +redis-1 | 1:M 31 Oct 2024 22:39:52.110 * Loading RDB produced by version 7.2.4 +db-1 | 2024-10-31 22:39:57.952 UTC [29] FATAL: the database system is starting up +db-1 | 2024-10-31 22:40:02.441 UTC [25] LOG: syncing data directory (fsync), elapsed time: 10.00 s, current path: ./base/16384/19806_fsm +redis-1 | 1:M 31 Oct 2024 22:39:52.110 * RDB age 1311 seconds +redis-1 | 1:M 31 Oct 2024 22:39:52.110 * RDB memory usage when created 212.43 Mb +db-1 | 2024-10-31 22:40:03.751 UTC [32] FATAL: the database system is starting up +db-1 | 2024-10-31 22:40:05.530 UTC [25] LOG: database system was not properly shut down; automatic recovery in progress +db-1 | 2024-10-31 22:40:05.534 UTC [25] LOG: redo starts at FD/EF3D5060 +db-1 | 2024-10-31 22:40:09.513 UTC [35] FATAL: the database system is not yet accepting connections +redis-1 | 1:M 31 Oct 2024 22:40:05.525 * Done loading RDB, keys loaded: 351168, keys expired: 397. +redis-1 | 1:M 31 Oct 2024 22:40:05.525 * DB loaded from disk: 13.416 seconds +db-1 | 2024-10-31 22:40:09.513 UTC [35] DETAIL: Consistent recovery state has not been yet reached. +redis-1 | 1:M 31 Oct 2024 22:40:05.525 * Ready to accept connections tcp +db-1 | 2024-10-31 22:40:15.139 UTC [25] LOG: invalid record length at FE/780543D0: wanted 24, got 0 +db-1 | 2024-10-31 22:40:15.139 UTC [25] LOG: redo done at FE/78054308 system usage: CPU: user: 5.87 s, system: 1.98 s, elapsed: 9.60 s +db-1 | 2024-10-31 22:40:16.057 UTC [23] LOG: checkpoint starting: end-of-recovery immediate wait +db-1 | 2024-10-31 22:40:16.152 UTC [38] FATAL: the database system is not yet accepting connections +db-1 | 2024-10-31 22:40:16.152 UTC [38] DETAIL: Consistent recovery state has not been yet reached. +db-1 | 2024-10-31 22:40:19.531 UTC [23] LOG: checkpoint complete: wrote 64940 buffers (99.1%); 0 WAL file(s) added, 0 removed, 137 recycled; write=0.657 s, sync=1.477 s, total=3.764 s; sync files=72, longest=0.532 s, average=0.021 s; distance=2241020 kB, estimate=2241020 kB +db-1 | 2024-10-31 22:40:19.547 UTC [1] LOG: database system is ready to accept connections +db-1 | 2024-10-31 22:40:36.995 UTC [45] ERROR: could not create unique index "IDX_8d5afc98982185799b160e10eb" +db-1 | 2024-10-31 22:40:36.995 UTC [45] DETAIL: Key (host)=(sc.dc09.ru) is duplicated. +db-1 | 2024-10-31 22:40:36.995 UTC [45] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +db-1 | CASE "suspensionState" +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +db-1 | ELSE 'none'::instance_suspensionstate_enum +db-1 | END +db-1 | ) +db-1 | 2024-10-31 22:40:37.001 UTC [55] FATAL: terminating background worker "parallel worker" due to administrator command +db-1 | 2024-10-31 22:40:37.001 UTC [55] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +db-1 | CASE "suspensionState" +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +db-1 | ELSE 'none'::instance_suspensionstate_enum +db-1 | END +db-1 | ) +db-1 | 2024-10-31 22:40:37.003 UTC [1] LOG: background worker "parallel worker" (PID 55) exited with exit code 1 +db-1 | 2024-10-31 22:40:41.036 UTC [59] ERROR: could not create unique index "IDX_8d5afc98982185799b160e10eb" +db-1 | 2024-10-31 22:40:41.036 UTC [59] DETAIL: Key (host)=(sc.dc09.ru) is duplicated. +db-1 | 2024-10-31 22:40:41.036 UTC [59] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +db-1 | CASE "suspensionState" +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +db-1 | ELSE 'none'::instance_suspensionstate_enum +db-1 | END +db-1 | ) +db-1 | 2024-10-31 22:40:41.042 UTC [63] FATAL: terminating background worker "parallel worker" due to administrator command +db-1 | 2024-10-31 22:40:41.042 UTC [63] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +db-1 | CASE "suspensionState" +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +db-1 | ELSE 'none'::instance_suspensionstate_enum +db-1 | END +db-1 | ) +db-1 | 2024-10-31 22:40:41.044 UTC [1] LOG: background worker "parallel worker" (PID 63) exited with exit code 1 +db-1 | 2024-10-31 22:40:44.655 UTC [64] ERROR: could not create unique index "IDX_8d5afc98982185799b160e10eb" +db-1 | 2024-10-31 22:40:44.655 UTC [64] DETAIL: Key (host)=(sc.dc09.ru) is duplicated. +db-1 | 2024-10-31 22:40:44.655 UTC [64] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +db-1 | CASE "suspensionState" +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +db-1 | ELSE 'none'::instance_suspensionstate_enum +db-1 | END +db-1 | ) +db-1 | 2024-10-31 22:40:44.661 UTC [71] FATAL: terminating background worker "parallel worker" due to administrator command +web-1 | +web-1 | > sharkey@2024.8.2 migrateandstart /sharkey +web-1 | > pnpm migrate && pnpm start +db-1 | 2024-10-31 22:40:44.661 UTC [71] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | +web-1 | +db-1 | CASE "suspensionState" +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | > sharkey@2024.8.2 migrate /sharkey +db-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | > cd packages/backend && pnpm migrate +web-1 | +db-1 | END +web-1 | +db-1 | ) +web-1 | > backend@ migrate /sharkey/packages/backend +db-1 | 2024-10-31 22:40:44.663 UTC [1] LOG: background worker "parallel worker" (PID 71) exited with exit code 1 +web-1 | > pnpm typeorm migration:run -d ormconfig.js +web-1 | +db-1 | 2024-10-31 22:40:48.246 UTC [72] ERROR: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | query: SELECT * FROM current_schema() +db-1 | 2024-10-31 22:40:48.246 UTC [72] DETAIL: Key (host)=(sc.dc09.ru) is duplicated. +web-1 | query: SELECT version(); +web-1 | query: SELECT * FROM "information_schema"."tables" WHERE "table_schema" = 'public' AND "table_name" = 'migrations' +db-1 | 2024-10-31 22:40:48.246 UTC [72] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | query: SELECT * FROM "migrations" "migrations" ORDER BY "id" DESC +db-1 | CASE "suspensionState" +web-1 | 300 migrations are already loaded in the database. +web-1 | 310 migrations were found in the source code. +web-1 | MoreRepoUrl1709462550083 is the last executed migration. It was executed on Sun Mar 03 2024 10:42:30 GMT+0000 (Coordinated Universal Time). +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +db-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | 10 migrations are new migrations must be executed. +web-1 | query: START TRANSACTION +web-1 | query: +db-1 | END +db-1 | ) +web-1 | alter table meta +web-1 | rename column "summalyProxy" to "urlPreviewSummaryProxyUrl"; +db-1 | 2024-10-31 22:40:48.252 UTC [76] FATAL: terminating background worker "parallel worker" due to administrator command +db-1 | 2024-10-31 22:40:48.252 UTC [76] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | alter table meta +web-1 | add "urlPreviewEnabled" boolean default true not null; +db-1 | CASE "suspensionState" +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +db-1 | ELSE 'none'::instance_suspensionstate_enum +db-1 | END +web-1 | alter table meta +web-1 | add "urlPreviewTimeout" integer default 10000 not null; +db-1 | ) +db-1 | 2024-10-31 22:40:48.254 UTC [1] LOG: background worker "parallel worker" (PID 76) exited with exit code 1 +web-1 | alter table meta +web-1 | add "urlPreviewMaximumContentLength" bigint default 10485760 not null; +web-1 | alter table meta +web-1 | add "urlPreviewRequireContentLength" boolean default false not null; +db-1 | 2024-10-31 22:40:51.889 UTC [77] ERROR: could not create unique index "IDX_8d5afc98982185799b160e10eb" +db-1 | 2024-10-31 22:40:51.889 UTC [77] DETAIL: Key (host)=(sc.dc09.ru) is duplicated. +web-1 | alter table meta +db-1 | 2024-10-31 22:40:51.889 UTC [77] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | add "urlPreviewUserAgent" varchar(1024) default null; +web-1 | +db-1 | CASE "suspensionState" +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710512074000,"UrlPreviewMeta1710512074000"] +db-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | Migration UrlPreviewMeta1710512074000 has been executed successfully. +db-1 | END +db-1 | ) +web-1 | query: ALTER TABLE "antenna" ADD "excludeBots" boolean NOT NULL DEFAULT false +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710919614510,"AntennaExcludeBots1710919614510"] +db-1 | 2024-10-31 22:40:51.896 UTC [84] FATAL: terminating background worker "parallel worker" due to administrator command +web-1 | Migration AntennaExcludeBots1710919614510 has been executed successfully. +db-1 | 2024-10-31 22:40:51.896 UTC [84] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | query: +db-1 | CASE "suspensionState" +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | CREATE TABLE "system_webhook" ( +web-1 | "id" varchar(32) NOT NULL, +db-1 | ELSE 'none'::instance_suspensionstate_enum +db-1 | END +web-1 | "isActive" boolean NOT NULL DEFAULT true, +db-1 | ) +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +db-1 | 2024-10-31 22:40:51.898 UTC [1] LOG: background worker "parallel worker" (PID 84) exited with exit code 1 +db-1 | 2024-10-31 22:40:55.613 UTC [85] ERROR: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | "latestSentAt" timestamp with time zone NULL DEFAULT NULL, +web-1 | "latestStatus" integer NULL DEFAULT NULL, +web-1 | "name" varchar(255) NOT NULL, +db-1 | 2024-10-31 22:40:55.613 UTC [85] DETAIL: Key (host)=(sc.dc09.ru) is duplicated. +web-1 | "on" varchar(128) [] NOT NULL DEFAULT '{}'::character varying[], +web-1 | "url" varchar(1024) NOT NULL, +db-1 | 2024-10-31 22:40:55.613 UTC [85] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | "secret" varchar(1024) NOT NULL, +web-1 | CONSTRAINT "PK_system_webhook_id" PRIMARY KEY ("id") +db-1 | CASE "suspensionState" +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ); +web-1 | CREATE INDEX "IDX_system_webhook_isActive" ON "system_webhook" ("isActive"); +web-1 | CREATE INDEX "IDX_system_webhook_on" ON "system_webhook" USING gin ("on"); +web-1 | +db-1 | ELSE 'none'::instance_suspensionstate_enum +db-1 | END +web-1 | CREATE TABLE "abuse_report_notification_recipient" ( +web-1 | "id" varchar(32) NOT NULL, +db-1 | ) +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "method" varchar(64) NOT NULL, +db-1 | 2024-10-31 22:40:55.619 UTC [89] FATAL: terminating background worker "parallel worker" due to administrator command +db-1 | 2024-10-31 22:40:55.619 UTC [89] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | "userId" varchar(32) NULL DEFAULT NULL, +web-1 | "systemWebhookId" varchar(32) NULL DEFAULT NULL, +db-1 | CASE "suspensionState" +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | CONSTRAINT "PK_abuse_report_notification_recipient_id" PRIMARY KEY ("id"), +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId1" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId2" FOREIGN KEY ("userId") REFERENCES "user_profile"("userId") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_systemWebhookId" FOREIGN KEY ("systemWebhookId") REFERENCES "system_webhook"("id") ON DELETE CASCADE ON UPDATE NO ACTION +db-1 | ELSE 'none'::instance_suspensionstate_enum +db-1 | END +web-1 | ); +db-1 | ) +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_isActive" ON "abuse_report_notification_recipient" ("isActive"); +db-1 | 2024-10-31 22:40:55.622 UTC [1] LOG: background worker "parallel worker" (PID 89) exited with exit code 1 +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_method" ON "abuse_report_notification_recipient" ("method"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_userId" ON "abuse_report_notification_recipient" ("userId"); +db-1 | 2024-10-31 22:40:59.724 UTC [93] ERROR: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_systemWebhookId" ON "abuse_report_notification_recipient" ("systemWebhookId"); +db-1 | 2024-10-31 22:40:59.724 UTC [93] DETAIL: Key (host)=(sc.dc09.ru) is duplicated. +web-1 | +db-1 | 2024-10-31 22:40:59.724 UTC [93] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1713656541000,"AbuseReportNotification1713656541000"] +db-1 | CASE "suspensionState" +web-1 | Migration AbuseReportNotification1713656541000 has been executed successfully. +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | query: ALTER TABLE "poll" ADD "channelId" character varying(32) +db-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | query: COMMENT ON COLUMN "poll"."channelId" IS '[Denormalized]' +db-1 | END +db-1 | ) +web-1 | query: CREATE INDEX "IDX_c1240fcc9675946ea5d6c2860e" ON "poll" ("channelId") +web-1 | query: UPDATE "poll" SET "channelId" = "note"."channelId" FROM "note" WHERE "poll"."noteId" = "note"."id" +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716129964060,"ChannelIdDenormalizedForMiPoll1716129964060"] +web-1 | Migration ChannelIdDenormalizedForMiPoll1716129964060 has been executed successfully. +db-1 | 2024-10-31 22:40:59.732 UTC [97] FATAL: terminating background worker "parallel worker" due to administrator command +db-1 | 2024-10-31 22:40:59.732 UTC [97] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | query: ALTER TABLE "meta" ADD "mediaSilencedHosts" character varying(1024) array NOT NULL DEFAULT '{}' +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716197366117,"MediaSilenceForHosts1716197366117"] +web-1 | Migration MediaSilenceForHosts1716197366117 has been executed successfully. +web-1 | query: ALTER TABLE "instance" ADD "notRespondingSince" TIMESTAMP WITH TIME ZONE +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716345015347,"NotRespondingSince1716345015347"] +web-1 | Migration NotRespondingSince1716345015347 has been executed successfully. +web-1 | query: CREATE TYPE "public"."instance_suspensionstate_enum" AS ENUM('none', 'manuallySuspended', 'goneSuspended', 'autoSuspendedForNotResponding') +web-1 | query: DROP INDEX "public"."IDX_34500da2e38ac393f7bb6b299c" +web-1 | query: ALTER TABLE "instance" RENAME COLUMN "isSuspended" TO "suspensionState" +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" DROP DEFAULT +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | query failed: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | error: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +db-1 | CASE "suspensionState" +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +db-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | Migration "SuspensionStateInsteadOfIsSspended1716345771510" failed, error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | query: ROLLBACK +db-1 | END +db-1 | ) +web-1 | Error during migration run: +web-1 | QueryFailedError: could not create unique index "IDX_8d5afc98982185799b160e10eb" +db-1 | 2024-10-31 22:40:59.734 UTC [1] LOG: background worker "parallel worker" (PID 97) exited with exit code 1 +web-1 | at PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219:19) +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +db-1 | 2024-10-31 22:41:03.314 UTC [98] ERROR: could not create unique index "IDX_8d5afc98982185799b160e10eb" +db-1 | 2024-10-31 22:41:03.314 UTC [98] DETAIL: Key (host)=(sc.dc09.ru) is duplicated. +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +db-1 | 2024-10-31 22:41:03.314 UTC [98] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +db-1 | CASE "suspensionState" +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | query: 'ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING (\n' + +db-1 | ELSE 'none'::instance_suspensionstate_enum +db-1 | END +web-1 | ' CASE "suspensionState"\n' + +web-1 | " WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum\n" + +web-1 | " ELSE 'none'::instance_suspensionstate_enum\n" + +web-1 | ' END\n' + +db-1 | ) +db-1 | 2024-10-31 22:41:03.320 UTC [105] FATAL: terminating background worker "parallel worker" due to administrator command +web-1 | ' )', +db-1 | 2024-10-31 22:41:03.320 UTC [105] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +db-1 | CASE "suspensionState" +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | parameters: undefined, +web-1 | driverError: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at /sharkey/node_modules/.pnpm/pg@8.12.0/node_modules/pg/lib/client.js:526:17 +db-1 | ELSE 'none'::instance_suspensionstate_enum +db-1 | END +db-1 | ) +db-1 | 2024-10-31 22:41:03.323 UTC [1] LOG: background worker "parallel worker" (PID 105) exited with exit code 1 +db-1 | 2024-10-31 22:41:07.086 UTC [106] ERROR: could not create unique index "IDX_8d5afc98982185799b160e10eb" +db-1 | 2024-10-31 22:41:07.086 UTC [106] DETAIL: Key (host)=(sc.dc09.ru) is duplicated. +db-1 | 2024-10-31 22:41:07.086 UTC [106] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +db-1 | CASE "suspensionState" +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +db-1 | ELSE 'none'::instance_suspensionstate_enum +db-1 | END +db-1 | ) +db-1 | 2024-10-31 22:41:07.091 UTC [110] FATAL: terminating background worker "parallel worker" due to administrator command +db-1 | 2024-10-31 22:41:07.091 UTC [110] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +db-1 | CASE "suspensionState" +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +db-1 | ELSE 'none'::instance_suspensionstate_enum +db-1 | END +db-1 | ) +db-1 | 2024-10-31 22:41:07.093 UTC [1] LOG: background worker "parallel worker" (PID 110) exited with exit code 1 +db-1 | 2024-10-31 22:41:10.742 UTC [114] ERROR: could not create unique index "IDX_8d5afc98982185799b160e10eb" +db-1 | 2024-10-31 22:41:10.742 UTC [114] DETAIL: Key (host)=(sc.dc09.ru) is duplicated. +db-1 | 2024-10-31 22:41:10.742 UTC [114] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +db-1 | CASE "suspensionState" +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +db-1 | ELSE 'none'::instance_suspensionstate_enum +db-1 | END +db-1 | ) +db-1 | 2024-10-31 22:41:10.748 UTC [118] FATAL: terminating background worker "parallel worker" due to administrator command +db-1 | 2024-10-31 22:41:10.748 UTC [118] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +db-1 | CASE "suspensionState" +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +db-1 | ELSE 'none'::instance_suspensionstate_enum +db-1 | END +db-1 | ) +db-1 | 2024-10-31 22:41:10.750 UTC [1] LOG: background worker "parallel worker" (PID 118) exited with exit code 1 +db-1 | 2024-10-31 22:41:14.388 UTC [119] ERROR: could not create unique index "IDX_8d5afc98982185799b160e10eb" +db-1 | 2024-10-31 22:41:14.388 UTC [119] DETAIL: Key (host)=(sc.dc09.ru) is duplicated. +db-1 | 2024-10-31 22:41:14.388 UTC [119] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +db-1 | CASE "suspensionState" +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +db-1 | ELSE 'none'::instance_suspensionstate_enum +db-1 | END +db-1 | ) +db-1 | 2024-10-31 22:41:14.394 UTC [126] FATAL: terminating background worker "parallel worker" due to administrator command +db-1 | 2024-10-31 22:41:14.394 UTC [126] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +db-1 | CASE "suspensionState" +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +db-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +web-1 | at async PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:184:25) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +db-1 | END +db-1 | ) +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | }, +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +db-1 | 2024-10-31 22:41:14.397 UTC [1] LOG: background worker "parallel worker" (PID 126) exited with exit code 1 +db-1 | 2024-10-31 22:41:18.024 UTC [127] ERROR: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | } +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 | +web-1 | > sharkey@2024.8.2 migrateandstart /sharkey +web-1 | > pnpm migrate && pnpm start +web-1 | +db-1 | 2024-10-31 22:41:18.024 UTC [127] DETAIL: Key (host)=(sc.dc09.ru) is duplicated. +web-1 | +web-1 | > sharkey@2024.8.2 migrate /sharkey +web-1 | > cd packages/backend && pnpm migrate +web-1 | +web-1 | +db-1 | 2024-10-31 22:41:18.024 UTC [127] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | > backend@ migrate /sharkey/packages/backend +web-1 | > pnpm typeorm migration:run -d ormconfig.js +db-1 | CASE "suspensionState" +web-1 | +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +db-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | query: SELECT * FROM current_schema() +web-1 | query: SELECT version(); +db-1 | END +db-1 | ) +web-1 | query: SELECT * FROM "information_schema"."tables" WHERE "table_schema" = 'public' AND "table_name" = 'migrations' +web-1 | query: SELECT * FROM "migrations" "migrations" ORDER BY "id" DESC +web-1 | 300 migrations are already loaded in the database. +db-1 | 2024-10-31 22:41:18.029 UTC [131] FATAL: terminating background worker "parallel worker" due to administrator command +db-1 | 2024-10-31 22:41:18.029 UTC [131] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +db-1 | CASE "suspensionState" +web-1 | 310 migrations were found in the source code. +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | MoreRepoUrl1709462550083 is the last executed migration. It was executed on Sun Mar 03 2024 10:42:30 GMT+0000 (Coordinated Universal Time). +web-1 | 10 migrations are new migrations must be executed. +db-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | query: START TRANSACTION +db-1 | END +db-1 | ) +db-1 | 2024-10-31 22:41:18.031 UTC [1] LOG: background worker "parallel worker" (PID 131) exited with exit code 1 +web-1 | query: +web-1 | alter table meta +web-1 | rename column "summalyProxy" to "urlPreviewSummaryProxyUrl"; +web-1 | alter table meta +db-1 | 2024-10-31 22:41:20.887 UTC [135] ERROR: canceling autovacuum task +db-1 | 2024-10-31 22:41:20.887 UTC [135] CONTEXT: while scanning block 54665 of relation "public.poll" +db-1 | automatic vacuum of table "sharkey.public.poll" +web-1 | add "urlPreviewEnabled" boolean default true not null; +web-1 | alter table meta +db-1 | 2024-10-31 22:41:22.706 UTC [136] ERROR: could not create unique index "IDX_8d5afc98982185799b160e10eb" +db-1 | 2024-10-31 22:41:22.706 UTC [136] DETAIL: Key (host)=(sc.dc09.ru) is duplicated. +web-1 | add "urlPreviewTimeout" integer default 10000 not null; +web-1 | alter table meta +db-1 | 2024-10-31 22:41:22.706 UTC [136] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +db-1 | CASE "suspensionState" +web-1 | add "urlPreviewMaximumContentLength" bigint default 10485760 not null; +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | alter table meta +web-1 | add "urlPreviewRequireContentLength" boolean default false not null; +web-1 | alter table meta +web-1 | add "urlPreviewUserAgent" varchar(1024) default null; +web-1 | +db-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710512074000,"UrlPreviewMeta1710512074000"] +web-1 | Migration UrlPreviewMeta1710512074000 has been executed successfully. +db-1 | END +web-1 | query: ALTER TABLE "antenna" ADD "excludeBots" boolean NOT NULL DEFAULT false +db-1 | ) +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710919614510,"AntennaExcludeBots1710919614510"] +db-1 | 2024-10-31 22:41:22.712 UTC [140] FATAL: terminating background worker "parallel worker" due to administrator command +web-1 | Migration AntennaExcludeBots1710919614510 has been executed successfully. +db-1 | 2024-10-31 22:41:22.712 UTC [140] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | query: +db-1 | CASE "suspensionState" +web-1 | CREATE TABLE "system_webhook" ( +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "latestSentAt" timestamp with time zone NULL DEFAULT NULL, +web-1 | "latestStatus" integer NULL DEFAULT NULL, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "on" varchar(128) [] NOT NULL DEFAULT '{}'::character varying[], +web-1 | "url" varchar(1024) NOT NULL, +web-1 | "secret" varchar(1024) NOT NULL, +web-1 | CONSTRAINT "PK_system_webhook_id" PRIMARY KEY ("id") +web-1 | ); +web-1 | CREATE INDEX "IDX_system_webhook_isActive" ON "system_webhook" ("isActive"); +web-1 | CREATE INDEX "IDX_system_webhook_on" ON "system_webhook" USING gin ("on"); +web-1 | +web-1 | CREATE TABLE "abuse_report_notification_recipient" ( +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "method" varchar(64) NOT NULL, +web-1 | "userId" varchar(32) NULL DEFAULT NULL, +web-1 | "systemWebhookId" varchar(32) NULL DEFAULT NULL, +web-1 | CONSTRAINT "PK_abuse_report_notification_recipient_id" PRIMARY KEY ("id"), +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId1" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId2" FOREIGN KEY ("userId") REFERENCES "user_profile"("userId") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_systemWebhookId" FOREIGN KEY ("systemWebhookId") REFERENCES "system_webhook"("id") ON DELETE CASCADE ON UPDATE NO ACTION +web-1 | ); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_isActive" ON "abuse_report_notification_recipient" ("isActive"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_method" ON "abuse_report_notification_recipient" ("method"); +db-1 | ELSE 'none'::instance_suspensionstate_enum +db-1 | END +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_userId" ON "abuse_report_notification_recipient" ("userId"); +db-1 | ) +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_systemWebhookId" ON "abuse_report_notification_recipient" ("systemWebhookId"); +web-1 | +db-1 | 2024-10-31 22:41:22.714 UTC [1] LOG: background worker "parallel worker" (PID 140) exited with exit code 1 +db-1 | 2024-10-31 22:41:26.376 UTC [144] ERROR: could not create unique index "IDX_8d5afc98982185799b160e10eb" +db-1 | 2024-10-31 22:41:26.376 UTC [144] DETAIL: Key (host)=(sc.dc09.ru) is duplicated. +db-1 | 2024-10-31 22:41:26.376 UTC [144] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +db-1 | CASE "suspensionState" +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +db-1 | ELSE 'none'::instance_suspensionstate_enum +db-1 | END +db-1 | ) +db-1 | 2024-10-31 22:41:26.381 UTC [148] FATAL: terminating background worker "parallel worker" due to administrator command +db-1 | 2024-10-31 22:41:26.381 UTC [148] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +db-1 | CASE "suspensionState" +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +db-1 | ELSE 'none'::instance_suspensionstate_enum +db-1 | END +db-1 | ) +db-1 | 2024-10-31 22:41:26.383 UTC [1] LOG: background worker "parallel worker" (PID 148) exited with exit code 1 +db-1 | 2024-10-31 22:41:30.001 UTC [149] ERROR: could not create unique index "IDX_8d5afc98982185799b160e10eb" +db-1 | 2024-10-31 22:41:30.001 UTC [149] DETAIL: Key (host)=(sc.dc09.ru) is duplicated. +db-1 | 2024-10-31 22:41:30.001 UTC [149] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +db-1 | CASE "suspensionState" +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +db-1 | ELSE 'none'::instance_suspensionstate_enum +db-1 | END +db-1 | ) +db-1 | 2024-10-31 22:41:30.008 UTC [156] FATAL: terminating background worker "parallel worker" due to administrator command +db-1 | 2024-10-31 22:41:30.008 UTC [156] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +db-1 | CASE "suspensionState" +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1713656541000,"AbuseReportNotification1713656541000"] +db-1 | ELSE 'none'::instance_suspensionstate_enum +db-1 | END +db-1 | ) +web-1 | Migration AbuseReportNotification1713656541000 has been executed successfully. +db-1 | 2024-10-31 22:41:30.010 UTC [1] LOG: background worker "parallel worker" (PID 156) exited with exit code 1 +web-1 | query: ALTER TABLE "poll" ADD "channelId" character varying(32) +db-1 | 2024-10-31 22:41:33.740 UTC [157] ERROR: could not create unique index "IDX_8d5afc98982185799b160e10eb" +db-1 | 2024-10-31 22:41:33.740 UTC [157] DETAIL: Key (host)=(sc.dc09.ru) is duplicated. +db-1 | 2024-10-31 22:41:33.740 UTC [157] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | query: COMMENT ON COLUMN "poll"."channelId" IS '[Denormalized]' +web-1 | query: CREATE INDEX "IDX_c1240fcc9675946ea5d6c2860e" ON "poll" ("channelId") +web-1 | query: UPDATE "poll" SET "channelId" = "note"."channelId" FROM "note" WHERE "poll"."noteId" = "note"."id" +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716129964060,"ChannelIdDenormalizedForMiPoll1716129964060"] +web-1 | Migration ChannelIdDenormalizedForMiPoll1716129964060 has been executed successfully. +db-1 | CASE "suspensionState" +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | query: ALTER TABLE "meta" ADD "mediaSilencedHosts" character varying(1024) array NOT NULL DEFAULT '{}' +db-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716197366117,"MediaSilenceForHosts1716197366117"] +web-1 | Migration MediaSilenceForHosts1716197366117 has been executed successfully. +db-1 | END +db-1 | ) +web-1 | query: ALTER TABLE "instance" ADD "notRespondingSince" TIMESTAMP WITH TIME ZONE +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716345015347,"NotRespondingSince1716345015347"] +db-1 | 2024-10-31 22:41:33.746 UTC [161] FATAL: terminating background worker "parallel worker" due to administrator command +db-1 | 2024-10-31 22:41:33.746 UTC [161] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +db-1 | CASE "suspensionState" +web-1 | Migration NotRespondingSince1716345015347 has been executed successfully. +web-1 | query: CREATE TYPE "public"."instance_suspensionstate_enum" AS ENUM('none', 'manuallySuspended', 'goneSuspended', 'autoSuspendedForNotResponding') +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +db-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | query: DROP INDEX "public"."IDX_34500da2e38ac393f7bb6b299c" +web-1 | query: ALTER TABLE "instance" RENAME COLUMN "isSuspended" TO "suspensionState" +db-1 | END +db-1 | ) +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" DROP DEFAULT +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +db-1 | 2024-10-31 22:41:33.748 UTC [1] LOG: background worker "parallel worker" (PID 161) exited with exit code 1 +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +db-1 | 2024-10-31 22:41:37.415 UTC [162] ERROR: could not create unique index "IDX_8d5afc98982185799b160e10eb" +db-1 | 2024-10-31 22:41:37.415 UTC [162] DETAIL: Key (host)=(sc.dc09.ru) is duplicated. +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +db-1 | 2024-10-31 22:41:37.415 UTC [162] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +db-1 | CASE "suspensionState" +web-1 | ) +web-1 | query failed: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +db-1 | ELSE 'none'::instance_suspensionstate_enum +db-1 | END +db-1 | ) +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +db-1 | 2024-10-31 22:41:37.421 UTC [169] FATAL: terminating background worker "parallel worker" due to administrator command +db-1 | 2024-10-31 22:41:37.421 UTC [169] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +db-1 | CASE "suspensionState" +web-1 | ) +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +db-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | error: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | Migration "SuspensionStateInsteadOfIsSspended1716345771510" failed, error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +db-1 | END +db-1 | ) +web-1 | query: ROLLBACK +db-1 | 2024-10-31 22:41:37.423 UTC [1] LOG: background worker "parallel worker" (PID 169) exited with exit code 1 +web-1 | Error during migration run: +db-1 | 2024-10-31 22:41:41.023 UTC [170] ERROR: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | QueryFailedError: could not create unique index "IDX_8d5afc98982185799b160e10eb" +db-1 | 2024-10-31 22:41:41.023 UTC [170] DETAIL: Key (host)=(sc.dc09.ru) is duplicated. +web-1 | at PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219:19) +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +db-1 | 2024-10-31 22:41:41.023 UTC [170] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +db-1 | CASE "suspensionState" +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +db-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +db-1 | END +db-1 | ) +db-1 | 2024-10-31 22:41:41.029 UTC [174] FATAL: terminating background worker "parallel worker" due to administrator command +web-1 | query: 'ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING (\n' + +web-1 | ' CASE "suspensionState"\n' + +db-1 | 2024-10-31 22:41:41.029 UTC [174] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +db-1 | CASE "suspensionState" +web-1 | " WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum\n" + +web-1 | " ELSE 'none'::instance_suspensionstate_enum\n" + +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +db-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | ' END\n' + +web-1 | ' )', +db-1 | END +db-1 | ) +web-1 | parameters: undefined, +web-1 | driverError: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +db-1 | 2024-10-31 22:41:41.031 UTC [1] LOG: background worker "parallel worker" (PID 174) exited with exit code 1 +web-1 | at /sharkey/node_modules/.pnpm/pg@8.12.0/node_modules/pg/lib/client.js:526:17 +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +db-1 | 2024-10-31 22:41:44.798 UTC [178] ERROR: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at async PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:184:25) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +db-1 | 2024-10-31 22:41:44.798 UTC [178] DETAIL: Key (host)=(sc.dc09.ru) is duplicated. +db-1 | 2024-10-31 22:41:44.798 UTC [178] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | length: 223, +db-1 | CASE "suspensionState" +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +db-1 | ELSE 'none'::instance_suspensionstate_enum +db-1 | END +web-1 | position: undefined, +web-1 | internalPosition: undefined, +db-1 | ) +db-1 | 2024-10-31 22:41:44.805 UTC [182] FATAL: terminating background worker "parallel worker" due to administrator command +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +db-1 | 2024-10-31 22:41:44.805 UTC [182] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +db-1 | CASE "suspensionState" +web-1 | column: undefined, +web-1 | dataType: undefined, +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +db-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +db-1 | END +db-1 | ) +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +db-1 | 2024-10-31 22:41:44.807 UTC [1] LOG: background worker "parallel worker" (PID 182) exited with exit code 1 +web-1 | }, +db-1 | 2024-10-31 22:41:48.434 UTC [183] ERROR: could not create unique index "IDX_8d5afc98982185799b160e10eb" +db-1 | 2024-10-31 22:41:48.434 UTC [183] DETAIL: Key (host)=(sc.dc09.ru) is duplicated. +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +db-1 | 2024-10-31 22:41:48.434 UTC [183] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +db-1 | CASE "suspensionState" +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +db-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +db-1 | END +web-1 | schema: 'public', +web-1 | table: 'instance', +db-1 | ) +web-1 | column: undefined, +web-1 | dataType: undefined, +db-1 | 2024-10-31 22:41:48.441 UTC [190] FATAL: terminating background worker "parallel worker" due to administrator command +db-1 | 2024-10-31 22:41:48.441 UTC [190] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +db-1 | CASE "suspensionState" +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | } +web-1 |  ELIFECYCLE  Command failed with exit code 1. +db-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +db-1 | END +db-1 | ) +db-1 | 2024-10-31 22:41:48.444 UTC [1] LOG: background worker "parallel worker" (PID 190) exited with exit code 1 +db-1 | 2024-10-31 22:41:52.046 UTC [191] ERROR: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | +web-1 | > sharkey@2024.8.2 migrateandstart /sharkey +web-1 | > pnpm migrate && pnpm start +db-1 | 2024-10-31 22:41:52.046 UTC [191] DETAIL: Key (host)=(sc.dc09.ru) is duplicated. +db-1 | 2024-10-31 22:41:52.046 UTC [191] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | +web-1 | +db-1 | CASE "suspensionState" +web-1 | > sharkey@2024.8.2 migrate /sharkey +web-1 | > cd packages/backend && pnpm migrate +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +db-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | +web-1 | +web-1 | > backend@ migrate /sharkey/packages/backend +web-1 | > pnpm typeorm migration:run -d ormconfig.js +db-1 | END +web-1 | +db-1 | ) +db-1 | 2024-10-31 22:41:52.052 UTC [195] FATAL: terminating background worker "parallel worker" due to administrator command +web-1 | query: SELECT * FROM current_schema() +web-1 | query: SELECT version(); +web-1 | query: SELECT * FROM "information_schema"."tables" WHERE "table_schema" = 'public' AND "table_name" = 'migrations' +db-1 | 2024-10-31 22:41:52.052 UTC [195] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | query: SELECT * FROM "migrations" "migrations" ORDER BY "id" DESC +db-1 | CASE "suspensionState" +web-1 | 300 migrations are already loaded in the database. +web-1 | 310 migrations were found in the source code. +web-1 | MoreRepoUrl1709462550083 is the last executed migration. It was executed on Sun Mar 03 2024 10:42:30 GMT+0000 (Coordinated Universal Time). +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +db-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | 10 migrations are new migrations must be executed. +web-1 | query: START TRANSACTION +web-1 | query: +db-1 | END +web-1 | alter table meta +web-1 | rename column "summalyProxy" to "urlPreviewSummaryProxyUrl"; +db-1 | ) +web-1 | alter table meta +web-1 | add "urlPreviewEnabled" boolean default true not null; +web-1 | alter table meta +web-1 | add "urlPreviewTimeout" integer default 10000 not null; +web-1 | alter table meta +db-1 | 2024-10-31 22:41:52.054 UTC [1] LOG: background worker "parallel worker" (PID 195) exited with exit code 1 +db-1 | 2024-10-31 22:41:55.815 UTC [199] ERROR: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | add "urlPreviewMaximumContentLength" bigint default 10485760 not null; +web-1 | alter table meta +db-1 | 2024-10-31 22:41:55.815 UTC [199] DETAIL: Key (host)=(sc.dc09.ru) is duplicated. +web-1 | add "urlPreviewRequireContentLength" boolean default false not null; +db-1 | 2024-10-31 22:41:55.815 UTC [199] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +db-1 | CASE "suspensionState" +web-1 | alter table meta +web-1 | add "urlPreviewUserAgent" varchar(1024) default null; +web-1 | +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710512074000,"UrlPreviewMeta1710512074000"] +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +db-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | Migration UrlPreviewMeta1710512074000 has been executed successfully. +web-1 | query: ALTER TABLE "antenna" ADD "excludeBots" boolean NOT NULL DEFAULT false +db-1 | END +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710919614510,"AntennaExcludeBots1710919614510"] +web-1 | Migration AntennaExcludeBots1710919614510 has been executed successfully. +web-1 | query: +web-1 | CREATE TABLE "system_webhook" ( +db-1 | ) +db-1 | 2024-10-31 22:41:55.821 UTC [203] FATAL: terminating background worker "parallel worker" due to administrator command +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +db-1 | 2024-10-31 22:41:55.821 UTC [203] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +db-1 | CASE "suspensionState" +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "latestSentAt" timestamp with time zone NULL DEFAULT NULL, +web-1 | "latestStatus" integer NULL DEFAULT NULL, +web-1 | "name" varchar(255) NOT NULL, +db-1 | ELSE 'none'::instance_suspensionstate_enum +db-1 | END +web-1 | "on" varchar(128) [] NOT NULL DEFAULT '{}'::character varying[], +db-1 | ) +db-1 | 2024-10-31 22:41:55.823 UTC [1] LOG: background worker "parallel worker" (PID 203) exited with exit code 1 +web-1 | "url" varchar(1024) NOT NULL, +web-1 | "secret" varchar(1024) NOT NULL, +web-1 | CONSTRAINT "PK_system_webhook_id" PRIMARY KEY ("id") +web-1 | ); +db-1 | 2024-10-31 22:41:59.478 UTC [204] ERROR: could not create unique index "IDX_8d5afc98982185799b160e10eb" +db-1 | 2024-10-31 22:41:59.478 UTC [204] DETAIL: Key (host)=(sc.dc09.ru) is duplicated. +web-1 | CREATE INDEX "IDX_system_webhook_isActive" ON "system_webhook" ("isActive"); +web-1 | CREATE INDEX "IDX_system_webhook_on" ON "system_webhook" USING gin ("on"); +db-1 | 2024-10-31 22:41:59.478 UTC [204] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | +web-1 | CREATE TABLE "abuse_report_notification_recipient" ( +db-1 | CASE "suspensionState" +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +db-1 | ELSE 'none'::instance_suspensionstate_enum +db-1 | END +db-1 | ) +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "name" varchar(255) NOT NULL, +db-1 | 2024-10-31 22:41:59.484 UTC [211] FATAL: terminating background worker "parallel worker" due to administrator command +web-1 | "method" varchar(64) NOT NULL, +db-1 | 2024-10-31 22:41:59.484 UTC [211] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | "userId" varchar(32) NULL DEFAULT NULL, +db-1 | CASE "suspensionState" +web-1 | "systemWebhookId" varchar(32) NULL DEFAULT NULL, +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +db-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | CONSTRAINT "PK_abuse_report_notification_recipient_id" PRIMARY KEY ("id"), +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId1" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId2" FOREIGN KEY ("userId") REFERENCES "user_profile"("userId") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_systemWebhookId" FOREIGN KEY ("systemWebhookId") REFERENCES "system_webhook"("id") ON DELETE CASCADE ON UPDATE NO ACTION +db-1 | END +db-1 | ) +web-1 | ); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_isActive" ON "abuse_report_notification_recipient" ("isActive"); +db-1 | 2024-10-31 22:41:59.486 UTC [1] LOG: background worker "parallel worker" (PID 211) exited with exit code 1 +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_method" ON "abuse_report_notification_recipient" ("method"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_userId" ON "abuse_report_notification_recipient" ("userId"); +db-1 | 2024-10-31 22:42:03.131 UTC [212] ERROR: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_systemWebhookId" ON "abuse_report_notification_recipient" ("systemWebhookId"); +web-1 | +db-1 | 2024-10-31 22:42:03.131 UTC [212] DETAIL: Key (host)=(sc.dc09.ru) is duplicated. +db-1 | 2024-10-31 22:42:03.131 UTC [212] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +db-1 | CASE "suspensionState" +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1713656541000,"AbuseReportNotification1713656541000"] +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +db-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | Migration AbuseReportNotification1713656541000 has been executed successfully. +web-1 | query: ALTER TABLE "poll" ADD "channelId" character varying(32) +web-1 | query: COMMENT ON COLUMN "poll"."channelId" IS '[Denormalized]' +web-1 | query: CREATE INDEX "IDX_c1240fcc9675946ea5d6c2860e" ON "poll" ("channelId") +db-1 | END +db-1 | ) +web-1 | query: UPDATE "poll" SET "channelId" = "note"."channelId" FROM "note" WHERE "poll"."noteId" = "note"."id" +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716129964060,"ChannelIdDenormalizedForMiPoll1716129964060"] +db-1 | 2024-10-31 22:42:03.137 UTC [219] FATAL: terminating background worker "parallel worker" due to administrator command +web-1 | Migration ChannelIdDenormalizedForMiPoll1716129964060 has been executed successfully. +web-1 | query: ALTER TABLE "meta" ADD "mediaSilencedHosts" character varying(1024) array NOT NULL DEFAULT '{}' +db-1 | 2024-10-31 22:42:03.137 UTC [219] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +db-1 | CASE "suspensionState" +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716197366117,"MediaSilenceForHosts1716197366117"] +web-1 | Migration MediaSilenceForHosts1716197366117 has been executed successfully. +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +db-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | query: ALTER TABLE "instance" ADD "notRespondingSince" TIMESTAMP WITH TIME ZONE +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716345015347,"NotRespondingSince1716345015347"] +db-1 | END +db-1 | ) +web-1 | Migration NotRespondingSince1716345015347 has been executed successfully. +web-1 | query: CREATE TYPE "public"."instance_suspensionstate_enum" AS ENUM('none', 'manuallySuspended', 'goneSuspended', 'autoSuspendedForNotResponding') +db-1 | 2024-10-31 22:42:03.139 UTC [1] LOG: background worker "parallel worker" (PID 219) exited with exit code 1 +web-1 | query: DROP INDEX "public"."IDX_34500da2e38ac393f7bb6b299c" +db-1 | 2024-10-31 22:42:06.993 UTC [220] ERROR: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | query: ALTER TABLE "instance" RENAME COLUMN "isSuspended" TO "suspensionState" +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" DROP DEFAULT +db-1 | 2024-10-31 22:42:06.993 UTC [220] DETAIL: Key (host)=(sc.dc09.ru) is duplicated. +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +db-1 | 2024-10-31 22:42:06.993 UTC [220] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +db-1 | CASE "suspensionState" +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +db-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +db-1 | END +web-1 | ) +web-1 | query failed: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +db-1 | ) +db-1 | 2024-10-31 22:42:06.999 UTC [224] FATAL: terminating background worker "parallel worker" due to administrator command +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +db-1 | 2024-10-31 22:42:06.999 UTC [224] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +db-1 | CASE "suspensionState" +web-1 | error: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | Migration "SuspensionStateInsteadOfIsSspended1716345771510" failed, error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | query: ROLLBACK +web-1 | Error during migration run: +db-1 | ELSE 'none'::instance_suspensionstate_enum +db-1 | END +web-1 | QueryFailedError: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219:19) +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +db-1 | ) +db-1 | 2024-10-31 22:42:07.001 UTC [1] LOG: background worker "parallel worker" (PID 224) exited with exit code 1 +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | query: 'ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING (\n' + +web-1 | ' CASE "suspensionState"\n' + +db-1 | 2024-10-31 22:42:10.861 UTC [228] ERROR: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | " WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum\n" + +db-1 | 2024-10-31 22:42:10.861 UTC [228] DETAIL: Key (host)=(sc.dc09.ru) is duplicated. +db-1 | 2024-10-31 22:42:10.861 UTC [228] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | " ELSE 'none'::instance_suspensionstate_enum\n" + +web-1 | ' END\n' + +db-1 | CASE "suspensionState" +web-1 | ' )', +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | parameters: undefined, +db-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | driverError: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +db-1 | END +web-1 | at /sharkey/node_modules/.pnpm/pg@8.12.0/node_modules/pg/lib/client.js:526:17 +db-1 | ) +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +db-1 | 2024-10-31 22:42:10.867 UTC [232] FATAL: terminating background worker "parallel worker" due to administrator command +web-1 | at async PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:184:25) +db-1 | 2024-10-31 22:42:10.867 UTC [232] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +db-1 | CASE "suspensionState" +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +db-1 | ELSE 'none'::instance_suspensionstate_enum +db-1 | END +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | length: 223, +web-1 | severity: 'ERROR', +db-1 | ) +db-1 | 2024-10-31 22:42:10.869 UTC [1] LOG: background worker "parallel worker" (PID 232) exited with exit code 1 +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +db-1 | 2024-10-31 22:42:14.554 UTC [233] ERROR: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | position: undefined, +web-1 | internalPosition: undefined, +db-1 | 2024-10-31 22:42:14.554 UTC [233] DETAIL: Key (host)=(sc.dc09.ru) is duplicated. +db-1 | 2024-10-31 22:42:14.554 UTC [233] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +db-1 | CASE "suspensionState" +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | internalQuery: undefined, +web-1 | where: undefined, +db-1 | ELSE 'none'::instance_suspensionstate_enum +db-1 | END +web-1 | schema: 'public', +db-1 | ) +db-1 | 2024-10-31 22:42:14.561 UTC [240] FATAL: terminating background worker "parallel worker" due to administrator command +web-1 | table: 'instance', +web-1 | column: undefined, +db-1 | 2024-10-31 22:42:14.561 UTC [240] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +db-1 | CASE "suspensionState" +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +db-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +db-1 | END +db-1 | ) +web-1 | file: 'tuplesort.c', +db-1 | 2024-10-31 22:42:14.564 UTC [1] LOG: background worker "parallel worker" (PID 240) exited with exit code 1 +db-1 | 2024-10-31 22:42:18.363 UTC [241] ERROR: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | line: '4423', +db-1 | 2024-10-31 22:42:18.363 UTC [241] DETAIL: Key (host)=(sc.dc09.ru) is duplicated. +db-1 | 2024-10-31 22:42:18.363 UTC [241] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | routine: 'comparetup_index_btree' +db-1 | CASE "suspensionState" +web-1 | }, +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +db-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | length: 223, +web-1 | severity: 'ERROR', +db-1 | END +db-1 | ) +db-1 | 2024-10-31 22:42:18.369 UTC [245] FATAL: terminating background worker "parallel worker" due to administrator command +db-1 | 2024-10-31 22:42:18.369 UTC [245] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | code: '23505', +db-1 | CASE "suspensionState" +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +db-1 | ELSE 'none'::instance_suspensionstate_enum +db-1 | END +web-1 | position: undefined, +db-1 | ) +db-1 | 2024-10-31 22:42:18.371 UTC [1] LOG: background worker "parallel worker" (PID 245) exited with exit code 1 +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +db-1 | 2024-10-31 22:42:21.095 UTC [246] ERROR: canceling autovacuum task +web-1 | where: undefined, +db-1 | 2024-10-31 22:42:21.095 UTC [246] CONTEXT: while scanning block 55839 of relation "public.poll" +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +db-1 | automatic vacuum of table "sharkey.public.poll" +db-1 | 2024-10-31 22:42:23.022 UTC [247] ERROR: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +db-1 | 2024-10-31 22:42:23.022 UTC [247] DETAIL: Key (host)=(sc.dc09.ru) is duplicated. +web-1 | line: '4423', +db-1 | 2024-10-31 22:42:23.022 UTC [247] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | routine: 'comparetup_index_btree' +web-1 | } +db-1 | CASE "suspensionState" +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +db-1 | ELSE 'none'::instance_suspensionstate_enum +db-1 | END +web-1 |  ELIFECYCLE  Command failed with exit code 1. +db-1 | ) +db-1 | 2024-10-31 22:42:23.028 UTC [254] FATAL: terminating background worker "parallel worker" due to administrator command +db-1 | 2024-10-31 22:42:23.028 UTC [254] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | +db-1 | CASE "suspensionState" +web-1 | > sharkey@2024.8.2 migrateandstart /sharkey +web-1 | > pnpm migrate && pnpm start +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | +web-1 | +db-1 | ELSE 'none'::instance_suspensionstate_enum +db-1 | END +web-1 | > sharkey@2024.8.2 migrate /sharkey +web-1 | > cd packages/backend && pnpm migrate +web-1 | +web-1 | +db-1 | ) +db-1 | 2024-10-31 22:42:23.030 UTC [1] LOG: background worker "parallel worker" (PID 254) exited with exit code 1 +web-1 | > backend@ migrate /sharkey/packages/backend +web-1 | > pnpm typeorm migration:run -d ormconfig.js +web-1 | +web-1 | query: SELECT * FROM current_schema() +db-1 | 2024-10-31 22:42:26.616 UTC [255] ERROR: could not create unique index "IDX_8d5afc98982185799b160e10eb" +db-1 | 2024-10-31 22:42:26.616 UTC [255] DETAIL: Key (host)=(sc.dc09.ru) is duplicated. +web-1 | query: SELECT version(); +db-1 | 2024-10-31 22:42:26.616 UTC [255] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | query: SELECT * FROM "information_schema"."tables" WHERE "table_schema" = 'public' AND "table_name" = 'migrations' +web-1 | query: SELECT * FROM "migrations" "migrations" ORDER BY "id" DESC +db-1 | CASE "suspensionState" +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | 300 migrations are already loaded in the database. +web-1 | 310 migrations were found in the source code. +web-1 | MoreRepoUrl1709462550083 is the last executed migration. It was executed on Sun Mar 03 2024 10:42:30 GMT+0000 (Coordinated Universal Time). +web-1 | 10 migrations are new migrations must be executed. +db-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | query: START TRANSACTION +web-1 | query: +db-1 | END +db-1 | ) +web-1 | alter table meta +web-1 | rename column "summalyProxy" to "urlPreviewSummaryProxyUrl"; +db-1 | 2024-10-31 22:42:26.622 UTC [262] FATAL: terminating background worker "parallel worker" due to administrator command +web-1 | alter table meta +web-1 | add "urlPreviewEnabled" boolean default true not null; +db-1 | 2024-10-31 22:42:26.622 UTC [262] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +db-1 | CASE "suspensionState" +web-1 | alter table meta +web-1 | add "urlPreviewTimeout" integer default 10000 not null; +web-1 | alter table meta +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | add "urlPreviewMaximumContentLength" bigint default 10485760 not null; +web-1 | alter table meta +db-1 | ELSE 'none'::instance_suspensionstate_enum +db-1 | END +web-1 | add "urlPreviewRequireContentLength" boolean default false not null; +web-1 | alter table meta +db-1 | ) +db-1 | 2024-10-31 22:42:26.624 UTC [1] LOG: background worker "parallel worker" (PID 262) exited with exit code 1 +db-1 | 2024-10-31 22:42:30.336 UTC [263] ERROR: could not create unique index "IDX_8d5afc98982185799b160e10eb" +db-1 | 2024-10-31 22:42:30.336 UTC [263] DETAIL: Key (host)=(sc.dc09.ru) is duplicated. +web-1 | add "urlPreviewUserAgent" varchar(1024) default null; +web-1 | +db-1 | 2024-10-31 22:42:30.336 UTC [263] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +db-1 | CASE "suspensionState" +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710512074000,"UrlPreviewMeta1710512074000"] +web-1 | Migration UrlPreviewMeta1710512074000 has been executed successfully. +web-1 | query: ALTER TABLE "antenna" ADD "excludeBots" boolean NOT NULL DEFAULT false +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710919614510,"AntennaExcludeBots1710919614510"] +web-1 | Migration AntennaExcludeBots1710919614510 has been executed successfully. +web-1 | query: +web-1 | CREATE TABLE "system_webhook" ( +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +db-1 | ELSE 'none'::instance_suspensionstate_enum +db-1 | END +db-1 | ) +db-1 | 2024-10-31 22:42:30.342 UTC [267] FATAL: terminating background worker "parallel worker" due to administrator command +db-1 | 2024-10-31 22:42:30.342 UTC [267] STATEMENT: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +db-1 | CASE "suspensionState" +db-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +db-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +db-1 | END +db-1 | ) +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +db-1 | 2024-10-31 22:42:30.345 UTC [1] LOG: background worker "parallel worker" (PID 267) exited with exit code 1 +web-1 | "latestSentAt" timestamp with time zone NULL DEFAULT NULL, +web-1 | "latestStatus" integer NULL DEFAULT NULL, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "on" varchar(128) [] NOT NULL DEFAULT '{}'::character varying[], +web-1 | "url" varchar(1024) NOT NULL, +web-1 | "secret" varchar(1024) NOT NULL, +web-1 | CONSTRAINT "PK_system_webhook_id" PRIMARY KEY ("id") +web-1 | ); +web-1 | CREATE INDEX "IDX_system_webhook_isActive" ON "system_webhook" ("isActive"); +web-1 | CREATE INDEX "IDX_system_webhook_on" ON "system_webhook" USING gin ("on"); +web-1 | +web-1 | CREATE TABLE "abuse_report_notification_recipient" ( +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "method" varchar(64) NOT NULL, +web-1 | "userId" varchar(32) NULL DEFAULT NULL, +web-1 | "systemWebhookId" varchar(32) NULL DEFAULT NULL, +web-1 | CONSTRAINT "PK_abuse_report_notification_recipient_id" PRIMARY KEY ("id"), +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId1" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId2" FOREIGN KEY ("userId") REFERENCES "user_profile"("userId") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_systemWebhookId" FOREIGN KEY ("systemWebhookId") REFERENCES "system_webhook"("id") ON DELETE CASCADE ON UPDATE NO ACTION +web-1 | ); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_isActive" ON "abuse_report_notification_recipient" ("isActive"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_method" ON "abuse_report_notification_recipient" ("method"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_userId" ON "abuse_report_notification_recipient" ("userId"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_systemWebhookId" ON "abuse_report_notification_recipient" ("systemWebhookId"); +web-1 | +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1713656541000,"AbuseReportNotification1713656541000"] +web-1 | Migration AbuseReportNotification1713656541000 has been executed successfully. +web-1 | query: ALTER TABLE "poll" ADD "channelId" character varying(32) +web-1 | query: COMMENT ON COLUMN "poll"."channelId" IS '[Denormalized]' +web-1 | query: CREATE INDEX "IDX_c1240fcc9675946ea5d6c2860e" ON "poll" ("channelId") +web-1 | query: UPDATE "poll" SET "channelId" = "note"."channelId" FROM "note" WHERE "poll"."noteId" = "note"."id" +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716129964060,"ChannelIdDenormalizedForMiPoll1716129964060"] +web-1 | Migration ChannelIdDenormalizedForMiPoll1716129964060 has been executed successfully. +web-1 | query: ALTER TABLE "meta" ADD "mediaSilencedHosts" character varying(1024) array NOT NULL DEFAULT '{}' +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716197366117,"MediaSilenceForHosts1716197366117"] +web-1 | Migration MediaSilenceForHosts1716197366117 has been executed successfully. +web-1 | query: ALTER TABLE "instance" ADD "notRespondingSince" TIMESTAMP WITH TIME ZONE +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716345015347,"NotRespondingSince1716345015347"] +web-1 | Migration NotRespondingSince1716345015347 has been executed successfully. +web-1 | query: CREATE TYPE "public"."instance_suspensionstate_enum" AS ENUM('none', 'manuallySuspended', 'goneSuspended', 'autoSuspendedForNotResponding') +web-1 | query: DROP INDEX "public"."IDX_34500da2e38ac393f7bb6b299c" +web-1 | query: ALTER TABLE "instance" RENAME COLUMN "isSuspended" TO "suspensionState" +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" DROP DEFAULT +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | query failed: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | error: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | Migration "SuspensionStateInsteadOfIsSspended1716345771510" failed, error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | query: ROLLBACK +web-1 | Error during migration run: +web-1 | QueryFailedError: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219:19) +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | query: 'ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING (\n' + +web-1 | ' CASE "suspensionState"\n' + +web-1 | " WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum\n" + +web-1 | " ELSE 'none'::instance_suspensionstate_enum\n" + +web-1 | ' END\n' + +web-1 | ' )', +web-1 | parameters: undefined, +web-1 | driverError: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at /sharkey/node_modules/.pnpm/pg@8.12.0/node_modules/pg/lib/client.js:526:17 +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +web-1 | at async PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:184:25) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | }, +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | } +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 | +web-1 | > sharkey@2024.8.2 migrateandstart /sharkey +web-1 | > pnpm migrate && pnpm start +web-1 | +web-1 | +web-1 | > sharkey@2024.8.2 migrate /sharkey +web-1 | > cd packages/backend && pnpm migrate +web-1 | +web-1 | +web-1 | > backend@ migrate /sharkey/packages/backend +web-1 | > pnpm typeorm migration:run -d ormconfig.js +web-1 | +web-1 | query: SELECT * FROM current_schema() +web-1 | query: SELECT version(); +web-1 | query: SELECT * FROM "information_schema"."tables" WHERE "table_schema" = 'public' AND "table_name" = 'migrations' +web-1 | query: SELECT * FROM "migrations" "migrations" ORDER BY "id" DESC +web-1 | 300 migrations are already loaded in the database. +web-1 | 310 migrations were found in the source code. +web-1 | MoreRepoUrl1709462550083 is the last executed migration. It was executed on Sun Mar 03 2024 10:42:30 GMT+0000 (Coordinated Universal Time). +web-1 | 10 migrations are new migrations must be executed. +web-1 | query: START TRANSACTION +web-1 | query: +web-1 | alter table meta +web-1 | rename column "summalyProxy" to "urlPreviewSummaryProxyUrl"; +web-1 | alter table meta +web-1 | add "urlPreviewEnabled" boolean default true not null; +web-1 | alter table meta +web-1 | add "urlPreviewTimeout" integer default 10000 not null; +web-1 | alter table meta +web-1 | add "urlPreviewMaximumContentLength" bigint default 10485760 not null; +web-1 | alter table meta +web-1 | add "urlPreviewRequireContentLength" boolean default false not null; +web-1 | alter table meta +web-1 | add "urlPreviewUserAgent" varchar(1024) default null; +web-1 | +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710512074000,"UrlPreviewMeta1710512074000"] +web-1 | Migration UrlPreviewMeta1710512074000 has been executed successfully. +web-1 | query: ALTER TABLE "antenna" ADD "excludeBots" boolean NOT NULL DEFAULT false +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710919614510,"AntennaExcludeBots1710919614510"] +web-1 | Migration AntennaExcludeBots1710919614510 has been executed successfully. +web-1 | query: +web-1 | CREATE TABLE "system_webhook" ( +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "latestSentAt" timestamp with time zone NULL DEFAULT NULL, +web-1 | "latestStatus" integer NULL DEFAULT NULL, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "on" varchar(128) [] NOT NULL DEFAULT '{}'::character varying[], +web-1 | "url" varchar(1024) NOT NULL, +web-1 | "secret" varchar(1024) NOT NULL, +web-1 | CONSTRAINT "PK_system_webhook_id" PRIMARY KEY ("id") +web-1 | ); +web-1 | CREATE INDEX "IDX_system_webhook_isActive" ON "system_webhook" ("isActive"); +web-1 | CREATE INDEX "IDX_system_webhook_on" ON "system_webhook" USING gin ("on"); +web-1 | +web-1 | CREATE TABLE "abuse_report_notification_recipient" ( +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "method" varchar(64) NOT NULL, +web-1 | "userId" varchar(32) NULL DEFAULT NULL, +web-1 | "systemWebhookId" varchar(32) NULL DEFAULT NULL, +web-1 | CONSTRAINT "PK_abuse_report_notification_recipient_id" PRIMARY KEY ("id"), +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId1" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId2" FOREIGN KEY ("userId") REFERENCES "user_profile"("userId") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_systemWebhookId" FOREIGN KEY ("systemWebhookId") REFERENCES "system_webhook"("id") ON DELETE CASCADE ON UPDATE NO ACTION +web-1 | ); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_isActive" ON "abuse_report_notification_recipient" ("isActive"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_method" ON "abuse_report_notification_recipient" ("method"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_userId" ON "abuse_report_notification_recipient" ("userId"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_systemWebhookId" ON "abuse_report_notification_recipient" ("systemWebhookId"); +web-1 | +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1713656541000,"AbuseReportNotification1713656541000"] +web-1 | Migration AbuseReportNotification1713656541000 has been executed successfully. +web-1 | query: ALTER TABLE "poll" ADD "channelId" character varying(32) +web-1 | query: COMMENT ON COLUMN "poll"."channelId" IS '[Denormalized]' +web-1 | query: CREATE INDEX "IDX_c1240fcc9675946ea5d6c2860e" ON "poll" ("channelId") +web-1 | query: UPDATE "poll" SET "channelId" = "note"."channelId" FROM "note" WHERE "poll"."noteId" = "note"."id" +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716129964060,"ChannelIdDenormalizedForMiPoll1716129964060"] +web-1 | Migration ChannelIdDenormalizedForMiPoll1716129964060 has been executed successfully. +web-1 | query: ALTER TABLE "meta" ADD "mediaSilencedHosts" character varying(1024) array NOT NULL DEFAULT '{}' +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716197366117,"MediaSilenceForHosts1716197366117"] +web-1 | Migration MediaSilenceForHosts1716197366117 has been executed successfully. +web-1 | query: ALTER TABLE "instance" ADD "notRespondingSince" TIMESTAMP WITH TIME ZONE +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716345015347,"NotRespondingSince1716345015347"] +web-1 | Migration NotRespondingSince1716345015347 has been executed successfully. +web-1 | query: CREATE TYPE "public"."instance_suspensionstate_enum" AS ENUM('none', 'manuallySuspended', 'goneSuspended', 'autoSuspendedForNotResponding') +web-1 | query: DROP INDEX "public"."IDX_34500da2e38ac393f7bb6b299c" +web-1 | query: ALTER TABLE "instance" RENAME COLUMN "isSuspended" TO "suspensionState" +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" DROP DEFAULT +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | query failed: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | error: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | Migration "SuspensionStateInsteadOfIsSspended1716345771510" failed, error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | query: ROLLBACK +web-1 | Error during migration run: +web-1 | QueryFailedError: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219:19) +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | query: 'ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING (\n' + +web-1 | ' CASE "suspensionState"\n' + +web-1 | " WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum\n" + +web-1 | " ELSE 'none'::instance_suspensionstate_enum\n" + +web-1 | ' END\n' + +web-1 | ' )', +web-1 | parameters: undefined, +web-1 | driverError: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at /sharkey/node_modules/.pnpm/pg@8.12.0/node_modules/pg/lib/client.js:526:17 +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +web-1 | at async PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:184:25) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | }, +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | } +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 | +web-1 | > sharkey@2024.8.2 migrateandstart /sharkey +web-1 | > pnpm migrate && pnpm start +web-1 | +web-1 | +web-1 | > sharkey@2024.8.2 migrate /sharkey +web-1 | > cd packages/backend && pnpm migrate +web-1 | +web-1 | +web-1 | > backend@ migrate /sharkey/packages/backend +web-1 | > pnpm typeorm migration:run -d ormconfig.js +web-1 | +web-1 | query: SELECT * FROM current_schema() +web-1 | query: SELECT version(); +web-1 | query: SELECT * FROM "information_schema"."tables" WHERE "table_schema" = 'public' AND "table_name" = 'migrations' +web-1 | query: SELECT * FROM "migrations" "migrations" ORDER BY "id" DESC +web-1 | 300 migrations are already loaded in the database. +web-1 | 310 migrations were found in the source code. +web-1 | MoreRepoUrl1709462550083 is the last executed migration. It was executed on Sun Mar 03 2024 10:42:30 GMT+0000 (Coordinated Universal Time). +web-1 | 10 migrations are new migrations must be executed. +web-1 | query: START TRANSACTION +web-1 | query: +web-1 | alter table meta +web-1 | rename column "summalyProxy" to "urlPreviewSummaryProxyUrl"; +web-1 | alter table meta +web-1 | add "urlPreviewEnabled" boolean default true not null; +web-1 | alter table meta +web-1 | add "urlPreviewTimeout" integer default 10000 not null; +web-1 | alter table meta +web-1 | add "urlPreviewMaximumContentLength" bigint default 10485760 not null; +web-1 | alter table meta +web-1 | add "urlPreviewRequireContentLength" boolean default false not null; +web-1 | alter table meta +web-1 | add "urlPreviewUserAgent" varchar(1024) default null; +web-1 | +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710512074000,"UrlPreviewMeta1710512074000"] +web-1 | Migration UrlPreviewMeta1710512074000 has been executed successfully. +web-1 | query: ALTER TABLE "antenna" ADD "excludeBots" boolean NOT NULL DEFAULT false +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710919614510,"AntennaExcludeBots1710919614510"] +web-1 | Migration AntennaExcludeBots1710919614510 has been executed successfully. +web-1 | query: +web-1 | CREATE TABLE "system_webhook" ( +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "latestSentAt" timestamp with time zone NULL DEFAULT NULL, +web-1 | "latestStatus" integer NULL DEFAULT NULL, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "on" varchar(128) [] NOT NULL DEFAULT '{}'::character varying[], +web-1 | "url" varchar(1024) NOT NULL, +web-1 | "secret" varchar(1024) NOT NULL, +web-1 | CONSTRAINT "PK_system_webhook_id" PRIMARY KEY ("id") +web-1 | ); +web-1 | CREATE INDEX "IDX_system_webhook_isActive" ON "system_webhook" ("isActive"); +web-1 | CREATE INDEX "IDX_system_webhook_on" ON "system_webhook" USING gin ("on"); +web-1 | +web-1 | CREATE TABLE "abuse_report_notification_recipient" ( +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "method" varchar(64) NOT NULL, +web-1 | "userId" varchar(32) NULL DEFAULT NULL, +web-1 | "systemWebhookId" varchar(32) NULL DEFAULT NULL, +web-1 | CONSTRAINT "PK_abuse_report_notification_recipient_id" PRIMARY KEY ("id"), +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId1" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId2" FOREIGN KEY ("userId") REFERENCES "user_profile"("userId") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_systemWebhookId" FOREIGN KEY ("systemWebhookId") REFERENCES "system_webhook"("id") ON DELETE CASCADE ON UPDATE NO ACTION +web-1 | ); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_isActive" ON "abuse_report_notification_recipient" ("isActive"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_method" ON "abuse_report_notification_recipient" ("method"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_userId" ON "abuse_report_notification_recipient" ("userId"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_systemWebhookId" ON "abuse_report_notification_recipient" ("systemWebhookId"); +web-1 | +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1713656541000,"AbuseReportNotification1713656541000"] +web-1 | Migration AbuseReportNotification1713656541000 has been executed successfully. +web-1 | query: ALTER TABLE "poll" ADD "channelId" character varying(32) +web-1 | query: COMMENT ON COLUMN "poll"."channelId" IS '[Denormalized]' +web-1 | query: CREATE INDEX "IDX_c1240fcc9675946ea5d6c2860e" ON "poll" ("channelId") +web-1 | query: UPDATE "poll" SET "channelId" = "note"."channelId" FROM "note" WHERE "poll"."noteId" = "note"."id" +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716129964060,"ChannelIdDenormalizedForMiPoll1716129964060"] +web-1 | Migration ChannelIdDenormalizedForMiPoll1716129964060 has been executed successfully. +web-1 | query: ALTER TABLE "meta" ADD "mediaSilencedHosts" character varying(1024) array NOT NULL DEFAULT '{}' +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716197366117,"MediaSilenceForHosts1716197366117"] +web-1 | Migration MediaSilenceForHosts1716197366117 has been executed successfully. +web-1 | query: ALTER TABLE "instance" ADD "notRespondingSince" TIMESTAMP WITH TIME ZONE +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716345015347,"NotRespondingSince1716345015347"] +web-1 | Migration NotRespondingSince1716345015347 has been executed successfully. +web-1 | query: CREATE TYPE "public"."instance_suspensionstate_enum" AS ENUM('none', 'manuallySuspended', 'goneSuspended', 'autoSuspendedForNotResponding') +web-1 | query: DROP INDEX "public"."IDX_34500da2e38ac393f7bb6b299c" +web-1 | query: ALTER TABLE "instance" RENAME COLUMN "isSuspended" TO "suspensionState" +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" DROP DEFAULT +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | query failed: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | error: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | Migration "SuspensionStateInsteadOfIsSspended1716345771510" failed, error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | query: ROLLBACK +web-1 | Error during migration run: +web-1 | QueryFailedError: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219:19) +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | query: 'ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING (\n' + +web-1 | ' CASE "suspensionState"\n' + +web-1 | " WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum\n" + +web-1 | " ELSE 'none'::instance_suspensionstate_enum\n" + +web-1 | ' END\n' + +web-1 | ' )', +web-1 | parameters: undefined, +web-1 | driverError: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at /sharkey/node_modules/.pnpm/pg@8.12.0/node_modules/pg/lib/client.js:526:17 +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +web-1 | at async PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:184:25) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | }, +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | } +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 | +web-1 | > sharkey@2024.8.2 migrateandstart /sharkey +web-1 | > pnpm migrate && pnpm start +web-1 | +web-1 | +web-1 | > sharkey@2024.8.2 migrate /sharkey +web-1 | > cd packages/backend && pnpm migrate +web-1 | +web-1 | +web-1 | > backend@ migrate /sharkey/packages/backend +web-1 | > pnpm typeorm migration:run -d ormconfig.js +web-1 | +web-1 | query: SELECT * FROM current_schema() +web-1 | query: SELECT version(); +web-1 | query: SELECT * FROM "information_schema"."tables" WHERE "table_schema" = 'public' AND "table_name" = 'migrations' +web-1 | query: SELECT * FROM "migrations" "migrations" ORDER BY "id" DESC +web-1 | 300 migrations are already loaded in the database. +web-1 | 310 migrations were found in the source code. +web-1 | MoreRepoUrl1709462550083 is the last executed migration. It was executed on Sun Mar 03 2024 10:42:30 GMT+0000 (Coordinated Universal Time). +web-1 | 10 migrations are new migrations must be executed. +web-1 | query: START TRANSACTION +web-1 | query: +web-1 | alter table meta +web-1 | rename column "summalyProxy" to "urlPreviewSummaryProxyUrl"; +web-1 | alter table meta +web-1 | add "urlPreviewEnabled" boolean default true not null; +web-1 | alter table meta +web-1 | add "urlPreviewTimeout" integer default 10000 not null; +web-1 | alter table meta +web-1 | add "urlPreviewMaximumContentLength" bigint default 10485760 not null; +web-1 | alter table meta +web-1 | add "urlPreviewRequireContentLength" boolean default false not null; +web-1 | alter table meta +web-1 | add "urlPreviewUserAgent" varchar(1024) default null; +web-1 | +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710512074000,"UrlPreviewMeta1710512074000"] +web-1 | Migration UrlPreviewMeta1710512074000 has been executed successfully. +web-1 | query: ALTER TABLE "antenna" ADD "excludeBots" boolean NOT NULL DEFAULT false +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710919614510,"AntennaExcludeBots1710919614510"] +web-1 | Migration AntennaExcludeBots1710919614510 has been executed successfully. +web-1 | query: +web-1 | CREATE TABLE "system_webhook" ( +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "latestSentAt" timestamp with time zone NULL DEFAULT NULL, +web-1 | "latestStatus" integer NULL DEFAULT NULL, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "on" varchar(128) [] NOT NULL DEFAULT '{}'::character varying[], +web-1 | "url" varchar(1024) NOT NULL, +web-1 | "secret" varchar(1024) NOT NULL, +web-1 | CONSTRAINT "PK_system_webhook_id" PRIMARY KEY ("id") +web-1 | ); +web-1 | CREATE INDEX "IDX_system_webhook_isActive" ON "system_webhook" ("isActive"); +web-1 | CREATE INDEX "IDX_system_webhook_on" ON "system_webhook" USING gin ("on"); +web-1 | +web-1 | CREATE TABLE "abuse_report_notification_recipient" ( +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "method" varchar(64) NOT NULL, +web-1 | "userId" varchar(32) NULL DEFAULT NULL, +web-1 | "systemWebhookId" varchar(32) NULL DEFAULT NULL, +web-1 | CONSTRAINT "PK_abuse_report_notification_recipient_id" PRIMARY KEY ("id"), +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId1" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId2" FOREIGN KEY ("userId") REFERENCES "user_profile"("userId") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_systemWebhookId" FOREIGN KEY ("systemWebhookId") REFERENCES "system_webhook"("id") ON DELETE CASCADE ON UPDATE NO ACTION +web-1 | ); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_isActive" ON "abuse_report_notification_recipient" ("isActive"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_method" ON "abuse_report_notification_recipient" ("method"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_userId" ON "abuse_report_notification_recipient" ("userId"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_systemWebhookId" ON "abuse_report_notification_recipient" ("systemWebhookId"); +web-1 | +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1713656541000,"AbuseReportNotification1713656541000"] +web-1 | Migration AbuseReportNotification1713656541000 has been executed successfully. +web-1 | query: ALTER TABLE "poll" ADD "channelId" character varying(32) +web-1 | query: COMMENT ON COLUMN "poll"."channelId" IS '[Denormalized]' +web-1 | query: CREATE INDEX "IDX_c1240fcc9675946ea5d6c2860e" ON "poll" ("channelId") +web-1 | query: UPDATE "poll" SET "channelId" = "note"."channelId" FROM "note" WHERE "poll"."noteId" = "note"."id" +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716129964060,"ChannelIdDenormalizedForMiPoll1716129964060"] +web-1 | Migration ChannelIdDenormalizedForMiPoll1716129964060 has been executed successfully. +web-1 | query: ALTER TABLE "meta" ADD "mediaSilencedHosts" character varying(1024) array NOT NULL DEFAULT '{}' +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716197366117,"MediaSilenceForHosts1716197366117"] +web-1 | Migration MediaSilenceForHosts1716197366117 has been executed successfully. +web-1 | query: ALTER TABLE "instance" ADD "notRespondingSince" TIMESTAMP WITH TIME ZONE +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716345015347,"NotRespondingSince1716345015347"] +web-1 | Migration NotRespondingSince1716345015347 has been executed successfully. +web-1 | query: CREATE TYPE "public"."instance_suspensionstate_enum" AS ENUM('none', 'manuallySuspended', 'goneSuspended', 'autoSuspendedForNotResponding') +web-1 | query: DROP INDEX "public"."IDX_34500da2e38ac393f7bb6b299c" +web-1 | query: ALTER TABLE "instance" RENAME COLUMN "isSuspended" TO "suspensionState" +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" DROP DEFAULT +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | query failed: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | error: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | Migration "SuspensionStateInsteadOfIsSspended1716345771510" failed, error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | query: ROLLBACK +web-1 | Error during migration run: +web-1 | QueryFailedError: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219:19) +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | query: 'ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING (\n' + +web-1 | ' CASE "suspensionState"\n' + +web-1 | " WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum\n" + +web-1 | " ELSE 'none'::instance_suspensionstate_enum\n" + +web-1 | ' END\n' + +web-1 | ' )', +web-1 | parameters: undefined, +web-1 | driverError: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at /sharkey/node_modules/.pnpm/pg@8.12.0/node_modules/pg/lib/client.js:526:17 +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +web-1 | at async PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:184:25) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | }, +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | } +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 | +web-1 | > sharkey@2024.8.2 migrateandstart /sharkey +web-1 | > pnpm migrate && pnpm start +web-1 | +web-1 | +web-1 | > sharkey@2024.8.2 migrate /sharkey +web-1 | > cd packages/backend && pnpm migrate +web-1 | +web-1 | +web-1 | > backend@ migrate /sharkey/packages/backend +web-1 | > pnpm typeorm migration:run -d ormconfig.js +web-1 | +web-1 | query: SELECT * FROM current_schema() +web-1 | query: SELECT version(); +web-1 | query: SELECT * FROM "information_schema"."tables" WHERE "table_schema" = 'public' AND "table_name" = 'migrations' +web-1 | query: SELECT * FROM "migrations" "migrations" ORDER BY "id" DESC +web-1 | 300 migrations are already loaded in the database. +web-1 | 310 migrations were found in the source code. +web-1 | MoreRepoUrl1709462550083 is the last executed migration. It was executed on Sun Mar 03 2024 10:42:30 GMT+0000 (Coordinated Universal Time). +web-1 | 10 migrations are new migrations must be executed. +web-1 | query: START TRANSACTION +web-1 | query: +web-1 | alter table meta +web-1 | rename column "summalyProxy" to "urlPreviewSummaryProxyUrl"; +web-1 | alter table meta +web-1 | add "urlPreviewEnabled" boolean default true not null; +web-1 | alter table meta +web-1 | add "urlPreviewTimeout" integer default 10000 not null; +web-1 | alter table meta +web-1 | add "urlPreviewMaximumContentLength" bigint default 10485760 not null; +web-1 | alter table meta +web-1 | add "urlPreviewRequireContentLength" boolean default false not null; +web-1 | alter table meta +web-1 | add "urlPreviewUserAgent" varchar(1024) default null; +web-1 | +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710512074000,"UrlPreviewMeta1710512074000"] +web-1 | Migration UrlPreviewMeta1710512074000 has been executed successfully. +web-1 | query: ALTER TABLE "antenna" ADD "excludeBots" boolean NOT NULL DEFAULT false +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710919614510,"AntennaExcludeBots1710919614510"] +web-1 | Migration AntennaExcludeBots1710919614510 has been executed successfully. +web-1 | query: +web-1 | CREATE TABLE "system_webhook" ( +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "latestSentAt" timestamp with time zone NULL DEFAULT NULL, +web-1 | "latestStatus" integer NULL DEFAULT NULL, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "on" varchar(128) [] NOT NULL DEFAULT '{}'::character varying[], +web-1 | "url" varchar(1024) NOT NULL, +web-1 | "secret" varchar(1024) NOT NULL, +web-1 | CONSTRAINT "PK_system_webhook_id" PRIMARY KEY ("id") +web-1 | ); +web-1 | CREATE INDEX "IDX_system_webhook_isActive" ON "system_webhook" ("isActive"); +web-1 | CREATE INDEX "IDX_system_webhook_on" ON "system_webhook" USING gin ("on"); +web-1 | +web-1 | CREATE TABLE "abuse_report_notification_recipient" ( +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "method" varchar(64) NOT NULL, +web-1 | "userId" varchar(32) NULL DEFAULT NULL, +web-1 | "systemWebhookId" varchar(32) NULL DEFAULT NULL, +web-1 | CONSTRAINT "PK_abuse_report_notification_recipient_id" PRIMARY KEY ("id"), +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId1" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId2" FOREIGN KEY ("userId") REFERENCES "user_profile"("userId") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_systemWebhookId" FOREIGN KEY ("systemWebhookId") REFERENCES "system_webhook"("id") ON DELETE CASCADE ON UPDATE NO ACTION +web-1 | ); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_isActive" ON "abuse_report_notification_recipient" ("isActive"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_method" ON "abuse_report_notification_recipient" ("method"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_userId" ON "abuse_report_notification_recipient" ("userId"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_systemWebhookId" ON "abuse_report_notification_recipient" ("systemWebhookId"); +web-1 | +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1713656541000,"AbuseReportNotification1713656541000"] +web-1 | Migration AbuseReportNotification1713656541000 has been executed successfully. +web-1 | query: ALTER TABLE "poll" ADD "channelId" character varying(32) +web-1 | query: COMMENT ON COLUMN "poll"."channelId" IS '[Denormalized]' +web-1 | query: CREATE INDEX "IDX_c1240fcc9675946ea5d6c2860e" ON "poll" ("channelId") +web-1 | query: UPDATE "poll" SET "channelId" = "note"."channelId" FROM "note" WHERE "poll"."noteId" = "note"."id" +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716129964060,"ChannelIdDenormalizedForMiPoll1716129964060"] +web-1 | Migration ChannelIdDenormalizedForMiPoll1716129964060 has been executed successfully. +web-1 | query: ALTER TABLE "meta" ADD "mediaSilencedHosts" character varying(1024) array NOT NULL DEFAULT '{}' +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716197366117,"MediaSilenceForHosts1716197366117"] +web-1 | Migration MediaSilenceForHosts1716197366117 has been executed successfully. +web-1 | query: ALTER TABLE "instance" ADD "notRespondingSince" TIMESTAMP WITH TIME ZONE +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716345015347,"NotRespondingSince1716345015347"] +web-1 | Migration NotRespondingSince1716345015347 has been executed successfully. +web-1 | query: CREATE TYPE "public"."instance_suspensionstate_enum" AS ENUM('none', 'manuallySuspended', 'goneSuspended', 'autoSuspendedForNotResponding') +web-1 | query: DROP INDEX "public"."IDX_34500da2e38ac393f7bb6b299c" +web-1 | query: ALTER TABLE "instance" RENAME COLUMN "isSuspended" TO "suspensionState" +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" DROP DEFAULT +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | query failed: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | error: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | Migration "SuspensionStateInsteadOfIsSspended1716345771510" failed, error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | query: ROLLBACK +web-1 | Error during migration run: +web-1 | QueryFailedError: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219:19) +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | query: 'ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING (\n' + +web-1 | ' CASE "suspensionState"\n' + +web-1 | " WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum\n" + +web-1 | " ELSE 'none'::instance_suspensionstate_enum\n" + +web-1 | ' END\n' + +web-1 | ' )', +web-1 | parameters: undefined, +web-1 | driverError: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at /sharkey/node_modules/.pnpm/pg@8.12.0/node_modules/pg/lib/client.js:526:17 +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +web-1 | at async PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:184:25) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | }, +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | } +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 | +web-1 | > sharkey@2024.8.2 migrateandstart /sharkey +web-1 | > pnpm migrate && pnpm start +web-1 | +web-1 | +web-1 | > sharkey@2024.8.2 migrate /sharkey +web-1 | > cd packages/backend && pnpm migrate +web-1 | +web-1 | +web-1 | > backend@ migrate /sharkey/packages/backend +web-1 | > pnpm typeorm migration:run -d ormconfig.js +web-1 | +web-1 | query: SELECT * FROM current_schema() +web-1 | query: SELECT version(); +web-1 | query: SELECT * FROM "information_schema"."tables" WHERE "table_schema" = 'public' AND "table_name" = 'migrations' +web-1 | query: SELECT * FROM "migrations" "migrations" ORDER BY "id" DESC +web-1 | 300 migrations are already loaded in the database. +web-1 | 310 migrations were found in the source code. +web-1 | MoreRepoUrl1709462550083 is the last executed migration. It was executed on Sun Mar 03 2024 10:42:30 GMT+0000 (Coordinated Universal Time). +web-1 | 10 migrations are new migrations must be executed. +web-1 | query: START TRANSACTION +web-1 | query: +web-1 | alter table meta +web-1 | rename column "summalyProxy" to "urlPreviewSummaryProxyUrl"; +web-1 | alter table meta +web-1 | add "urlPreviewEnabled" boolean default true not null; +web-1 | alter table meta +web-1 | add "urlPreviewTimeout" integer default 10000 not null; +web-1 | alter table meta +web-1 | add "urlPreviewMaximumContentLength" bigint default 10485760 not null; +web-1 | alter table meta +web-1 | add "urlPreviewRequireContentLength" boolean default false not null; +web-1 | alter table meta +web-1 | add "urlPreviewUserAgent" varchar(1024) default null; +web-1 | +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710512074000,"UrlPreviewMeta1710512074000"] +web-1 | Migration UrlPreviewMeta1710512074000 has been executed successfully. +web-1 | query: ALTER TABLE "antenna" ADD "excludeBots" boolean NOT NULL DEFAULT false +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710919614510,"AntennaExcludeBots1710919614510"] +web-1 | Migration AntennaExcludeBots1710919614510 has been executed successfully. +web-1 | query: +web-1 | CREATE TABLE "system_webhook" ( +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "latestSentAt" timestamp with time zone NULL DEFAULT NULL, +web-1 | "latestStatus" integer NULL DEFAULT NULL, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "on" varchar(128) [] NOT NULL DEFAULT '{}'::character varying[], +web-1 | "url" varchar(1024) NOT NULL, +web-1 | "secret" varchar(1024) NOT NULL, +web-1 | CONSTRAINT "PK_system_webhook_id" PRIMARY KEY ("id") +web-1 | ); +web-1 | CREATE INDEX "IDX_system_webhook_isActive" ON "system_webhook" ("isActive"); +web-1 | CREATE INDEX "IDX_system_webhook_on" ON "system_webhook" USING gin ("on"); +web-1 | +web-1 | CREATE TABLE "abuse_report_notification_recipient" ( +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "method" varchar(64) NOT NULL, +web-1 | "userId" varchar(32) NULL DEFAULT NULL, +web-1 | "systemWebhookId" varchar(32) NULL DEFAULT NULL, +web-1 | CONSTRAINT "PK_abuse_report_notification_recipient_id" PRIMARY KEY ("id"), +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId1" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId2" FOREIGN KEY ("userId") REFERENCES "user_profile"("userId") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_systemWebhookId" FOREIGN KEY ("systemWebhookId") REFERENCES "system_webhook"("id") ON DELETE CASCADE ON UPDATE NO ACTION +web-1 | ); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_isActive" ON "abuse_report_notification_recipient" ("isActive"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_method" ON "abuse_report_notification_recipient" ("method"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_userId" ON "abuse_report_notification_recipient" ("userId"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_systemWebhookId" ON "abuse_report_notification_recipient" ("systemWebhookId"); +web-1 | +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1713656541000,"AbuseReportNotification1713656541000"] +web-1 | Migration AbuseReportNotification1713656541000 has been executed successfully. +web-1 | query: ALTER TABLE "poll" ADD "channelId" character varying(32) +web-1 | query: COMMENT ON COLUMN "poll"."channelId" IS '[Denormalized]' +web-1 | query: CREATE INDEX "IDX_c1240fcc9675946ea5d6c2860e" ON "poll" ("channelId") +web-1 | query: UPDATE "poll" SET "channelId" = "note"."channelId" FROM "note" WHERE "poll"."noteId" = "note"."id" +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716129964060,"ChannelIdDenormalizedForMiPoll1716129964060"] +web-1 | Migration ChannelIdDenormalizedForMiPoll1716129964060 has been executed successfully. +web-1 | query: ALTER TABLE "meta" ADD "mediaSilencedHosts" character varying(1024) array NOT NULL DEFAULT '{}' +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716197366117,"MediaSilenceForHosts1716197366117"] +web-1 | Migration MediaSilenceForHosts1716197366117 has been executed successfully. +web-1 | query: ALTER TABLE "instance" ADD "notRespondingSince" TIMESTAMP WITH TIME ZONE +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716345015347,"NotRespondingSince1716345015347"] +web-1 | Migration NotRespondingSince1716345015347 has been executed successfully. +web-1 | query: CREATE TYPE "public"."instance_suspensionstate_enum" AS ENUM('none', 'manuallySuspended', 'goneSuspended', 'autoSuspendedForNotResponding') +web-1 | query: DROP INDEX "public"."IDX_34500da2e38ac393f7bb6b299c" +web-1 | query: ALTER TABLE "instance" RENAME COLUMN "isSuspended" TO "suspensionState" +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" DROP DEFAULT +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | query failed: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | error: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | Migration "SuspensionStateInsteadOfIsSspended1716345771510" failed, error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | query: ROLLBACK +web-1 | Error during migration run: +web-1 | QueryFailedError: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219:19) +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | query: 'ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING (\n' + +web-1 | ' CASE "suspensionState"\n' + +web-1 | " WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum\n" + +web-1 | " ELSE 'none'::instance_suspensionstate_enum\n" + +web-1 | ' END\n' + +web-1 | ' )', +web-1 | parameters: undefined, +web-1 | driverError: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at /sharkey/node_modules/.pnpm/pg@8.12.0/node_modules/pg/lib/client.js:526:17 +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +web-1 | at async PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:184:25) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | }, +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | } +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 | +web-1 | > sharkey@2024.8.2 migrateandstart /sharkey +web-1 | > pnpm migrate && pnpm start +web-1 | +web-1 | +web-1 | > sharkey@2024.8.2 migrate /sharkey +web-1 | > cd packages/backend && pnpm migrate +web-1 | +web-1 | +web-1 | > backend@ migrate /sharkey/packages/backend +web-1 | > pnpm typeorm migration:run -d ormconfig.js +web-1 | +web-1 | query: SELECT * FROM current_schema() +web-1 | query: SELECT version(); +web-1 | query: SELECT * FROM "information_schema"."tables" WHERE "table_schema" = 'public' AND "table_name" = 'migrations' +web-1 | query: SELECT * FROM "migrations" "migrations" ORDER BY "id" DESC +web-1 | 300 migrations are already loaded in the database. +web-1 | 310 migrations were found in the source code. +web-1 | MoreRepoUrl1709462550083 is the last executed migration. It was executed on Sun Mar 03 2024 10:42:30 GMT+0000 (Coordinated Universal Time). +web-1 | 10 migrations are new migrations must be executed. +web-1 | query: START TRANSACTION +web-1 | query: +web-1 | alter table meta +web-1 | rename column "summalyProxy" to "urlPreviewSummaryProxyUrl"; +web-1 | alter table meta +web-1 | add "urlPreviewEnabled" boolean default true not null; +web-1 | alter table meta +web-1 | add "urlPreviewTimeout" integer default 10000 not null; +web-1 | alter table meta +web-1 | add "urlPreviewMaximumContentLength" bigint default 10485760 not null; +web-1 | alter table meta +web-1 | add "urlPreviewRequireContentLength" boolean default false not null; +web-1 | alter table meta +web-1 | add "urlPreviewUserAgent" varchar(1024) default null; +web-1 | +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710512074000,"UrlPreviewMeta1710512074000"] +web-1 | Migration UrlPreviewMeta1710512074000 has been executed successfully. +web-1 | query: ALTER TABLE "antenna" ADD "excludeBots" boolean NOT NULL DEFAULT false +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710919614510,"AntennaExcludeBots1710919614510"] +web-1 | Migration AntennaExcludeBots1710919614510 has been executed successfully. +web-1 | query: +web-1 | CREATE TABLE "system_webhook" ( +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "latestSentAt" timestamp with time zone NULL DEFAULT NULL, +web-1 | "latestStatus" integer NULL DEFAULT NULL, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "on" varchar(128) [] NOT NULL DEFAULT '{}'::character varying[], +web-1 | "url" varchar(1024) NOT NULL, +web-1 | "secret" varchar(1024) NOT NULL, +web-1 | CONSTRAINT "PK_system_webhook_id" PRIMARY KEY ("id") +web-1 | ); +web-1 | CREATE INDEX "IDX_system_webhook_isActive" ON "system_webhook" ("isActive"); +web-1 | CREATE INDEX "IDX_system_webhook_on" ON "system_webhook" USING gin ("on"); +web-1 | +web-1 | CREATE TABLE "abuse_report_notification_recipient" ( +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "method" varchar(64) NOT NULL, +web-1 | "userId" varchar(32) NULL DEFAULT NULL, +web-1 | "systemWebhookId" varchar(32) NULL DEFAULT NULL, +web-1 | CONSTRAINT "PK_abuse_report_notification_recipient_id" PRIMARY KEY ("id"), +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId1" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId2" FOREIGN KEY ("userId") REFERENCES "user_profile"("userId") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_systemWebhookId" FOREIGN KEY ("systemWebhookId") REFERENCES "system_webhook"("id") ON DELETE CASCADE ON UPDATE NO ACTION +web-1 | ); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_isActive" ON "abuse_report_notification_recipient" ("isActive"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_method" ON "abuse_report_notification_recipient" ("method"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_userId" ON "abuse_report_notification_recipient" ("userId"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_systemWebhookId" ON "abuse_report_notification_recipient" ("systemWebhookId"); +web-1 | +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1713656541000,"AbuseReportNotification1713656541000"] +web-1 | Migration AbuseReportNotification1713656541000 has been executed successfully. +web-1 | query: ALTER TABLE "poll" ADD "channelId" character varying(32) +web-1 | query: COMMENT ON COLUMN "poll"."channelId" IS '[Denormalized]' +web-1 | query: CREATE INDEX "IDX_c1240fcc9675946ea5d6c2860e" ON "poll" ("channelId") +web-1 | query: UPDATE "poll" SET "channelId" = "note"."channelId" FROM "note" WHERE "poll"."noteId" = "note"."id" +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716129964060,"ChannelIdDenormalizedForMiPoll1716129964060"] +web-1 | Migration ChannelIdDenormalizedForMiPoll1716129964060 has been executed successfully. +web-1 | query: ALTER TABLE "meta" ADD "mediaSilencedHosts" character varying(1024) array NOT NULL DEFAULT '{}' +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716197366117,"MediaSilenceForHosts1716197366117"] +web-1 | Migration MediaSilenceForHosts1716197366117 has been executed successfully. +web-1 | query: ALTER TABLE "instance" ADD "notRespondingSince" TIMESTAMP WITH TIME ZONE +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716345015347,"NotRespondingSince1716345015347"] +web-1 | Migration NotRespondingSince1716345015347 has been executed successfully. +web-1 | query: CREATE TYPE "public"."instance_suspensionstate_enum" AS ENUM('none', 'manuallySuspended', 'goneSuspended', 'autoSuspendedForNotResponding') +web-1 | query: DROP INDEX "public"."IDX_34500da2e38ac393f7bb6b299c" +web-1 | query: ALTER TABLE "instance" RENAME COLUMN "isSuspended" TO "suspensionState" +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" DROP DEFAULT +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | query failed: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | error: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | Migration "SuspensionStateInsteadOfIsSspended1716345771510" failed, error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | query: ROLLBACK +web-1 | Error during migration run: +web-1 | QueryFailedError: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219:19) +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | query: 'ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING (\n' + +web-1 | ' CASE "suspensionState"\n' + +web-1 | " WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum\n" + +web-1 | " ELSE 'none'::instance_suspensionstate_enum\n" + +web-1 | ' END\n' + +web-1 | ' )', +web-1 | parameters: undefined, +web-1 | driverError: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at /sharkey/node_modules/.pnpm/pg@8.12.0/node_modules/pg/lib/client.js:526:17 +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +web-1 | at async PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:184:25) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | }, +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | } +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 | +web-1 | > sharkey@2024.8.2 migrateandstart /sharkey +web-1 | > pnpm migrate && pnpm start +web-1 | +web-1 | +web-1 | > sharkey@2024.8.2 migrate /sharkey +web-1 | > cd packages/backend && pnpm migrate +web-1 | +web-1 | +web-1 | > backend@ migrate /sharkey/packages/backend +web-1 | > pnpm typeorm migration:run -d ormconfig.js +web-1 | +web-1 | query: SELECT * FROM current_schema() +web-1 | query: SELECT version(); +web-1 | query: SELECT * FROM "information_schema"."tables" WHERE "table_schema" = 'public' AND "table_name" = 'migrations' +web-1 | query: SELECT * FROM "migrations" "migrations" ORDER BY "id" DESC +web-1 | 300 migrations are already loaded in the database. +web-1 | 310 migrations were found in the source code. +web-1 | MoreRepoUrl1709462550083 is the last executed migration. It was executed on Sun Mar 03 2024 10:42:30 GMT+0000 (Coordinated Universal Time). +web-1 | 10 migrations are new migrations must be executed. +web-1 | query: START TRANSACTION +web-1 | query: +web-1 | alter table meta +web-1 | rename column "summalyProxy" to "urlPreviewSummaryProxyUrl"; +web-1 | alter table meta +web-1 | add "urlPreviewEnabled" boolean default true not null; +web-1 | alter table meta +web-1 | add "urlPreviewTimeout" integer default 10000 not null; +web-1 | alter table meta +web-1 | add "urlPreviewMaximumContentLength" bigint default 10485760 not null; +web-1 | alter table meta +web-1 | add "urlPreviewRequireContentLength" boolean default false not null; +web-1 | alter table meta +web-1 | add "urlPreviewUserAgent" varchar(1024) default null; +web-1 | +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710512074000,"UrlPreviewMeta1710512074000"] +web-1 | Migration UrlPreviewMeta1710512074000 has been executed successfully. +web-1 | query: ALTER TABLE "antenna" ADD "excludeBots" boolean NOT NULL DEFAULT false +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710919614510,"AntennaExcludeBots1710919614510"] +web-1 | Migration AntennaExcludeBots1710919614510 has been executed successfully. +web-1 | query: +web-1 | CREATE TABLE "system_webhook" ( +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "latestSentAt" timestamp with time zone NULL DEFAULT NULL, +web-1 | "latestStatus" integer NULL DEFAULT NULL, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "on" varchar(128) [] NOT NULL DEFAULT '{}'::character varying[], +web-1 | "url" varchar(1024) NOT NULL, +web-1 | "secret" varchar(1024) NOT NULL, +web-1 | CONSTRAINT "PK_system_webhook_id" PRIMARY KEY ("id") +web-1 | ); +web-1 | CREATE INDEX "IDX_system_webhook_isActive" ON "system_webhook" ("isActive"); +web-1 | CREATE INDEX "IDX_system_webhook_on" ON "system_webhook" USING gin ("on"); +web-1 | +web-1 | CREATE TABLE "abuse_report_notification_recipient" ( +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "method" varchar(64) NOT NULL, +web-1 | "userId" varchar(32) NULL DEFAULT NULL, +web-1 | "systemWebhookId" varchar(32) NULL DEFAULT NULL, +web-1 | CONSTRAINT "PK_abuse_report_notification_recipient_id" PRIMARY KEY ("id"), +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId1" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId2" FOREIGN KEY ("userId") REFERENCES "user_profile"("userId") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_systemWebhookId" FOREIGN KEY ("systemWebhookId") REFERENCES "system_webhook"("id") ON DELETE CASCADE ON UPDATE NO ACTION +web-1 | ); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_isActive" ON "abuse_report_notification_recipient" ("isActive"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_method" ON "abuse_report_notification_recipient" ("method"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_userId" ON "abuse_report_notification_recipient" ("userId"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_systemWebhookId" ON "abuse_report_notification_recipient" ("systemWebhookId"); +web-1 | +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1713656541000,"AbuseReportNotification1713656541000"] +web-1 | Migration AbuseReportNotification1713656541000 has been executed successfully. +web-1 | query: ALTER TABLE "poll" ADD "channelId" character varying(32) +web-1 | query: COMMENT ON COLUMN "poll"."channelId" IS '[Denormalized]' +web-1 | query: CREATE INDEX "IDX_c1240fcc9675946ea5d6c2860e" ON "poll" ("channelId") +web-1 | query: UPDATE "poll" SET "channelId" = "note"."channelId" FROM "note" WHERE "poll"."noteId" = "note"."id" +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716129964060,"ChannelIdDenormalizedForMiPoll1716129964060"] +web-1 | Migration ChannelIdDenormalizedForMiPoll1716129964060 has been executed successfully. +web-1 | query: ALTER TABLE "meta" ADD "mediaSilencedHosts" character varying(1024) array NOT NULL DEFAULT '{}' +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716197366117,"MediaSilenceForHosts1716197366117"] +web-1 | Migration MediaSilenceForHosts1716197366117 has been executed successfully. +web-1 | query: ALTER TABLE "instance" ADD "notRespondingSince" TIMESTAMP WITH TIME ZONE +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716345015347,"NotRespondingSince1716345015347"] +web-1 | Migration NotRespondingSince1716345015347 has been executed successfully. +web-1 | query: CREATE TYPE "public"."instance_suspensionstate_enum" AS ENUM('none', 'manuallySuspended', 'goneSuspended', 'autoSuspendedForNotResponding') +web-1 | query: DROP INDEX "public"."IDX_34500da2e38ac393f7bb6b299c" +web-1 | query: ALTER TABLE "instance" RENAME COLUMN "isSuspended" TO "suspensionState" +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" DROP DEFAULT +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | query failed: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | error: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | Migration "SuspensionStateInsteadOfIsSspended1716345771510" failed, error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | query: ROLLBACK +web-1 | Error during migration run: +web-1 | QueryFailedError: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219:19) +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | query: 'ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING (\n' + +web-1 | ' CASE "suspensionState"\n' + +web-1 | " WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum\n" + +web-1 | " ELSE 'none'::instance_suspensionstate_enum\n" + +web-1 | ' END\n' + +web-1 | ' )', +web-1 | parameters: undefined, +web-1 | driverError: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at /sharkey/node_modules/.pnpm/pg@8.12.0/node_modules/pg/lib/client.js:526:17 +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +web-1 | at async PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:184:25) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | }, +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | } +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 | +web-1 | > sharkey@2024.8.2 migrateandstart /sharkey +web-1 | > pnpm migrate && pnpm start +web-1 | +web-1 | +web-1 | > sharkey@2024.8.2 migrate /sharkey +web-1 | > cd packages/backend && pnpm migrate +web-1 | +web-1 | +web-1 | > backend@ migrate /sharkey/packages/backend +web-1 | > pnpm typeorm migration:run -d ormconfig.js +web-1 | +web-1 | query: SELECT * FROM current_schema() +web-1 | query: SELECT version(); +web-1 | query: SELECT * FROM "information_schema"."tables" WHERE "table_schema" = 'public' AND "table_name" = 'migrations' +web-1 | query: SELECT * FROM "migrations" "migrations" ORDER BY "id" DESC +web-1 | 300 migrations are already loaded in the database. +web-1 | 310 migrations were found in the source code. +web-1 | MoreRepoUrl1709462550083 is the last executed migration. It was executed on Sun Mar 03 2024 10:42:30 GMT+0000 (Coordinated Universal Time). +web-1 | 10 migrations are new migrations must be executed. +web-1 | query: START TRANSACTION +web-1 | query: +web-1 | alter table meta +web-1 | rename column "summalyProxy" to "urlPreviewSummaryProxyUrl"; +web-1 | alter table meta +web-1 | add "urlPreviewEnabled" boolean default true not null; +web-1 | alter table meta +web-1 | add "urlPreviewTimeout" integer default 10000 not null; +web-1 | alter table meta +web-1 | add "urlPreviewMaximumContentLength" bigint default 10485760 not null; +web-1 | alter table meta +web-1 | add "urlPreviewRequireContentLength" boolean default false not null; +web-1 | alter table meta +web-1 | add "urlPreviewUserAgent" varchar(1024) default null; +web-1 | +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710512074000,"UrlPreviewMeta1710512074000"] +web-1 | Migration UrlPreviewMeta1710512074000 has been executed successfully. +web-1 | query: ALTER TABLE "antenna" ADD "excludeBots" boolean NOT NULL DEFAULT false +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710919614510,"AntennaExcludeBots1710919614510"] +web-1 | Migration AntennaExcludeBots1710919614510 has been executed successfully. +web-1 | query: +web-1 | CREATE TABLE "system_webhook" ( +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "latestSentAt" timestamp with time zone NULL DEFAULT NULL, +web-1 | "latestStatus" integer NULL DEFAULT NULL, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "on" varchar(128) [] NOT NULL DEFAULT '{}'::character varying[], +web-1 | "url" varchar(1024) NOT NULL, +web-1 | "secret" varchar(1024) NOT NULL, +web-1 | CONSTRAINT "PK_system_webhook_id" PRIMARY KEY ("id") +web-1 | ); +web-1 | CREATE INDEX "IDX_system_webhook_isActive" ON "system_webhook" ("isActive"); +web-1 | CREATE INDEX "IDX_system_webhook_on" ON "system_webhook" USING gin ("on"); +web-1 | +web-1 | CREATE TABLE "abuse_report_notification_recipient" ( +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "method" varchar(64) NOT NULL, +web-1 | "userId" varchar(32) NULL DEFAULT NULL, +web-1 | "systemWebhookId" varchar(32) NULL DEFAULT NULL, +web-1 | CONSTRAINT "PK_abuse_report_notification_recipient_id" PRIMARY KEY ("id"), +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId1" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId2" FOREIGN KEY ("userId") REFERENCES "user_profile"("userId") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_systemWebhookId" FOREIGN KEY ("systemWebhookId") REFERENCES "system_webhook"("id") ON DELETE CASCADE ON UPDATE NO ACTION +web-1 | ); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_isActive" ON "abuse_report_notification_recipient" ("isActive"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_method" ON "abuse_report_notification_recipient" ("method"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_userId" ON "abuse_report_notification_recipient" ("userId"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_systemWebhookId" ON "abuse_report_notification_recipient" ("systemWebhookId"); +web-1 | +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1713656541000,"AbuseReportNotification1713656541000"] +web-1 | Migration AbuseReportNotification1713656541000 has been executed successfully. +web-1 | query: ALTER TABLE "poll" ADD "channelId" character varying(32) +web-1 | query: COMMENT ON COLUMN "poll"."channelId" IS '[Denormalized]' +web-1 | query: CREATE INDEX "IDX_c1240fcc9675946ea5d6c2860e" ON "poll" ("channelId") +web-1 | query: UPDATE "poll" SET "channelId" = "note"."channelId" FROM "note" WHERE "poll"."noteId" = "note"."id" +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716129964060,"ChannelIdDenormalizedForMiPoll1716129964060"] +web-1 | Migration ChannelIdDenormalizedForMiPoll1716129964060 has been executed successfully. +web-1 | query: ALTER TABLE "meta" ADD "mediaSilencedHosts" character varying(1024) array NOT NULL DEFAULT '{}' +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716197366117,"MediaSilenceForHosts1716197366117"] +web-1 | Migration MediaSilenceForHosts1716197366117 has been executed successfully. +web-1 | query: ALTER TABLE "instance" ADD "notRespondingSince" TIMESTAMP WITH TIME ZONE +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716345015347,"NotRespondingSince1716345015347"] +web-1 | Migration NotRespondingSince1716345015347 has been executed successfully. +web-1 | query: CREATE TYPE "public"."instance_suspensionstate_enum" AS ENUM('none', 'manuallySuspended', 'goneSuspended', 'autoSuspendedForNotResponding') +web-1 | query: DROP INDEX "public"."IDX_34500da2e38ac393f7bb6b299c" +web-1 | query: ALTER TABLE "instance" RENAME COLUMN "isSuspended" TO "suspensionState" +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" DROP DEFAULT +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | query failed: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | error: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | Migration "SuspensionStateInsteadOfIsSspended1716345771510" failed, error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | query: ROLLBACK +web-1 | Error during migration run: +web-1 | QueryFailedError: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219:19) +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | query: 'ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING (\n' + +web-1 | ' CASE "suspensionState"\n' + +web-1 | " WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum\n" + +web-1 | " ELSE 'none'::instance_suspensionstate_enum\n" + +web-1 | ' END\n' + +web-1 | ' )', +web-1 | parameters: undefined, +web-1 | driverError: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at /sharkey/node_modules/.pnpm/pg@8.12.0/node_modules/pg/lib/client.js:526:17 +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +web-1 | at async PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:184:25) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | }, +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | } +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 | +web-1 | > sharkey@2024.8.2 migrateandstart /sharkey +web-1 | > pnpm migrate && pnpm start +web-1 | +web-1 | +web-1 | > sharkey@2024.8.2 migrate /sharkey +web-1 | > cd packages/backend && pnpm migrate +web-1 | +web-1 | +web-1 | > backend@ migrate /sharkey/packages/backend +web-1 | > pnpm typeorm migration:run -d ormconfig.js +web-1 | +web-1 | query: SELECT * FROM current_schema() +web-1 | query: SELECT version(); +web-1 | query: SELECT * FROM "information_schema"."tables" WHERE "table_schema" = 'public' AND "table_name" = 'migrations' +web-1 | query: SELECT * FROM "migrations" "migrations" ORDER BY "id" DESC +web-1 | 300 migrations are already loaded in the database. +web-1 | 310 migrations were found in the source code. +web-1 | MoreRepoUrl1709462550083 is the last executed migration. It was executed on Sun Mar 03 2024 10:42:30 GMT+0000 (Coordinated Universal Time). +web-1 | 10 migrations are new migrations must be executed. +web-1 | query: START TRANSACTION +web-1 | query: +web-1 | alter table meta +web-1 | rename column "summalyProxy" to "urlPreviewSummaryProxyUrl"; +web-1 | alter table meta +web-1 | add "urlPreviewEnabled" boolean default true not null; +web-1 | alter table meta +web-1 | add "urlPreviewTimeout" integer default 10000 not null; +web-1 | alter table meta +web-1 | add "urlPreviewMaximumContentLength" bigint default 10485760 not null; +web-1 | alter table meta +web-1 | add "urlPreviewRequireContentLength" boolean default false not null; +web-1 | alter table meta +web-1 | add "urlPreviewUserAgent" varchar(1024) default null; +web-1 | +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710512074000,"UrlPreviewMeta1710512074000"] +web-1 | Migration UrlPreviewMeta1710512074000 has been executed successfully. +web-1 | query: ALTER TABLE "antenna" ADD "excludeBots" boolean NOT NULL DEFAULT false +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710919614510,"AntennaExcludeBots1710919614510"] +web-1 | Migration AntennaExcludeBots1710919614510 has been executed successfully. +web-1 | query: +web-1 | CREATE TABLE "system_webhook" ( +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "latestSentAt" timestamp with time zone NULL DEFAULT NULL, +web-1 | "latestStatus" integer NULL DEFAULT NULL, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "on" varchar(128) [] NOT NULL DEFAULT '{}'::character varying[], +web-1 | "url" varchar(1024) NOT NULL, +web-1 | "secret" varchar(1024) NOT NULL, +web-1 | CONSTRAINT "PK_system_webhook_id" PRIMARY KEY ("id") +web-1 | ); +web-1 | CREATE INDEX "IDX_system_webhook_isActive" ON "system_webhook" ("isActive"); +web-1 | CREATE INDEX "IDX_system_webhook_on" ON "system_webhook" USING gin ("on"); +web-1 | +web-1 | CREATE TABLE "abuse_report_notification_recipient" ( +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "method" varchar(64) NOT NULL, +web-1 | "userId" varchar(32) NULL DEFAULT NULL, +web-1 | "systemWebhookId" varchar(32) NULL DEFAULT NULL, +web-1 | CONSTRAINT "PK_abuse_report_notification_recipient_id" PRIMARY KEY ("id"), +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId1" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId2" FOREIGN KEY ("userId") REFERENCES "user_profile"("userId") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_systemWebhookId" FOREIGN KEY ("systemWebhookId") REFERENCES "system_webhook"("id") ON DELETE CASCADE ON UPDATE NO ACTION +web-1 | ); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_isActive" ON "abuse_report_notification_recipient" ("isActive"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_method" ON "abuse_report_notification_recipient" ("method"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_userId" ON "abuse_report_notification_recipient" ("userId"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_systemWebhookId" ON "abuse_report_notification_recipient" ("systemWebhookId"); +web-1 | +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1713656541000,"AbuseReportNotification1713656541000"] +web-1 | Migration AbuseReportNotification1713656541000 has been executed successfully. +web-1 | query: ALTER TABLE "poll" ADD "channelId" character varying(32) +web-1 | query: COMMENT ON COLUMN "poll"."channelId" IS '[Denormalized]' +web-1 | query: CREATE INDEX "IDX_c1240fcc9675946ea5d6c2860e" ON "poll" ("channelId") +web-1 | query: UPDATE "poll" SET "channelId" = "note"."channelId" FROM "note" WHERE "poll"."noteId" = "note"."id" +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716129964060,"ChannelIdDenormalizedForMiPoll1716129964060"] +web-1 | Migration ChannelIdDenormalizedForMiPoll1716129964060 has been executed successfully. +web-1 | query: ALTER TABLE "meta" ADD "mediaSilencedHosts" character varying(1024) array NOT NULL DEFAULT '{}' +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716197366117,"MediaSilenceForHosts1716197366117"] +web-1 | Migration MediaSilenceForHosts1716197366117 has been executed successfully. +web-1 | query: ALTER TABLE "instance" ADD "notRespondingSince" TIMESTAMP WITH TIME ZONE +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716345015347,"NotRespondingSince1716345015347"] +web-1 | Migration NotRespondingSince1716345015347 has been executed successfully. +web-1 | query: CREATE TYPE "public"."instance_suspensionstate_enum" AS ENUM('none', 'manuallySuspended', 'goneSuspended', 'autoSuspendedForNotResponding') +web-1 | query: DROP INDEX "public"."IDX_34500da2e38ac393f7bb6b299c" +web-1 | query: ALTER TABLE "instance" RENAME COLUMN "isSuspended" TO "suspensionState" +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" DROP DEFAULT +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | query failed: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | error: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | Migration "SuspensionStateInsteadOfIsSspended1716345771510" failed, error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | query: ROLLBACK +web-1 | Error during migration run: +web-1 | QueryFailedError: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219:19) +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | query: 'ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING (\n' + +web-1 | ' CASE "suspensionState"\n' + +web-1 | " WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum\n" + +web-1 | " ELSE 'none'::instance_suspensionstate_enum\n" + +web-1 | ' END\n' + +web-1 | ' )', +web-1 | parameters: undefined, +web-1 | driverError: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at /sharkey/node_modules/.pnpm/pg@8.12.0/node_modules/pg/lib/client.js:526:17 +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +web-1 | at async PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:184:25) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | }, +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | } +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 | +web-1 | > sharkey@2024.8.2 migrateandstart /sharkey +web-1 | > pnpm migrate && pnpm start +web-1 | +web-1 | +web-1 | > sharkey@2024.8.2 migrate /sharkey +web-1 | > cd packages/backend && pnpm migrate +web-1 | +web-1 | +web-1 | > backend@ migrate /sharkey/packages/backend +web-1 | > pnpm typeorm migration:run -d ormconfig.js +web-1 | +web-1 | query: SELECT * FROM current_schema() +web-1 | query: SELECT version(); +web-1 | query: SELECT * FROM "information_schema"."tables" WHERE "table_schema" = 'public' AND "table_name" = 'migrations' +web-1 | query: SELECT * FROM "migrations" "migrations" ORDER BY "id" DESC +web-1 | 300 migrations are already loaded in the database. +web-1 | 310 migrations were found in the source code. +web-1 | MoreRepoUrl1709462550083 is the last executed migration. It was executed on Sun Mar 03 2024 10:42:30 GMT+0000 (Coordinated Universal Time). +web-1 | 10 migrations are new migrations must be executed. +web-1 | query: START TRANSACTION +web-1 | query: +web-1 | alter table meta +web-1 | rename column "summalyProxy" to "urlPreviewSummaryProxyUrl"; +web-1 | alter table meta +web-1 | add "urlPreviewEnabled" boolean default true not null; +web-1 | alter table meta +web-1 | add "urlPreviewTimeout" integer default 10000 not null; +web-1 | alter table meta +web-1 | add "urlPreviewMaximumContentLength" bigint default 10485760 not null; +web-1 | alter table meta +web-1 | add "urlPreviewRequireContentLength" boolean default false not null; +web-1 | alter table meta +web-1 | add "urlPreviewUserAgent" varchar(1024) default null; +web-1 | +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710512074000,"UrlPreviewMeta1710512074000"] +web-1 | Migration UrlPreviewMeta1710512074000 has been executed successfully. +web-1 | query: ALTER TABLE "antenna" ADD "excludeBots" boolean NOT NULL DEFAULT false +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710919614510,"AntennaExcludeBots1710919614510"] +web-1 | Migration AntennaExcludeBots1710919614510 has been executed successfully. +web-1 | query: +web-1 | CREATE TABLE "system_webhook" ( +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "latestSentAt" timestamp with time zone NULL DEFAULT NULL, +web-1 | "latestStatus" integer NULL DEFAULT NULL, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "on" varchar(128) [] NOT NULL DEFAULT '{}'::character varying[], +web-1 | "url" varchar(1024) NOT NULL, +web-1 | "secret" varchar(1024) NOT NULL, +web-1 | CONSTRAINT "PK_system_webhook_id" PRIMARY KEY ("id") +web-1 | ); +web-1 | CREATE INDEX "IDX_system_webhook_isActive" ON "system_webhook" ("isActive"); +web-1 | CREATE INDEX "IDX_system_webhook_on" ON "system_webhook" USING gin ("on"); +web-1 | +web-1 | CREATE TABLE "abuse_report_notification_recipient" ( +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "method" varchar(64) NOT NULL, +web-1 | "userId" varchar(32) NULL DEFAULT NULL, +web-1 | "systemWebhookId" varchar(32) NULL DEFAULT NULL, +web-1 | CONSTRAINT "PK_abuse_report_notification_recipient_id" PRIMARY KEY ("id"), +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId1" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId2" FOREIGN KEY ("userId") REFERENCES "user_profile"("userId") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_systemWebhookId" FOREIGN KEY ("systemWebhookId") REFERENCES "system_webhook"("id") ON DELETE CASCADE ON UPDATE NO ACTION +web-1 | ); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_isActive" ON "abuse_report_notification_recipient" ("isActive"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_method" ON "abuse_report_notification_recipient" ("method"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_userId" ON "abuse_report_notification_recipient" ("userId"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_systemWebhookId" ON "abuse_report_notification_recipient" ("systemWebhookId"); +web-1 | +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1713656541000,"AbuseReportNotification1713656541000"] +web-1 | Migration AbuseReportNotification1713656541000 has been executed successfully. +web-1 | query: ALTER TABLE "poll" ADD "channelId" character varying(32) +web-1 | query: COMMENT ON COLUMN "poll"."channelId" IS '[Denormalized]' +web-1 | query: CREATE INDEX "IDX_c1240fcc9675946ea5d6c2860e" ON "poll" ("channelId") +web-1 | query: UPDATE "poll" SET "channelId" = "note"."channelId" FROM "note" WHERE "poll"."noteId" = "note"."id" +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716129964060,"ChannelIdDenormalizedForMiPoll1716129964060"] +web-1 | Migration ChannelIdDenormalizedForMiPoll1716129964060 has been executed successfully. +web-1 | query: ALTER TABLE "meta" ADD "mediaSilencedHosts" character varying(1024) array NOT NULL DEFAULT '{}' +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716197366117,"MediaSilenceForHosts1716197366117"] +web-1 | Migration MediaSilenceForHosts1716197366117 has been executed successfully. +web-1 | query: ALTER TABLE "instance" ADD "notRespondingSince" TIMESTAMP WITH TIME ZONE +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716345015347,"NotRespondingSince1716345015347"] +web-1 | Migration NotRespondingSince1716345015347 has been executed successfully. +web-1 | query: CREATE TYPE "public"."instance_suspensionstate_enum" AS ENUM('none', 'manuallySuspended', 'goneSuspended', 'autoSuspendedForNotResponding') +web-1 | query: DROP INDEX "public"."IDX_34500da2e38ac393f7bb6b299c" +web-1 | query: ALTER TABLE "instance" RENAME COLUMN "isSuspended" TO "suspensionState" +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" DROP DEFAULT +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | query failed: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | error: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | Migration "SuspensionStateInsteadOfIsSspended1716345771510" failed, error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | query: ROLLBACK +web-1 | Error during migration run: +web-1 | QueryFailedError: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219:19) +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | query: 'ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING (\n' + +web-1 | ' CASE "suspensionState"\n' + +web-1 | " WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum\n" + +web-1 | " ELSE 'none'::instance_suspensionstate_enum\n" + +web-1 | ' END\n' + +web-1 | ' )', +web-1 | parameters: undefined, +web-1 | driverError: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at /sharkey/node_modules/.pnpm/pg@8.12.0/node_modules/pg/lib/client.js:526:17 +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +web-1 | at async PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:184:25) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | }, +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | } +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 | +web-1 | > sharkey@2024.8.2 migrateandstart /sharkey +web-1 | > pnpm migrate && pnpm start +web-1 | +web-1 | +web-1 | > sharkey@2024.8.2 migrate /sharkey +web-1 | > cd packages/backend && pnpm migrate +web-1 | +web-1 | +web-1 | > backend@ migrate /sharkey/packages/backend +web-1 | > pnpm typeorm migration:run -d ormconfig.js +web-1 | +web-1 | query: SELECT * FROM current_schema() +web-1 | query: SELECT version(); +web-1 | query: SELECT * FROM "information_schema"."tables" WHERE "table_schema" = 'public' AND "table_name" = 'migrations' +web-1 | query: SELECT * FROM "migrations" "migrations" ORDER BY "id" DESC +web-1 | 300 migrations are already loaded in the database. +web-1 | 310 migrations were found in the source code. +web-1 | MoreRepoUrl1709462550083 is the last executed migration. It was executed on Sun Mar 03 2024 10:42:30 GMT+0000 (Coordinated Universal Time). +web-1 | 10 migrations are new migrations must be executed. +web-1 | query: START TRANSACTION +web-1 | query: +web-1 | alter table meta +web-1 | rename column "summalyProxy" to "urlPreviewSummaryProxyUrl"; +web-1 | alter table meta +web-1 | add "urlPreviewEnabled" boolean default true not null; +web-1 | alter table meta +web-1 | add "urlPreviewTimeout" integer default 10000 not null; +web-1 | alter table meta +web-1 | add "urlPreviewMaximumContentLength" bigint default 10485760 not null; +web-1 | alter table meta +web-1 | add "urlPreviewRequireContentLength" boolean default false not null; +web-1 | alter table meta +web-1 | add "urlPreviewUserAgent" varchar(1024) default null; +web-1 | +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710512074000,"UrlPreviewMeta1710512074000"] +web-1 | Migration UrlPreviewMeta1710512074000 has been executed successfully. +web-1 | query: ALTER TABLE "antenna" ADD "excludeBots" boolean NOT NULL DEFAULT false +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710919614510,"AntennaExcludeBots1710919614510"] +web-1 | Migration AntennaExcludeBots1710919614510 has been executed successfully. +web-1 | query: +web-1 | CREATE TABLE "system_webhook" ( +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "latestSentAt" timestamp with time zone NULL DEFAULT NULL, +web-1 | "latestStatus" integer NULL DEFAULT NULL, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "on" varchar(128) [] NOT NULL DEFAULT '{}'::character varying[], +web-1 | "url" varchar(1024) NOT NULL, +web-1 | "secret" varchar(1024) NOT NULL, +web-1 | CONSTRAINT "PK_system_webhook_id" PRIMARY KEY ("id") +web-1 | ); +web-1 | CREATE INDEX "IDX_system_webhook_isActive" ON "system_webhook" ("isActive"); +web-1 | CREATE INDEX "IDX_system_webhook_on" ON "system_webhook" USING gin ("on"); +web-1 | +web-1 | CREATE TABLE "abuse_report_notification_recipient" ( +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "method" varchar(64) NOT NULL, +web-1 | "userId" varchar(32) NULL DEFAULT NULL, +web-1 | "systemWebhookId" varchar(32) NULL DEFAULT NULL, +web-1 | CONSTRAINT "PK_abuse_report_notification_recipient_id" PRIMARY KEY ("id"), +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId1" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId2" FOREIGN KEY ("userId") REFERENCES "user_profile"("userId") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_systemWebhookId" FOREIGN KEY ("systemWebhookId") REFERENCES "system_webhook"("id") ON DELETE CASCADE ON UPDATE NO ACTION +web-1 | ); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_isActive" ON "abuse_report_notification_recipient" ("isActive"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_method" ON "abuse_report_notification_recipient" ("method"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_userId" ON "abuse_report_notification_recipient" ("userId"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_systemWebhookId" ON "abuse_report_notification_recipient" ("systemWebhookId"); +web-1 | +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1713656541000,"AbuseReportNotification1713656541000"] +web-1 | Migration AbuseReportNotification1713656541000 has been executed successfully. +web-1 | query: ALTER TABLE "poll" ADD "channelId" character varying(32) +web-1 | query: COMMENT ON COLUMN "poll"."channelId" IS '[Denormalized]' +web-1 | query: CREATE INDEX "IDX_c1240fcc9675946ea5d6c2860e" ON "poll" ("channelId") +web-1 | query: UPDATE "poll" SET "channelId" = "note"."channelId" FROM "note" WHERE "poll"."noteId" = "note"."id" +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716129964060,"ChannelIdDenormalizedForMiPoll1716129964060"] +web-1 | Migration ChannelIdDenormalizedForMiPoll1716129964060 has been executed successfully. +web-1 | query: ALTER TABLE "meta" ADD "mediaSilencedHosts" character varying(1024) array NOT NULL DEFAULT '{}' +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716197366117,"MediaSilenceForHosts1716197366117"] +web-1 | Migration MediaSilenceForHosts1716197366117 has been executed successfully. +web-1 | query: ALTER TABLE "instance" ADD "notRespondingSince" TIMESTAMP WITH TIME ZONE +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716345015347,"NotRespondingSince1716345015347"] +web-1 | Migration NotRespondingSince1716345015347 has been executed successfully. +web-1 | query: CREATE TYPE "public"."instance_suspensionstate_enum" AS ENUM('none', 'manuallySuspended', 'goneSuspended', 'autoSuspendedForNotResponding') +web-1 | query: DROP INDEX "public"."IDX_34500da2e38ac393f7bb6b299c" +web-1 | query: ALTER TABLE "instance" RENAME COLUMN "isSuspended" TO "suspensionState" +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" DROP DEFAULT +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | query failed: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | error: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | Migration "SuspensionStateInsteadOfIsSspended1716345771510" failed, error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | query: ROLLBACK +web-1 | Error during migration run: +web-1 | QueryFailedError: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219:19) +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | query: 'ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING (\n' + +web-1 | ' CASE "suspensionState"\n' + +web-1 | " WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum\n" + +web-1 | " ELSE 'none'::instance_suspensionstate_enum\n" + +web-1 | ' END\n' + +web-1 | ' )', +web-1 | parameters: undefined, +web-1 | driverError: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at /sharkey/node_modules/.pnpm/pg@8.12.0/node_modules/pg/lib/client.js:526:17 +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +web-1 | at async PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:184:25) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | }, +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | } +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 | +web-1 | > sharkey@2024.8.2 migrateandstart /sharkey +web-1 | > pnpm migrate && pnpm start +web-1 | +web-1 | +web-1 | > sharkey@2024.8.2 migrate /sharkey +web-1 | > cd packages/backend && pnpm migrate +web-1 | +web-1 | +web-1 | > backend@ migrate /sharkey/packages/backend +web-1 | > pnpm typeorm migration:run -d ormconfig.js +web-1 | +web-1 | query: SELECT * FROM current_schema() +web-1 | query: SELECT version(); +web-1 | query: SELECT * FROM "information_schema"."tables" WHERE "table_schema" = 'public' AND "table_name" = 'migrations' +web-1 | query: SELECT * FROM "migrations" "migrations" ORDER BY "id" DESC +web-1 | 300 migrations are already loaded in the database. +web-1 | 310 migrations were found in the source code. +web-1 | MoreRepoUrl1709462550083 is the last executed migration. It was executed on Sun Mar 03 2024 10:42:30 GMT+0000 (Coordinated Universal Time). +web-1 | 10 migrations are new migrations must be executed. +web-1 | query: START TRANSACTION +web-1 | query: +web-1 | alter table meta +web-1 | rename column "summalyProxy" to "urlPreviewSummaryProxyUrl"; +web-1 | alter table meta +web-1 | add "urlPreviewEnabled" boolean default true not null; +web-1 | alter table meta +web-1 | add "urlPreviewTimeout" integer default 10000 not null; +web-1 | alter table meta +web-1 | add "urlPreviewMaximumContentLength" bigint default 10485760 not null; +web-1 | alter table meta +web-1 | add "urlPreviewRequireContentLength" boolean default false not null; +web-1 | alter table meta +web-1 | add "urlPreviewUserAgent" varchar(1024) default null; +web-1 | +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710512074000,"UrlPreviewMeta1710512074000"] +web-1 | Migration UrlPreviewMeta1710512074000 has been executed successfully. +web-1 | query: ALTER TABLE "antenna" ADD "excludeBots" boolean NOT NULL DEFAULT false +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710919614510,"AntennaExcludeBots1710919614510"] +web-1 | Migration AntennaExcludeBots1710919614510 has been executed successfully. +web-1 | query: +web-1 | CREATE TABLE "system_webhook" ( +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "latestSentAt" timestamp with time zone NULL DEFAULT NULL, +web-1 | "latestStatus" integer NULL DEFAULT NULL, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "on" varchar(128) [] NOT NULL DEFAULT '{}'::character varying[], +web-1 | "url" varchar(1024) NOT NULL, +web-1 | "secret" varchar(1024) NOT NULL, +web-1 | CONSTRAINT "PK_system_webhook_id" PRIMARY KEY ("id") +web-1 | ); +web-1 | CREATE INDEX "IDX_system_webhook_isActive" ON "system_webhook" ("isActive"); +web-1 | CREATE INDEX "IDX_system_webhook_on" ON "system_webhook" USING gin ("on"); +web-1 | +web-1 | CREATE TABLE "abuse_report_notification_recipient" ( +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "method" varchar(64) NOT NULL, +web-1 | "userId" varchar(32) NULL DEFAULT NULL, +web-1 | "systemWebhookId" varchar(32) NULL DEFAULT NULL, +web-1 | CONSTRAINT "PK_abuse_report_notification_recipient_id" PRIMARY KEY ("id"), +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId1" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId2" FOREIGN KEY ("userId") REFERENCES "user_profile"("userId") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_systemWebhookId" FOREIGN KEY ("systemWebhookId") REFERENCES "system_webhook"("id") ON DELETE CASCADE ON UPDATE NO ACTION +web-1 | ); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_isActive" ON "abuse_report_notification_recipient" ("isActive"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_method" ON "abuse_report_notification_recipient" ("method"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_userId" ON "abuse_report_notification_recipient" ("userId"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_systemWebhookId" ON "abuse_report_notification_recipient" ("systemWebhookId"); +web-1 | +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1713656541000,"AbuseReportNotification1713656541000"] +web-1 | Migration AbuseReportNotification1713656541000 has been executed successfully. +web-1 | query: ALTER TABLE "poll" ADD "channelId" character varying(32) +web-1 | query: COMMENT ON COLUMN "poll"."channelId" IS '[Denormalized]' +web-1 | query: CREATE INDEX "IDX_c1240fcc9675946ea5d6c2860e" ON "poll" ("channelId") +web-1 | query: UPDATE "poll" SET "channelId" = "note"."channelId" FROM "note" WHERE "poll"."noteId" = "note"."id" +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716129964060,"ChannelIdDenormalizedForMiPoll1716129964060"] +web-1 | Migration ChannelIdDenormalizedForMiPoll1716129964060 has been executed successfully. +web-1 | query: ALTER TABLE "meta" ADD "mediaSilencedHosts" character varying(1024) array NOT NULL DEFAULT '{}' +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716197366117,"MediaSilenceForHosts1716197366117"] +web-1 | Migration MediaSilenceForHosts1716197366117 has been executed successfully. +web-1 | query: ALTER TABLE "instance" ADD "notRespondingSince" TIMESTAMP WITH TIME ZONE +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716345015347,"NotRespondingSince1716345015347"] +web-1 | Migration NotRespondingSince1716345015347 has been executed successfully. +web-1 | query: CREATE TYPE "public"."instance_suspensionstate_enum" AS ENUM('none', 'manuallySuspended', 'goneSuspended', 'autoSuspendedForNotResponding') +web-1 | query: DROP INDEX "public"."IDX_34500da2e38ac393f7bb6b299c" +web-1 | query: ALTER TABLE "instance" RENAME COLUMN "isSuspended" TO "suspensionState" +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" DROP DEFAULT +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | query failed: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | error: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | Migration "SuspensionStateInsteadOfIsSspended1716345771510" failed, error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | query: ROLLBACK +web-1 | Error during migration run: +web-1 | QueryFailedError: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219:19) +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | query: 'ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING (\n' + +web-1 | ' CASE "suspensionState"\n' + +web-1 | " WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum\n" + +web-1 | " ELSE 'none'::instance_suspensionstate_enum\n" + +web-1 | ' END\n' + +web-1 | ' )', +web-1 | parameters: undefined, +web-1 | driverError: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at /sharkey/node_modules/.pnpm/pg@8.12.0/node_modules/pg/lib/client.js:526:17 +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +web-1 | at async PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:184:25) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | }, +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | } +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 | +web-1 | > sharkey@2024.8.2 migrateandstart /sharkey +web-1 | > pnpm migrate && pnpm start +web-1 | +web-1 | +web-1 | > sharkey@2024.8.2 migrate /sharkey +web-1 | > cd packages/backend && pnpm migrate +web-1 | +web-1 | +web-1 | > backend@ migrate /sharkey/packages/backend +web-1 | > pnpm typeorm migration:run -d ormconfig.js +web-1 | +web-1 | query: SELECT * FROM current_schema() +web-1 | query: SELECT version(); +web-1 | query: SELECT * FROM "information_schema"."tables" WHERE "table_schema" = 'public' AND "table_name" = 'migrations' +web-1 | query: SELECT * FROM "migrations" "migrations" ORDER BY "id" DESC +web-1 | 300 migrations are already loaded in the database. +web-1 | 310 migrations were found in the source code. +web-1 | MoreRepoUrl1709462550083 is the last executed migration. It was executed on Sun Mar 03 2024 10:42:30 GMT+0000 (Coordinated Universal Time). +web-1 | 10 migrations are new migrations must be executed. +web-1 | query: START TRANSACTION +web-1 | query: +web-1 | alter table meta +web-1 | rename column "summalyProxy" to "urlPreviewSummaryProxyUrl"; +web-1 | alter table meta +web-1 | add "urlPreviewEnabled" boolean default true not null; +web-1 | alter table meta +web-1 | add "urlPreviewTimeout" integer default 10000 not null; +web-1 | alter table meta +web-1 | add "urlPreviewMaximumContentLength" bigint default 10485760 not null; +web-1 | alter table meta +web-1 | add "urlPreviewRequireContentLength" boolean default false not null; +web-1 | alter table meta +web-1 | add "urlPreviewUserAgent" varchar(1024) default null; +web-1 | +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710512074000,"UrlPreviewMeta1710512074000"] +web-1 | Migration UrlPreviewMeta1710512074000 has been executed successfully. +web-1 | query: ALTER TABLE "antenna" ADD "excludeBots" boolean NOT NULL DEFAULT false +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710919614510,"AntennaExcludeBots1710919614510"] +web-1 | Migration AntennaExcludeBots1710919614510 has been executed successfully. +web-1 | query: +web-1 | CREATE TABLE "system_webhook" ( +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "latestSentAt" timestamp with time zone NULL DEFAULT NULL, +web-1 | "latestStatus" integer NULL DEFAULT NULL, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "on" varchar(128) [] NOT NULL DEFAULT '{}'::character varying[], +web-1 | "url" varchar(1024) NOT NULL, +web-1 | "secret" varchar(1024) NOT NULL, +web-1 | CONSTRAINT "PK_system_webhook_id" PRIMARY KEY ("id") +web-1 | ); +web-1 | CREATE INDEX "IDX_system_webhook_isActive" ON "system_webhook" ("isActive"); +web-1 | CREATE INDEX "IDX_system_webhook_on" ON "system_webhook" USING gin ("on"); +web-1 | +web-1 | CREATE TABLE "abuse_report_notification_recipient" ( +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "method" varchar(64) NOT NULL, +web-1 | "userId" varchar(32) NULL DEFAULT NULL, +web-1 | "systemWebhookId" varchar(32) NULL DEFAULT NULL, +web-1 | CONSTRAINT "PK_abuse_report_notification_recipient_id" PRIMARY KEY ("id"), +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId1" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId2" FOREIGN KEY ("userId") REFERENCES "user_profile"("userId") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_systemWebhookId" FOREIGN KEY ("systemWebhookId") REFERENCES "system_webhook"("id") ON DELETE CASCADE ON UPDATE NO ACTION +web-1 | ); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_isActive" ON "abuse_report_notification_recipient" ("isActive"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_method" ON "abuse_report_notification_recipient" ("method"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_userId" ON "abuse_report_notification_recipient" ("userId"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_systemWebhookId" ON "abuse_report_notification_recipient" ("systemWebhookId"); +web-1 | +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1713656541000,"AbuseReportNotification1713656541000"] +web-1 | Migration AbuseReportNotification1713656541000 has been executed successfully. +web-1 | query: ALTER TABLE "poll" ADD "channelId" character varying(32) +web-1 | query: COMMENT ON COLUMN "poll"."channelId" IS '[Denormalized]' +web-1 | query: CREATE INDEX "IDX_c1240fcc9675946ea5d6c2860e" ON "poll" ("channelId") +web-1 | query: UPDATE "poll" SET "channelId" = "note"."channelId" FROM "note" WHERE "poll"."noteId" = "note"."id" +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716129964060,"ChannelIdDenormalizedForMiPoll1716129964060"] +web-1 | Migration ChannelIdDenormalizedForMiPoll1716129964060 has been executed successfully. +web-1 | query: ALTER TABLE "meta" ADD "mediaSilencedHosts" character varying(1024) array NOT NULL DEFAULT '{}' +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716197366117,"MediaSilenceForHosts1716197366117"] +web-1 | Migration MediaSilenceForHosts1716197366117 has been executed successfully. +web-1 | query: ALTER TABLE "instance" ADD "notRespondingSince" TIMESTAMP WITH TIME ZONE +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716345015347,"NotRespondingSince1716345015347"] +web-1 | Migration NotRespondingSince1716345015347 has been executed successfully. +web-1 | query: CREATE TYPE "public"."instance_suspensionstate_enum" AS ENUM('none', 'manuallySuspended', 'goneSuspended', 'autoSuspendedForNotResponding') +web-1 | query: DROP INDEX "public"."IDX_34500da2e38ac393f7bb6b299c" +web-1 | query: ALTER TABLE "instance" RENAME COLUMN "isSuspended" TO "suspensionState" +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" DROP DEFAULT +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | query failed: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | error: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | Migration "SuspensionStateInsteadOfIsSspended1716345771510" failed, error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | query: ROLLBACK +web-1 | Error during migration run: +web-1 | QueryFailedError: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219:19) +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | query: 'ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING (\n' + +web-1 | ' CASE "suspensionState"\n' + +web-1 | " WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum\n" + +web-1 | " ELSE 'none'::instance_suspensionstate_enum\n" + +web-1 | ' END\n' + +web-1 | ' )', +web-1 | parameters: undefined, +web-1 | driverError: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at /sharkey/node_modules/.pnpm/pg@8.12.0/node_modules/pg/lib/client.js:526:17 +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +web-1 | at async PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:184:25) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | }, +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | } +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 | +web-1 | > sharkey@2024.8.2 migrateandstart /sharkey +web-1 | > pnpm migrate && pnpm start +web-1 | +web-1 | +web-1 | > sharkey@2024.8.2 migrate /sharkey +web-1 | > cd packages/backend && pnpm migrate +web-1 | +web-1 | +web-1 | > backend@ migrate /sharkey/packages/backend +web-1 | > pnpm typeorm migration:run -d ormconfig.js +web-1 | +web-1 | query: SELECT * FROM current_schema() +web-1 | query: SELECT version(); +web-1 | query: SELECT * FROM "information_schema"."tables" WHERE "table_schema" = 'public' AND "table_name" = 'migrations' +web-1 | query: SELECT * FROM "migrations" "migrations" ORDER BY "id" DESC +web-1 | 300 migrations are already loaded in the database. +web-1 | 310 migrations were found in the source code. +web-1 | MoreRepoUrl1709462550083 is the last executed migration. It was executed on Sun Mar 03 2024 10:42:30 GMT+0000 (Coordinated Universal Time). +web-1 | 10 migrations are new migrations must be executed. +web-1 | query: START TRANSACTION +web-1 | query: +web-1 | alter table meta +web-1 | rename column "summalyProxy" to "urlPreviewSummaryProxyUrl"; +web-1 | alter table meta +web-1 | add "urlPreviewEnabled" boolean default true not null; +web-1 | alter table meta +web-1 | add "urlPreviewTimeout" integer default 10000 not null; +web-1 | alter table meta +web-1 | add "urlPreviewMaximumContentLength" bigint default 10485760 not null; +web-1 | alter table meta +web-1 | add "urlPreviewRequireContentLength" boolean default false not null; +web-1 | alter table meta +web-1 | add "urlPreviewUserAgent" varchar(1024) default null; +web-1 | +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710512074000,"UrlPreviewMeta1710512074000"] +web-1 | Migration UrlPreviewMeta1710512074000 has been executed successfully. +web-1 | query: ALTER TABLE "antenna" ADD "excludeBots" boolean NOT NULL DEFAULT false +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710919614510,"AntennaExcludeBots1710919614510"] +web-1 | Migration AntennaExcludeBots1710919614510 has been executed successfully. +web-1 | query: +web-1 | CREATE TABLE "system_webhook" ( +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "latestSentAt" timestamp with time zone NULL DEFAULT NULL, +web-1 | "latestStatus" integer NULL DEFAULT NULL, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "on" varchar(128) [] NOT NULL DEFAULT '{}'::character varying[], +web-1 | "url" varchar(1024) NOT NULL, +web-1 | "secret" varchar(1024) NOT NULL, +web-1 | CONSTRAINT "PK_system_webhook_id" PRIMARY KEY ("id") +web-1 | ); +web-1 | CREATE INDEX "IDX_system_webhook_isActive" ON "system_webhook" ("isActive"); +web-1 | CREATE INDEX "IDX_system_webhook_on" ON "system_webhook" USING gin ("on"); +web-1 | +web-1 | CREATE TABLE "abuse_report_notification_recipient" ( +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "method" varchar(64) NOT NULL, +web-1 | "userId" varchar(32) NULL DEFAULT NULL, +web-1 | "systemWebhookId" varchar(32) NULL DEFAULT NULL, +web-1 | CONSTRAINT "PK_abuse_report_notification_recipient_id" PRIMARY KEY ("id"), +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId1" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId2" FOREIGN KEY ("userId") REFERENCES "user_profile"("userId") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_systemWebhookId" FOREIGN KEY ("systemWebhookId") REFERENCES "system_webhook"("id") ON DELETE CASCADE ON UPDATE NO ACTION +web-1 | ); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_isActive" ON "abuse_report_notification_recipient" ("isActive"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_method" ON "abuse_report_notification_recipient" ("method"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_userId" ON "abuse_report_notification_recipient" ("userId"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_systemWebhookId" ON "abuse_report_notification_recipient" ("systemWebhookId"); +web-1 | +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1713656541000,"AbuseReportNotification1713656541000"] +web-1 | Migration AbuseReportNotification1713656541000 has been executed successfully. +web-1 | query: ALTER TABLE "poll" ADD "channelId" character varying(32) +web-1 | query: COMMENT ON COLUMN "poll"."channelId" IS '[Denormalized]' +web-1 | query: CREATE INDEX "IDX_c1240fcc9675946ea5d6c2860e" ON "poll" ("channelId") +web-1 | query: UPDATE "poll" SET "channelId" = "note"."channelId" FROM "note" WHERE "poll"."noteId" = "note"."id" +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716129964060,"ChannelIdDenormalizedForMiPoll1716129964060"] +web-1 | Migration ChannelIdDenormalizedForMiPoll1716129964060 has been executed successfully. +web-1 | query: ALTER TABLE "meta" ADD "mediaSilencedHosts" character varying(1024) array NOT NULL DEFAULT '{}' +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716197366117,"MediaSilenceForHosts1716197366117"] +web-1 | Migration MediaSilenceForHosts1716197366117 has been executed successfully. +web-1 | query: ALTER TABLE "instance" ADD "notRespondingSince" TIMESTAMP WITH TIME ZONE +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716345015347,"NotRespondingSince1716345015347"] +web-1 | Migration NotRespondingSince1716345015347 has been executed successfully. +web-1 | query: CREATE TYPE "public"."instance_suspensionstate_enum" AS ENUM('none', 'manuallySuspended', 'goneSuspended', 'autoSuspendedForNotResponding') +web-1 | query: DROP INDEX "public"."IDX_34500da2e38ac393f7bb6b299c" +web-1 | query: ALTER TABLE "instance" RENAME COLUMN "isSuspended" TO "suspensionState" +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" DROP DEFAULT +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | query failed: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | error: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | Migration "SuspensionStateInsteadOfIsSspended1716345771510" failed, error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | query: ROLLBACK +web-1 | Error during migration run: +web-1 | QueryFailedError: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219:19) +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | query: 'ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING (\n' + +web-1 | ' CASE "suspensionState"\n' + +web-1 | " WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum\n" + +web-1 | " ELSE 'none'::instance_suspensionstate_enum\n" + +web-1 | ' END\n' + +web-1 | ' )', +web-1 | parameters: undefined, +web-1 | driverError: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at /sharkey/node_modules/.pnpm/pg@8.12.0/node_modules/pg/lib/client.js:526:17 +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +web-1 | at async PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:184:25) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | }, +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | } +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 | +web-1 | > sharkey@2024.8.2 migrateandstart /sharkey +web-1 | > pnpm migrate && pnpm start +web-1 | +web-1 | +web-1 | > sharkey@2024.8.2 migrate /sharkey +web-1 | > cd packages/backend && pnpm migrate +web-1 | +web-1 | +web-1 | > backend@ migrate /sharkey/packages/backend +web-1 | > pnpm typeorm migration:run -d ormconfig.js +web-1 | +web-1 | query: SELECT * FROM current_schema() +web-1 | query: SELECT version(); +web-1 | query: SELECT * FROM "information_schema"."tables" WHERE "table_schema" = 'public' AND "table_name" = 'migrations' +web-1 | query: SELECT * FROM "migrations" "migrations" ORDER BY "id" DESC +web-1 | 300 migrations are already loaded in the database. +web-1 | 310 migrations were found in the source code. +web-1 | MoreRepoUrl1709462550083 is the last executed migration. It was executed on Sun Mar 03 2024 10:42:30 GMT+0000 (Coordinated Universal Time). +web-1 | 10 migrations are new migrations must be executed. +web-1 | query: START TRANSACTION +web-1 | query: +web-1 | alter table meta +web-1 | rename column "summalyProxy" to "urlPreviewSummaryProxyUrl"; +web-1 | alter table meta +web-1 | add "urlPreviewEnabled" boolean default true not null; +web-1 | alter table meta +web-1 | add "urlPreviewTimeout" integer default 10000 not null; +web-1 | alter table meta +web-1 | add "urlPreviewMaximumContentLength" bigint default 10485760 not null; +web-1 | alter table meta +web-1 | add "urlPreviewRequireContentLength" boolean default false not null; +web-1 | alter table meta +web-1 | add "urlPreviewUserAgent" varchar(1024) default null; +web-1 | +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710512074000,"UrlPreviewMeta1710512074000"] +web-1 | Migration UrlPreviewMeta1710512074000 has been executed successfully. +web-1 | query: ALTER TABLE "antenna" ADD "excludeBots" boolean NOT NULL DEFAULT false +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710919614510,"AntennaExcludeBots1710919614510"] +web-1 | Migration AntennaExcludeBots1710919614510 has been executed successfully. +web-1 | query: +web-1 | CREATE TABLE "system_webhook" ( +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "latestSentAt" timestamp with time zone NULL DEFAULT NULL, +web-1 | "latestStatus" integer NULL DEFAULT NULL, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "on" varchar(128) [] NOT NULL DEFAULT '{}'::character varying[], +web-1 | "url" varchar(1024) NOT NULL, +web-1 | "secret" varchar(1024) NOT NULL, +web-1 | CONSTRAINT "PK_system_webhook_id" PRIMARY KEY ("id") +web-1 | ); +web-1 | CREATE INDEX "IDX_system_webhook_isActive" ON "system_webhook" ("isActive"); +web-1 | CREATE INDEX "IDX_system_webhook_on" ON "system_webhook" USING gin ("on"); +web-1 | +web-1 | CREATE TABLE "abuse_report_notification_recipient" ( +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "method" varchar(64) NOT NULL, +web-1 | "userId" varchar(32) NULL DEFAULT NULL, +web-1 | "systemWebhookId" varchar(32) NULL DEFAULT NULL, +web-1 | CONSTRAINT "PK_abuse_report_notification_recipient_id" PRIMARY KEY ("id"), +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId1" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId2" FOREIGN KEY ("userId") REFERENCES "user_profile"("userId") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_systemWebhookId" FOREIGN KEY ("systemWebhookId") REFERENCES "system_webhook"("id") ON DELETE CASCADE ON UPDATE NO ACTION +web-1 | ); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_isActive" ON "abuse_report_notification_recipient" ("isActive"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_method" ON "abuse_report_notification_recipient" ("method"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_userId" ON "abuse_report_notification_recipient" ("userId"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_systemWebhookId" ON "abuse_report_notification_recipient" ("systemWebhookId"); +web-1 | +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1713656541000,"AbuseReportNotification1713656541000"] +web-1 | Migration AbuseReportNotification1713656541000 has been executed successfully. +web-1 | query: ALTER TABLE "poll" ADD "channelId" character varying(32) +web-1 | query: COMMENT ON COLUMN "poll"."channelId" IS '[Denormalized]' +web-1 | query: CREATE INDEX "IDX_c1240fcc9675946ea5d6c2860e" ON "poll" ("channelId") +web-1 | query: UPDATE "poll" SET "channelId" = "note"."channelId" FROM "note" WHERE "poll"."noteId" = "note"."id" +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716129964060,"ChannelIdDenormalizedForMiPoll1716129964060"] +web-1 | Migration ChannelIdDenormalizedForMiPoll1716129964060 has been executed successfully. +web-1 | query: ALTER TABLE "meta" ADD "mediaSilencedHosts" character varying(1024) array NOT NULL DEFAULT '{}' +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716197366117,"MediaSilenceForHosts1716197366117"] +web-1 | Migration MediaSilenceForHosts1716197366117 has been executed successfully. +web-1 | query: ALTER TABLE "instance" ADD "notRespondingSince" TIMESTAMP WITH TIME ZONE +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716345015347,"NotRespondingSince1716345015347"] +web-1 | Migration NotRespondingSince1716345015347 has been executed successfully. +web-1 | query: CREATE TYPE "public"."instance_suspensionstate_enum" AS ENUM('none', 'manuallySuspended', 'goneSuspended', 'autoSuspendedForNotResponding') +web-1 | query: DROP INDEX "public"."IDX_34500da2e38ac393f7bb6b299c" +web-1 | query: ALTER TABLE "instance" RENAME COLUMN "isSuspended" TO "suspensionState" +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" DROP DEFAULT +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | query failed: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | error: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | Migration "SuspensionStateInsteadOfIsSspended1716345771510" failed, error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | query: ROLLBACK +web-1 | Error during migration run: +web-1 | QueryFailedError: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219:19) +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | query: 'ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING (\n' + +web-1 | ' CASE "suspensionState"\n' + +web-1 | " WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum\n" + +web-1 | " ELSE 'none'::instance_suspensionstate_enum\n" + +web-1 | ' END\n' + +web-1 | ' )', +web-1 | parameters: undefined, +web-1 | driverError: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at /sharkey/node_modules/.pnpm/pg@8.12.0/node_modules/pg/lib/client.js:526:17 +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +web-1 | at async PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:184:25) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | }, +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | } +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 | +web-1 | > sharkey@2024.8.2 migrateandstart /sharkey +web-1 | > pnpm migrate && pnpm start +web-1 | +web-1 | +web-1 | > sharkey@2024.8.2 migrate /sharkey +web-1 | > cd packages/backend && pnpm migrate +web-1 | +web-1 | +web-1 | > backend@ migrate /sharkey/packages/backend +web-1 | > pnpm typeorm migration:run -d ormconfig.js +web-1 | +web-1 | query: SELECT * FROM current_schema() +web-1 | query: SELECT version(); +web-1 | query: SELECT * FROM "information_schema"."tables" WHERE "table_schema" = 'public' AND "table_name" = 'migrations' +web-1 | query: SELECT * FROM "migrations" "migrations" ORDER BY "id" DESC +web-1 | 300 migrations are already loaded in the database. +web-1 | 310 migrations were found in the source code. +web-1 | MoreRepoUrl1709462550083 is the last executed migration. It was executed on Sun Mar 03 2024 10:42:30 GMT+0000 (Coordinated Universal Time). +web-1 | 10 migrations are new migrations must be executed. +web-1 | query: START TRANSACTION +web-1 | query: +web-1 | alter table meta +web-1 | rename column "summalyProxy" to "urlPreviewSummaryProxyUrl"; +web-1 | alter table meta +web-1 | add "urlPreviewEnabled" boolean default true not null; +web-1 | alter table meta +web-1 | add "urlPreviewTimeout" integer default 10000 not null; +web-1 | alter table meta +web-1 | add "urlPreviewMaximumContentLength" bigint default 10485760 not null; +web-1 | alter table meta +web-1 | add "urlPreviewRequireContentLength" boolean default false not null; +web-1 | alter table meta +web-1 | add "urlPreviewUserAgent" varchar(1024) default null; +web-1 | +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710512074000,"UrlPreviewMeta1710512074000"] +web-1 | Migration UrlPreviewMeta1710512074000 has been executed successfully. +web-1 | query: ALTER TABLE "antenna" ADD "excludeBots" boolean NOT NULL DEFAULT false +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710919614510,"AntennaExcludeBots1710919614510"] +web-1 | Migration AntennaExcludeBots1710919614510 has been executed successfully. +web-1 | query: +web-1 | CREATE TABLE "system_webhook" ( +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "latestSentAt" timestamp with time zone NULL DEFAULT NULL, +web-1 | "latestStatus" integer NULL DEFAULT NULL, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "on" varchar(128) [] NOT NULL DEFAULT '{}'::character varying[], +web-1 | "url" varchar(1024) NOT NULL, +web-1 | "secret" varchar(1024) NOT NULL, +web-1 | CONSTRAINT "PK_system_webhook_id" PRIMARY KEY ("id") +web-1 | ); +web-1 | CREATE INDEX "IDX_system_webhook_isActive" ON "system_webhook" ("isActive"); +web-1 | CREATE INDEX "IDX_system_webhook_on" ON "system_webhook" USING gin ("on"); +web-1 | +web-1 | CREATE TABLE "abuse_report_notification_recipient" ( +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "method" varchar(64) NOT NULL, +web-1 | "userId" varchar(32) NULL DEFAULT NULL, +web-1 | "systemWebhookId" varchar(32) NULL DEFAULT NULL, +web-1 | CONSTRAINT "PK_abuse_report_notification_recipient_id" PRIMARY KEY ("id"), +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId1" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId2" FOREIGN KEY ("userId") REFERENCES "user_profile"("userId") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_systemWebhookId" FOREIGN KEY ("systemWebhookId") REFERENCES "system_webhook"("id") ON DELETE CASCADE ON UPDATE NO ACTION +web-1 | ); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_isActive" ON "abuse_report_notification_recipient" ("isActive"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_method" ON "abuse_report_notification_recipient" ("method"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_userId" ON "abuse_report_notification_recipient" ("userId"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_systemWebhookId" ON "abuse_report_notification_recipient" ("systemWebhookId"); +web-1 | +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1713656541000,"AbuseReportNotification1713656541000"] +web-1 | Migration AbuseReportNotification1713656541000 has been executed successfully. +web-1 | query: ALTER TABLE "poll" ADD "channelId" character varying(32) +web-1 | query: COMMENT ON COLUMN "poll"."channelId" IS '[Denormalized]' +web-1 | query: CREATE INDEX "IDX_c1240fcc9675946ea5d6c2860e" ON "poll" ("channelId") +web-1 | query: UPDATE "poll" SET "channelId" = "note"."channelId" FROM "note" WHERE "poll"."noteId" = "note"."id" +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716129964060,"ChannelIdDenormalizedForMiPoll1716129964060"] +web-1 | Migration ChannelIdDenormalizedForMiPoll1716129964060 has been executed successfully. +web-1 | query: ALTER TABLE "meta" ADD "mediaSilencedHosts" character varying(1024) array NOT NULL DEFAULT '{}' +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716197366117,"MediaSilenceForHosts1716197366117"] +web-1 | Migration MediaSilenceForHosts1716197366117 has been executed successfully. +web-1 | query: ALTER TABLE "instance" ADD "notRespondingSince" TIMESTAMP WITH TIME ZONE +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716345015347,"NotRespondingSince1716345015347"] +web-1 | Migration NotRespondingSince1716345015347 has been executed successfully. +web-1 | query: CREATE TYPE "public"."instance_suspensionstate_enum" AS ENUM('none', 'manuallySuspended', 'goneSuspended', 'autoSuspendedForNotResponding') +web-1 | query: DROP INDEX "public"."IDX_34500da2e38ac393f7bb6b299c" +web-1 | query: ALTER TABLE "instance" RENAME COLUMN "isSuspended" TO "suspensionState" +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" DROP DEFAULT +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | query failed: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | error: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | Migration "SuspensionStateInsteadOfIsSspended1716345771510" failed, error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | query: ROLLBACK +web-1 | Error during migration run: +web-1 | QueryFailedError: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219:19) +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | query: 'ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING (\n' + +web-1 | ' CASE "suspensionState"\n' + +web-1 | " WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum\n" + +web-1 | " ELSE 'none'::instance_suspensionstate_enum\n" + +web-1 | ' END\n' + +web-1 | ' )', +web-1 | parameters: undefined, +web-1 | driverError: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at /sharkey/node_modules/.pnpm/pg@8.12.0/node_modules/pg/lib/client.js:526:17 +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +web-1 | at async PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:184:25) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | }, +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | } +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 | +web-1 | > sharkey@2024.8.2 migrateandstart /sharkey +web-1 | > pnpm migrate && pnpm start +web-1 | +web-1 | +web-1 | > sharkey@2024.8.2 migrate /sharkey +web-1 | > cd packages/backend && pnpm migrate +web-1 | +web-1 | +web-1 | > backend@ migrate /sharkey/packages/backend +web-1 | > pnpm typeorm migration:run -d ormconfig.js +web-1 | +web-1 | query: SELECT * FROM current_schema() +web-1 | query: SELECT version(); +web-1 | query: SELECT * FROM "information_schema"."tables" WHERE "table_schema" = 'public' AND "table_name" = 'migrations' +web-1 | query: SELECT * FROM "migrations" "migrations" ORDER BY "id" DESC +web-1 | 300 migrations are already loaded in the database. +web-1 | 310 migrations were found in the source code. +web-1 | MoreRepoUrl1709462550083 is the last executed migration. It was executed on Sun Mar 03 2024 10:42:30 GMT+0000 (Coordinated Universal Time). +web-1 | 10 migrations are new migrations must be executed. +web-1 | query: START TRANSACTION +web-1 | query: +web-1 | alter table meta +web-1 | rename column "summalyProxy" to "urlPreviewSummaryProxyUrl"; +web-1 | alter table meta +web-1 | add "urlPreviewEnabled" boolean default true not null; +web-1 | alter table meta +web-1 | add "urlPreviewTimeout" integer default 10000 not null; +web-1 | alter table meta +web-1 | add "urlPreviewMaximumContentLength" bigint default 10485760 not null; +web-1 | alter table meta +web-1 | add "urlPreviewRequireContentLength" boolean default false not null; +web-1 | alter table meta +web-1 | add "urlPreviewUserAgent" varchar(1024) default null; +web-1 | +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710512074000,"UrlPreviewMeta1710512074000"] +web-1 | Migration UrlPreviewMeta1710512074000 has been executed successfully. +web-1 | query: ALTER TABLE "antenna" ADD "excludeBots" boolean NOT NULL DEFAULT false +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710919614510,"AntennaExcludeBots1710919614510"] +web-1 | Migration AntennaExcludeBots1710919614510 has been executed successfully. +web-1 | query: +web-1 | CREATE TABLE "system_webhook" ( +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "latestSentAt" timestamp with time zone NULL DEFAULT NULL, +web-1 | "latestStatus" integer NULL DEFAULT NULL, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "on" varchar(128) [] NOT NULL DEFAULT '{}'::character varying[], +web-1 | "url" varchar(1024) NOT NULL, +web-1 | "secret" varchar(1024) NOT NULL, +web-1 | CONSTRAINT "PK_system_webhook_id" PRIMARY KEY ("id") +web-1 | ); +web-1 | CREATE INDEX "IDX_system_webhook_isActive" ON "system_webhook" ("isActive"); +web-1 | CREATE INDEX "IDX_system_webhook_on" ON "system_webhook" USING gin ("on"); +web-1 | +web-1 | CREATE TABLE "abuse_report_notification_recipient" ( +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "method" varchar(64) NOT NULL, +web-1 | "userId" varchar(32) NULL DEFAULT NULL, +web-1 | "systemWebhookId" varchar(32) NULL DEFAULT NULL, +web-1 | CONSTRAINT "PK_abuse_report_notification_recipient_id" PRIMARY KEY ("id"), +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId1" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId2" FOREIGN KEY ("userId") REFERENCES "user_profile"("userId") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_systemWebhookId" FOREIGN KEY ("systemWebhookId") REFERENCES "system_webhook"("id") ON DELETE CASCADE ON UPDATE NO ACTION +web-1 | ); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_isActive" ON "abuse_report_notification_recipient" ("isActive"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_method" ON "abuse_report_notification_recipient" ("method"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_userId" ON "abuse_report_notification_recipient" ("userId"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_systemWebhookId" ON "abuse_report_notification_recipient" ("systemWebhookId"); +web-1 | +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1713656541000,"AbuseReportNotification1713656541000"] +web-1 | Migration AbuseReportNotification1713656541000 has been executed successfully. +web-1 | query: ALTER TABLE "poll" ADD "channelId" character varying(32) +web-1 | query: COMMENT ON COLUMN "poll"."channelId" IS '[Denormalized]' +web-1 | query: CREATE INDEX "IDX_c1240fcc9675946ea5d6c2860e" ON "poll" ("channelId") +web-1 | query: UPDATE "poll" SET "channelId" = "note"."channelId" FROM "note" WHERE "poll"."noteId" = "note"."id" +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716129964060,"ChannelIdDenormalizedForMiPoll1716129964060"] +web-1 | Migration ChannelIdDenormalizedForMiPoll1716129964060 has been executed successfully. +web-1 | query: ALTER TABLE "meta" ADD "mediaSilencedHosts" character varying(1024) array NOT NULL DEFAULT '{}' +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716197366117,"MediaSilenceForHosts1716197366117"] +web-1 | Migration MediaSilenceForHosts1716197366117 has been executed successfully. +web-1 | query: ALTER TABLE "instance" ADD "notRespondingSince" TIMESTAMP WITH TIME ZONE +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716345015347,"NotRespondingSince1716345015347"] +web-1 | Migration NotRespondingSince1716345015347 has been executed successfully. +web-1 | query: CREATE TYPE "public"."instance_suspensionstate_enum" AS ENUM('none', 'manuallySuspended', 'goneSuspended', 'autoSuspendedForNotResponding') +web-1 | query: DROP INDEX "public"."IDX_34500da2e38ac393f7bb6b299c" +web-1 | query: ALTER TABLE "instance" RENAME COLUMN "isSuspended" TO "suspensionState" +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" DROP DEFAULT +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | query failed: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | error: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | Migration "SuspensionStateInsteadOfIsSspended1716345771510" failed, error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | query: ROLLBACK +web-1 | Error during migration run: +web-1 | QueryFailedError: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219:19) +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | query: 'ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING (\n' + +web-1 | ' CASE "suspensionState"\n' + +web-1 | " WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum\n" + +web-1 | " ELSE 'none'::instance_suspensionstate_enum\n" + +web-1 | ' END\n' + +web-1 | ' )', +web-1 | parameters: undefined, +web-1 | driverError: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at /sharkey/node_modules/.pnpm/pg@8.12.0/node_modules/pg/lib/client.js:526:17 +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +web-1 | at async PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:184:25) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | }, +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | } +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 | +web-1 | > sharkey@2024.8.2 migrateandstart /sharkey +web-1 | > pnpm migrate && pnpm start +web-1 | +web-1 | +web-1 | > sharkey@2024.8.2 migrate /sharkey +web-1 | > cd packages/backend && pnpm migrate +web-1 | +web-1 | +web-1 | > backend@ migrate /sharkey/packages/backend +web-1 | > pnpm typeorm migration:run -d ormconfig.js +web-1 | +web-1 | query: SELECT * FROM current_schema() +web-1 | query: SELECT version(); +web-1 | query: SELECT * FROM "information_schema"."tables" WHERE "table_schema" = 'public' AND "table_name" = 'migrations' +web-1 | query: SELECT * FROM "migrations" "migrations" ORDER BY "id" DESC +web-1 | 300 migrations are already loaded in the database. +web-1 | 310 migrations were found in the source code. +web-1 | MoreRepoUrl1709462550083 is the last executed migration. It was executed on Sun Mar 03 2024 10:42:30 GMT+0000 (Coordinated Universal Time). +web-1 | 10 migrations are new migrations must be executed. +web-1 | query: START TRANSACTION +web-1 | query: +web-1 | alter table meta +web-1 | rename column "summalyProxy" to "urlPreviewSummaryProxyUrl"; +web-1 | alter table meta +web-1 | add "urlPreviewEnabled" boolean default true not null; +web-1 | alter table meta +web-1 | add "urlPreviewTimeout" integer default 10000 not null; +web-1 | alter table meta +web-1 | add "urlPreviewMaximumContentLength" bigint default 10485760 not null; +web-1 | alter table meta +web-1 | add "urlPreviewRequireContentLength" boolean default false not null; +web-1 | alter table meta +web-1 | add "urlPreviewUserAgent" varchar(1024) default null; +web-1 | +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710512074000,"UrlPreviewMeta1710512074000"] +web-1 | Migration UrlPreviewMeta1710512074000 has been executed successfully. +web-1 | query: ALTER TABLE "antenna" ADD "excludeBots" boolean NOT NULL DEFAULT false +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710919614510,"AntennaExcludeBots1710919614510"] +web-1 | Migration AntennaExcludeBots1710919614510 has been executed successfully. +web-1 | query: +web-1 | CREATE TABLE "system_webhook" ( +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "latestSentAt" timestamp with time zone NULL DEFAULT NULL, +web-1 | "latestStatus" integer NULL DEFAULT NULL, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "on" varchar(128) [] NOT NULL DEFAULT '{}'::character varying[], +web-1 | "url" varchar(1024) NOT NULL, +web-1 | "secret" varchar(1024) NOT NULL, +web-1 | CONSTRAINT "PK_system_webhook_id" PRIMARY KEY ("id") +web-1 | ); +web-1 | CREATE INDEX "IDX_system_webhook_isActive" ON "system_webhook" ("isActive"); +web-1 | CREATE INDEX "IDX_system_webhook_on" ON "system_webhook" USING gin ("on"); +web-1 | +web-1 | CREATE TABLE "abuse_report_notification_recipient" ( +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "method" varchar(64) NOT NULL, +web-1 | "userId" varchar(32) NULL DEFAULT NULL, +web-1 | "systemWebhookId" varchar(32) NULL DEFAULT NULL, +web-1 | CONSTRAINT "PK_abuse_report_notification_recipient_id" PRIMARY KEY ("id"), +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId1" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId2" FOREIGN KEY ("userId") REFERENCES "user_profile"("userId") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_systemWebhookId" FOREIGN KEY ("systemWebhookId") REFERENCES "system_webhook"("id") ON DELETE CASCADE ON UPDATE NO ACTION +web-1 | ); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_isActive" ON "abuse_report_notification_recipient" ("isActive"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_method" ON "abuse_report_notification_recipient" ("method"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_userId" ON "abuse_report_notification_recipient" ("userId"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_systemWebhookId" ON "abuse_report_notification_recipient" ("systemWebhookId"); +web-1 | +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1713656541000,"AbuseReportNotification1713656541000"] +web-1 | Migration AbuseReportNotification1713656541000 has been executed successfully. +web-1 | query: ALTER TABLE "poll" ADD "channelId" character varying(32) +web-1 | query: COMMENT ON COLUMN "poll"."channelId" IS '[Denormalized]' +web-1 | query: CREATE INDEX "IDX_c1240fcc9675946ea5d6c2860e" ON "poll" ("channelId") +web-1 | query: UPDATE "poll" SET "channelId" = "note"."channelId" FROM "note" WHERE "poll"."noteId" = "note"."id" +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716129964060,"ChannelIdDenormalizedForMiPoll1716129964060"] +web-1 | Migration ChannelIdDenormalizedForMiPoll1716129964060 has been executed successfully. +web-1 | query: ALTER TABLE "meta" ADD "mediaSilencedHosts" character varying(1024) array NOT NULL DEFAULT '{}' +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716197366117,"MediaSilenceForHosts1716197366117"] +web-1 | Migration MediaSilenceForHosts1716197366117 has been executed successfully. +web-1 | query: ALTER TABLE "instance" ADD "notRespondingSince" TIMESTAMP WITH TIME ZONE +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716345015347,"NotRespondingSince1716345015347"] +web-1 | Migration NotRespondingSince1716345015347 has been executed successfully. +web-1 | query: CREATE TYPE "public"."instance_suspensionstate_enum" AS ENUM('none', 'manuallySuspended', 'goneSuspended', 'autoSuspendedForNotResponding') +web-1 | query: DROP INDEX "public"."IDX_34500da2e38ac393f7bb6b299c" +web-1 | query: ALTER TABLE "instance" RENAME COLUMN "isSuspended" TO "suspensionState" +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" DROP DEFAULT +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | query failed: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | error: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | Migration "SuspensionStateInsteadOfIsSspended1716345771510" failed, error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | query: ROLLBACK +web-1 | Error during migration run: +web-1 | QueryFailedError: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219:19) +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | query: 'ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING (\n' + +web-1 | ' CASE "suspensionState"\n' + +web-1 | " WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum\n" + +web-1 | " ELSE 'none'::instance_suspensionstate_enum\n" + +web-1 | ' END\n' + +web-1 | ' )', +web-1 | parameters: undefined, +web-1 | driverError: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at /sharkey/node_modules/.pnpm/pg@8.12.0/node_modules/pg/lib/client.js:526:17 +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +web-1 | at async PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:184:25) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | }, +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | } +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 | +web-1 | > sharkey@2024.8.2 migrateandstart /sharkey +web-1 | > pnpm migrate && pnpm start +web-1 | +web-1 | +web-1 | > sharkey@2024.8.2 migrate /sharkey +web-1 | > cd packages/backend && pnpm migrate +web-1 | +web-1 | +web-1 | > backend@ migrate /sharkey/packages/backend +web-1 | > pnpm typeorm migration:run -d ormconfig.js +web-1 | +web-1 | query: SELECT * FROM current_schema() +web-1 | query: SELECT version(); +web-1 | query: SELECT * FROM "information_schema"."tables" WHERE "table_schema" = 'public' AND "table_name" = 'migrations' +web-1 | query: SELECT * FROM "migrations" "migrations" ORDER BY "id" DESC +web-1 | 300 migrations are already loaded in the database. +web-1 | 310 migrations were found in the source code. +web-1 | MoreRepoUrl1709462550083 is the last executed migration. It was executed on Sun Mar 03 2024 10:42:30 GMT+0000 (Coordinated Universal Time). +web-1 | 10 migrations are new migrations must be executed. +web-1 | query: START TRANSACTION +web-1 | query: +web-1 | alter table meta +web-1 | rename column "summalyProxy" to "urlPreviewSummaryProxyUrl"; +web-1 | alter table meta +web-1 | add "urlPreviewEnabled" boolean default true not null; +web-1 | alter table meta +web-1 | add "urlPreviewTimeout" integer default 10000 not null; +web-1 | alter table meta +web-1 | add "urlPreviewMaximumContentLength" bigint default 10485760 not null; +web-1 | alter table meta +web-1 | add "urlPreviewRequireContentLength" boolean default false not null; +web-1 | alter table meta +web-1 | add "urlPreviewUserAgent" varchar(1024) default null; +web-1 | +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710512074000,"UrlPreviewMeta1710512074000"] +web-1 | Migration UrlPreviewMeta1710512074000 has been executed successfully. +web-1 | query: ALTER TABLE "antenna" ADD "excludeBots" boolean NOT NULL DEFAULT false +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710919614510,"AntennaExcludeBots1710919614510"] +web-1 | Migration AntennaExcludeBots1710919614510 has been executed successfully. +web-1 | query: +web-1 | CREATE TABLE "system_webhook" ( +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "latestSentAt" timestamp with time zone NULL DEFAULT NULL, +web-1 | "latestStatus" integer NULL DEFAULT NULL, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "on" varchar(128) [] NOT NULL DEFAULT '{}'::character varying[], +web-1 | "url" varchar(1024) NOT NULL, +web-1 | "secret" varchar(1024) NOT NULL, +web-1 | CONSTRAINT "PK_system_webhook_id" PRIMARY KEY ("id") +web-1 | ); +web-1 | CREATE INDEX "IDX_system_webhook_isActive" ON "system_webhook" ("isActive"); +web-1 | CREATE INDEX "IDX_system_webhook_on" ON "system_webhook" USING gin ("on"); +web-1 | +web-1 | CREATE TABLE "abuse_report_notification_recipient" ( +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "method" varchar(64) NOT NULL, +web-1 | "userId" varchar(32) NULL DEFAULT NULL, +web-1 | "systemWebhookId" varchar(32) NULL DEFAULT NULL, +web-1 | CONSTRAINT "PK_abuse_report_notification_recipient_id" PRIMARY KEY ("id"), +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId1" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId2" FOREIGN KEY ("userId") REFERENCES "user_profile"("userId") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_systemWebhookId" FOREIGN KEY ("systemWebhookId") REFERENCES "system_webhook"("id") ON DELETE CASCADE ON UPDATE NO ACTION +web-1 | ); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_isActive" ON "abuse_report_notification_recipient" ("isActive"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_method" ON "abuse_report_notification_recipient" ("method"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_userId" ON "abuse_report_notification_recipient" ("userId"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_systemWebhookId" ON "abuse_report_notification_recipient" ("systemWebhookId"); +web-1 | +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1713656541000,"AbuseReportNotification1713656541000"] +web-1 | Migration AbuseReportNotification1713656541000 has been executed successfully. +web-1 | query: ALTER TABLE "poll" ADD "channelId" character varying(32) +web-1 | query: COMMENT ON COLUMN "poll"."channelId" IS '[Denormalized]' +web-1 | query: CREATE INDEX "IDX_c1240fcc9675946ea5d6c2860e" ON "poll" ("channelId") +web-1 | query: UPDATE "poll" SET "channelId" = "note"."channelId" FROM "note" WHERE "poll"."noteId" = "note"."id" +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716129964060,"ChannelIdDenormalizedForMiPoll1716129964060"] +web-1 | Migration ChannelIdDenormalizedForMiPoll1716129964060 has been executed successfully. +web-1 | query: ALTER TABLE "meta" ADD "mediaSilencedHosts" character varying(1024) array NOT NULL DEFAULT '{}' +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716197366117,"MediaSilenceForHosts1716197366117"] +web-1 | Migration MediaSilenceForHosts1716197366117 has been executed successfully. +web-1 | query: ALTER TABLE "instance" ADD "notRespondingSince" TIMESTAMP WITH TIME ZONE +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716345015347,"NotRespondingSince1716345015347"] +web-1 | Migration NotRespondingSince1716345015347 has been executed successfully. +web-1 | query: CREATE TYPE "public"."instance_suspensionstate_enum" AS ENUM('none', 'manuallySuspended', 'goneSuspended', 'autoSuspendedForNotResponding') +web-1 | query: DROP INDEX "public"."IDX_34500da2e38ac393f7bb6b299c" +web-1 | query: ALTER TABLE "instance" RENAME COLUMN "isSuspended" TO "suspensionState" +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" DROP DEFAULT +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | query failed: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | error: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | Migration "SuspensionStateInsteadOfIsSspended1716345771510" failed, error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | query: ROLLBACK +web-1 | Error during migration run: +web-1 | QueryFailedError: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219:19) +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | query: 'ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING (\n' + +web-1 | ' CASE "suspensionState"\n' + +web-1 | " WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum\n" + +web-1 | " ELSE 'none'::instance_suspensionstate_enum\n" + +web-1 | ' END\n' + +web-1 | ' )', +web-1 | parameters: undefined, +web-1 | driverError: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at /sharkey/node_modules/.pnpm/pg@8.12.0/node_modules/pg/lib/client.js:526:17 +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +web-1 | at async PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:184:25) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | }, +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | } +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 | +web-1 | > sharkey@2024.8.2 migrateandstart /sharkey +web-1 | > pnpm migrate && pnpm start +web-1 | +web-1 | +web-1 | > sharkey@2024.8.2 migrate /sharkey +web-1 | > cd packages/backend && pnpm migrate +web-1 | +web-1 | +web-1 | > backend@ migrate /sharkey/packages/backend +web-1 | > pnpm typeorm migration:run -d ormconfig.js +web-1 | +web-1 | query: SELECT * FROM current_schema() +web-1 | query: SELECT version(); +web-1 | query: SELECT * FROM "information_schema"."tables" WHERE "table_schema" = 'public' AND "table_name" = 'migrations' +web-1 | query: SELECT * FROM "migrations" "migrations" ORDER BY "id" DESC +web-1 | 300 migrations are already loaded in the database. +web-1 | 310 migrations were found in the source code. +web-1 | MoreRepoUrl1709462550083 is the last executed migration. It was executed on Sun Mar 03 2024 10:42:30 GMT+0000 (Coordinated Universal Time). +web-1 | 10 migrations are new migrations must be executed. +web-1 | query: START TRANSACTION +web-1 | query: +web-1 | alter table meta +web-1 | rename column "summalyProxy" to "urlPreviewSummaryProxyUrl"; +web-1 | alter table meta +web-1 | add "urlPreviewEnabled" boolean default true not null; +web-1 | alter table meta +web-1 | add "urlPreviewTimeout" integer default 10000 not null; +web-1 | alter table meta +web-1 | add "urlPreviewMaximumContentLength" bigint default 10485760 not null; +web-1 | alter table meta +web-1 | add "urlPreviewRequireContentLength" boolean default false not null; +web-1 | alter table meta +web-1 | add "urlPreviewUserAgent" varchar(1024) default null; +web-1 | +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710512074000,"UrlPreviewMeta1710512074000"] +web-1 | Migration UrlPreviewMeta1710512074000 has been executed successfully. +web-1 | query: ALTER TABLE "antenna" ADD "excludeBots" boolean NOT NULL DEFAULT false +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710919614510,"AntennaExcludeBots1710919614510"] +web-1 | Migration AntennaExcludeBots1710919614510 has been executed successfully. +web-1 | query: +web-1 | CREATE TABLE "system_webhook" ( +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "latestSentAt" timestamp with time zone NULL DEFAULT NULL, +web-1 | "latestStatus" integer NULL DEFAULT NULL, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "on" varchar(128) [] NOT NULL DEFAULT '{}'::character varying[], +web-1 | "url" varchar(1024) NOT NULL, +web-1 | "secret" varchar(1024) NOT NULL, +web-1 | CONSTRAINT "PK_system_webhook_id" PRIMARY KEY ("id") +web-1 | ); +web-1 | CREATE INDEX "IDX_system_webhook_isActive" ON "system_webhook" ("isActive"); +web-1 | CREATE INDEX "IDX_system_webhook_on" ON "system_webhook" USING gin ("on"); +web-1 | +web-1 | CREATE TABLE "abuse_report_notification_recipient" ( +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "method" varchar(64) NOT NULL, +web-1 | "userId" varchar(32) NULL DEFAULT NULL, +web-1 | "systemWebhookId" varchar(32) NULL DEFAULT NULL, +web-1 | CONSTRAINT "PK_abuse_report_notification_recipient_id" PRIMARY KEY ("id"), +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId1" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId2" FOREIGN KEY ("userId") REFERENCES "user_profile"("userId") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_systemWebhookId" FOREIGN KEY ("systemWebhookId") REFERENCES "system_webhook"("id") ON DELETE CASCADE ON UPDATE NO ACTION +web-1 | ); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_isActive" ON "abuse_report_notification_recipient" ("isActive"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_method" ON "abuse_report_notification_recipient" ("method"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_userId" ON "abuse_report_notification_recipient" ("userId"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_systemWebhookId" ON "abuse_report_notification_recipient" ("systemWebhookId"); +web-1 | +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1713656541000,"AbuseReportNotification1713656541000"] +web-1 | Migration AbuseReportNotification1713656541000 has been executed successfully. +web-1 | query: ALTER TABLE "poll" ADD "channelId" character varying(32) +web-1 | query: COMMENT ON COLUMN "poll"."channelId" IS '[Denormalized]' +web-1 | query: CREATE INDEX "IDX_c1240fcc9675946ea5d6c2860e" ON "poll" ("channelId") +web-1 | query: UPDATE "poll" SET "channelId" = "note"."channelId" FROM "note" WHERE "poll"."noteId" = "note"."id" +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716129964060,"ChannelIdDenormalizedForMiPoll1716129964060"] +web-1 | Migration ChannelIdDenormalizedForMiPoll1716129964060 has been executed successfully. +web-1 | query: ALTER TABLE "meta" ADD "mediaSilencedHosts" character varying(1024) array NOT NULL DEFAULT '{}' +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716197366117,"MediaSilenceForHosts1716197366117"] +web-1 | Migration MediaSilenceForHosts1716197366117 has been executed successfully. +web-1 | query: ALTER TABLE "instance" ADD "notRespondingSince" TIMESTAMP WITH TIME ZONE +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716345015347,"NotRespondingSince1716345015347"] +web-1 | Migration NotRespondingSince1716345015347 has been executed successfully. +web-1 | query: CREATE TYPE "public"."instance_suspensionstate_enum" AS ENUM('none', 'manuallySuspended', 'goneSuspended', 'autoSuspendedForNotResponding') +web-1 | query: DROP INDEX "public"."IDX_34500da2e38ac393f7bb6b299c" +web-1 | query: ALTER TABLE "instance" RENAME COLUMN "isSuspended" TO "suspensionState" +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" DROP DEFAULT +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | query failed: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | error: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | Migration "SuspensionStateInsteadOfIsSspended1716345771510" failed, error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | query: ROLLBACK +web-1 | Error during migration run: +web-1 | QueryFailedError: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219:19) +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | query: 'ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING (\n' + +web-1 | ' CASE "suspensionState"\n' + +web-1 | " WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum\n" + +web-1 | " ELSE 'none'::instance_suspensionstate_enum\n" + +web-1 | ' END\n' + +web-1 | ' )', +web-1 | parameters: undefined, +web-1 | driverError: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at /sharkey/node_modules/.pnpm/pg@8.12.0/node_modules/pg/lib/client.js:526:17 +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +web-1 | at async PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:184:25) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | }, +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | } +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 | +web-1 | > sharkey@2024.8.2 migrateandstart /sharkey +web-1 | > pnpm migrate && pnpm start +web-1 | +web-1 | +web-1 | > sharkey@2024.8.2 migrate /sharkey +web-1 | > cd packages/backend && pnpm migrate +web-1 | +web-1 | +web-1 | > backend@ migrate /sharkey/packages/backend +web-1 | > pnpm typeorm migration:run -d ormconfig.js +web-1 | +web-1 | query: SELECT * FROM current_schema() +web-1 | query: SELECT version(); +web-1 | query: SELECT * FROM "information_schema"."tables" WHERE "table_schema" = 'public' AND "table_name" = 'migrations' +web-1 | query: SELECT * FROM "migrations" "migrations" ORDER BY "id" DESC +web-1 | 300 migrations are already loaded in the database. +web-1 | 310 migrations were found in the source code. +web-1 | MoreRepoUrl1709462550083 is the last executed migration. It was executed on Sun Mar 03 2024 10:42:30 GMT+0000 (Coordinated Universal Time). +web-1 | 10 migrations are new migrations must be executed. +web-1 | query: START TRANSACTION +web-1 | query: +web-1 | alter table meta +web-1 | rename column "summalyProxy" to "urlPreviewSummaryProxyUrl"; +web-1 | alter table meta +web-1 | add "urlPreviewEnabled" boolean default true not null; +web-1 | alter table meta +web-1 | add "urlPreviewTimeout" integer default 10000 not null; +web-1 | alter table meta +web-1 | add "urlPreviewMaximumContentLength" bigint default 10485760 not null; +web-1 | alter table meta +web-1 | add "urlPreviewRequireContentLength" boolean default false not null; +web-1 | alter table meta +web-1 | add "urlPreviewUserAgent" varchar(1024) default null; +web-1 | +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710512074000,"UrlPreviewMeta1710512074000"] +web-1 | Migration UrlPreviewMeta1710512074000 has been executed successfully. +web-1 | query: ALTER TABLE "antenna" ADD "excludeBots" boolean NOT NULL DEFAULT false +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710919614510,"AntennaExcludeBots1710919614510"] +web-1 | Migration AntennaExcludeBots1710919614510 has been executed successfully. +web-1 | query: +web-1 | CREATE TABLE "system_webhook" ( +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "latestSentAt" timestamp with time zone NULL DEFAULT NULL, +web-1 | "latestStatus" integer NULL DEFAULT NULL, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "on" varchar(128) [] NOT NULL DEFAULT '{}'::character varying[], +web-1 | "url" varchar(1024) NOT NULL, +web-1 | "secret" varchar(1024) NOT NULL, +web-1 | CONSTRAINT "PK_system_webhook_id" PRIMARY KEY ("id") +web-1 | ); +web-1 | CREATE INDEX "IDX_system_webhook_isActive" ON "system_webhook" ("isActive"); +web-1 | CREATE INDEX "IDX_system_webhook_on" ON "system_webhook" USING gin ("on"); +web-1 | +web-1 | CREATE TABLE "abuse_report_notification_recipient" ( +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "method" varchar(64) NOT NULL, +web-1 | "userId" varchar(32) NULL DEFAULT NULL, +web-1 | "systemWebhookId" varchar(32) NULL DEFAULT NULL, +web-1 | CONSTRAINT "PK_abuse_report_notification_recipient_id" PRIMARY KEY ("id"), +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId1" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId2" FOREIGN KEY ("userId") REFERENCES "user_profile"("userId") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_systemWebhookId" FOREIGN KEY ("systemWebhookId") REFERENCES "system_webhook"("id") ON DELETE CASCADE ON UPDATE NO ACTION +web-1 | ); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_isActive" ON "abuse_report_notification_recipient" ("isActive"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_method" ON "abuse_report_notification_recipient" ("method"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_userId" ON "abuse_report_notification_recipient" ("userId"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_systemWebhookId" ON "abuse_report_notification_recipient" ("systemWebhookId"); +web-1 | +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1713656541000,"AbuseReportNotification1713656541000"] +web-1 | Migration AbuseReportNotification1713656541000 has been executed successfully. +web-1 | query: ALTER TABLE "poll" ADD "channelId" character varying(32) +web-1 | query: COMMENT ON COLUMN "poll"."channelId" IS '[Denormalized]' +web-1 | query: CREATE INDEX "IDX_c1240fcc9675946ea5d6c2860e" ON "poll" ("channelId") +web-1 | query: UPDATE "poll" SET "channelId" = "note"."channelId" FROM "note" WHERE "poll"."noteId" = "note"."id" +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716129964060,"ChannelIdDenormalizedForMiPoll1716129964060"] +web-1 | Migration ChannelIdDenormalizedForMiPoll1716129964060 has been executed successfully. +web-1 | query: ALTER TABLE "meta" ADD "mediaSilencedHosts" character varying(1024) array NOT NULL DEFAULT '{}' +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716197366117,"MediaSilenceForHosts1716197366117"] +web-1 | Migration MediaSilenceForHosts1716197366117 has been executed successfully. +web-1 | query: ALTER TABLE "instance" ADD "notRespondingSince" TIMESTAMP WITH TIME ZONE +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716345015347,"NotRespondingSince1716345015347"] +web-1 | Migration NotRespondingSince1716345015347 has been executed successfully. +web-1 | query: CREATE TYPE "public"."instance_suspensionstate_enum" AS ENUM('none', 'manuallySuspended', 'goneSuspended', 'autoSuspendedForNotResponding') +web-1 | query: DROP INDEX "public"."IDX_34500da2e38ac393f7bb6b299c" +web-1 | query: ALTER TABLE "instance" RENAME COLUMN "isSuspended" TO "suspensionState" +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" DROP DEFAULT +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | query failed: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | error: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | Migration "SuspensionStateInsteadOfIsSspended1716345771510" failed, error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | query: ROLLBACK +web-1 | Error during migration run: +web-1 | QueryFailedError: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219:19) +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | query: 'ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING (\n' + +web-1 | ' CASE "suspensionState"\n' + +web-1 | " WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum\n" + +web-1 | " ELSE 'none'::instance_suspensionstate_enum\n" + +web-1 | ' END\n' + +web-1 | ' )', +web-1 | parameters: undefined, +web-1 | driverError: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at /sharkey/node_modules/.pnpm/pg@8.12.0/node_modules/pg/lib/client.js:526:17 +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +web-1 | at async PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:184:25) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | }, +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | } +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 | +web-1 | > sharkey@2024.8.2 migrateandstart /sharkey +web-1 | > pnpm migrate && pnpm start +web-1 | +web-1 | +web-1 | > sharkey@2024.8.2 migrate /sharkey +web-1 | > cd packages/backend && pnpm migrate +web-1 | +web-1 | +web-1 | > backend@ migrate /sharkey/packages/backend +web-1 | > pnpm typeorm migration:run -d ormconfig.js +web-1 | +web-1 | query: SELECT * FROM current_schema() +web-1 | query: SELECT version(); +web-1 | query: SELECT * FROM "information_schema"."tables" WHERE "table_schema" = 'public' AND "table_name" = 'migrations' +web-1 | query: SELECT * FROM "migrations" "migrations" ORDER BY "id" DESC +web-1 | 300 migrations are already loaded in the database. +web-1 | 310 migrations were found in the source code. +web-1 | MoreRepoUrl1709462550083 is the last executed migration. It was executed on Sun Mar 03 2024 10:42:30 GMT+0000 (Coordinated Universal Time). +web-1 | 10 migrations are new migrations must be executed. +web-1 | query: START TRANSACTION +web-1 | query: +web-1 | alter table meta +web-1 | rename column "summalyProxy" to "urlPreviewSummaryProxyUrl"; +web-1 | alter table meta +web-1 | add "urlPreviewEnabled" boolean default true not null; +web-1 | alter table meta +web-1 | add "urlPreviewTimeout" integer default 10000 not null; +web-1 | alter table meta +web-1 | add "urlPreviewMaximumContentLength" bigint default 10485760 not null; +web-1 | alter table meta +web-1 | add "urlPreviewRequireContentLength" boolean default false not null; +web-1 | alter table meta +web-1 | add "urlPreviewUserAgent" varchar(1024) default null; +web-1 | +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710512074000,"UrlPreviewMeta1710512074000"] +web-1 | Migration UrlPreviewMeta1710512074000 has been executed successfully. +web-1 | query: ALTER TABLE "antenna" ADD "excludeBots" boolean NOT NULL DEFAULT false +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710919614510,"AntennaExcludeBots1710919614510"] +web-1 | Migration AntennaExcludeBots1710919614510 has been executed successfully. +web-1 | query: +web-1 | CREATE TABLE "system_webhook" ( +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "latestSentAt" timestamp with time zone NULL DEFAULT NULL, +web-1 | "latestStatus" integer NULL DEFAULT NULL, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "on" varchar(128) [] NOT NULL DEFAULT '{}'::character varying[], +web-1 | "url" varchar(1024) NOT NULL, +web-1 | "secret" varchar(1024) NOT NULL, +web-1 | CONSTRAINT "PK_system_webhook_id" PRIMARY KEY ("id") +web-1 | ); +web-1 | CREATE INDEX "IDX_system_webhook_isActive" ON "system_webhook" ("isActive"); +web-1 | CREATE INDEX "IDX_system_webhook_on" ON "system_webhook" USING gin ("on"); +web-1 | +web-1 | CREATE TABLE "abuse_report_notification_recipient" ( +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "method" varchar(64) NOT NULL, +web-1 | "userId" varchar(32) NULL DEFAULT NULL, +web-1 | "systemWebhookId" varchar(32) NULL DEFAULT NULL, +web-1 | CONSTRAINT "PK_abuse_report_notification_recipient_id" PRIMARY KEY ("id"), +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId1" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId2" FOREIGN KEY ("userId") REFERENCES "user_profile"("userId") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_systemWebhookId" FOREIGN KEY ("systemWebhookId") REFERENCES "system_webhook"("id") ON DELETE CASCADE ON UPDATE NO ACTION +web-1 | ); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_isActive" ON "abuse_report_notification_recipient" ("isActive"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_method" ON "abuse_report_notification_recipient" ("method"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_userId" ON "abuse_report_notification_recipient" ("userId"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_systemWebhookId" ON "abuse_report_notification_recipient" ("systemWebhookId"); +web-1 | +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1713656541000,"AbuseReportNotification1713656541000"] +web-1 | Migration AbuseReportNotification1713656541000 has been executed successfully. +web-1 | query: ALTER TABLE "poll" ADD "channelId" character varying(32) +web-1 | query: COMMENT ON COLUMN "poll"."channelId" IS '[Denormalized]' +web-1 | query: CREATE INDEX "IDX_c1240fcc9675946ea5d6c2860e" ON "poll" ("channelId") +web-1 | query: UPDATE "poll" SET "channelId" = "note"."channelId" FROM "note" WHERE "poll"."noteId" = "note"."id" +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716129964060,"ChannelIdDenormalizedForMiPoll1716129964060"] +web-1 | Migration ChannelIdDenormalizedForMiPoll1716129964060 has been executed successfully. +web-1 | query: ALTER TABLE "meta" ADD "mediaSilencedHosts" character varying(1024) array NOT NULL DEFAULT '{}' +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716197366117,"MediaSilenceForHosts1716197366117"] +web-1 | Migration MediaSilenceForHosts1716197366117 has been executed successfully. +web-1 | query: ALTER TABLE "instance" ADD "notRespondingSince" TIMESTAMP WITH TIME ZONE +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716345015347,"NotRespondingSince1716345015347"] +web-1 | Migration NotRespondingSince1716345015347 has been executed successfully. +web-1 | query: CREATE TYPE "public"."instance_suspensionstate_enum" AS ENUM('none', 'manuallySuspended', 'goneSuspended', 'autoSuspendedForNotResponding') +web-1 | query: DROP INDEX "public"."IDX_34500da2e38ac393f7bb6b299c" +web-1 | query: ALTER TABLE "instance" RENAME COLUMN "isSuspended" TO "suspensionState" +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" DROP DEFAULT +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | query failed: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | error: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | Migration "SuspensionStateInsteadOfIsSspended1716345771510" failed, error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | query: ROLLBACK +web-1 | Error during migration run: +web-1 | QueryFailedError: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219:19) +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | query: 'ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING (\n' + +web-1 | ' CASE "suspensionState"\n' + +web-1 | " WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum\n" + +web-1 | " ELSE 'none'::instance_suspensionstate_enum\n" + +web-1 | ' END\n' + +web-1 | ' )', +web-1 | parameters: undefined, +web-1 | driverError: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at /sharkey/node_modules/.pnpm/pg@8.12.0/node_modules/pg/lib/client.js:526:17 +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +web-1 | at async PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:184:25) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | }, +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | } +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 | +web-1 | > sharkey@2024.8.2 migrateandstart /sharkey +web-1 | > pnpm migrate && pnpm start +web-1 | +web-1 | +web-1 | > sharkey@2024.8.2 migrate /sharkey +web-1 | > cd packages/backend && pnpm migrate +web-1 | +web-1 | +web-1 | > backend@ migrate /sharkey/packages/backend +web-1 | > pnpm typeorm migration:run -d ormconfig.js +web-1 | +web-1 | query: SELECT * FROM current_schema() +web-1 | query: SELECT version(); +web-1 | query: SELECT * FROM "information_schema"."tables" WHERE "table_schema" = 'public' AND "table_name" = 'migrations' +web-1 | query: SELECT * FROM "migrations" "migrations" ORDER BY "id" DESC +web-1 | 300 migrations are already loaded in the database. +web-1 | 310 migrations were found in the source code. +web-1 | MoreRepoUrl1709462550083 is the last executed migration. It was executed on Sun Mar 03 2024 10:42:30 GMT+0000 (Coordinated Universal Time). +web-1 | 10 migrations are new migrations must be executed. +web-1 | query: START TRANSACTION +web-1 | query: +web-1 | alter table meta +web-1 | rename column "summalyProxy" to "urlPreviewSummaryProxyUrl"; +web-1 | alter table meta +web-1 | add "urlPreviewEnabled" boolean default true not null; +web-1 | alter table meta +web-1 | add "urlPreviewTimeout" integer default 10000 not null; +web-1 | alter table meta +web-1 | add "urlPreviewMaximumContentLength" bigint default 10485760 not null; +web-1 | alter table meta +web-1 | add "urlPreviewRequireContentLength" boolean default false not null; +web-1 | alter table meta +web-1 | add "urlPreviewUserAgent" varchar(1024) default null; +web-1 | +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710512074000,"UrlPreviewMeta1710512074000"] +web-1 | Migration UrlPreviewMeta1710512074000 has been executed successfully. +web-1 | query: ALTER TABLE "antenna" ADD "excludeBots" boolean NOT NULL DEFAULT false +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710919614510,"AntennaExcludeBots1710919614510"] +web-1 | Migration AntennaExcludeBots1710919614510 has been executed successfully. +web-1 | query: +web-1 | CREATE TABLE "system_webhook" ( +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "latestSentAt" timestamp with time zone NULL DEFAULT NULL, +web-1 | "latestStatus" integer NULL DEFAULT NULL, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "on" varchar(128) [] NOT NULL DEFAULT '{}'::character varying[], +web-1 | "url" varchar(1024) NOT NULL, +web-1 | "secret" varchar(1024) NOT NULL, +web-1 | CONSTRAINT "PK_system_webhook_id" PRIMARY KEY ("id") +web-1 | ); +web-1 | CREATE INDEX "IDX_system_webhook_isActive" ON "system_webhook" ("isActive"); +web-1 | CREATE INDEX "IDX_system_webhook_on" ON "system_webhook" USING gin ("on"); +web-1 | +web-1 | CREATE TABLE "abuse_report_notification_recipient" ( +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "method" varchar(64) NOT NULL, +web-1 | "userId" varchar(32) NULL DEFAULT NULL, +web-1 | "systemWebhookId" varchar(32) NULL DEFAULT NULL, +web-1 | CONSTRAINT "PK_abuse_report_notification_recipient_id" PRIMARY KEY ("id"), +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId1" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId2" FOREIGN KEY ("userId") REFERENCES "user_profile"("userId") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_systemWebhookId" FOREIGN KEY ("systemWebhookId") REFERENCES "system_webhook"("id") ON DELETE CASCADE ON UPDATE NO ACTION +web-1 | ); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_isActive" ON "abuse_report_notification_recipient" ("isActive"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_method" ON "abuse_report_notification_recipient" ("method"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_userId" ON "abuse_report_notification_recipient" ("userId"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_systemWebhookId" ON "abuse_report_notification_recipient" ("systemWebhookId"); +web-1 | +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1713656541000,"AbuseReportNotification1713656541000"] +web-1 | Migration AbuseReportNotification1713656541000 has been executed successfully. +web-1 | query: ALTER TABLE "poll" ADD "channelId" character varying(32) +web-1 | query: COMMENT ON COLUMN "poll"."channelId" IS '[Denormalized]' +web-1 | query: CREATE INDEX "IDX_c1240fcc9675946ea5d6c2860e" ON "poll" ("channelId") +web-1 | query: UPDATE "poll" SET "channelId" = "note"."channelId" FROM "note" WHERE "poll"."noteId" = "note"."id" +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716129964060,"ChannelIdDenormalizedForMiPoll1716129964060"] +web-1 | Migration ChannelIdDenormalizedForMiPoll1716129964060 has been executed successfully. +web-1 | query: ALTER TABLE "meta" ADD "mediaSilencedHosts" character varying(1024) array NOT NULL DEFAULT '{}' +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716197366117,"MediaSilenceForHosts1716197366117"] +web-1 | Migration MediaSilenceForHosts1716197366117 has been executed successfully. +web-1 | query: ALTER TABLE "instance" ADD "notRespondingSince" TIMESTAMP WITH TIME ZONE +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716345015347,"NotRespondingSince1716345015347"] +web-1 | Migration NotRespondingSince1716345015347 has been executed successfully. +web-1 | query: CREATE TYPE "public"."instance_suspensionstate_enum" AS ENUM('none', 'manuallySuspended', 'goneSuspended', 'autoSuspendedForNotResponding') +web-1 | query: DROP INDEX "public"."IDX_34500da2e38ac393f7bb6b299c" +web-1 | query: ALTER TABLE "instance" RENAME COLUMN "isSuspended" TO "suspensionState" +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" DROP DEFAULT +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | query failed: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | error: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | Migration "SuspensionStateInsteadOfIsSspended1716345771510" failed, error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | query: ROLLBACK +web-1 | Error during migration run: +web-1 | QueryFailedError: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219:19) +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | query: 'ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING (\n' + +web-1 | ' CASE "suspensionState"\n' + +web-1 | " WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum\n" + +web-1 | " ELSE 'none'::instance_suspensionstate_enum\n" + +web-1 | ' END\n' + +web-1 | ' )', +web-1 | parameters: undefined, +web-1 | driverError: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at /sharkey/node_modules/.pnpm/pg@8.12.0/node_modules/pg/lib/client.js:526:17 +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +web-1 | at async PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:184:25) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | }, +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | } +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 | +web-1 | > sharkey@2024.8.2 migrateandstart /sharkey +web-1 | > pnpm migrate && pnpm start +web-1 | +web-1 | +web-1 | > sharkey@2024.8.2 migrate /sharkey +web-1 | > cd packages/backend && pnpm migrate +web-1 | +web-1 | +web-1 | > backend@ migrate /sharkey/packages/backend +web-1 | > pnpm typeorm migration:run -d ormconfig.js +web-1 | +web-1 | query: SELECT * FROM current_schema() +web-1 | query: SELECT version(); +web-1 | query: SELECT * FROM "information_schema"."tables" WHERE "table_schema" = 'public' AND "table_name" = 'migrations' +web-1 | query: SELECT * FROM "migrations" "migrations" ORDER BY "id" DESC +web-1 | 300 migrations are already loaded in the database. +web-1 | 310 migrations were found in the source code. +web-1 | MoreRepoUrl1709462550083 is the last executed migration. It was executed on Sun Mar 03 2024 10:42:30 GMT+0000 (Coordinated Universal Time). +web-1 | 10 migrations are new migrations must be executed. +web-1 | query: START TRANSACTION +web-1 | query: +web-1 | alter table meta +web-1 | rename column "summalyProxy" to "urlPreviewSummaryProxyUrl"; +web-1 | alter table meta +web-1 | add "urlPreviewEnabled" boolean default true not null; +web-1 | alter table meta +web-1 | add "urlPreviewTimeout" integer default 10000 not null; +web-1 | alter table meta +web-1 | add "urlPreviewMaximumContentLength" bigint default 10485760 not null; +web-1 | alter table meta +web-1 | add "urlPreviewRequireContentLength" boolean default false not null; +web-1 | alter table meta +web-1 | add "urlPreviewUserAgent" varchar(1024) default null; +web-1 | +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710512074000,"UrlPreviewMeta1710512074000"] +web-1 | Migration UrlPreviewMeta1710512074000 has been executed successfully. +web-1 | query: ALTER TABLE "antenna" ADD "excludeBots" boolean NOT NULL DEFAULT false +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710919614510,"AntennaExcludeBots1710919614510"] +web-1 | Migration AntennaExcludeBots1710919614510 has been executed successfully. +web-1 | query: +web-1 | CREATE TABLE "system_webhook" ( +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "latestSentAt" timestamp with time zone NULL DEFAULT NULL, +web-1 | "latestStatus" integer NULL DEFAULT NULL, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "on" varchar(128) [] NOT NULL DEFAULT '{}'::character varying[], +web-1 | "url" varchar(1024) NOT NULL, +web-1 | "secret" varchar(1024) NOT NULL, +web-1 | CONSTRAINT "PK_system_webhook_id" PRIMARY KEY ("id") +web-1 | ); +web-1 | CREATE INDEX "IDX_system_webhook_isActive" ON "system_webhook" ("isActive"); +web-1 | CREATE INDEX "IDX_system_webhook_on" ON "system_webhook" USING gin ("on"); +web-1 | +web-1 | CREATE TABLE "abuse_report_notification_recipient" ( +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "method" varchar(64) NOT NULL, +web-1 | "userId" varchar(32) NULL DEFAULT NULL, +web-1 | "systemWebhookId" varchar(32) NULL DEFAULT NULL, +web-1 | CONSTRAINT "PK_abuse_report_notification_recipient_id" PRIMARY KEY ("id"), +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId1" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId2" FOREIGN KEY ("userId") REFERENCES "user_profile"("userId") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_systemWebhookId" FOREIGN KEY ("systemWebhookId") REFERENCES "system_webhook"("id") ON DELETE CASCADE ON UPDATE NO ACTION +web-1 | ); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_isActive" ON "abuse_report_notification_recipient" ("isActive"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_method" ON "abuse_report_notification_recipient" ("method"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_userId" ON "abuse_report_notification_recipient" ("userId"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_systemWebhookId" ON "abuse_report_notification_recipient" ("systemWebhookId"); +web-1 | +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1713656541000,"AbuseReportNotification1713656541000"] +web-1 | Migration AbuseReportNotification1713656541000 has been executed successfully. +web-1 | query: ALTER TABLE "poll" ADD "channelId" character varying(32) +web-1 | query: COMMENT ON COLUMN "poll"."channelId" IS '[Denormalized]' +web-1 | query: CREATE INDEX "IDX_c1240fcc9675946ea5d6c2860e" ON "poll" ("channelId") +web-1 | query: UPDATE "poll" SET "channelId" = "note"."channelId" FROM "note" WHERE "poll"."noteId" = "note"."id" +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716129964060,"ChannelIdDenormalizedForMiPoll1716129964060"] +web-1 | Migration ChannelIdDenormalizedForMiPoll1716129964060 has been executed successfully. +web-1 | query: ALTER TABLE "meta" ADD "mediaSilencedHosts" character varying(1024) array NOT NULL DEFAULT '{}' +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716197366117,"MediaSilenceForHosts1716197366117"] +web-1 | Migration MediaSilenceForHosts1716197366117 has been executed successfully. +web-1 | query: ALTER TABLE "instance" ADD "notRespondingSince" TIMESTAMP WITH TIME ZONE +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716345015347,"NotRespondingSince1716345015347"] +web-1 | Migration NotRespondingSince1716345015347 has been executed successfully. +web-1 | query: CREATE TYPE "public"."instance_suspensionstate_enum" AS ENUM('none', 'manuallySuspended', 'goneSuspended', 'autoSuspendedForNotResponding') +web-1 | query: DROP INDEX "public"."IDX_34500da2e38ac393f7bb6b299c" +web-1 | query: ALTER TABLE "instance" RENAME COLUMN "isSuspended" TO "suspensionState" +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" DROP DEFAULT +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | query failed: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | error: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | Migration "SuspensionStateInsteadOfIsSspended1716345771510" failed, error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | query: ROLLBACK +web-1 | Error during migration run: +web-1 | QueryFailedError: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219:19) +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | query: 'ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING (\n' + +web-1 | ' CASE "suspensionState"\n' + +web-1 | " WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum\n" + +web-1 | " ELSE 'none'::instance_suspensionstate_enum\n" + +web-1 | ' END\n' + +web-1 | ' )', +web-1 | parameters: undefined, +web-1 | driverError: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at /sharkey/node_modules/.pnpm/pg@8.12.0/node_modules/pg/lib/client.js:526:17 +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +web-1 | at async PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:184:25) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | }, +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | } +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 | +web-1 | > sharkey@2024.8.2 migrateandstart /sharkey +web-1 | > pnpm migrate && pnpm start +web-1 | +web-1 | +web-1 | > sharkey@2024.8.2 migrate /sharkey +web-1 | > cd packages/backend && pnpm migrate +web-1 | +web-1 | +web-1 | > backend@ migrate /sharkey/packages/backend +web-1 | > pnpm typeorm migration:run -d ormconfig.js +web-1 | +web-1 | query: SELECT * FROM current_schema() +web-1 | query: SELECT version(); +web-1 | query: SELECT * FROM "information_schema"."tables" WHERE "table_schema" = 'public' AND "table_name" = 'migrations' +web-1 | query: SELECT * FROM "migrations" "migrations" ORDER BY "id" DESC +web-1 | 300 migrations are already loaded in the database. +web-1 | 310 migrations were found in the source code. +web-1 | MoreRepoUrl1709462550083 is the last executed migration. It was executed on Sun Mar 03 2024 10:42:30 GMT+0000 (Coordinated Universal Time). +web-1 | 10 migrations are new migrations must be executed. +web-1 | query: START TRANSACTION +web-1 | query: +web-1 | alter table meta +web-1 | rename column "summalyProxy" to "urlPreviewSummaryProxyUrl"; +web-1 | alter table meta +web-1 | add "urlPreviewEnabled" boolean default true not null; +web-1 | alter table meta +web-1 | add "urlPreviewTimeout" integer default 10000 not null; +web-1 | alter table meta +web-1 | add "urlPreviewMaximumContentLength" bigint default 10485760 not null; +web-1 | alter table meta +web-1 | add "urlPreviewRequireContentLength" boolean default false not null; +web-1 | alter table meta +web-1 | add "urlPreviewUserAgent" varchar(1024) default null; +web-1 | +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710512074000,"UrlPreviewMeta1710512074000"] +web-1 | Migration UrlPreviewMeta1710512074000 has been executed successfully. +web-1 | query: ALTER TABLE "antenna" ADD "excludeBots" boolean NOT NULL DEFAULT false +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710919614510,"AntennaExcludeBots1710919614510"] +web-1 | Migration AntennaExcludeBots1710919614510 has been executed successfully. +web-1 | query: +web-1 | CREATE TABLE "system_webhook" ( +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "latestSentAt" timestamp with time zone NULL DEFAULT NULL, +web-1 | "latestStatus" integer NULL DEFAULT NULL, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "on" varchar(128) [] NOT NULL DEFAULT '{}'::character varying[], +web-1 | "url" varchar(1024) NOT NULL, +web-1 | "secret" varchar(1024) NOT NULL, +web-1 | CONSTRAINT "PK_system_webhook_id" PRIMARY KEY ("id") +web-1 | ); +web-1 | CREATE INDEX "IDX_system_webhook_isActive" ON "system_webhook" ("isActive"); +web-1 | CREATE INDEX "IDX_system_webhook_on" ON "system_webhook" USING gin ("on"); +web-1 | +web-1 | CREATE TABLE "abuse_report_notification_recipient" ( +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "method" varchar(64) NOT NULL, +web-1 | "userId" varchar(32) NULL DEFAULT NULL, +web-1 | "systemWebhookId" varchar(32) NULL DEFAULT NULL, +web-1 | CONSTRAINT "PK_abuse_report_notification_recipient_id" PRIMARY KEY ("id"), +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId1" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId2" FOREIGN KEY ("userId") REFERENCES "user_profile"("userId") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_systemWebhookId" FOREIGN KEY ("systemWebhookId") REFERENCES "system_webhook"("id") ON DELETE CASCADE ON UPDATE NO ACTION +web-1 | ); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_isActive" ON "abuse_report_notification_recipient" ("isActive"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_method" ON "abuse_report_notification_recipient" ("method"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_userId" ON "abuse_report_notification_recipient" ("userId"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_systemWebhookId" ON "abuse_report_notification_recipient" ("systemWebhookId"); +web-1 | +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1713656541000,"AbuseReportNotification1713656541000"] +web-1 | Migration AbuseReportNotification1713656541000 has been executed successfully. +web-1 | query: ALTER TABLE "poll" ADD "channelId" character varying(32) +web-1 | query: COMMENT ON COLUMN "poll"."channelId" IS '[Denormalized]' +web-1 | query: CREATE INDEX "IDX_c1240fcc9675946ea5d6c2860e" ON "poll" ("channelId") +web-1 | query: UPDATE "poll" SET "channelId" = "note"."channelId" FROM "note" WHERE "poll"."noteId" = "note"."id" +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716129964060,"ChannelIdDenormalizedForMiPoll1716129964060"] +web-1 | Migration ChannelIdDenormalizedForMiPoll1716129964060 has been executed successfully. +web-1 | query: ALTER TABLE "meta" ADD "mediaSilencedHosts" character varying(1024) array NOT NULL DEFAULT '{}' +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716197366117,"MediaSilenceForHosts1716197366117"] +web-1 | Migration MediaSilenceForHosts1716197366117 has been executed successfully. +web-1 | query: ALTER TABLE "instance" ADD "notRespondingSince" TIMESTAMP WITH TIME ZONE +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716345015347,"NotRespondingSince1716345015347"] +web-1 | Migration NotRespondingSince1716345015347 has been executed successfully. +web-1 | query: CREATE TYPE "public"."instance_suspensionstate_enum" AS ENUM('none', 'manuallySuspended', 'goneSuspended', 'autoSuspendedForNotResponding') +web-1 | query: DROP INDEX "public"."IDX_34500da2e38ac393f7bb6b299c" +web-1 | query: ALTER TABLE "instance" RENAME COLUMN "isSuspended" TO "suspensionState" +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" DROP DEFAULT +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | query failed: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | error: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | Migration "SuspensionStateInsteadOfIsSspended1716345771510" failed, error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | query: ROLLBACK +web-1 | Error during migration run: +web-1 | QueryFailedError: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219:19) +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | query: 'ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING (\n' + +web-1 | ' CASE "suspensionState"\n' + +web-1 | " WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum\n" + +web-1 | " ELSE 'none'::instance_suspensionstate_enum\n" + +web-1 | ' END\n' + +web-1 | ' )', +web-1 | parameters: undefined, +web-1 | driverError: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at /sharkey/node_modules/.pnpm/pg@8.12.0/node_modules/pg/lib/client.js:526:17 +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +web-1 | at async PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:184:25) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | }, +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | } +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 | +web-1 | > sharkey@2024.8.2 migrateandstart /sharkey +web-1 | > pnpm migrate && pnpm start +web-1 | +web-1 | +web-1 | > sharkey@2024.8.2 migrate /sharkey +web-1 | > cd packages/backend && pnpm migrate +web-1 | +web-1 | +web-1 | > backend@ migrate /sharkey/packages/backend +web-1 | > pnpm typeorm migration:run -d ormconfig.js +web-1 | +web-1 | query: SELECT * FROM current_schema() +web-1 | query: SELECT version(); +web-1 | query: SELECT * FROM "information_schema"."tables" WHERE "table_schema" = 'public' AND "table_name" = 'migrations' +web-1 | query: SELECT * FROM "migrations" "migrations" ORDER BY "id" DESC +web-1 | 300 migrations are already loaded in the database. +web-1 | 310 migrations were found in the source code. +web-1 | MoreRepoUrl1709462550083 is the last executed migration. It was executed on Sun Mar 03 2024 10:42:30 GMT+0000 (Coordinated Universal Time). +web-1 | 10 migrations are new migrations must be executed. +web-1 | query: START TRANSACTION +web-1 | query: +web-1 | alter table meta +web-1 | rename column "summalyProxy" to "urlPreviewSummaryProxyUrl"; +web-1 | alter table meta +web-1 | add "urlPreviewEnabled" boolean default true not null; +web-1 | alter table meta +web-1 | add "urlPreviewTimeout" integer default 10000 not null; +web-1 | alter table meta +web-1 | add "urlPreviewMaximumContentLength" bigint default 10485760 not null; +web-1 | alter table meta +web-1 | add "urlPreviewRequireContentLength" boolean default false not null; +web-1 | alter table meta +web-1 | add "urlPreviewUserAgent" varchar(1024) default null; +web-1 | +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710512074000,"UrlPreviewMeta1710512074000"] +web-1 | Migration UrlPreviewMeta1710512074000 has been executed successfully. +web-1 | query: ALTER TABLE "antenna" ADD "excludeBots" boolean NOT NULL DEFAULT false +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710919614510,"AntennaExcludeBots1710919614510"] +web-1 | Migration AntennaExcludeBots1710919614510 has been executed successfully. +web-1 | query: +web-1 | CREATE TABLE "system_webhook" ( +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "latestSentAt" timestamp with time zone NULL DEFAULT NULL, +web-1 | "latestStatus" integer NULL DEFAULT NULL, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "on" varchar(128) [] NOT NULL DEFAULT '{}'::character varying[], +web-1 | "url" varchar(1024) NOT NULL, +web-1 | "secret" varchar(1024) NOT NULL, +web-1 | CONSTRAINT "PK_system_webhook_id" PRIMARY KEY ("id") +web-1 | ); +web-1 | CREATE INDEX "IDX_system_webhook_isActive" ON "system_webhook" ("isActive"); +web-1 | CREATE INDEX "IDX_system_webhook_on" ON "system_webhook" USING gin ("on"); +web-1 | +web-1 | CREATE TABLE "abuse_report_notification_recipient" ( +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "method" varchar(64) NOT NULL, +web-1 | "userId" varchar(32) NULL DEFAULT NULL, +web-1 | "systemWebhookId" varchar(32) NULL DEFAULT NULL, +web-1 | CONSTRAINT "PK_abuse_report_notification_recipient_id" PRIMARY KEY ("id"), +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId1" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId2" FOREIGN KEY ("userId") REFERENCES "user_profile"("userId") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_systemWebhookId" FOREIGN KEY ("systemWebhookId") REFERENCES "system_webhook"("id") ON DELETE CASCADE ON UPDATE NO ACTION +web-1 | ); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_isActive" ON "abuse_report_notification_recipient" ("isActive"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_method" ON "abuse_report_notification_recipient" ("method"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_userId" ON "abuse_report_notification_recipient" ("userId"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_systemWebhookId" ON "abuse_report_notification_recipient" ("systemWebhookId"); +web-1 | +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1713656541000,"AbuseReportNotification1713656541000"] +web-1 | Migration AbuseReportNotification1713656541000 has been executed successfully. +web-1 | query: ALTER TABLE "poll" ADD "channelId" character varying(32) +web-1 | query: COMMENT ON COLUMN "poll"."channelId" IS '[Denormalized]' +web-1 | query: CREATE INDEX "IDX_c1240fcc9675946ea5d6c2860e" ON "poll" ("channelId") +web-1 | query: UPDATE "poll" SET "channelId" = "note"."channelId" FROM "note" WHERE "poll"."noteId" = "note"."id" +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716129964060,"ChannelIdDenormalizedForMiPoll1716129964060"] +web-1 | Migration ChannelIdDenormalizedForMiPoll1716129964060 has been executed successfully. +web-1 | query: ALTER TABLE "meta" ADD "mediaSilencedHosts" character varying(1024) array NOT NULL DEFAULT '{}' +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716197366117,"MediaSilenceForHosts1716197366117"] +web-1 | Migration MediaSilenceForHosts1716197366117 has been executed successfully. +web-1 | query: ALTER TABLE "instance" ADD "notRespondingSince" TIMESTAMP WITH TIME ZONE +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716345015347,"NotRespondingSince1716345015347"] +web-1 | Migration NotRespondingSince1716345015347 has been executed successfully. +web-1 | query: CREATE TYPE "public"."instance_suspensionstate_enum" AS ENUM('none', 'manuallySuspended', 'goneSuspended', 'autoSuspendedForNotResponding') +web-1 | query: DROP INDEX "public"."IDX_34500da2e38ac393f7bb6b299c" +web-1 | query: ALTER TABLE "instance" RENAME COLUMN "isSuspended" TO "suspensionState" +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" DROP DEFAULT +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | query failed: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | error: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | Migration "SuspensionStateInsteadOfIsSspended1716345771510" failed, error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | query: ROLLBACK +web-1 | Error during migration run: +web-1 | QueryFailedError: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219:19) +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | query: 'ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING (\n' + +web-1 | ' CASE "suspensionState"\n' + +web-1 | " WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum\n" + +web-1 | " ELSE 'none'::instance_suspensionstate_enum\n" + +web-1 | ' END\n' + +web-1 | ' )', +web-1 | parameters: undefined, +web-1 | driverError: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at /sharkey/node_modules/.pnpm/pg@8.12.0/node_modules/pg/lib/client.js:526:17 +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +web-1 | at async PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:184:25) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | }, +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | } +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 | +web-1 | > sharkey@2024.8.2 migrateandstart /sharkey +web-1 | > pnpm migrate && pnpm start +web-1 | +web-1 | +web-1 | > sharkey@2024.8.2 migrate /sharkey +web-1 | > cd packages/backend && pnpm migrate +web-1 | +web-1 | +web-1 | > backend@ migrate /sharkey/packages/backend +web-1 | > pnpm typeorm migration:run -d ormconfig.js +web-1 | +web-1 | query: SELECT * FROM current_schema() +web-1 | query: SELECT version(); +web-1 | query: SELECT * FROM "information_schema"."tables" WHERE "table_schema" = 'public' AND "table_name" = 'migrations' +web-1 | query: SELECT * FROM "migrations" "migrations" ORDER BY "id" DESC +web-1 | 300 migrations are already loaded in the database. +web-1 | 310 migrations were found in the source code. +web-1 | MoreRepoUrl1709462550083 is the last executed migration. It was executed on Sun Mar 03 2024 10:42:30 GMT+0000 (Coordinated Universal Time). +web-1 | 10 migrations are new migrations must be executed. +web-1 | query: START TRANSACTION +web-1 | query: +web-1 | alter table meta +web-1 | rename column "summalyProxy" to "urlPreviewSummaryProxyUrl"; +web-1 | alter table meta +web-1 | add "urlPreviewEnabled" boolean default true not null; +web-1 | alter table meta +web-1 | add "urlPreviewTimeout" integer default 10000 not null; +web-1 | alter table meta +web-1 | add "urlPreviewMaximumContentLength" bigint default 10485760 not null; +web-1 | alter table meta +web-1 | add "urlPreviewRequireContentLength" boolean default false not null; +web-1 | alter table meta +web-1 | add "urlPreviewUserAgent" varchar(1024) default null; +web-1 | +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710512074000,"UrlPreviewMeta1710512074000"] +web-1 | Migration UrlPreviewMeta1710512074000 has been executed successfully. +web-1 | query: ALTER TABLE "antenna" ADD "excludeBots" boolean NOT NULL DEFAULT false +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1710919614510,"AntennaExcludeBots1710919614510"] +web-1 | Migration AntennaExcludeBots1710919614510 has been executed successfully. +web-1 | query: +web-1 | CREATE TABLE "system_webhook" ( +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "latestSentAt" timestamp with time zone NULL DEFAULT NULL, +web-1 | "latestStatus" integer NULL DEFAULT NULL, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "on" varchar(128) [] NOT NULL DEFAULT '{}'::character varying[], +web-1 | "url" varchar(1024) NOT NULL, +web-1 | "secret" varchar(1024) NOT NULL, +web-1 | CONSTRAINT "PK_system_webhook_id" PRIMARY KEY ("id") +web-1 | ); +web-1 | CREATE INDEX "IDX_system_webhook_isActive" ON "system_webhook" ("isActive"); +web-1 | CREATE INDEX "IDX_system_webhook_on" ON "system_webhook" USING gin ("on"); +web-1 | +web-1 | CREATE TABLE "abuse_report_notification_recipient" ( +web-1 | "id" varchar(32) NOT NULL, +web-1 | "isActive" boolean NOT NULL DEFAULT true, +web-1 | "updatedAt" timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, +web-1 | "name" varchar(255) NOT NULL, +web-1 | "method" varchar(64) NOT NULL, +web-1 | "userId" varchar(32) NULL DEFAULT NULL, +web-1 | "systemWebhookId" varchar(32) NULL DEFAULT NULL, +web-1 | CONSTRAINT "PK_abuse_report_notification_recipient_id" PRIMARY KEY ("id"), +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId1" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_userId2" FOREIGN KEY ("userId") REFERENCES "user_profile"("userId") ON DELETE CASCADE ON UPDATE NO ACTION, +web-1 | CONSTRAINT "FK_abuse_report_notification_recipient_systemWebhookId" FOREIGN KEY ("systemWebhookId") REFERENCES "system_webhook"("id") ON DELETE CASCADE ON UPDATE NO ACTION +web-1 | ); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_isActive" ON "abuse_report_notification_recipient" ("isActive"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_method" ON "abuse_report_notification_recipient" ("method"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_userId" ON "abuse_report_notification_recipient" ("userId"); +web-1 | CREATE INDEX "IDX_abuse_report_notification_recipient_systemWebhookId" ON "abuse_report_notification_recipient" ("systemWebhookId"); +web-1 | +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1713656541000,"AbuseReportNotification1713656541000"] +web-1 | Migration AbuseReportNotification1713656541000 has been executed successfully. +web-1 | query: ALTER TABLE "poll" ADD "channelId" character varying(32) +web-1 | query: COMMENT ON COLUMN "poll"."channelId" IS '[Denormalized]' +web-1 | query: CREATE INDEX "IDX_c1240fcc9675946ea5d6c2860e" ON "poll" ("channelId") +web-1 | query: UPDATE "poll" SET "channelId" = "note"."channelId" FROM "note" WHERE "poll"."noteId" = "note"."id" +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716129964060,"ChannelIdDenormalizedForMiPoll1716129964060"] +web-1 | Migration ChannelIdDenormalizedForMiPoll1716129964060 has been executed successfully. +web-1 | query: ALTER TABLE "meta" ADD "mediaSilencedHosts" character varying(1024) array NOT NULL DEFAULT '{}' +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716197366117,"MediaSilenceForHosts1716197366117"] +web-1 | Migration MediaSilenceForHosts1716197366117 has been executed successfully. +web-1 | query: ALTER TABLE "instance" ADD "notRespondingSince" TIMESTAMP WITH TIME ZONE +web-1 | query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1716345015347,"NotRespondingSince1716345015347"] +web-1 | Migration NotRespondingSince1716345015347 has been executed successfully. +web-1 | query: CREATE TYPE "public"."instance_suspensionstate_enum" AS ENUM('none', 'manuallySuspended', 'goneSuspended', 'autoSuspendedForNotResponding') +web-1 | query: DROP INDEX "public"."IDX_34500da2e38ac393f7bb6b299c" +web-1 | query: ALTER TABLE "instance" RENAME COLUMN "isSuspended" TO "suspensionState" +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" DROP DEFAULT +web-1 | query: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | query failed: ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING ( +web-1 | CASE "suspensionState" +web-1 | WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum +web-1 | ELSE 'none'::instance_suspensionstate_enum +web-1 | END +web-1 | ) +web-1 | error: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | Migration "SuspensionStateInsteadOfIsSspended1716345771510" failed, error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | query: ROLLBACK +web-1 | Error during migration run: +web-1 | QueryFailedError: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219:19) +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | query: 'ALTER TABLE "instance" ALTER COLUMN "suspensionState" TYPE "public"."instance_suspensionstate_enum" USING (\n' + +web-1 | ' CASE "suspensionState"\n' + +web-1 | " WHEN TRUE THEN 'manuallySuspended'::instance_suspensionstate_enum\n" + +web-1 | " ELSE 'none'::instance_suspensionstate_enum\n" + +web-1 | ' END\n' + +web-1 | ' )', +web-1 | parameters: undefined, +web-1 | driverError: error: could not create unique index "IDX_8d5afc98982185799b160e10eb" +web-1 | at /sharkey/node_modules/.pnpm/pg@8.12.0/node_modules/pg/lib/client.js:526:17 +web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +web-1 | at async PostgresQueryRunner.query (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:184:25) +web-1 | at async SuspensionStateInsteadOfIsSspended1716345771510.up (file:///sharkey/packages/backend/migration/1716447138870-SuspensionStateInsteadOfIsSspended.js:18:9) +web-1 | at async MigrationExecutor.executePendingMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/migration/MigrationExecutor.js:225:17) +web-1 | at async DataSource.runMigrations (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/data-source/DataSource.js:265:35) +web-1 | at async Object.handler (/sharkey/node_modules/.pnpm/typeorm@0.3.20_ioredis@5.4.1_pg@8.12.0/node_modules/typeorm/commands/MigrationRunCommand.js:68:13) { +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | }, +web-1 | length: 223, +web-1 | severity: 'ERROR', +web-1 | code: '23505', +web-1 | detail: 'Key (host)=(sc.dc09.ru) is duplicated.', +web-1 | hint: undefined, +web-1 | position: undefined, +web-1 | internalPosition: undefined, +web-1 | internalQuery: undefined, +web-1 | where: undefined, +web-1 | schema: 'public', +web-1 | table: 'instance', +web-1 | column: undefined, +web-1 | dataType: undefined, +web-1 | constraint: 'IDX_8d5afc98982185799b160e10eb', +web-1 | file: 'tuplesort.c', +web-1 | line: '4423', +web-1 | routine: 'comparetup_index_btree' +web-1 | } +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. +web-1 |  ELIFECYCLE  Command failed with exit code 1. diff --git a/hosts/titan/services/cloud.nix b/hosts/titan/services/cloud.nix index 193dd32..01272cc 100644 --- a/hosts/titan/services/cloud.nix +++ b/hosts/titan/services/cloud.nix @@ -1,7 +1,7 @@ inputs: { pkgs, config, ... }: { services.nextcloud = { enable = true; - package = pkgs.nextcloud27; + package = pkgs.nextcloud30; hostName = "localhost"; config = { adminpassFile = "/var/keys/nextcloud_initial_password"; @@ -10,8 +10,8 @@ inputs: { pkgs, config, ... }: { ]; overwriteProtocol = "https"; }; - extraApps = with config.services.nextcloud.package.packages.apps; { - inherit news files_markdown files_texteditor forms maps memories music onlyoffice polls calendar tasks contacts; + extraApps = with pkgs.nextcloud30Packages.apps; { + inherit (pkgs.nextcloud30Packages.apps) memories music onlyoffice polls calendar tasks contacts; }; /* extraOptions = {