2024-01-22 07:22:29 +09:00
|
|
|
BEGIN;
|
|
|
|
|
2024-01-22 07:23:29 +09:00
|
|
|
DELETE FROM "migrations" WHERE name IN (
|
2024-02-26 02:48:45 +09:00
|
|
|
'IndexAltTextAndCw1708872574733',
|
2024-01-31 13:34:11 +09:00
|
|
|
'SeparateHardMuteWordsAndPatterns1706413792769',
|
2024-01-23 03:53:53 +09:00
|
|
|
'RenameMetaColumns1705944717480',
|
|
|
|
'RemoveNativeUtilsMigration1705877093218',
|
2024-01-22 07:23:29 +09:00
|
|
|
'DropTimeZone1705691683091',
|
|
|
|
'AddReplyMuting1704851359889',
|
|
|
|
'EmojimodEnumRelabel1699658378432',
|
|
|
|
'Vervis1699302371683',
|
|
|
|
'Pgroonga1698420787202',
|
|
|
|
'TruncateChartTables1694921638251',
|
2024-01-23 03:53:53 +09:00
|
|
|
'EmojiModerator1692825433698'
|
2024-01-22 07:23:29 +09:00
|
|
|
);
|
|
|
|
|
2024-02-26 02:48:45 +09:00
|
|
|
-- index-alt-text-and-cw
|
|
|
|
DROP INDEX "IDX_f4f7b93d05958527300d79ac82";
|
|
|
|
DROP INDEX "IDX_8e3bbbeb3df04d1a8105da4c8f";
|
|
|
|
|
2024-01-31 13:34:11 +09:00
|
|
|
-- separate-hard-mute-words-and-patterns
|
|
|
|
UPDATE "user_profile" SET "mutedWords" = "mutedWords" || array_to_json("mutedPatterns")::jsonb;
|
|
|
|
ALTER TABLE "user_profile" DROP "mutedPatterns";
|
|
|
|
|
2024-01-23 03:53:53 +09:00
|
|
|
-- rename-meta-columns
|
|
|
|
ALTER TABLE "meta" RENAME COLUMN "tosUrl" TO "ToSUrl";
|
|
|
|
ALTER TABLE "meta" RENAME COLUMN "objectStorageUseSsl" TO "objectStorageUseSSL";
|
|
|
|
ALTER TABLE "meta" RENAME COLUMN "customMotd" TO "customMOTD";
|
|
|
|
|
2024-01-22 08:54:24 +09:00
|
|
|
-- remove-native-utils-migration
|
|
|
|
CREATE TABLE "seaql_migrations" (
|
|
|
|
version character varying NOT NULL,
|
|
|
|
applied_at bigint NOT NULL
|
|
|
|
);
|
|
|
|
INSERT INTO "seaql_migrations" (version, applied_at)
|
|
|
|
VALUES
|
|
|
|
('m20230531_180824_drop_reversi', 1705876632),
|
|
|
|
('m20230627_185451_index_note_url', 1705876632),
|
|
|
|
('m20230709_000510_move_antenna_to_cache', 1705876632),
|
|
|
|
('m20230806_170616_fix_antenna_stream_ids', 1705876632),
|
|
|
|
('m20230904_013244_is_indexable', 1705876632),
|
|
|
|
('m20231002_143323_remove_integrations', 1705876632)
|
|
|
|
;
|
|
|
|
|
2024-01-22 00:40:07 +09:00
|
|
|
-- remove-nsfw-detection
|
|
|
|
ALTER TABLE "user_profile" ADD "autoSensitive" boolean NOT NULL DEFAULT false;
|
|
|
|
ALTER TABLE "meta" ADD "enableSensitiveMediaDetectionForVideos" boolean NOT NULL DEFAULT false;
|
|
|
|
ALTER TABLE "meta" ADD "setSensitiveFlagAutomatically" boolean NOT NULL DEFAULT false;
|
|
|
|
CREATE TYPE "public"."meta_sensitivemediadetectionsensitivity_enum" AS ENUM('medium', 'low', 'high', 'veryLow', 'veryHigh');
|
|
|
|
ALTER TABLE "meta" ADD "sensitiveMediaDetectionSensitivity" "public"."meta_sensitivemediadetectionsensitivity_enum" NOT NULL DEFAULT 'medium';
|
|
|
|
CREATE TYPE "public"."meta_sensitivemediadetection_enum" AS ENUM('none', 'all', 'local', 'remote');
|
|
|
|
ALTER TABLE "meta" ADD "sensitiveMediaDetection" "public"."meta_sensitivemediadetection_enum" NOT NULL DEFAULT 'none';
|
|
|
|
ALTER TABLE "drive_file" ADD "maybePorn" boolean NOT NULL DEFAULT false;
|
|
|
|
ALTER TABLE "drive_file" ADD "maybeSensitive" boolean NOT NULL DEFAULT false;
|
|
|
|
COMMENT ON COLUMN "drive_file"."maybeSensitive" IS 'Whether the DriveFile is NSFW. (predict)';
|
|
|
|
|
2024-01-20 04:26:13 +09:00
|
|
|
-- drop-time-zone
|
|
|
|
ALTER TABLE "webhook" ALTER "latestSentAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "webhook" ALTER "createdAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "user_security_key" ALTER "lastUsed" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "user_pending" ALTER "createdAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "user_note_pining" ALTER "createdAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "user_list_joining" ALTER "createdAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "user_list" ALTER "createdAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "user_ip" ALTER "createdAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "user_group_joining" ALTER "createdAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "user_group_invite" ALTER "createdAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "user_group_invitation" ALTER "createdAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "user_group" ALTER "createdAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "user" ALTER "updatedAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "user" ALTER "lastFetchedAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "user" ALTER "lastActiveDate" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "user" ALTER "createdAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "used_username" ALTER "createdAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "sw_subscription" ALTER "createdAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "signin" ALTER "createdAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "reply_muting" ALTER "createdAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "renote_muting" ALTER "createdAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "registry_item" ALTER "updatedAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "registry_item" ALTER "createdAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "registration_ticket" ALTER "createdAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "promo_read" ALTER "createdAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "promo_note" ALTER "expiresAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "poll_vote" ALTER "createdAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "poll" ALTER "expiresAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "password_reset_request" ALTER "createdAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "page_like" ALTER "createdAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "page" ALTER "updatedAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "page" ALTER "createdAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "notification" ALTER "createdAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "note_watching" ALTER "createdAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "note_thread_muting" ALTER "createdAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "note_reaction" ALTER "createdAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "note_favorite" ALTER "createdAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "note_edit" ALTER "updatedAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "note" ALTER "updatedAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "note" ALTER "createdAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "muting" ALTER "expiresAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "muting" ALTER "createdAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "moderation_log" ALTER "createdAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "messaging_message" ALTER "createdAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "instance" ALTER "latestRequestSentAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "instance" ALTER "latestRequestReceivedAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "instance" ALTER "lastCommunicatedAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "instance" ALTER "infoUpdatedAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "instance" ALTER "caughtAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "gallery_post" ALTER "updatedAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "gallery_post" ALTER "createdAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "gallery_like" ALTER "createdAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "follow_request" ALTER "createdAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "following" ALTER "createdAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "emoji" ALTER "updatedAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "drive_folder" ALTER "createdAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "drive_file" ALTER "createdAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "clip" ALTER "createdAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "channel_note_pining" ALTER "createdAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "channel_following" ALTER "createdAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "channel" ALTER "lastNotedAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "channel" ALTER "createdAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "blocking" ALTER "createdAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "auth_session" ALTER "createdAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "attestation_challenge" ALTER "createdAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "app" ALTER "createdAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "antenna" ALTER "createdAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "announcement_read" ALTER "createdAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "announcement" ALTER "updatedAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "announcement" ALTER "createdAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "ad" ALTER "expiresAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "ad" ALTER "createdAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "access_token" ALTER "lastUsedAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "access_token" ALTER "createdAt" TYPE timestamp with time zone;
|
|
|
|
ALTER TABLE "abuse_user_report" ALTER "createdAt" TYPE timestamp with time zone;
|
|
|
|
|
2024-01-10 12:29:50 +09:00
|
|
|
-- reply-muting
|
|
|
|
DROP TABLE "reply_muting";
|
|
|
|
|
2023-11-09 21:25:55 +09:00
|
|
|
-- vervis
|
|
|
|
UPDATE meta SET "repositoryUrl" = 'https://git.joinfirefish.org/firefish/firefish';
|
|
|
|
|
2023-10-28 20:19:25 +09:00
|
|
|
-- pgroonga
|
|
|
|
DROP INDEX "public"."IDX_f27f5d88941e57442be75ba9c8";
|
|
|
|
DROP INDEX "public"."IDX_065d4d8f3b5adb4a08841eae3c";
|
|
|
|
DROP INDEX "public"."IDX_fcb770976ff8240af5799e3ffc";
|
|
|
|
DROP EXTENSION pgroonga CASCADE;
|
|
|
|
|
2023-10-04 18:18:06 +09:00
|
|
|
-- emoji-moderator
|
|
|
|
ALTER TABLE "user" DROP COLUMN "emojiModPerm";
|
|
|
|
DROP TYPE "public"."user_emojimodperm_enum";
|
2024-01-22 07:22:29 +09:00
|
|
|
|
|
|
|
COMMIT;
|