Closed18

Ubuntu ServerにインストールしたPostgreSQLのバージョンを上げる

Alice RoseAlice Rose

いつものようにSharkeyのアップデートをしていた所、マイグレーションがこけた

いつか来ると思っていたアップデート失敗に遭遇する

Alice RoseAlice Rose

エラーログ見た天才からPostgreSQLのバージョンが古いんでね?という指摘をもらう

psql --version
psql (PostgreSQL) 16.8 (Ubuntu 16.8-1.pgdg22.04+1)

要求されてる15以上やんけ、と思ってたら偉い人から「それはpsqlのバージョンなのでは」とさらに指摘をもらう

psql (16.8 (Ubuntu 16.8-1.pgdg22.04+1), server 14.18 (Ubuntu 14.18-0ubuntu0.22.04.1))
SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, compression: off)
Type "help" for help.

sharkey=> select * From version();
                                                                version                                                                 
----------------------------------------------------------------------------------------------------------------------------------------
 PostgreSQL 14.18 (Ubuntu 14.18-0ubuntu0.22.04.1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, 64-bit
(1 row)

生きてて申し訳ありません

Alice RoseAlice Rose

調子に乗って16入れなかったっけ?とか思ってたら両方いて16はいただけだった

pg_lsclusters
Ver Cluster Port Status Owner    Data directory              Log file
14  main    5432 online postgres /var/lib/postgresql/14/main /var/log/postgresql/postgresql-14-main.log
16  main    5433 online postgres /var/lib/postgresql/16/main /var/log/postgresql/postgresql-16-main.log

14から16に切り替えないと駄目みたい

言葉もございません

Alice RoseAlice Rose

PostgreSQL16は現状空のはずなので、14のデータを移行する必要がある
まずは14を一旦停止

sudo pg_ctlcluster 14 main stop

一応バックアップを取っておく

sudo tar czvf /home/<USER>/pgsql-14-main-backup-$(date +%Y%m%d).tar.gz /var/lib/postgresql/14/main
Alice RoseAlice Rose

お一人鯖でもそれなりな容量

-rwxr-xr-x 1 **** **** 110586530 May 29 22:34 pgsql-14-main-backup-20250529.tar.gz
Alice RoseAlice Rose

で、再度14は動かしておく

sudo pg_ctlcluster 14 main start

逆に16は停止して削除

sudo pg_dropcluster 16 main --stop

使ってないはず、と思って躊躇なく16消したけどほんまか?って気がしてきた
考えないようにする

pg_lsclusters
Ver Cluster Port Status Owner    Data directory              Log file
14  main    5432 online postgres /var/lib/postgresql/14/main /var/log/postgresql/postgresql-14-main.log
Alice RoseAlice Rose

移行してみる

sudo pg_upgradecluster 14 main
Upgrading cluster 14/main to 16/main ...
Stopping old cluster...
Restarting old cluster with restricted connections...
Notice: extra pg_ctl/postgres options given, bypassing systemctl for start operation
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_CTYPE = "UTF-8",
	LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
Error: The locale requested by the environment is invalid:
  LANG: en_US.UTF-8
  LC_CTYPE: UTF-8
Error: Could not create target cluster

文字コードがおかしいらしい

Alice RoseAlice Rose
locale -a
C
C.utf8
POSIX
en_US.utf8

en_US.UTF-8自体は入ってそう

cat /etc/default/locale
LANG=en_US.UTF-8

ハイフンついてなかったりUTFの大文字小文字が違ったりはしていた

Alice RoseAlice Rose
/etc/default/locale
LANG="en_US.utf8"
LC_CTYPE="en_US.utf8"

書き換えて

source /etc/default/locale

シェル再読み込み

Alice RoseAlice Rose
locale
LANG=en_US.utf8
LANGUAGE=
LC_CTYPE="C.UTF-8"
LC_NUMERIC="C.UTF-8"
LC_TIME="C.UTF-8"
LC_COLLATE="C.UTF-8"
LC_MONETARY="C.UTF-8"
LC_MESSAGES="C.UTF-8"
LC_PAPER="C.UTF-8"
LC_NAME="C.UTF-8"
LC_ADDRESS="C.UTF-8"
LC_TELEPHONE="C.UTF-8"
LC_MEASUREMENT="C.UTF-8"
LC_IDENTIFICATION="C.UTF-8"
LC_ALL=C.UTF-8

('A`)えー

Alice RoseAlice Rose

ここにいた
セッションの環境変数として上書きされている?らしい

env | grep LC_ALL
LC_ALL=C.UTF-8
Alice RoseAlice Rose

解除して

unset LC_ALL

入れ直して

export LANG="en_US.utf8"

みる

export LC_CTYPE="en_US.utf8"

これでええんか?

locale
LANG=en_US.utf8
LANGUAGE=
LC_CTYPE=en_US.utf8
LC_NUMERIC="en_US.utf8"
LC_TIME="en_US.utf8"
LC_COLLATE="en_US.utf8"
LC_MONETARY="en_US.utf8"
LC_MESSAGES="en_US.utf8"
LC_PAPER="en_US.utf8"
LC_NAME="en_US.utf8"
LC_ADDRESS="en_US.utf8"
LC_TELEPHONE="en_US.utf8"
LC_MEASUREMENT="en_US.utf8"
LC_IDENTIFICATION="en_US.utf8"
LC_ALL=
Alice RoseAlice Rose

再度移行実行
今度はちゃんと走ったっぽい

sudo pg_upgradecluster 14 main
Upgrading cluster 14/main to 16/main ...
Stopping old cluster...
Restarting old cluster with restricted connections...
Notice: extra pg_ctl/postgres options given, bypassing systemctl for start operation
Creating new PostgreSQL cluster 16/main ...
/usr/lib/postgresql/16/bin/initdb -D /var/lib/postgresql/16/main --auth-local peer --auth-host scram-sha-256 --no-instructions --encoding UTF8 --lc-collate en_US.UTF-8 --lc-ctype en_US.UTF-8
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with this locale configuration:
  provider:    libc
  LC_COLLATE:  en_US.UTF-8
  LC_CTYPE:    en_US.UTF-8
  LC_MESSAGES: en_US.utf8
  LC_MONETARY: en_US.utf8
  LC_NUMERIC:  en_US.utf8
  LC_TIME:     en_US.utf8
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /var/lib/postgresql/16/main ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... Asia/Tokyo
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok

Copying old configuration files...
Copying old start.conf...
Copying old pg_ctl.conf...
Starting new cluster...
Notice: extra pg_ctl/postgres options given, bypassing systemctl for start operation
Running init phase upgrade hook scripts ...

Roles, databases, schemas, ACLs...
 set_config 
------------
 
(1 row)

 set_config 
------------
 
(1 row)

 set_config 
------------
 
(1 row)

 set_config 
------------
 
(1 row)

Fixing hardcoded library paths for stored procedures...
Upgrading database postgres...
Fixing hardcoded library paths for stored procedures...
Upgrading database sharkey...
Fixing hardcoded library paths for stored procedures...
Upgrading database template1...
Stopping target cluster...
Stopping old cluster...
Disabling automatic startup of old cluster...
Starting upgraded cluster on port 5432...
Running finish phase upgrade hook scripts ...
vacuumdb: processing database "postgres": Generating minimal optimizer statistics (1 target)
vacuumdb: processing database "sharkey": Generating minimal optimizer statistics (1 target)
vacuumdb: processing database "template1": Generating minimal optimizer statistics (1 target)
vacuumdb: processing database "postgres": Generating medium optimizer statistics (10 targets)
vacuumdb: processing database "sharkey": Generating medium optimizer statistics (10 targets)
vacuumdb: processing database "template1": Generating medium optimizer statistics (10 targets)
vacuumdb: processing database "postgres": Generating default (full) optimizer statistics
vacuumdb: processing database "sharkey": Generating default (full) optimizer statistics
vacuumdb: processing database "template1": Generating default (full) optimizer statistics

Success. Please check that the upgraded cluster works. If it does,
you can remove the old cluster with
    pg_dropcluster 14 main

Ver Cluster Port Status Owner    Data directory              Log file
14  main    5433 down   postgres /var/lib/postgresql/14/main /var/log/postgresql/postgresql-14-main.log
Ver Cluster Port Status Owner    Data directory              Log file
16  main    5432 online postgres /var/lib/postgresql/16/main /var/log/postgresql/postgresql-16-main.log
Alice RoseAlice Rose

滞っていたsharkeyのmigration再実行

pnpm run migrate

> sharkey@2025.4.2 migrate /home/sharkey/Sharkey
> pnpm --filter backend migrate


> backend@ migrate /home/sharkey/Sharkey/packages/backend
> pnpm typeorm migration:run -d ormconfig.js

query: SELECT version()
query: SELECT * FROM current_schema()
query: SELECT * FROM "information_schema"."tables" WHERE "table_schema" = 'public' AND "table_name" = 'migrations'
query: SELECT * FROM "migrations" "migrations" ORDER BY "id" DESC
347 migrations are already loaded in the database.
377 migrations were found in the source code.
AddInstanceRejectQuotes1739671847942 is the last executed migration. It was executed on Sun Feb 16 2025 11:10:47 GMT+0900 (Japan Standard Time).
30 migrations are new migrations must be executed.
query: START TRANSACTION
query: ALTER TABLE "antenna" ADD "hideNotesInSensitiveChannel" boolean NOT NULL DEFAULT false
query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1736230492103,"AddAntennaHideNotesInSensitiveChannel1736230492103"]
Migration AddAntennaHideNotesInSensitiveChannel1736230492103 has been executed successfully.
query: CREATE TABLE "system_account" ("id" character varying(32) NOT NULL, "userId" character varying(32) NOT NULL, "type" character varying(256) NOT NULL, CONSTRAINT "PK_edb56f4aaf9ddd50ee556da97ba" PRIMARY KEY ("id"))
query: CREATE INDEX "IDX_41a3c87a37aea616ee459369e1" ON "system_account" ("userId") 
query: CREATE UNIQUE INDEX "IDX_c362033aee0ea51011386a5a7e" ON "system_account" ("type") 
query: ALTER TABLE "system_account" ADD CONSTRAINT "FK_41a3c87a37aea616ee459369e12" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION
query: SELECT "id" FROM "user" WHERE "username" = 'instance.actor'
query: INSERT INTO "system_account" ("id", "userId", "type") VALUES ('9rtfplcx8rnu002j', '9rtfplcx8rnu002j', 'actor')
query: SELECT "id" FROM "user" WHERE "username" = 'relay.actor'
query: SELECT "proxyAccountId" FROM "meta" ORDER BY "id" DESC LIMIT 1
query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1740121393164,"SystemAccounts1740121393164"]
Migration SystemAccounts1740121393164 has been executed successfully.
query: ALTER TABLE "meta" DROP CONSTRAINT "FK_ab1bc0c1e209daa77b8e8d212ad"
query: ALTER TABLE "meta" DROP COLUMN "proxyAccountId"
query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1740129169650,"SystemAccounts21740129169650"]
Migration SystemAccounts21740129169650 has been executed successfully.
query: ALTER TABLE "meta" ADD "rootUserId" character varying(32)
query: ALTER TABLE "meta" ADD CONSTRAINT "FK_c80e4079d632f95eac06a9d28cc" FOREIGN KEY ("rootUserId") REFERENCES "user"("id") ON DELETE SET NULL ON UPDATE NO ACTION
query: SELECT "id" FROM "user" WHERE "isRoot" = true LIMIT 1
query: UPDATE "meta" SET "rootUserId" = $1 -- PARAMETERS: ["9rtdha218rnu0001"]
query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1740133121105,"SystemAccounts31740133121105"]
Migration SystemAccounts31740133121105 has been executed successfully.
query: CREATE TYPE "public"."meta_allowunsignedfetch_enum" AS ENUM('never', 'always', 'essential')
query: ALTER TABLE "meta" ADD "allowUnsignedFetch" "public"."meta_allowunsignedfetch_enum" NOT NULL DEFAULT 'always'
query: CREATE TYPE "public"."user_allowunsignedfetch_enum" AS ENUM('never', 'always', 'essential', 'staff')
query: ALTER TABLE "user" ADD "allowUnsignedFetch" "public"."user_allowunsignedfetch_enum" NOT NULL DEFAULT 'staff'
query: UPDATE "user" SET "allowUnsignedFetch" = 'always' WHERE "username" LIKE '%.%' AND "host" IS null
query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1740162088574,"AddUnsignedFetch1740162088574"]
Migration AddUnsignedFetch1740162088574 has been executed successfully.
query: ALTER TABLE "user" DROP COLUMN "isRoot"
query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1740993126937,"SystemAccounts41740993126937"]
Migration SystemAccounts41740993126937 has been executed successfully.
query: ALTER TABLE "meta" ADD "libreTranslateURL" character varying(1024)
query: ALTER TABLE "meta" ADD "libreTranslateKey" character varying(1024)
query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1741215877000,"Libretranslate1741215877000"]
Migration Libretranslate1741215877000 has been executed successfully.
query: SELECT "id" FROM "user" WHERE "username" = 'instance.actor' AND "host" IS NULL AND "id" NOT IN (SELECT "userId" FROM "system_account" WHERE "type" = 'actor')
query: SELECT "id" FROM "user" WHERE "username" = 'relay.actor' AND "host" IS NULL AND "id" NOT IN (SELECT "userId" FROM "system_account" WHERE "type" = 'relay')
query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1741279404074,"SystemAccounts1741279404074"]
Migration SystemAccounts1741279404074 has been executed successfully.
query: CREATE OR REPLACE FUNCTION pg_temp.extract_ap_id(text) RETURNS text AS $$
            SELECT
                CASE
                    WHEN $1 ~ '^https?://' THEN $1
                    WHEN $1 LIKE '{%' THEN COALESCE(jsonb_extract_path_text($1::jsonb, 'id'), null)
                    ELSE null
                END;
        $$ LANGUAGE sql IMMUTABLE;
