High performance self-hosted photo and video management solution.
TypeScript backup-toolfluttergoogle-photosgoogle-photos-alternativejavascriptmobile-appnestjsnodejsphoto-galleryphotosphotos-managementself-hostedsveltesveltekittypescriptvideos
fix(server): public references in migrations (#12298)
Jason Rasmussen526cf23a9ebc
diff --git a/server/src/migrations/1661881837496-AddAssetChecksum.ts b/server/src/migrations/1661881837496-AddAssetChecksum.tsindex 231aeecca7..2901b4f554 100644--- a/server/src/migrations/1661881837496-AddAssetChecksum.ts+++ b/server/src/migrations/1661881837496-AddAssetChecksum.ts@@ -11,7 +11,7 @@ export class AddAssetChecksum1661881837496 implements MigrationInterface {}public async down(queryRunner: QueryRunner): Promise<void> {- await queryRunner.query(`DROP INDEX "public"."IDX_64c507300988dd1764f9a6530c"`);+ await queryRunner.query(`DROP INDEX "IDX_64c507300988dd1764f9a6530c"`);await queryRunner.query(`ALTER TABLE "assets" DROP COLUMN "checksum"`);}}diff --git a/server/src/migrations/1670257571385-CreateTagsTable.ts b/server/src/migrations/1670257571385-CreateTagsTable.tsindex 0585aecc8c..75fba9249c 100644--- a/server/src/migrations/1670257571385-CreateTagsTable.ts+++ b/server/src/migrations/1670257571385-CreateTagsTable.ts@@ -17,8 +17,8 @@ export class CreateTagsTable1670257571385 implements MigrationInterface {await queryRunner.query(`ALTER TABLE "tag_asset" DROP CONSTRAINT "FK_e99f31ea4cdf3a2c35c7287eb42"`);await queryRunner.query(`ALTER TABLE "tag_asset" DROP CONSTRAINT "FK_f8e8a9e893cb5c54907f1b798e9"`);await queryRunner.query(`ALTER TABLE "tags" DROP CONSTRAINT "FK_92e67dc508c705dd66c94615576"`);- await queryRunner.query(`DROP INDEX "public"."IDX_e99f31ea4cdf3a2c35c7287eb4"`);- await queryRunner.query(`DROP INDEX "public"."IDX_f8e8a9e893cb5c54907f1b798e"`);+ await queryRunner.query(`DROP INDEX "IDX_e99f31ea4cdf3a2c35c7287eb4"`);+ await queryRunner.query(`DROP INDEX "IDX_f8e8a9e893cb5c54907f1b798e"`);await queryRunner.query(`DROP TABLE "tag_asset"`);await queryRunner.query(`DROP TABLE "tags"`);}diff --git a/server/src/migrations/1673150490490-AddSharedLinkTable.ts b/server/src/migrations/1673150490490-AddSharedLinkTable.tsindex a7508722d2..8d5bd2f5a5 100644--- a/server/src/migrations/1673150490490-AddSharedLinkTable.ts+++ b/server/src/migrations/1673150490490-AddSharedLinkTable.ts@@ -18,10 +18,10 @@ export class AddSharedLinkTable1673150490490 implements MigrationInterface {await queryRunner.query(`ALTER TABLE "shared_link__asset" DROP CONSTRAINT "FK_c9fab4aa97ffd1b034f3d6581ab"`);await queryRunner.query(`ALTER TABLE "shared_link__asset" DROP CONSTRAINT "FK_5b7decce6c8d3db9593d6111a66"`);await queryRunner.query(`ALTER TABLE "shared_links" DROP CONSTRAINT "FK_0c6ce9058c29f07cdf7014eac66"`);- await queryRunner.query(`DROP INDEX "public"."IDX_c9fab4aa97ffd1b034f3d6581a"`);- await queryRunner.query(`DROP INDEX "public"."IDX_5b7decce6c8d3db9593d6111a6"`);+ await queryRunner.query(`DROP INDEX "IDX_c9fab4aa97ffd1b034f3d6581a"`);+ await queryRunner.query(`DROP INDEX "IDX_5b7decce6c8d3db9593d6111a6"`);await queryRunner.query(`DROP TABLE "shared_link__asset"`);- await queryRunner.query(`DROP INDEX "public"."IDX_sharedlink_key"`);+ await queryRunner.query(`DROP INDEX "IDX_sharedlink_key"`);await queryRunner.query(`DROP TABLE "shared_links"`);}diff --git a/server/src/migrations/1675812532822-FixAlbumEntityTypeORM.ts b/server/src/migrations/1675812532822-FixAlbumEntityTypeORM.tsindex 3be6a2aa1d..6f48ac736d 100644--- a/server/src/migrations/1675812532822-FixAlbumEntityTypeORM.ts+++ b/server/src/migrations/1675812532822-FixAlbumEntityTypeORM.ts@@ -44,10 +44,10 @@ export class FixAlbumEntityTypeORM1675812532822 implements MigrationInterface {await queryRunner.query(`ALTER TABLE "asset_album" DROP CONSTRAINT "FK_4bd1303d199f4e72ccdf998c621"`);await queryRunner.query(`ALTER TABLE "user_shared_album" DROP CONSTRAINT "FK_427c350ad49bd3935a50baab737"`);await queryRunner.query(`ALTER TABLE "user_shared_album" DROP CONSTRAINT "FK_f48513bf9bccefd6ff3ad30bd06"`);- await queryRunner.query(`DROP INDEX "public"."IDX_427c350ad49bd3935a50baab73"`);- await queryRunner.query(`DROP INDEX "public"."IDX_f48513bf9bccefd6ff3ad30bd0"`);- await queryRunner.query(`DROP INDEX "public"."IDX_e590fa396c6898fcd4a50e4092"`);- await queryRunner.query(`DROP INDEX "public"."IDX_4bd1303d199f4e72ccdf998c62"`);+ await queryRunner.query(`DROP INDEX "IDX_427c350ad49bd3935a50baab73"`);+ await queryRunner.query(`DROP INDEX "IDX_f48513bf9bccefd6ff3ad30bd0"`);+ await queryRunner.query(`DROP INDEX "IDX_e590fa396c6898fcd4a50e4092"`);+ await queryRunner.query(`DROP INDEX "IDX_4bd1303d199f4e72ccdf998c62"`);await queryRunner.query(`ALTER TABLE "albums" DROP CONSTRAINT "FK_b22c53f35ef20c28c21637c85f4"`);await queryRunner.query(diff --git a/server/src/migrations/1676437878377-AppleContentIdentifier.ts b/server/src/migrations/1676437878377-AppleContentIdentifier.tsindex 40a4dce579..8d11139878 100644--- a/server/src/migrations/1676437878377-AppleContentIdentifier.ts+++ b/server/src/migrations/1676437878377-AppleContentIdentifier.ts@@ -9,7 +9,7 @@ export class AppleContentIdentifier1676437878377 implements MigrationInterface {}public async down(queryRunner: QueryRunner): Promise<void> {- await queryRunner.query(`DROP INDEX "public"."IDX_live_photo_cid"`);+ await queryRunner.query(`DROP INDEX "IDX_live_photo_cid"`);await queryRunner.query(`ALTER TABLE "exif" DROP COLUMN "livePhotoCID"`);}}diff --git a/server/src/migrations/1676848629119-ExifEntityDefinitionFixes.ts b/server/src/migrations/1676848629119-ExifEntityDefinitionFixes.tsindex 35d4c77eba..947559ed2d 100644--- a/server/src/migrations/1676848629119-ExifEntityDefinitionFixes.ts+++ b/server/src/migrations/1676848629119-ExifEntityDefinitionFixes.ts@@ -6,7 +6,7 @@ export class ExifEntityDefinitionFixes1676848629119 implements MigrationInterfacpublic async up(queryRunner: QueryRunner): Promise<void> {await queryRunner.query(`ALTER TABLE "exif" ALTER COLUMN "description" SET NOT NULL`);- await queryRunner.query(`DROP INDEX "public"."IDX_c0117fdbc50b917ef9067740c4"`);+ await queryRunner.query(`DROP INDEX "IDX_c0117fdbc50b917ef9067740c4"`);await queryRunner.query(`ALTER TABLE "exif" DROP CONSTRAINT "PK_28663352d85078ad0046dafafaa"`);await queryRunner.query(`ALTER TABLE "exif" DROP COLUMN "id"`);await queryRunner.query(`ALTER TABLE "exif" DROP CONSTRAINT "FK_c0117fdbc50b917ef9067740c44"`);diff --git a/server/src/migrations/1676852143506-SmartInfoEntityDefinitionFixes.ts b/server/src/migrations/1676852143506-SmartInfoEntityDefinitionFixes.tsindex f89c7acdd2..e089619c6d 100644--- a/server/src/migrations/1676852143506-SmartInfoEntityDefinitionFixes.ts+++ b/server/src/migrations/1676852143506-SmartInfoEntityDefinitionFixes.ts@@ -4,7 +4,7 @@ export class SmartInfoEntityDefinitionFixes1676852143506 implements MigrationIntname = 'SmartInfoEntityDefinitionFixes1676852143506'public async up(queryRunner: QueryRunner): Promise<void> {- await queryRunner.query(`DROP INDEX "public"."IDX_5e3753aadd956110bf3ec0244a"`);+ await queryRunner.query(`DROP INDEX "IDX_5e3753aadd956110bf3ec0244a"`);await queryRunner.query(`ALTER TABLE "smart_info" DROP CONSTRAINT "PK_0beace66440e9713f5c40470e46"`);await queryRunner.query(`ALTER TABLE "smart_info" DROP COLUMN "id"`);await queryRunner.query(`ALTER TABLE "smart_info" DROP CONSTRAINT "FK_5e3753aadd956110bf3ec0244ac"`);diff --git a/server/src/migrations/1677535643119-AddIndexForAlbumInSharedLinkTable.ts b/server/src/migrations/1677535643119-AddIndexForAlbumInSharedLinkTable.tsindex f3fb4a6c63..986b5ebd20 100644--- a/server/src/migrations/1677535643119-AddIndexForAlbumInSharedLinkTable.ts+++ b/server/src/migrations/1677535643119-AddIndexForAlbumInSharedLinkTable.ts@@ -8,7 +8,7 @@ export class AddIndexForAlbumInSharedLinkTable1677535643119 implements Migration}public async down(queryRunner: QueryRunner): Promise<void> {- await queryRunner.query(`DROP INDEX "public"."IDX_sharedlink_albumId"`);+ await queryRunner.query(`DROP INDEX "IDX_sharedlink_albumId"`);}}diff --git a/server/src/migrations/1684328185099-RequireChecksumNotNull.ts b/server/src/migrations/1684328185099-RequireChecksumNotNull.tsindex 6da8f32622..e691fff2b1 100644--- a/server/src/migrations/1684328185099-RequireChecksumNotNull.ts+++ b/server/src/migrations/1684328185099-RequireChecksumNotNull.ts@@ -4,13 +4,13 @@ export class RequireChecksumNotNull1684328185099 implements MigrationInterface {name = 'removeNotNullFromChecksumIndex1684328185099';public async up(queryRunner: QueryRunner): Promise<void> {- await queryRunner.query(`DROP INDEX "public"."IDX_64c507300988dd1764f9a6530c"`);+ await queryRunner.query(`DROP INDEX "IDX_64c507300988dd1764f9a6530c"`);await queryRunner.query(`ALTER TABLE "assets" ALTER COLUMN "checksum" SET NOT NULL`);await queryRunner.query(`CREATE INDEX "IDX_8d3efe36c0755849395e6ea866" ON "assets" ("checksum") `);}public async down(queryRunner: QueryRunner): Promise<void> {- await queryRunner.query(`DROP INDEX "public"."IDX_8d3efe36c0755849395e6ea866"`);+ await queryRunner.query(`DROP INDEX "IDX_8d3efe36c0755849395e6ea866"`);await queryRunner.query(`ALTER TABLE "assets" ALTER COLUMN "checksum" DROP NOT NULL`);await queryRunner.query(`CREATE INDEX "IDX_64c507300988dd1764f9a6530c" ON "assets" ("checksum") WHERE ('checksum' IS NOT NULL)`,diff --git a/server/src/migrations/1692804658140-AddAuditTable.ts b/server/src/migrations/1692804658140-AddAuditTable.tsindex 71b8c7b2c6..d398051a79 100644--- a/server/src/migrations/1692804658140-AddAuditTable.ts+++ b/server/src/migrations/1692804658140-AddAuditTable.ts@@ -9,7 +9,7 @@ export class AddAuditTable1692804658140 implements MigrationInterface {}public async down(queryRunner: QueryRunner): Promise<void> {- await queryRunner.query(`DROP INDEX "public"."IDX_ownerId_createdAt"`);+ await queryRunner.query(`DROP INDEX "IDX_ownerId_createdAt"`);await queryRunner.query(`DROP TABLE "audit"`);}diff --git a/server/src/migrations/1696888644031-AddOriginalPathIndex.ts b/server/src/migrations/1696888644031-AddOriginalPathIndex.tsindex 826700ffe8..78e1c92ecb 100644--- a/server/src/migrations/1696888644031-AddOriginalPathIndex.ts+++ b/server/src/migrations/1696888644031-AddOriginalPathIndex.ts@@ -8,6 +8,6 @@ export class AddOriginalPathIndex1696888644031 implements MigrationInterface {}public async down(queryRunner: QueryRunner): Promise<void> {- await queryRunner.query(`DROP INDEX "public"."IDX_originalPath_libraryId"`);+ await queryRunner.query(`DROP INDEX "IDX_originalPath_libraryId"`);}}diff --git a/server/src/migrations/1698693294632-AddActivity.ts b/server/src/migrations/1698693294632-AddActivity.tsindex 46041570ea..5556ef2b20 100644--- a/server/src/migrations/1698693294632-AddActivity.ts+++ b/server/src/migrations/1698693294632-AddActivity.ts@@ -15,7 +15,7 @@ export class AddActivity1698693294632 implements MigrationInterface {await queryRunner.query(`ALTER TABLE "activity" DROP CONSTRAINT "FK_1af8519996fbfb3684b58df280b"`);await queryRunner.query(`ALTER TABLE "activity" DROP CONSTRAINT "FK_3571467bcbe021f66e2bdce96ea"`);await queryRunner.query(`ALTER TABLE "activity" DROP CONSTRAINT "FK_8091ea76b12338cb4428d33d782"`);- await queryRunner.query(`DROP INDEX "public"."IDX_activity_like"`);+ await queryRunner.query(`DROP INDEX "IDX_activity_like"`);await queryRunner.query(`DROP TABLE "activity"`);}diff --git a/server/src/migrations/1700752078178-AddAssetFaceIndicies.ts b/server/src/migrations/1700752078178-AddAssetFaceIndicies.tsindex 723b22b3d1..38dd915139 100644--- a/server/src/migrations/1700752078178-AddAssetFaceIndicies.ts+++ b/server/src/migrations/1700752078178-AddAssetFaceIndicies.ts@@ -9,8 +9,8 @@ export class AddAssetFaceIndicies1700752078178 implements MigrationInterface {}public async down(queryRunner: QueryRunner): Promise<void> {- await queryRunner.query(`DROP INDEX "public"."IDX_b463c8edb01364bf2beba08ef1"`);- await queryRunner.query(`DROP INDEX "public"."IDX_bf339a24070dac7e71304ec530"`);+ await queryRunner.query(`DROP INDEX "IDX_b463c8edb01364bf2beba08ef1"`);+ await queryRunner.query(`DROP INDEX "IDX_bf339a24070dac7e71304ec530"`);}}diff --git a/server/src/migrations/1701665867595-AddExifCityIndex.ts b/server/src/migrations/1701665867595-AddExifCityIndex.tsindex 9979762dc4..0899ea1e6b 100644--- a/server/src/migrations/1701665867595-AddExifCityIndex.ts+++ b/server/src/migrations/1701665867595-AddExifCityIndex.ts@@ -8,7 +8,7 @@ export class AddExifCityIndex1701665867595 implements MigrationInterface {}public async down(queryRunner: QueryRunner): Promise<void> {- await queryRunner.query(`DROP INDEX "public"."exif_city"`);+ await queryRunner.query(`DROP INDEX "exif_city"`);}}diff --git a/server/src/migrations/1703035138085-AddAutoStackId.ts b/server/src/migrations/1703035138085-AddAutoStackId.tsindex 6669142611..d8c83ac565 100644--- a/server/src/migrations/1703035138085-AddAutoStackId.ts+++ b/server/src/migrations/1703035138085-AddAutoStackId.ts@@ -9,7 +9,7 @@ export class AddAutoStackId1703035138085 implements MigrationInterface {}public async down(queryRunner: QueryRunner): Promise<void> {- await queryRunner.query(`DROP INDEX "public"."IDX_auto_stack_id"`);+ await queryRunner.query(`DROP INDEX "IDX_auto_stack_id"`);await queryRunner.query(`ALTER TABLE "exif" DROP COLUMN "autoStackId"`);}diff --git a/server/src/migrations/1705306747072-AddOriginalFileNameIndex.ts b/server/src/migrations/1705306747072-AddOriginalFileNameIndex.tsindex b465d42943..c62c01f50c 100644--- a/server/src/migrations/1705306747072-AddOriginalFileNameIndex.ts+++ b/server/src/migrations/1705306747072-AddOriginalFileNameIndex.ts@@ -8,6 +8,6 @@ export class AddOriginalFileNameIndex1705306747072 implements MigrationInterface}public async down(queryRunner: QueryRunner): Promise<void> {- await queryRunner.query(`DROP INDEX "public"."IDX_4d66e76dada1ca180f67a205dc"`);+ await queryRunner.query(`DROP INDEX "IDX_4d66e76dada1ca180f67a205dc"`);}}diff --git a/server/src/migrations/1705363967169-CreateAssetStackTable.ts b/server/src/migrations/1705363967169-CreateAssetStackTable.tsindex 74c75d555c..d1591797ff 100644--- a/server/src/migrations/1705363967169-CreateAssetStackTable.ts+++ b/server/src/migrations/1705363967169-CreateAssetStackTable.ts@@ -41,7 +41,7 @@ export class CreateAssetStackTable1705197515600 implements MigrationInterface {);// update constraints- await queryRunner.query(`DROP INDEX "public"."IDX_b463c8edb01364bf2beba08ef1"`);+ await queryRunner.query(`DROP INDEX "IDX_b463c8edb01364bf2beba08ef1"`);await queryRunner.query(`ALTER TABLE "assets" DROP CONSTRAINT "FK_b463c8edb01364bf2beba08ef19"`);await queryRunner.query(`ALTER TABLE "assets" ADD CONSTRAINT "FK_f15d48fa3ea5e4bda05ca8ab207" FOREIGN KEY ("stackId") REFERENCES "asset_stack"("id") ON DELETE SET NULL ON UPDATE CASCADE`,diff --git a/server/src/migrations/1711637874206-AddMemoryTable.ts b/server/src/migrations/1711637874206-AddMemoryTable.tsindex 6309cb5082..b1c5b437d7 100644--- a/server/src/migrations/1711637874206-AddMemoryTable.ts+++ b/server/src/migrations/1711637874206-AddMemoryTable.ts@@ -17,8 +17,8 @@ export class AddMemoryTable1711637874206 implements MigrationInterface {await queryRunner.query(`ALTER TABLE "memories_assets_assets" DROP CONSTRAINT "FK_6942ecf52d75d4273de19d2c16f"`);await queryRunner.query(`ALTER TABLE "memories_assets_assets" DROP CONSTRAINT "FK_984e5c9ab1f04d34538cd32334e"`);await queryRunner.query(`ALTER TABLE "memories" DROP CONSTRAINT "FK_575842846f0c28fa5da46c99b19"`);- await queryRunner.query(`DROP INDEX "public"."IDX_6942ecf52d75d4273de19d2c16"`);- await queryRunner.query(`DROP INDEX "public"."IDX_984e5c9ab1f04d34538cd32334"`);+ await queryRunner.query(`DROP INDEX "IDX_6942ecf52d75d4273de19d2c16"`);+ await queryRunner.query(`DROP INDEX "IDX_984e5c9ab1f04d34538cd32334"`);await queryRunner.query(`DROP TABLE "memories_assets_assets"`);await queryRunner.query(`DROP TABLE "memories"`);}diff --git a/server/src/migrations/1715804005643-RemoveLibraryType.ts b/server/src/migrations/1715804005643-RemoveLibraryType.tsindex d42ba4ec73..cd4dc574f2 100644--- a/server/src/migrations/1715804005643-RemoveLibraryType.ts+++ b/server/src/migrations/1715804005643-RemoveLibraryType.ts@@ -5,8 +5,8 @@ export class RemoveLibraryType1715804005643 implements MigrationInterface {public async up(queryRunner: QueryRunner): Promise<void> {await queryRunner.query(`ALTER TABLE "assets" DROP CONSTRAINT "FK_9977c3c1de01c3d848039a6b90c"`);- await queryRunner.query(`DROP INDEX "public"."UQ_assets_owner_library_checksum"`);- await queryRunner.query(`DROP INDEX "public"."IDX_originalPath_libraryId"`);+ await queryRunner.query(`DROP INDEX "UQ_assets_owner_library_checksum"`);+ await queryRunner.query(`DROP INDEX "IDX_originalPath_libraryId"`);await queryRunner.query(`ALTER TABLE "assets" ALTER COLUMN "libraryId" DROP NOT NULL`);await queryRunner.query(`UPDATE "assets"diff --git a/server/src/migrations/1724101822106-AddAssetFilesTable.ts b/server/src/migrations/1724101822106-AddAssetFilesTable.tsindex 1ed4945749..bb086b084e 100644--- a/server/src/migrations/1724101822106-AddAssetFilesTable.ts+++ b/server/src/migrations/1724101822106-AddAssetFilesTable.ts@@ -27,7 +27,7 @@ export class AddAssetFilesTable1724101822106 implements MigrationInterface {await queryRunner.query(`UPDATE "assets" SET "thumbnailPath" = "asset_files".path FROM "asset_files" WHERE "assets".id = "asset_files".assetId AND "asset_files".type = 'thumbnail'`);await queryRunner.query(`ALTER TABLE "asset_files" DROP CONSTRAINT "FK_e3e103a5f1d8bc8402999286040"`);- await queryRunner.query(`DROP INDEX "public"."IDX_asset_files_assetId"`);+ await queryRunner.query(`DROP INDEX "IDX_asset_files_assetId"`);await queryRunner.query(`DROP TABLE "asset_files"`);}diff --git a/server/src/migrations/1724790460210-NestedTagTable.ts b/server/src/migrations/1724790460210-NestedTagTable.tsindex dfda9a6d7a..d468ff6ba4 100644--- a/server/src/migrations/1724790460210-NestedTagTable.ts+++ b/server/src/migrations/1724790460210-NestedTagTable.ts@@ -47,8 +47,8 @@ export class NestedTagTable1724790460210 implements MigrationInterface {await queryRunner.query(`ALTER TABLE "tags" ADD "name" character varying NOT NULL`);await queryRunner.query(`ALTER TABLE "tags" ADD "type" character varying NOT NULL`);await queryRunner.query(`ALTER TABLE "tags" ADD "renameTagId" uuid`);- await queryRunner.query(`DROP INDEX "public"."IDX_b1a2a7ed45c29179b5ad51548a"`);- await queryRunner.query(`DROP INDEX "public"."IDX_15fbcbc67663c6bfc07b354c22"`);+ await queryRunner.query(`DROP INDEX "IDX_b1a2a7ed45c29179b5ad51548a"`);+ await queryRunner.query(`DROP INDEX "IDX_15fbcbc67663c6bfc07b354c22"`);await queryRunner.query(`DROP TABLE "tags_closure"`);await queryRunner.query(`ALTER TABLE "tags" ADD CONSTRAINT "UQ_tag_name_userId" UNIQUE ("name", "userId")`);await queryRunner.query(`ALTER TABLE "tags" ADD CONSTRAINT "FK_92e67dc508c705dd66c94615576" FOREIGN KEY ("userId") REFERENCES "users"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);