query: UPDATE "user" SET "featured" = pg_temp.extract_ap_id("featured") WHERE "host" IS NOT NULL
query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1741424411879,"UserFeaturedFixup1741424411879"]
Migration UserFeaturedFixup1741424411879 has been executed successfully.
query: CREATE TABLE "chat_room" ("id" character varying(32) NOT NULL, "name" character varying(256) NOT NULL, "ownerId" character varying(32) NOT NULL, CONSTRAINT "PK_8aa3a52cf74c96469f0ef9fbe3e" PRIMARY KEY ("id"))
query: CREATE INDEX "IDX_f0d8ad64243fa2ca2800da0dfd" ON "chat_room" ("ownerId") 
query: CREATE TABLE "chat_message" ("id" character varying(32) NOT NULL, "fromUserId" character varying(32) NOT NULL, "toUserId" character varying(32), "toRoomId" character varying(32), "text" character varying(4096), "uri" character varying(512), "reads" character varying(32) array NOT NULL DEFAULT '{}', "fileId" character varying(32), "reactions" character varying(1024) array NOT NULL DEFAULT '{}', CONSTRAINT "PK_3cc0d85193aade457d3077dd06b" PRIMARY KEY ("id"))
query: CREATE INDEX "IDX_79a26e7a4d9afa5e4fc05f134e" ON "chat_message" ("fromUserId") 
query: CREATE INDEX "IDX_25e097b51d7622c249452c6f75" ON "chat_message" ("toUserId") 
query: CREATE INDEX "IDX_f006b8a76efd1abf9f221c175c" ON "chat_message" ("toRoomId") 
query: CREATE TABLE "chat_room_membership" ("id" character varying(32) NOT NULL, "userId" character varying(32) NOT NULL, "roomId" character varying(32) NOT NULL, CONSTRAINT "PK_2bd59c741e571b283c048beb69a" PRIMARY KEY ("id"))
query: CREATE INDEX "IDX_d99c5279460fb77ef58c596ce5" ON "chat_room_membership" ("userId") 
query: CREATE INDEX "IDX_c25143ebab714e930aeca1c0e8" ON "chat_room_membership" ("roomId") 
query: ALTER TABLE "chat_room" ADD CONSTRAINT "FK_f0d8ad64243fa2ca2800da0dfd6" FOREIGN KEY ("ownerId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION
query: ALTER TABLE "chat_message" ADD CONSTRAINT "FK_79a26e7a4d9afa5e4fc05f134ed" FOREIGN KEY ("fromUserId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION
query: ALTER TABLE "chat_message" ADD CONSTRAINT "FK_25e097b51d7622c249452c6f757" FOREIGN KEY ("toUserId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION
query: ALTER TABLE "chat_message" ADD CONSTRAINT "FK_f006b8a76efd1abf9f221c175ce" FOREIGN KEY ("toRoomId") REFERENCES "chat_room"("id") ON DELETE CASCADE ON UPDATE NO ACTION
query: ALTER TABLE "chat_message" ADD CONSTRAINT "FK_fd0f9a4879430239715ad4f8e2a" FOREIGN KEY ("fileId") REFERENCES "drive_file"("id") ON DELETE SET NULL ON UPDATE NO ACTION
query: ALTER TABLE "chat_room_membership" ADD CONSTRAINT "FK_d99c5279460fb77ef58c596ce51" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION
query: ALTER TABLE "chat_room_membership" ADD CONSTRAINT "FK_c25143ebab714e930aeca1c0e8d" FOREIGN KEY ("roomId") REFERENCES "chat_room"("id") ON DELETE CASCADE ON UPDATE NO ACTION
query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1742203321812,"Chat1742203321812"]
Migration Chat1742203321812 has been executed successfully.
query: ALTER TABLE "user" ADD "chatScope" character varying(128) NOT NULL DEFAULT 'mutual'
query: CREATE UNIQUE INDEX "IDX_185b6b5afa707b5d36d1ce3144" ON "chat_room_membership" ("userId", "roomId") 
query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1742608337548,"Chat21742608337548"]
Migration Chat21742608337548 has been executed successfully.
query: CREATE TABLE "chat_approval" ("id" character varying(32) NOT NULL, "userId" character varying(32) NOT NULL, "otherId" character varying(32) NOT NULL, CONSTRAINT "PK_fbbb95d60acf5c85388345b5f5d" PRIMARY KEY ("id"))
query: CREATE INDEX "IDX_530257863e1381a7f2f1d3282f" ON "chat_approval" ("userId") 
query: CREATE INDEX "IDX_b1d46037f23d170da5c05fdf75" ON "chat_approval" ("otherId") 
query: CREATE UNIQUE INDEX "IDX_12c4768a2f706fc267f2078903" ON "chat_approval" ("userId", "otherId") 
query: ALTER TABLE "chat_approval" ADD CONSTRAINT "FK_530257863e1381a7f2f1d3282fe" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION
query: ALTER TABLE "chat_approval" ADD CONSTRAINT "FK_b1d46037f23d170da5c05fdf755" FOREIGN KEY ("otherId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION
query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1742617546147,"Chat31742617546147"]
Migration Chat31742617546147 has been executed successfully.
query: CREATE TABLE "chat_room_invitation" ("id" character varying(32) NOT NULL, "userId" character varying(32) NOT NULL, "roomId" character varying(32) NOT NULL, CONSTRAINT "PK_9d489521a312dd28225672de2dc" PRIMARY KEY ("id"))
query: CREATE INDEX "IDX_8552bb38e7ed038c5bdd398a38" ON "chat_room_invitation" ("userId") 
query: CREATE INDEX "IDX_5f265075b215fc390a57523b12" ON "chat_room_invitation" ("roomId") 
query: CREATE UNIQUE INDEX "IDX_044f2a7962b8ee5bbfaa02e8a3" ON "chat_room_invitation" ("userId", "roomId") 
query: ALTER TABLE "chat_room_invitation" ADD CONSTRAINT "FK_8552bb38e7ed038c5bdd398a384" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION
query: ALTER TABLE "chat_room_invitation" ADD CONSTRAINT "FK_5f265075b215fc390a57523b12a" FOREIGN KEY ("roomId") REFERENCES "chat_room"("id") ON DELETE CASCADE ON UPDATE NO ACTION
query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1742707840715,"Chat41742707840715"]
Migration Chat41742707840715 has been executed successfully.
query: ALTER TABLE "chat_room_invitation" ADD "ignored" boolean NOT NULL DEFAULT false
query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1742721896936,"Chat51742721896936"]
Migration Chat51742721896936 has been executed successfully.
query: ALTER TABLE "chat_room" ADD "description" character varying(2048) NOT NULL DEFAULT ''
query: ALTER TABLE "chat_room" ADD "isArchived" boolean NOT NULL DEFAULT false
query: ALTER TABLE "chat_room_membership" ADD "isMuted" boolean NOT NULL DEFAULT false
query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1742795111958,"Chat61742795111958"]
Migration Chat61742795111958 has been executed successfully.
query: ALTER TABLE "role" ADD "preserveAssignmentOnMoveAccount" boolean NOT NULL DEFAULT false
query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1743558299182,"RoleCopyOnMoveAccount1743558299182"]
Migration RoleCopyOnMoveAccount1743558299182 has been executed successfully.
query: ALTER TABLE "antenna" RENAME COLUMN "hideNotesInSensitiveChannel" TO "excludeNotesInSensitiveChannel"
query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1744075766000,"ExcludeNotesInSensitiveChannel1744075766000"]
Migration ExcludeNotesInSensitiveChannel1744075766000 has been executed successfully.
query: CREATE INDEX "IDX_724b311e6f883751f261ebe378" ON "note" ("userId", "id" DESC)
query: DROP INDEX IF EXISTS "IDX_5b87d9d19127bd5d92026017a7"
query: ANALYZE "user", "note"
query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1745378064470,"CompositeNoteIndex1745378064470"]
Migration CompositeNoteIndex1745378064470 has been executed successfully.
query: ALTER TABLE "meta" ADD "enableProxyAccount" boolean NOT NULL DEFAULT false
query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1746029830779,"AddMetaEnableProxyAccount1746029830779"]
Migration AddMetaEnableProxyAccount1746029830779 has been executed successfully.
query: DROP INDEX IF EXISTS "IDX_5deb01ae162d1d70b80d064c27"
query: CREATE UNIQUE INDEX "IDX_5deb01ae162d1d70b80d064c27" ON "user" ("usernameLower", "host") NULLS NOT DISTINCT
query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1746813431756,"Indexusernulldistinct1746813431756"]
Migration Indexusernulldistinct1746813431756 has been executed successfully.
query: ALTER TABLE "meta" ADD "translationTimeout" integer NOT NULL DEFAULT '5000'
query: COMMENT ON COLUMN "meta"."translationTimeout" IS 'Timeout in milliseconds for translation API requests'
query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1747023091463,"AddMetaTranslationTimeout1747023091463"]
Migration AddMetaTranslationTimeout1747023091463 has been executed successfully.
query: ALTER TYPE "public"."user_profile_followingvisibility_enum" RENAME TO "user_profile_followingVisibility_enum"
query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1747934911491,"RenameFollowingVisibility1747934911491"]
Migration RenameFollowingVisibility1747934911491 has been executed successfully.
query: COMMENT ON COLUMN "user"."backgroundId" IS 'The ID of background DriveFile.'
query: COMMENT ON COLUMN "user"."isSilenced" IS 'Whether the User is silenced.'
query: COMMENT ON COLUMN "user"."noindex" IS 'Whether the User''s notes dont get indexed.'
query: COMMENT ON COLUMN "user"."speakAsCat" IS 'Whether the User speaks in nya.'
query: COMMENT ON COLUMN "user_profile"."listenbrainz" IS 'The ListenBrainz username of the User.'
query: COMMENT ON COLUMN "note"."updatedAt" IS 'The update time of the Note.'
query: COMMENT ON COLUMN "meta"."trustedLinkUrlPatterns" IS 'An array of URL strings or regex that can be used to omit warnings about redirects to external sites. Separate them with spaces to specify AND, and enclose them with slashes to specify regular expressions. Each item is regarded as an OR.'
query: COMMENT ON COLUMN "note_edit"."oldDate" IS 'The old date from before the edit'
query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1747935197708,"AddEntityComments1747935197708"]
Migration AddEntityComments1747935197708 has been executed successfully.
query: ALTER TABLE "system_webhook" ALTER COLUMN "updatedAt" SET DEFAULT now()
query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1747937504140,"FixSystemWebhookUpdatedAtDefault1747937504140"]
Migration FixSystemWebhookUpdatedAtDefault1747937504140 has been executed successfully.
query: ALTER TABLE "abuse_report_notification_recipient" ALTER COLUMN "updatedAt" SET DEFAULT now()
query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1747937670341,"FixAbuseReportNotificationRecipientUpdatedAtDefault1747937670341"]
Migration FixAbuseReportNotificationRecipientUpdatedAtDefault1747937670341 has been executed successfully.
query: ALTER TABLE "flash" ALTER COLUMN "visibility" SET NOT NULL
query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1747937796573,"FixFlashVisibilityNullable1747937796573"]
Migration FixFlashVisibilityNullable1747937796573 has been executed successfully.
query: ALTER TABLE "abuse_report_notification_recipient" ALTER COLUMN "userId" DROP DEFAULT
query: ALTER TABLE "abuse_report_notification_recipient" ALTER COLUMN "systemWebhookId" DROP DEFAULT
query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1747938136399,"FixAbuseReportNotificationRecipientDefaults1747938136399"]
Migration FixAbuseReportNotificationRecipientDefaults1747938136399 has been executed successfully.
query: ALTER TABLE "meta" ALTER COLUMN "urlPreviewUserAgent" DROP DEFAULT
query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1747938263980,"FixMetaUrlPreviewUserAgentDefault1747938263980"]
Migration FixMetaUrlPreviewUserAgentDefault1747938263980 has been executed successfully.
query: CREATE INDEX "IDX_58699f75b9cf904f5f007909cb" ON "user_profile" ("birthday") 
query: CREATE INDEX "IDX_021015e6683570ae9f6b0c62be" ON "user_list_membership" ("userId") 
query: CREATE INDEX "IDX_cddcaf418dc4d392ecfcca842a" ON "user_list_membership" ("userListId") 
query: CREATE UNIQUE INDEX "IDX_e4f3094c43f2d665e6030b0337" ON "user_list_membership" ("userId", "userListId") 
query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1747938628395,"AddMissingIndexes1747938628395"]
Migration AddMissingIndexes1747938628395 has been executed successfully.
query: ALTER TABLE "meta" ALTER COLUMN "defaultLike" SET NOT NULL
query: INSERT INTO "migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1747944466178,"AlterMetaDefaultLikeNotNull1747944466178"]
Migration AlterMetaDefaultLikeNotNull1747944466178 has been executed successfully.
query: COMMIT

今回はこけなかった

Alice RoseAlice Rose

Sharkey再起動したら知らないUIが出てきた 怖い

Alice RoseAlice Rose

ちょっと待ってたらいつもの画面に戻った
ちゃんとSharkeyもアップデートされて2025.4.2になってた

Alice RoseAlice Rose

設定画面に押したことないボタンが自動実行されたものだったらしい

PC/SPともに移行完了したみたいなのでこれで完了かな
原因を突き止めてくれた天才と偉い人に感謝
終わり

このスクラップは3ヶ月前にクローズされました