From c1402eee8e0020994c488c22b175fd693e40be3d Mon Sep 17 00:00:00 2001 From: Jason Rasmussen Date: Wed, 20 Mar 2024 16:02:51 -0500 Subject: [PATCH] chore: migrate database files (#8126) --- .github/workflows/test.yml | 4 +- docs/docs/developer/database-migrations.md | 4 +- server/e2e/jobs/jest-e2e.json | 6 +- .../jobs/specs/library-watcher.e2e-spec.ts | 4 +- server/e2e/jobs/specs/library.e2e-spec.ts | 2 +- server/package.json | 2 + server/src/commands/list-users.command.ts | 2 +- server/src/config.ts | 2 +- server/src/cores/access.core.ts | 2 +- server/src/cores/storage.core.ts | 6 +- server/src/cores/system-config.core.ts | 2 +- server/src/cores/user.core.ts | 4 +- server/src/domain/activity/activity.dto.ts | 2 +- .../src/domain/activity/activity.service.ts | 2 +- server/src/domain/album/album-response.dto.ts | 2 +- server/src/domain/album/album.service.ts | 6 +- .../src/domain/album/dto/album-update.dto.ts | 2 +- server/src/domain/api-key/api-key.service.ts | 2 +- server/src/domain/asset/asset.service.spec.ts | 2 +- server/src/domain/asset/asset.service.ts | 4 +- .../domain/asset/dto/asset-statistics.dto.ts | 2 +- .../src/domain/asset/dto/time-bucket.dto.ts | 2 +- .../asset/response-dto/asset-response.dto.ts | 4 +- .../asset/response-dto/exif-response.dto.ts | 2 +- .../response-dto/smart-info-response.dto.ts | 2 +- server/src/domain/audit/audit.dto.ts | 4 +- server/src/domain/audit/audit.service.spec.ts | 2 +- server/src/domain/audit/audit.service.ts | 4 +- server/src/domain/auth/auth.dto.ts | 8 +-- server/src/domain/auth/auth.service.spec.ts | 2 +- server/src/domain/auth/auth.service.ts | 4 +- server/src/domain/domain.constant.ts | 2 +- .../src/domain/download/download.service.ts | 2 +- server/src/domain/job/job.service.spec.ts | 2 +- server/src/domain/job/job.service.ts | 2 +- server/src/domain/library/library.dto.ts | 2 +- .../domain/library/library.service.spec.ts | 8 +-- server/src/domain/library/library.service.ts | 4 +- server/src/domain/media/media.service.spec.ts | 6 +- server/src/domain/media/media.service.ts | 6 +- server/src/domain/media/media.util.ts | 8 +-- .../domain/metadata/metadata.service.spec.ts | 6 +- .../src/domain/metadata/metadata.service.ts | 4 +- .../domain/partner/partner.service.spec.ts | 2 +- server/src/domain/partner/partner.service.ts | 2 +- server/src/domain/person/person.dto.ts | 4 +- .../src/domain/person/person.service.spec.ts | 4 +- server/src/domain/person/person.service.ts | 4 +- server/src/domain/search/dto/search.dto.ts | 6 +- .../src/domain/search/search.service.spec.ts | 2 +- server/src/domain/search/search.service.ts | 4 +- .../server-info/server-info.service.spec.ts | 2 +- .../domain/server-info/server-info.service.ts | 2 +- .../shared-link/shared-link-response.dto.ts | 2 +- .../src/domain/shared-link/shared-link.dto.ts | 2 +- .../shared-link/shared-link.service.spec.ts | 2 +- .../domain/shared-link/shared-link.service.ts | 4 +- .../smart-info/smart-info.service.spec.ts | 4 +- .../storage-template.service.spec.ts | 4 +- .../storage-template.service.ts | 6 +- .../dto/system-config-ffmpeg.dto.ts | 2 +- .../dto/system-config-logging.dto.ts | 2 +- .../dto/system-config-thumbnail.dto.ts | 2 +- .../system-config/dto/system-config.dto.ts | 2 +- .../system-config.service.spec.ts | 2 +- .../system-config/system-config.service.ts | 2 +- server/src/domain/tag/tag-response.dto.ts | 2 +- server/src/domain/tag/tag.dto.ts | 2 +- server/src/domain/tag/tag.service.spec.ts | 2 +- server/src/domain/user/dto/update-user.dto.ts | 2 +- .../user/response-dto/user-response.dto.ts | 2 +- server/src/domain/user/user.service.spec.ts | 2 +- server/src/domain/user/user.service.ts | 2 +- .../{infra => }/entities/activity.entity.ts | 6 +- .../src/{infra => }/entities/album.entity.ts | 6 +- .../{infra => }/entities/api-key.entity.ts | 2 +- .../{infra => }/entities/asset-face.entity.ts | 4 +- .../entities/asset-job-status.entity.ts | 2 +- .../entities/asset-stack.entity.ts | 2 +- .../src/{infra => }/entities/asset.entity.ts | 22 ++++---- .../src/{infra => }/entities/audit.entity.ts | 0 .../src/{infra => }/entities/exif.entity.ts | 2 +- .../entities/geodata-places.entity.ts | 0 server/src/entities/index.ts | 47 ++++++++++++++++ .../{infra => }/entities/library.entity.ts | 4 +- .../src/{infra => }/entities/move.entity.ts | 0 .../{infra => }/entities/partner.entity.ts | 2 +- .../src/{infra => }/entities/person.entity.ts | 4 +- .../entities/shared-link.entity.ts | 6 +- .../{infra => }/entities/smart-info.entity.ts | 2 +- .../entities/smart-search.entity.ts | 2 +- .../entities/system-config.entity.ts | 0 .../entities/system-metadata.entity.ts | 0 server/src/{infra => }/entities/tag.entity.ts | 4 +- .../{infra => }/entities/user-token.entity.ts | 2 +- .../src/{infra => }/entities/user.entity.ts | 4 +- server/src/immich-admin/main.ts | 2 +- .../immich/api-v1/asset/asset-repository.ts | 4 +- .../immich/api-v1/asset/asset.service.spec.ts | 4 +- .../src/immich/api-v1/asset/asset.service.ts | 4 +- server/src/immich/app.module.ts | 4 +- server/src/infra/database.config.ts | 8 +-- server/src/infra/entities/index.ts | 47 ---------------- server/src/infra/infra.module.ts | 56 +++++++++---------- server/src/infra/infra.utils.ts | 2 +- server/src/infra/logger.ts | 2 +- server/src/infra/sql-generator/index.ts | 34 +++++------ server/src/interfaces/activity.repository.ts | 4 +- server/src/interfaces/album.repository.ts | 2 +- server/src/interfaces/api-key.repository.ts | 2 +- .../src/interfaces/asset-stack.repository.ts | 2 +- server/src/interfaces/asset.repository.ts | 8 +-- server/src/interfaces/audit.repository.ts | 2 +- .../interfaces/communication.repository.ts | 2 +- server/src/interfaces/library.repository.ts | 2 +- server/src/interfaces/media.repository.ts | 2 +- server/src/interfaces/move.repository.ts | 2 +- server/src/interfaces/partner.repository.ts | 2 +- server/src/interfaces/person.repository.ts | 6 +- server/src/interfaces/search.repository.ts | 8 +-- .../src/interfaces/shared-link.repository.ts | 2 +- .../interfaces/system-config.repository.ts | 2 +- .../interfaces/system-metadata.repository.ts | 2 +- server/src/interfaces/tag.repository.ts | 4 +- .../src/interfaces/user-token.repository.ts | 2 +- server/src/interfaces/user.repository.ts | 2 +- .../1645130759468-CreateUserTable.ts | 0 .../1645130777674-CreateDeviceInfoTable.ts | 0 .../1645130805273-CreateAssetsTable.ts | 0 .../1645130817965-CreateExifTable.ts | 0 .../1645130870184-CreateSmartInfoTable.ts | 0 .../1646249209023-AddExifTextSearchColumn.ts | 0 ...1646249734844-CreateExifTextSearchIndex.ts | 0 .../1646709533213-AddRegionCityToExIf.ts | 0 ...46710459852-AddLocationToExifTextSearch.ts | 0 ...648317474768-AddObjectColumnToSmartInfo.ts | 0 ...16111-CreateSharedAlbumAndRelatedTables.ts | 0 ...3525943-UpdateUserTableWithAdminAndName.ts | 0 ...3214255670-UpdateAssetTableWithWebpPath.ts | 0 ...583-UpdateAssetTableWithEncodeVideoPath.ts | 0 .../1655401127251-RenameSharedAlbums.ts | 0 ...56338626260-RenameIsFirstLoggedInColumn.ts | 0 ...656888591977-RenameAssetAlbumIdSequence.ts | 0 ...6888918620-DropExifTextSearchableColumn.ts | 0 ...1566-MatchMigrationsWithTypeORMEntities.ts | 0 ...470248-AddExifImageNameAsSearchableText.ts | 0 .../migrations/1661011331242-AddCaption.ts | 0 ...919411-ChangeExifFileSizeInByteToBigInt.ts | 0 .../1661881837496-AddAssetChecksum.ts | 0 ...UpdateAssetTableWithNewUniqueConstraint.ts | 0 ...365521-FixTimestampDataTypeInAssetTable.ts | 0 .../1665540663419-CreateSystemConfigTable.ts | 0 ...60744-AddingDeletedAtColumnInUserEntity.ts | 0 ...-AddLivePhotosRelatedColumnToAssetTable.ts | 0 .../1668835311083-UpdateUserTableForOIDC.ts | 0 .../migrations/1670104716264-OAuthId.ts | 0 .../1670257571385-CreateTagsTable.ts | 0 .../1670607437008-TruncateOldConfigItems.ts | 0 ...0633210032-AddUserEmailUniqueConstraint.ts | 0 .../1672109862870-DropSaltColumn.ts | 0 .../migrations/1672502270115-AddAPIKeys.ts | 0 .../1673150490490-AddSharedLinkTable.ts | 0 ...907194740-AddMorePermissionToSharedLink.ts | 0 ...4263302005-RemoveVideoCodecConfigOption.ts | 0 .../1674342044239-CreateUserTokenEntity.ts | 0 ...757936889-AlterExifExposureTimeToString.ts | 0 .../1674774248319-TruncateAPIKeys.ts | 0 ...9-AddSharedLinkUserForeignKeyConstraint.ts | 0 ...2-AddUpdatedAtColumnToAlbumsUsersAssets.ts | 0 ...909594-AddAlbumUserForeignKeyConstraint.ts | 0 .../1675808874445-APIKeyUUIDPrimaryKey.ts | 0 .../1675812532822-FixAlbumEntityTypeORM.ts | 0 .../1676437878377-AppleContentIdentifier.ts | 0 .../1676680127415-FixAssetRelations.ts | 0 .../1676721296440-AssetCreatedAtField.ts | 0 ...1676848629119-ExifEntityDefinitionFixes.ts | 0 ...8694786-SharedLinkEntityDefinitionFixes.ts | 0 ...52143506-SmartInfoEntityDefinitionFixes.ts | 0 .../1677497925328-AddExifTimeZone.ts | 0 ...43119-AddIndexForAlbumInSharedLinkTable.ts | 0 .../1677613712565-AlbumThumbnailRelation.ts | 0 .../1677971458822-AddCLIPEncodeDataColumn.ts | 0 .../1679751316282-UpdateTranscodeOption.ts | 0 .../1679901204458-ClipEmbeddingFloat4.ts | 0 .../1680632845740-AddIsArchivedColumn.ts | 0 ...680694465853-RemoveRedundantConstraints.ts | 0 ...4628393-AddOriginalFileNameToAssetTable.ts | 0 ...1159594469-RemoveImageNameFromEXIFTable.ts | 0 .../1682371561743-FixNullableRelations.ts | 0 .../1682371791038-AddDeviceInfoToUserToken.ts | 0 .../1682710252424-DropDeviceInfoTable.ts | 0 .../1683808254676-AddPartnersTable.ts | 0 .../1684255168091-AddFacialTables.ts | 0 .../1684273840676-AddSidecarFile.ts | 0 .../1684328185099-RequireChecksumNotNull.ts | 0 .../1684410565398-AddStorageLabel.ts | 0 ...867360825-AddUserTokenAndAPIKeyCascades.ts | 0 .../1685044328272-AddSharedLinkCascade.ts | 0 .../1685370430343-UserDatesTimestamptz.ts | 0 .../1685731372040-RemoveInvalidCoordinates.ts | 0 .../migrations/1686584273471-ImportAsset.ts | 0 .../1686762895180-AddThumbhashColumn.ts | 0 .../1688241394489-AddDetectFaceResultInfo.ts | 0 .../1688392120838-AddLibraryTable.ts | 0 .../1689001889950-DropMimeTypeColumn.ts | 0 .../1689281196844-AddHiddenFaces.ts | 0 .../migrations/1690469489288-Panoramas.ts | 0 .../1691209138541-AddAlbumDescription.ts | 0 .../1691600216749-UserMemoryPreference.ts | 0 .../1692057328660-fixGPSNullIsland.ts | 0 .../1692112147855-AddPersonBirthDate.ts | 0 .../migrations/1692804658140-AddAuditTable.ts | 0 .../1693236627291-RenameMLEnableFlags.ts | 0 .../1693833336881-AddPersonFaceAssetId.ts | 0 .../1694204416744-AddAssetDeletedAtColumn.ts | 0 .../1694525143117-AddLocalDateTime.ts | 0 .../1694638413248-AddDeletedAtToAlbums.ts | 0 .../1694750975773-AddExifColorSpace.ts | 0 .../1694758412194-UpdateOpusCodecToLibopus.ts | 0 .../1695354433573-AddStackParentIdToAssets.ts | 0 .../1695660378655-RemoveInvalidCoordinates.ts | 0 .../1696888644031-AddOriginalPathIndex.ts | 0 .../migrations/1696968880063-AddMoveTable.ts | 0 .../migrations/1697272818851-UnassignFace.ts | 0 .../1698290827089-AddPasswordToSharedLinks.ts | 0 .../migrations/1698693294632-AddActivity.ts | 0 .../1699268680508-DisableActivity.ts | 0 .../1699322864544-UserNameConsolidation.ts | 0 .../migrations/1699345863886-AddJobStatus.ts | 0 ...562570201-AdddInTimelineToPartnersTable.ts | 0 .../1699727044012-EditFaceAssetForeignKey.ts | 0 .../1699889987493-AddAvatarColor.ts | 0 .../1700345818045-SystemMetadata.ts | 0 .../migrations/1700362016675-Geodata.ts | 0 .../migrations/1700713871511-UsePgVectors.ts | 0 .../1700713994428-AddCLIPEmbeddingIndex.ts | 0 .../1700714033632-AddFaceEmbeddingIndex.ts | 0 .../1700714072055-AddSmartInfoTagsIndex.ts | 0 ...14140297-CreateSmartInfoTextSearchIndex.ts | 0 .../1700752078178-AddAssetFaceIndicies.ts | 0 .../1701665867595-AddExifCityIndex.ts | 0 ...02084989965-AddWebSocketAttachmentTable.ts | 0 .../1702257380990-DropNullIslandLatLong.ts | 0 ...fyFutureBirthDatesAndAddCheckConstraint.ts | 0 ...702942303661-FixRemovedAssetsSharedLink.ts | 0 .../1703035138085-AddAutoStackId.ts | 0 ...orageTemplateOnForExistingInstallations.ts | 0 .../1704382918223-AddQuotaColumnsToUser.ts | 0 ...faultOnboardingForExistingInstallations.ts | 0 ...43345360-SetAssetFaceNullOnPersonDelete.ts | 0 .../1705094221536-AddMetadataExtractedAt.ts | 0 .../1705306747072-AddOriginalFileNameIndex.ts | 0 .../1705363967169-CreateAssetStackTable.ts | 0 .../1707000751533-AddVectorsToSearchPath.ts | 0 .../1708059341865-GeodataLocationSearch.ts | 0 .../1708116312820-GeonamesEnhancement.ts | 0 .../1708227417898-AddFileCreatedAtIndex.ts | 0 .../1708425975121-RemoveExternalPath.ts | 0 ...0004123-RemoveLibraryWatchPollingOption.ts | 0 ...140355-AddAssetOriginalPathTrigramIndex.ts | 0 ...63765506-AddExtensionToOriginalFileName.ts | 0 .../1709825430031-CascadeSharedLinksDelete.ts | 0 .../migrations/1709870213078-AddUserStatus.ts | 0 .../1710182081326-AscendingOrderAlbum.ts | 0 .../1710293990203-AddAssetRelationIndices.ts | 0 .../repositories/access.repository.ts | 18 +++--- .../repositories/activity.repository.ts | 2 +- .../repositories/album.repository.ts | 4 +- .../repositories/api-key.repository.ts | 2 +- .../repositories/asset-stack.repository.ts | 2 +- .../repositories/asset.repository.ts | 10 ++-- .../repositories/audit.repository.ts | 2 +- .../repositories/communication.repository.ts | 0 .../repositories/crypto.repository.ts | 0 .../repositories/database.repository.ts | 0 .../repositories/filesystem.provider.spec.ts | 2 +- .../repositories/filesystem.provider.ts | 0 .../repositories/job.repository.ts | 0 .../repositories/library.repository.ts | 2 +- .../machine-learning.repository.ts | 0 .../repositories/media.repository.ts | 2 +- .../repositories/metadata.repository.ts | 6 +- .../repositories/move.repository.ts | 2 +- .../repositories/partner.repository.ts | 2 +- .../repositories/person.repository.ts | 6 +- .../repositories/search.repository.ts | 10 ++-- .../repositories/server-info.repository.ts | 0 .../repositories/shared-link.repository.ts | 2 +- .../repositories/system-config.repository.ts | 2 +- .../system-metadata.repository.ts | 2 +- .../repositories/tag.repository.ts | 4 +- .../repositories/user-token.repository.ts | 2 +- .../repositories/user.repository.ts | 4 +- .../subscribers/audit.subscriber.ts | 6 +- server/src/test-utils/utils.ts | 2 +- server/test/fixtures/activity.stub.ts | 2 +- server/test/fixtures/album.stub.ts | 2 +- server/test/fixtures/api-key.stub.ts | 2 +- server/test/fixtures/asset.stub.ts | 6 +- server/test/fixtures/audit.stub.ts | 2 +- server/test/fixtures/auth.stub.ts | 6 +- server/test/fixtures/face.stub.ts | 2 +- server/test/fixtures/library.stub.ts | 2 +- server/test/fixtures/partner.stub.ts | 2 +- server/test/fixtures/person.stub.ts | 2 +- server/test/fixtures/shared-link.stub.ts | 8 +-- server/test/fixtures/system-config.stub.ts | 2 +- server/test/fixtures/tag.stub.ts | 2 +- server/test/fixtures/user-token.stub.ts | 2 +- server/test/fixtures/user.stub.ts | 2 +- 310 files changed, 358 insertions(+), 362 deletions(-) rename server/src/{infra => }/entities/activity.entity.ts (86%) rename server/src/{infra => }/entities/album.entity.ts (88%) rename server/src/{infra => }/entities/api-key.entity.ts (90%) rename server/src/{infra => }/entities/asset-face.entity.ts (91%) rename server/src/{infra => }/entities/asset-job-status.entity.ts (88%) rename server/src/{infra => }/entities/asset-stack.entity.ts (88%) rename server/src/{infra => }/entities/asset.entity.ts (85%) rename server/src/{infra => }/entities/audit.entity.ts (100%) rename server/src/{infra => }/entities/exif.entity.ts (98%) rename server/src/{infra => }/entities/geodata-places.entity.ts (100%) create mode 100644 server/src/entities/index.ts rename server/src/{infra => }/entities/library.entity.ts (90%) rename server/src/{infra => }/entities/move.entity.ts (100%) rename server/src/{infra => }/entities/partner.entity.ts (92%) rename server/src/{infra => }/entities/person.entity.ts (88%) rename server/src/{infra => }/entities/shared-link.entity.ts (89%) rename server/src/{infra => }/entities/smart-info.entity.ts (89%) rename server/src/{infra => }/entities/smart-search.entity.ts (89%) rename server/src/{infra => }/entities/system-config.entity.ts (100%) rename server/src/{infra => }/entities/system-metadata.entity.ts (100%) rename server/src/{infra => }/entities/tag.entity.ts (88%) rename server/src/{infra => }/entities/user-token.entity.ts (91%) rename server/src/{infra => }/entities/user.entity.ts (93%) delete mode 100644 server/src/infra/entities/index.ts rename server/src/{infra => }/migrations/1645130759468-CreateUserTable.ts (100%) rename server/src/{infra => }/migrations/1645130777674-CreateDeviceInfoTable.ts (100%) rename server/src/{infra => }/migrations/1645130805273-CreateAssetsTable.ts (100%) rename server/src/{infra => }/migrations/1645130817965-CreateExifTable.ts (100%) rename server/src/{infra => }/migrations/1645130870184-CreateSmartInfoTable.ts (100%) rename server/src/{infra => }/migrations/1646249209023-AddExifTextSearchColumn.ts (100%) rename server/src/{infra => }/migrations/1646249734844-CreateExifTextSearchIndex.ts (100%) rename server/src/{infra => }/migrations/1646709533213-AddRegionCityToExIf.ts (100%) rename server/src/{infra => }/migrations/1646710459852-AddLocationToExifTextSearch.ts (100%) rename server/src/{infra => }/migrations/1648317474768-AddObjectColumnToSmartInfo.ts (100%) rename server/src/{infra => }/migrations/1649643216111-CreateSharedAlbumAndRelatedTables.ts (100%) rename server/src/{infra => }/migrations/1652633525943-UpdateUserTableWithAdminAndName.ts (100%) rename server/src/{infra => }/migrations/1653214255670-UpdateAssetTableWithWebpPath.ts (100%) rename server/src/{infra => }/migrations/1654299904583-UpdateAssetTableWithEncodeVideoPath.ts (100%) rename server/src/{infra => }/migrations/1655401127251-RenameSharedAlbums.ts (100%) rename server/src/{infra => }/migrations/1656338626260-RenameIsFirstLoggedInColumn.ts (100%) rename server/src/{infra => }/migrations/1656888591977-RenameAssetAlbumIdSequence.ts (100%) rename server/src/{infra => }/migrations/1656888918620-DropExifTextSearchableColumn.ts (100%) rename server/src/{infra => }/migrations/1656889061566-MatchMigrationsWithTypeORMEntities.ts (100%) rename server/src/{infra => }/migrations/1658860470248-AddExifImageNameAsSearchableText.ts (100%) rename server/src/{infra => }/migrations/1661011331242-AddCaption.ts (100%) rename server/src/{infra => }/migrations/1661528919411-ChangeExifFileSizeInByteToBigInt.ts (100%) rename server/src/{infra => }/migrations/1661881837496-AddAssetChecksum.ts (100%) rename server/src/{infra => }/migrations/1661971370662-UpdateAssetTableWithNewUniqueConstraint.ts (100%) rename server/src/{infra => }/migrations/1662427365521-FixTimestampDataTypeInAssetTable.ts (100%) rename server/src/{infra => }/migrations/1665540663419-CreateSystemConfigTable.ts (100%) rename server/src/{infra => }/migrations/1667762360744-AddingDeletedAtColumnInUserEntity.ts (100%) rename server/src/{infra => }/migrations/1668383120461-AddLivePhotosRelatedColumnToAssetTable.ts (100%) rename server/src/{infra => }/migrations/1668835311083-UpdateUserTableForOIDC.ts (100%) rename server/src/{infra => }/migrations/1670104716264-OAuthId.ts (100%) rename server/src/{infra => }/migrations/1670257571385-CreateTagsTable.ts (100%) rename server/src/{infra => }/migrations/1670607437008-TruncateOldConfigItems.ts (100%) rename server/src/{infra => }/migrations/1670633210032-AddUserEmailUniqueConstraint.ts (100%) rename server/src/{infra => }/migrations/1672109862870-DropSaltColumn.ts (100%) rename server/src/{infra => }/migrations/1672502270115-AddAPIKeys.ts (100%) rename server/src/{infra => }/migrations/1673150490490-AddSharedLinkTable.ts (100%) rename server/src/{infra => }/migrations/1673907194740-AddMorePermissionToSharedLink.ts (100%) rename server/src/{infra => }/migrations/1674263302005-RemoveVideoCodecConfigOption.ts (100%) rename server/src/{infra => }/migrations/1674342044239-CreateUserTokenEntity.ts (100%) rename server/src/{infra => }/migrations/1674757936889-AlterExifExposureTimeToString.ts (100%) rename server/src/{infra => }/migrations/1674774248319-TruncateAPIKeys.ts (100%) rename server/src/{infra => }/migrations/1674939383309-AddSharedLinkUserForeignKeyConstraint.ts (100%) rename server/src/{infra => }/migrations/1675667878312-AddUpdatedAtColumnToAlbumsUsersAssets.ts (100%) rename server/src/{infra => }/migrations/1675701909594-AddAlbumUserForeignKeyConstraint.ts (100%) rename server/src/{infra => }/migrations/1675808874445-APIKeyUUIDPrimaryKey.ts (100%) rename server/src/{infra => }/migrations/1675812532822-FixAlbumEntityTypeORM.ts (100%) rename server/src/{infra => }/migrations/1676437878377-AppleContentIdentifier.ts (100%) rename server/src/{infra => }/migrations/1676680127415-FixAssetRelations.ts (100%) rename server/src/{infra => }/migrations/1676721296440-AssetCreatedAtField.ts (100%) rename server/src/{infra => }/migrations/1676848629119-ExifEntityDefinitionFixes.ts (100%) rename server/src/{infra => }/migrations/1676848694786-SharedLinkEntityDefinitionFixes.ts (100%) rename server/src/{infra => }/migrations/1676852143506-SmartInfoEntityDefinitionFixes.ts (100%) rename server/src/{infra => }/migrations/1677497925328-AddExifTimeZone.ts (100%) rename server/src/{infra => }/migrations/1677535643119-AddIndexForAlbumInSharedLinkTable.ts (100%) rename server/src/{infra => }/migrations/1677613712565-AlbumThumbnailRelation.ts (100%) rename server/src/{infra => }/migrations/1677971458822-AddCLIPEncodeDataColumn.ts (100%) rename server/src/{infra => }/migrations/1679751316282-UpdateTranscodeOption.ts (100%) rename server/src/{infra => }/migrations/1679901204458-ClipEmbeddingFloat4.ts (100%) rename server/src/{infra => }/migrations/1680632845740-AddIsArchivedColumn.ts (100%) rename server/src/{infra => }/migrations/1680694465853-RemoveRedundantConstraints.ts (100%) rename server/src/{infra => }/migrations/1681144628393-AddOriginalFileNameToAssetTable.ts (100%) rename server/src/{infra => }/migrations/1681159594469-RemoveImageNameFromEXIFTable.ts (100%) rename server/src/{infra => }/migrations/1682371561743-FixNullableRelations.ts (100%) rename server/src/{infra => }/migrations/1682371791038-AddDeviceInfoToUserToken.ts (100%) rename server/src/{infra => }/migrations/1682710252424-DropDeviceInfoTable.ts (100%) rename server/src/{infra => }/migrations/1683808254676-AddPartnersTable.ts (100%) rename server/src/{infra => }/migrations/1684255168091-AddFacialTables.ts (100%) rename server/src/{infra => }/migrations/1684273840676-AddSidecarFile.ts (100%) rename server/src/{infra => }/migrations/1684328185099-RequireChecksumNotNull.ts (100%) rename server/src/{infra => }/migrations/1684410565398-AddStorageLabel.ts (100%) rename server/src/{infra => }/migrations/1684867360825-AddUserTokenAndAPIKeyCascades.ts (100%) rename server/src/{infra => }/migrations/1685044328272-AddSharedLinkCascade.ts (100%) rename server/src/{infra => }/migrations/1685370430343-UserDatesTimestamptz.ts (100%) rename server/src/{infra => }/migrations/1685731372040-RemoveInvalidCoordinates.ts (100%) rename server/src/{infra => }/migrations/1686584273471-ImportAsset.ts (100%) rename server/src/{infra => }/migrations/1686762895180-AddThumbhashColumn.ts (100%) rename server/src/{infra => }/migrations/1688241394489-AddDetectFaceResultInfo.ts (100%) rename server/src/{infra => }/migrations/1688392120838-AddLibraryTable.ts (100%) rename server/src/{infra => }/migrations/1689001889950-DropMimeTypeColumn.ts (100%) rename server/src/{infra => }/migrations/1689281196844-AddHiddenFaces.ts (100%) rename server/src/{infra => }/migrations/1690469489288-Panoramas.ts (100%) rename server/src/{infra => }/migrations/1691209138541-AddAlbumDescription.ts (100%) rename server/src/{infra => }/migrations/1691600216749-UserMemoryPreference.ts (100%) rename server/src/{infra => }/migrations/1692057328660-fixGPSNullIsland.ts (100%) rename server/src/{infra => }/migrations/1692112147855-AddPersonBirthDate.ts (100%) rename server/src/{infra => }/migrations/1692804658140-AddAuditTable.ts (100%) rename server/src/{infra => }/migrations/1693236627291-RenameMLEnableFlags.ts (100%) rename server/src/{infra => }/migrations/1693833336881-AddPersonFaceAssetId.ts (100%) rename server/src/{infra => }/migrations/1694204416744-AddAssetDeletedAtColumn.ts (100%) rename server/src/{infra => }/migrations/1694525143117-AddLocalDateTime.ts (100%) rename server/src/{infra => }/migrations/1694638413248-AddDeletedAtToAlbums.ts (100%) rename server/src/{infra => }/migrations/1694750975773-AddExifColorSpace.ts (100%) rename server/src/{infra => }/migrations/1694758412194-UpdateOpusCodecToLibopus.ts (100%) rename server/src/{infra => }/migrations/1695354433573-AddStackParentIdToAssets.ts (100%) rename server/src/{infra => }/migrations/1695660378655-RemoveInvalidCoordinates.ts (100%) rename server/src/{infra => }/migrations/1696888644031-AddOriginalPathIndex.ts (100%) rename server/src/{infra => }/migrations/1696968880063-AddMoveTable.ts (100%) rename server/src/{infra => }/migrations/1697272818851-UnassignFace.ts (100%) rename server/src/{infra => }/migrations/1698290827089-AddPasswordToSharedLinks.ts (100%) rename server/src/{infra => }/migrations/1698693294632-AddActivity.ts (100%) rename server/src/{infra => }/migrations/1699268680508-DisableActivity.ts (100%) rename server/src/{infra => }/migrations/1699322864544-UserNameConsolidation.ts (100%) rename server/src/{infra => }/migrations/1699345863886-AddJobStatus.ts (100%) rename server/src/{infra => }/migrations/1699562570201-AdddInTimelineToPartnersTable.ts (100%) rename server/src/{infra => }/migrations/1699727044012-EditFaceAssetForeignKey.ts (100%) rename server/src/{infra => }/migrations/1699889987493-AddAvatarColor.ts (100%) rename server/src/{infra => }/migrations/1700345818045-SystemMetadata.ts (100%) rename server/src/{infra => }/migrations/1700362016675-Geodata.ts (100%) rename server/src/{infra => }/migrations/1700713871511-UsePgVectors.ts (100%) rename server/src/{infra => }/migrations/1700713994428-AddCLIPEmbeddingIndex.ts (100%) rename server/src/{infra => }/migrations/1700714033632-AddFaceEmbeddingIndex.ts (100%) rename server/src/{infra => }/migrations/1700714072055-AddSmartInfoTagsIndex.ts (100%) rename server/src/{infra => }/migrations/1700714140297-CreateSmartInfoTextSearchIndex.ts (100%) rename server/src/{infra => }/migrations/1700752078178-AddAssetFaceIndicies.ts (100%) rename server/src/{infra => }/migrations/1701665867595-AddExifCityIndex.ts (100%) rename server/src/{infra => }/migrations/1702084989965-AddWebSocketAttachmentTable.ts (100%) rename server/src/{infra => }/migrations/1702257380990-DropNullIslandLatLong.ts (100%) rename server/src/{infra => }/migrations/1702938928766-NullifyFutureBirthDatesAndAddCheckConstraint.ts (100%) rename server/src/{infra => }/migrations/1702942303661-FixRemovedAssetsSharedLink.ts (100%) rename server/src/{infra => }/migrations/1703035138085-AddAutoStackId.ts (100%) rename server/src/{infra => }/migrations/1703288449127-DefaultStorageTemplateOnForExistingInstallations.ts (100%) rename server/src/{infra => }/migrations/1704382918223-AddQuotaColumnsToUser.ts (100%) rename server/src/{infra => }/migrations/1704571051932-DefaultOnboardingForExistingInstallations.ts (100%) rename server/src/{infra => }/migrations/1704943345360-SetAssetFaceNullOnPersonDelete.ts (100%) rename server/src/{infra => }/migrations/1705094221536-AddMetadataExtractedAt.ts (100%) rename server/src/{infra => }/migrations/1705306747072-AddOriginalFileNameIndex.ts (100%) rename server/src/{infra => }/migrations/1705363967169-CreateAssetStackTable.ts (100%) rename server/src/{infra => }/migrations/1707000751533-AddVectorsToSearchPath.ts (100%) rename server/src/{infra => }/migrations/1708059341865-GeodataLocationSearch.ts (100%) rename server/src/{infra => }/migrations/1708116312820-GeonamesEnhancement.ts (100%) rename server/src/{infra => }/migrations/1708227417898-AddFileCreatedAtIndex.ts (100%) rename server/src/{infra => }/migrations/1708425975121-RemoveExternalPath.ts (100%) rename server/src/{infra => }/migrations/1709150004123-RemoveLibraryWatchPollingOption.ts (100%) rename server/src/{infra => }/migrations/1709608140355-AddAssetOriginalPathTrigramIndex.ts (100%) rename server/src/{infra => }/migrations/1709763765506-AddExtensionToOriginalFileName.ts (100%) rename server/src/{infra => }/migrations/1709825430031-CascadeSharedLinksDelete.ts (100%) rename server/src/{infra => }/migrations/1709870213078-AddUserStatus.ts (100%) rename server/src/{infra => }/migrations/1710182081326-AscendingOrderAlbum.ts (100%) rename server/src/{infra => }/migrations/1710293990203-AddAssetRelationIndices.ts (100%) rename server/src/{infra => }/repositories/access.repository.ts (95%) rename server/src/{infra => }/repositories/activity.repository.ts (96%) rename server/src/{infra => }/repositories/album.repository.ts (98%) rename server/src/{infra => }/repositories/api-key.repository.ts (96%) rename server/src/{infra => }/repositories/asset-stack.repository.ts (94%) rename server/src/{infra => }/repositories/asset.repository.ts (98%) rename server/src/{infra => }/repositories/audit.repository.ts (94%) rename server/src/{infra => }/repositories/communication.repository.ts (100%) rename server/src/{infra => }/repositories/crypto.repository.ts (100%) rename server/src/{infra => }/repositories/database.repository.ts (100%) rename server/src/{infra => }/repositories/filesystem.provider.spec.ts (98%) rename server/src/{infra => }/repositories/filesystem.provider.ts (100%) rename server/src/{infra => }/repositories/job.repository.ts (100%) rename server/src/{infra => }/repositories/library.repository.ts (98%) rename server/src/{infra => }/repositories/machine-learning.repository.ts (100%) rename server/src/{infra => }/repositories/media.repository.ts (98%) rename server/src/{infra => }/repositories/metadata.repository.ts (97%) rename server/src/{infra => }/repositories/move.repository.ts (93%) rename server/src/{infra => }/repositories/partner.repository.ts (95%) rename server/src/{infra => }/repositories/person.repository.ts (97%) rename server/src/{infra => }/repositories/search.repository.ts (97%) rename server/src/{infra => }/repositories/server-info.repository.ts (100%) rename server/src/{infra => }/repositories/shared-link.repository.ts (96%) rename server/src/{infra => }/repositories/system-config.repository.ts (94%) rename server/src/{infra => }/repositories/system-metadata.repository.ts (90%) rename server/src/{infra => }/repositories/tag.repository.ts (96%) rename server/src/{infra => }/repositories/user-token.repository.ts (95%) rename server/src/{infra => }/repositories/user.repository.ts (97%) rename server/src/{infra => }/subscribers/audit.subscriber.ts (84%) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1d57b3a84a..13f5a73a15 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -329,14 +329,14 @@ jobs: - name: Generate new migrations continue-on-error: true - run: npm run typeorm:migrations:generate ./src/infra/migrations/TestMigration + run: npm run typeorm:migrations:generate ./src/migrations/TestMigration - name: Find file changes uses: tj-actions/verify-changed-files@v19 id: verify-changed-files with: files: | - server/src/infra/migrations/ + server/src/migrations/ - name: Verify migration files have not changed if: steps.verify-changed-files.outputs.files_changed == 'true' run: | diff --git a/docs/docs/developer/database-migrations.md b/docs/docs/developer/database-migrations.md index a78274a619..eccf78b44d 100644 --- a/docs/docs/developer/database-migrations.md +++ b/docs/docs/developer/database-migrations.md @@ -1,6 +1,6 @@ # Database Migrations -After making any changes in the `server/src/infra/entities`, a database migration need to run in order to register the changes in the database. Follow the steps below to create a new migration. +After making any changes in the `server/src/entities`, a database migration need to run in order to register the changes in the database. Follow the steps below to create a new migration. 1. Run the command @@ -9,6 +9,6 @@ npm run typeorm:migrations:generate ./src/infra/ ``` 2. Check if the migration file makes sense. -3. Move the migration file to folder `./server/src/infra/migrations` in your code editor. +3. Move the migration file to folder `./server/src/migrations` in your code editor. The server will automatically detect `*.ts` file changes and restart. Part of the server start-up process includes running any new migrations, so it will be applied immediately. diff --git a/server/e2e/jobs/jest-e2e.json b/server/e2e/jobs/jest-e2e.json index b9a238d838..b7e62d5f46 100644 --- a/server/e2e/jobs/jest-e2e.json +++ b/server/e2e/jobs/jest-e2e.json @@ -12,11 +12,11 @@ "collectCoverageFrom": [ "/src/**/*.(t|j)s", "!/src/**/*.spec.(t|s)s", - "!/src/infra/migrations/**" + "!/src/migrations/**" ], "coverageDirectory": "./coverage", "moduleNameMapper": { - "^test(|/.*)$": "/test/$1", - "^src(|/.*)$": "/src/$1" + "^test(|/.*)$": "/test/$1", + "^src(|/.*)$": "/src/$1" } } diff --git a/server/e2e/jobs/specs/library-watcher.e2e-spec.ts b/server/e2e/jobs/specs/library-watcher.e2e-spec.ts index a146bc8569..e8be570ca4 100644 --- a/server/e2e/jobs/specs/library-watcher.e2e-spec.ts +++ b/server/e2e/jobs/specs/library-watcher.e2e-spec.ts @@ -4,8 +4,8 @@ import path from 'node:path'; import { LoginResponseDto } from 'src/domain/auth/auth.dto'; import { LibraryResponseDto } from 'src/domain/library/library.dto'; import { LibraryService } from 'src/domain/library/library.service'; -import { AssetType } from 'src/infra/entities/asset.entity'; -import { LibraryType } from 'src/infra/entities/library.entity'; +import { AssetType } from 'src/entities/asset.entity'; +import { LibraryType } from 'src/entities/library.entity'; import { StorageEventType } from 'src/interfaces/storage.repository'; import { IMMICH_TEST_ASSET_PATH, diff --git a/server/e2e/jobs/specs/library.e2e-spec.ts b/server/e2e/jobs/specs/library.e2e-spec.ts index f67dd91782..c2839a7d12 100644 --- a/server/e2e/jobs/specs/library.e2e-spec.ts +++ b/server/e2e/jobs/specs/library.e2e-spec.ts @@ -2,7 +2,7 @@ import { api } from 'e2e/client'; import fs from 'node:fs'; import { LibraryController } from 'src/controllers/library.controller'; import { LoginResponseDto } from 'src/domain/auth/auth.dto'; -import { LibraryType } from 'src/infra/entities/library.entity'; +import { LibraryType } from 'src/entities/library.entity'; import { IMMICH_TEST_ASSET_PATH, IMMICH_TEST_ASSET_TEMP_PATH, restoreTempFolder, testApp } from 'src/test-utils/utils'; import request from 'supertest'; import { errorStub } from 'test/fixtures/error.stub'; diff --git a/server/package.json b/server/package.json index 30ba53b619..eb65eadf09 100644 --- a/server/package.json +++ b/server/package.json @@ -148,6 +148,8 @@ "collectCoverageFrom": [ "/src/**/*.(t|j)s", "!/src/infra/**/*", + "!/src/migrations/**/*", + "!/src/subscribers/**/*", "!/src/immich/controllers/**/*" ], "coverageDirectory": "./coverage", diff --git a/server/src/commands/list-users.command.ts b/server/src/commands/list-users.command.ts index eeda72d1c2..222833fad2 100644 --- a/server/src/commands/list-users.command.ts +++ b/server/src/commands/list-users.command.ts @@ -1,6 +1,6 @@ import { Command, CommandRunner } from 'nest-commander'; import { UserService } from 'src/domain/user/user.service'; -import { UserEntity } from 'src/infra/entities/user.entity'; +import { UserEntity } from 'src/entities/user.entity'; @Command({ name: 'list-users', diff --git a/server/src/config.ts b/server/src/config.ts index 01f3f1a1c0..b97f0bb7ea 100644 --- a/server/src/config.ts +++ b/server/src/config.ts @@ -4,7 +4,7 @@ import { QueueOptions } from 'bullmq'; import { RedisOptions } from 'ioredis'; import Joi from 'joi'; import { QueueName } from 'src/domain/job/job.constants'; -import { LogLevel } from 'src/infra/entities/system-config.entity'; +import { LogLevel } from 'src/entities/system-config.entity'; const WHEN_DB_URL_SET = Joi.when('DB_URL', { is: Joi.exist(), diff --git a/server/src/cores/access.core.ts b/server/src/cores/access.core.ts index 3896475244..f9e22bb6b2 100644 --- a/server/src/cores/access.core.ts +++ b/server/src/cores/access.core.ts @@ -1,6 +1,6 @@ import { BadRequestException, UnauthorizedException } from '@nestjs/common'; import { AuthDto } from 'src/domain/auth/auth.dto'; -import { SharedLinkEntity } from 'src/infra/entities/shared-link.entity'; +import { SharedLinkEntity } from 'src/entities/shared-link.entity'; import { IAccessRepository } from 'src/interfaces/access.repository'; import { setDifference, setIsEqual, setUnion } from 'src/utils'; diff --git a/server/src/cores/storage.core.ts b/server/src/cores/storage.core.ts index 39d9e12c96..8bf65b2482 100644 --- a/server/src/cores/storage.core.ts +++ b/server/src/cores/storage.core.ts @@ -1,9 +1,9 @@ import { dirname, join, resolve } from 'node:path'; import { SystemConfigCore } from 'src/cores/system-config.core'; import { APP_MEDIA_LOCATION } from 'src/domain/domain.constant'; -import { AssetEntity } from 'src/infra/entities/asset.entity'; -import { AssetPathType, PathType, PersonPathType } from 'src/infra/entities/move.entity'; -import { PersonEntity } from 'src/infra/entities/person.entity'; +import { AssetEntity } from 'src/entities/asset.entity'; +import { AssetPathType, PathType, PersonPathType } from 'src/entities/move.entity'; +import { PersonEntity } from 'src/entities/person.entity'; import { ImmichLogger } from 'src/infra/logger'; import { IAssetRepository } from 'src/interfaces/asset.repository'; import { ICryptoRepository } from 'src/interfaces/crypto.repository'; diff --git a/server/src/cores/system-config.core.ts b/server/src/cores/system-config.core.ts index 1bfab773d1..295a0e5ed5 100644 --- a/server/src/cores/system-config.core.ts +++ b/server/src/cores/system-config.core.ts @@ -20,7 +20,7 @@ import { TranscodeHWAccel, TranscodePolicy, VideoCodec, -} from 'src/infra/entities/system-config.entity'; +} from 'src/entities/system-config.entity'; import { ImmichLogger } from 'src/infra/logger'; import { ISystemConfigRepository } from 'src/interfaces/system-config.repository'; diff --git a/server/src/cores/user.core.ts b/server/src/cores/user.core.ts index 488c160368..d91f2bae59 100644 --- a/server/src/cores/user.core.ts +++ b/server/src/cores/user.core.ts @@ -1,8 +1,8 @@ import { BadRequestException, ForbiddenException } from '@nestjs/common'; import sanitize from 'sanitize-filename'; import { UserResponseDto } from 'src/domain/user/response-dto/user-response.dto'; -import { LibraryType } from 'src/infra/entities/library.entity'; -import { UserEntity } from 'src/infra/entities/user.entity'; +import { LibraryType } from 'src/entities/library.entity'; +import { UserEntity } from 'src/entities/user.entity'; import { ICryptoRepository } from 'src/interfaces/crypto.repository'; import { ILibraryRepository } from 'src/interfaces/library.repository'; import { IUserRepository } from 'src/interfaces/user.repository'; diff --git a/server/src/domain/activity/activity.dto.ts b/server/src/domain/activity/activity.dto.ts index 1bfbabd806..a9d8657783 100644 --- a/server/src/domain/activity/activity.dto.ts +++ b/server/src/domain/activity/activity.dto.ts @@ -1,7 +1,7 @@ import { ApiProperty } from '@nestjs/swagger'; import { IsEnum, IsNotEmpty, IsString, ValidateIf } from 'class-validator'; import { UserDto, mapSimpleUser } from 'src/domain/user/response-dto/user-response.dto'; -import { ActivityEntity } from 'src/infra/entities/activity.entity'; +import { ActivityEntity } from 'src/entities/activity.entity'; import { Optional, ValidateUUID } from 'src/validation'; export enum ReactionType { diff --git a/server/src/domain/activity/activity.service.ts b/server/src/domain/activity/activity.service.ts index 9ed8946f50..81d77fa8db 100644 --- a/server/src/domain/activity/activity.service.ts +++ b/server/src/domain/activity/activity.service.ts @@ -12,7 +12,7 @@ import { mapActivity, } from 'src/domain/activity/activity.dto'; import { AuthDto } from 'src/domain/auth/auth.dto'; -import { ActivityEntity } from 'src/infra/entities/activity.entity'; +import { ActivityEntity } from 'src/entities/activity.entity'; import { IAccessRepository } from 'src/interfaces/access.repository'; import { IActivityRepository } from 'src/interfaces/activity.repository'; diff --git a/server/src/domain/album/album-response.dto.ts b/server/src/domain/album/album-response.dto.ts index 663a463f2c..b016a1200b 100644 --- a/server/src/domain/album/album-response.dto.ts +++ b/server/src/domain/album/album-response.dto.ts @@ -2,7 +2,7 @@ import { ApiProperty } from '@nestjs/swagger'; import { AssetResponseDto, mapAsset } from 'src/domain/asset/response-dto/asset-response.dto'; import { AuthDto } from 'src/domain/auth/auth.dto'; import { UserResponseDto, mapUser } from 'src/domain/user/response-dto/user-response.dto'; -import { AlbumEntity, AssetOrder } from 'src/infra/entities/album.entity'; +import { AlbumEntity, AssetOrder } from 'src/entities/album.entity'; import { Optional } from 'src/validation'; export class AlbumResponseDto { diff --git a/server/src/domain/album/album.service.ts b/server/src/domain/album/album.service.ts index 77a6c6c467..4d459ea44d 100644 --- a/server/src/domain/album/album.service.ts +++ b/server/src/domain/album/album.service.ts @@ -14,9 +14,9 @@ import { AlbumInfoDto } from 'src/domain/album/dto/album.dto'; import { GetAlbumsDto } from 'src/domain/album/dto/get-albums.dto'; import { BulkIdErrorReason, BulkIdResponseDto, BulkIdsDto } from 'src/domain/asset/response-dto/asset-ids-response.dto'; import { AuthDto } from 'src/domain/auth/auth.dto'; -import { AlbumEntity } from 'src/infra/entities/album.entity'; -import { AssetEntity } from 'src/infra/entities/asset.entity'; -import { UserEntity } from 'src/infra/entities/user.entity'; +import { AlbumEntity } from 'src/entities/album.entity'; +import { AssetEntity } from 'src/entities/asset.entity'; +import { UserEntity } from 'src/entities/user.entity'; import { IAccessRepository } from 'src/interfaces/access.repository'; import { AlbumAssetCount, AlbumInfoOptions, IAlbumRepository } from 'src/interfaces/album.repository'; import { IAssetRepository } from 'src/interfaces/asset.repository'; diff --git a/server/src/domain/album/dto/album-update.dto.ts b/server/src/domain/album/dto/album-update.dto.ts index 1f329cb3c5..cf2d5f8c26 100644 --- a/server/src/domain/album/dto/album-update.dto.ts +++ b/server/src/domain/album/dto/album-update.dto.ts @@ -1,6 +1,6 @@ import { ApiProperty } from '@nestjs/swagger'; import { IsEnum, IsString } from 'class-validator'; -import { AssetOrder } from 'src/infra/entities/album.entity'; +import { AssetOrder } from 'src/entities/album.entity'; import { Optional, ValidateBoolean, ValidateUUID } from 'src/validation'; export class UpdateAlbumDto { diff --git a/server/src/domain/api-key/api-key.service.ts b/server/src/domain/api-key/api-key.service.ts index c8e7c5ec35..540c1d71f5 100644 --- a/server/src/domain/api-key/api-key.service.ts +++ b/server/src/domain/api-key/api-key.service.ts @@ -1,7 +1,7 @@ import { BadRequestException, Inject, Injectable } from '@nestjs/common'; import { APIKeyCreateDto, APIKeyCreateResponseDto, APIKeyResponseDto } from 'src/domain/api-key/api-key.dto'; import { AuthDto } from 'src/domain/auth/auth.dto'; -import { APIKeyEntity } from 'src/infra/entities/api-key.entity'; +import { APIKeyEntity } from 'src/entities/api-key.entity'; import { IKeyRepository } from 'src/interfaces/api-key.repository'; import { ICryptoRepository } from 'src/interfaces/crypto.repository'; diff --git a/server/src/domain/asset/asset.service.spec.ts b/server/src/domain/asset/asset.service.spec.ts index 9b59f40923..7b49cfef96 100644 --- a/server/src/domain/asset/asset.service.spec.ts +++ b/server/src/domain/asset/asset.service.spec.ts @@ -5,7 +5,7 @@ import { AssetJobName } from 'src/domain/asset/dto/asset-ids.dto'; import { AssetStatsResponseDto } from 'src/domain/asset/dto/asset-statistics.dto'; import { mapAsset } from 'src/domain/asset/response-dto/asset-response.dto'; import { JobName } from 'src/domain/job/job.constants'; -import { AssetEntity, AssetType } from 'src/infra/entities/asset.entity'; +import { AssetEntity, AssetType } from 'src/entities/asset.entity'; import { IAssetStackRepository } from 'src/interfaces/asset-stack.repository'; import { AssetStats, IAssetRepository, TimeBucketSize } from 'src/interfaces/asset.repository'; import { ClientEvent, ICommunicationRepository } from 'src/interfaces/communication.repository'; diff --git a/server/src/domain/asset/asset.service.ts b/server/src/domain/asset/asset.service.ts index 2594233c45..38446b5763 100644 --- a/server/src/domain/asset/asset.service.ts +++ b/server/src/domain/asset/asset.service.ts @@ -25,8 +25,8 @@ import { AuthDto } from 'src/domain/auth/auth.dto'; import { mimeTypes } from 'src/domain/domain.constant'; import { JOBS_ASSET_PAGINATION_SIZE, JobName } from 'src/domain/job/job.constants'; import { IAssetDeletionJob, ISidecarWriteJob } from 'src/domain/job/job.interface'; -import { AssetEntity } from 'src/infra/entities/asset.entity'; -import { LibraryType } from 'src/infra/entities/library.entity'; +import { AssetEntity } from 'src/entities/asset.entity'; +import { LibraryType } from 'src/entities/library.entity'; import { ImmichLogger } from 'src/infra/logger'; import { IAccessRepository } from 'src/interfaces/access.repository'; import { IAssetStackRepository } from 'src/interfaces/asset-stack.repository'; diff --git a/server/src/domain/asset/dto/asset-statistics.dto.ts b/server/src/domain/asset/dto/asset-statistics.dto.ts index 45bae1f5dd..93e0070293 100644 --- a/server/src/domain/asset/dto/asset-statistics.dto.ts +++ b/server/src/domain/asset/dto/asset-statistics.dto.ts @@ -1,5 +1,5 @@ import { ApiProperty } from '@nestjs/swagger'; -import { AssetType } from 'src/infra/entities/asset.entity'; +import { AssetType } from 'src/entities/asset.entity'; import { AssetStats } from 'src/interfaces/asset.repository'; import { ValidateBoolean } from 'src/validation'; diff --git a/server/src/domain/asset/dto/time-bucket.dto.ts b/server/src/domain/asset/dto/time-bucket.dto.ts index 7b2ee24c09..a5ff023d1d 100644 --- a/server/src/domain/asset/dto/time-bucket.dto.ts +++ b/server/src/domain/asset/dto/time-bucket.dto.ts @@ -1,6 +1,6 @@ import { ApiProperty } from '@nestjs/swagger'; import { IsEnum, IsNotEmpty, IsString } from 'class-validator'; -import { AssetOrder } from 'src/infra/entities/album.entity'; +import { AssetOrder } from 'src/entities/album.entity'; import { TimeBucketSize } from 'src/interfaces/asset.repository'; import { Optional, ValidateBoolean, ValidateUUID } from 'src/validation'; diff --git a/server/src/domain/asset/response-dto/asset-response.dto.ts b/server/src/domain/asset/response-dto/asset-response.dto.ts index a5c88b4cb2..dff12d481b 100644 --- a/server/src/domain/asset/response-dto/asset-response.dto.ts +++ b/server/src/domain/asset/response-dto/asset-response.dto.ts @@ -5,8 +5,8 @@ import { AuthDto } from 'src/domain/auth/auth.dto'; import { PersonWithFacesResponseDto, mapFacesWithoutPerson, mapPerson } from 'src/domain/person/person.dto'; import { TagResponseDto, mapTag } from 'src/domain/tag/tag-response.dto'; import { UserResponseDto, mapUser } from 'src/domain/user/response-dto/user-response.dto'; -import { AssetFaceEntity } from 'src/infra/entities/asset-face.entity'; -import { AssetEntity, AssetType } from 'src/infra/entities/asset.entity'; +import { AssetFaceEntity } from 'src/entities/asset-face.entity'; +import { AssetEntity, AssetType } from 'src/entities/asset.entity'; export class SanitizedAssetResponseDto { id!: string; diff --git a/server/src/domain/asset/response-dto/exif-response.dto.ts b/server/src/domain/asset/response-dto/exif-response.dto.ts index fbef6cbbce..6724de98f5 100644 --- a/server/src/domain/asset/response-dto/exif-response.dto.ts +++ b/server/src/domain/asset/response-dto/exif-response.dto.ts @@ -1,5 +1,5 @@ import { ApiProperty } from '@nestjs/swagger'; -import { ExifEntity } from 'src/infra/entities/exif.entity'; +import { ExifEntity } from 'src/entities/exif.entity'; export class ExifResponseDto { make?: string | null = null; diff --git a/server/src/domain/asset/response-dto/smart-info-response.dto.ts b/server/src/domain/asset/response-dto/smart-info-response.dto.ts index 840fca8a7f..c55c7ffb33 100644 --- a/server/src/domain/asset/response-dto/smart-info-response.dto.ts +++ b/server/src/domain/asset/response-dto/smart-info-response.dto.ts @@ -1,4 +1,4 @@ -import { SmartInfoEntity } from 'src/infra/entities/smart-info.entity'; +import { SmartInfoEntity } from 'src/entities/smart-info.entity'; export class SmartInfoResponseDto { tags?: string[] | null; diff --git a/server/src/domain/audit/audit.dto.ts b/server/src/domain/audit/audit.dto.ts index 1c34e94916..e83efca768 100644 --- a/server/src/domain/audit/audit.dto.ts +++ b/server/src/domain/audit/audit.dto.ts @@ -1,8 +1,8 @@ import { ApiProperty } from '@nestjs/swagger'; import { Type } from 'class-transformer'; import { IsArray, IsEnum, IsString, IsUUID, ValidateNested } from 'class-validator'; -import { EntityType } from 'src/infra/entities/audit.entity'; -import { AssetPathType, PathType, PersonPathType, UserPathType } from 'src/infra/entities/move.entity'; +import { EntityType } from 'src/entities/audit.entity'; +import { AssetPathType, PathType, PersonPathType, UserPathType } from 'src/entities/move.entity'; import { Optional, ValidateDate, ValidateUUID } from 'src/validation'; const PathEnum = Object.values({ ...AssetPathType, ...PersonPathType, ...UserPathType }); diff --git a/server/src/domain/audit/audit.service.spec.ts b/server/src/domain/audit/audit.service.spec.ts index aa110dfb2a..ecda57b089 100644 --- a/server/src/domain/audit/audit.service.spec.ts +++ b/server/src/domain/audit/audit.service.spec.ts @@ -1,5 +1,5 @@ import { AuditService } from 'src/domain/audit/audit.service'; -import { DatabaseAction, EntityType } from 'src/infra/entities/audit.entity'; +import { DatabaseAction, EntityType } from 'src/entities/audit.entity'; import { IAssetRepository } from 'src/interfaces/asset.repository'; import { IAuditRepository } from 'src/interfaces/audit.repository'; import { ICryptoRepository } from 'src/interfaces/crypto.repository'; diff --git a/server/src/domain/audit/audit.service.ts b/server/src/domain/audit/audit.service.ts index cf8b7f3030..91acb54d94 100644 --- a/server/src/domain/audit/audit.service.ts +++ b/server/src/domain/audit/audit.service.ts @@ -14,8 +14,8 @@ import { import { AuthDto } from 'src/domain/auth/auth.dto'; import { AUDIT_LOG_MAX_DURATION } from 'src/domain/domain.constant'; import { JOBS_ASSET_PAGINATION_SIZE } from 'src/domain/job/job.constants'; -import { DatabaseAction } from 'src/infra/entities/audit.entity'; -import { AssetPathType, PersonPathType, UserPathType } from 'src/infra/entities/move.entity'; +import { DatabaseAction } from 'src/entities/audit.entity'; +import { AssetPathType, PersonPathType, UserPathType } from 'src/entities/move.entity'; import { ImmichLogger } from 'src/infra/logger'; import { IAccessRepository } from 'src/interfaces/access.repository'; import { IAssetRepository } from 'src/interfaces/asset.repository'; diff --git a/server/src/domain/auth/auth.dto.ts b/server/src/domain/auth/auth.dto.ts index 1694231abf..f3f2270d02 100644 --- a/server/src/domain/auth/auth.dto.ts +++ b/server/src/domain/auth/auth.dto.ts @@ -1,10 +1,10 @@ import { ApiProperty } from '@nestjs/swagger'; import { Transform } from 'class-transformer'; import { IsEmail, IsNotEmpty, IsString, MinLength } from 'class-validator'; -import { APIKeyEntity } from 'src/infra/entities/api-key.entity'; -import { SharedLinkEntity } from 'src/infra/entities/shared-link.entity'; -import { UserTokenEntity } from 'src/infra/entities/user-token.entity'; -import { UserEntity } from 'src/infra/entities/user.entity'; +import { APIKeyEntity } from 'src/entities/api-key.entity'; +import { SharedLinkEntity } from 'src/entities/shared-link.entity'; +import { UserTokenEntity } from 'src/entities/user-token.entity'; +import { UserEntity } from 'src/entities/user.entity'; export class AuthDto { user!: UserEntity; diff --git a/server/src/domain/auth/auth.service.spec.ts b/server/src/domain/auth/auth.service.spec.ts index 2cbc3cb6e0..e091cdcd97 100644 --- a/server/src/domain/auth/auth.service.spec.ts +++ b/server/src/domain/auth/auth.service.spec.ts @@ -5,7 +5,7 @@ import { Socket } from 'socket.io'; import { AuthType } from 'src/domain/auth/auth.constant'; import { AuthDto, SignUpDto } from 'src/domain/auth/auth.dto'; import { AuthService } from 'src/domain/auth/auth.service'; -import { UserEntity } from 'src/infra/entities/user.entity'; +import { UserEntity } from 'src/entities/user.entity'; import { IKeyRepository } from 'src/interfaces/api-key.repository'; import { ICryptoRepository } from 'src/interfaces/crypto.repository'; import { ILibraryRepository } from 'src/interfaces/library.repository'; diff --git a/server/src/domain/auth/auth.service.ts b/server/src/domain/auth/auth.service.ts index 0f2709307d..2d807a249f 100644 --- a/server/src/domain/auth/auth.service.ts +++ b/server/src/domain/auth/auth.service.ts @@ -37,8 +37,8 @@ import { mapUserToken, } from 'src/domain/auth/auth.dto'; import { UserResponseDto, mapUser } from 'src/domain/user/response-dto/user-response.dto'; -import { SystemConfig } from 'src/infra/entities/system-config.entity'; -import { UserEntity } from 'src/infra/entities/user.entity'; +import { SystemConfig } from 'src/entities/system-config.entity'; +import { UserEntity } from 'src/entities/user.entity'; import { ImmichLogger } from 'src/infra/logger'; import { IAccessRepository } from 'src/interfaces/access.repository'; import { IKeyRepository } from 'src/interfaces/api-key.repository'; diff --git a/server/src/domain/domain.constant.ts b/server/src/domain/domain.constant.ts index 13c8fa5322..29c4837b6b 100644 --- a/server/src/domain/domain.constant.ts +++ b/server/src/domain/domain.constant.ts @@ -1,7 +1,7 @@ import { Duration } from 'luxon'; import { readFileSync } from 'node:fs'; import { extname, join } from 'node:path'; -import { AssetType } from 'src/infra/entities/asset.entity'; +import { AssetType } from 'src/entities/asset.entity'; export const AUDIT_LOG_MAX_DURATION = Duration.fromObject({ days: 100 }); export const ONE_HOUR = Duration.fromObject({ hours: 1 }); diff --git a/server/src/domain/download/download.service.ts b/server/src/domain/download/download.service.ts index 5c790548d0..8c0168a6cd 100644 --- a/server/src/domain/download/download.service.ts +++ b/server/src/domain/download/download.service.ts @@ -5,7 +5,7 @@ import { AssetIdsDto } from 'src/domain/asset/dto/asset-ids.dto'; import { AuthDto } from 'src/domain/auth/auth.dto'; import { mimeTypes } from 'src/domain/domain.constant'; import { DownloadArchiveInfo, DownloadInfoDto, DownloadResponseDto } from 'src/domain/download/download.dto'; -import { AssetEntity } from 'src/infra/entities/asset.entity'; +import { AssetEntity } from 'src/entities/asset.entity'; import { IAccessRepository } from 'src/interfaces/access.repository'; import { IAssetRepository } from 'src/interfaces/asset.repository'; import { IStorageRepository, ImmichReadStream } from 'src/interfaces/storage.repository'; diff --git a/server/src/domain/job/job.service.spec.ts b/server/src/domain/job/job.service.spec.ts index 1b46ec9362..ec905b062d 100644 --- a/server/src/domain/job/job.service.spec.ts +++ b/server/src/domain/job/job.service.spec.ts @@ -2,7 +2,7 @@ import { BadRequestException } from '@nestjs/common'; import { FeatureFlag, SystemConfigCore } from 'src/cores/system-config.core'; import { JobCommand, JobName, QueueName } from 'src/domain/job/job.constants'; import { JobService } from 'src/domain/job/job.service'; -import { SystemConfig, SystemConfigKey } from 'src/infra/entities/system-config.entity'; +import { SystemConfig, SystemConfigKey } from 'src/entities/system-config.entity'; import { IAssetRepository } from 'src/interfaces/asset.repository'; import { ICommunicationRepository } from 'src/interfaces/communication.repository'; import { IJobRepository, JobHandler, JobItem, JobStatus } from 'src/interfaces/job.repository'; diff --git a/server/src/domain/job/job.service.ts b/server/src/domain/job/job.service.ts index 5676036562..192b093c1e 100644 --- a/server/src/domain/job/job.service.ts +++ b/server/src/domain/job/job.service.ts @@ -3,7 +3,7 @@ import { FeatureFlag, SystemConfigCore } from 'src/cores/system-config.core'; import { mapAsset } from 'src/domain/asset/response-dto/asset-response.dto'; import { ConcurrentQueueName, JobCommand, JobName, QueueName } from 'src/domain/job/job.constants'; import { AllJobStatusResponseDto, JobCommandDto, JobStatusDto } from 'src/domain/job/job.dto'; -import { AssetType } from 'src/infra/entities/asset.entity'; +import { AssetType } from 'src/entities/asset.entity'; import { ImmichLogger } from 'src/infra/logger'; import { IAssetRepository } from 'src/interfaces/asset.repository'; import { ClientEvent, ICommunicationRepository } from 'src/interfaces/communication.repository'; diff --git a/server/src/domain/library/library.dto.ts b/server/src/domain/library/library.dto.ts index f65779fb85..951012a852 100644 --- a/server/src/domain/library/library.dto.ts +++ b/server/src/domain/library/library.dto.ts @@ -1,6 +1,6 @@ import { ApiProperty } from '@nestjs/swagger'; import { ArrayMaxSize, ArrayUnique, IsEnum, IsNotEmpty, IsString } from 'class-validator'; -import { LibraryEntity, LibraryType } from 'src/infra/entities/library.entity'; +import { LibraryEntity, LibraryType } from 'src/entities/library.entity'; import { Optional, ValidateBoolean, ValidateUUID } from 'src/validation'; export class CreateLibraryDto { diff --git a/server/src/domain/library/library.service.spec.ts b/server/src/domain/library/library.service.spec.ts index 00592dc1eb..f34b6d5bed 100644 --- a/server/src/domain/library/library.service.spec.ts +++ b/server/src/domain/library/library.service.spec.ts @@ -7,10 +7,10 @@ import { JobName } from 'src/domain/job/job.constants'; import { ILibraryFileJob, ILibraryRefreshJob } from 'src/domain/job/job.interface'; import { mapLibrary } from 'src/domain/library/library.dto'; import { LibraryService } from 'src/domain/library/library.service'; -import { AssetType } from 'src/infra/entities/asset.entity'; -import { LibraryType } from 'src/infra/entities/library.entity'; -import { SystemConfig, SystemConfigKey } from 'src/infra/entities/system-config.entity'; -import { UserEntity } from 'src/infra/entities/user.entity'; +import { AssetType } from 'src/entities/asset.entity'; +import { LibraryType } from 'src/entities/library.entity'; +import { SystemConfig, SystemConfigKey } from 'src/entities/system-config.entity'; +import { UserEntity } from 'src/entities/user.entity'; import { IAssetRepository } from 'src/interfaces/asset.repository'; import { ICryptoRepository } from 'src/interfaces/crypto.repository'; import { IDatabaseRepository } from 'src/interfaces/database.repository'; diff --git a/server/src/domain/library/library.service.ts b/server/src/domain/library/library.service.ts index b859d0046c..1fc0091493 100644 --- a/server/src/domain/library/library.service.ts +++ b/server/src/domain/library/library.service.ts @@ -23,8 +23,8 @@ import { ValidateLibraryResponseDto, mapLibrary, } from 'src/domain/library/library.dto'; -import { AssetType } from 'src/infra/entities/asset.entity'; -import { LibraryEntity, LibraryType } from 'src/infra/entities/library.entity'; +import { AssetType } from 'src/entities/asset.entity'; +import { LibraryEntity, LibraryType } from 'src/entities/library.entity'; import { ImmichLogger } from 'src/infra/logger'; import { IAssetRepository, WithProperty } from 'src/interfaces/asset.repository'; import { InternalEvent, InternalEventMap } from 'src/interfaces/communication.repository'; diff --git a/server/src/domain/media/media.service.spec.ts b/server/src/domain/media/media.service.spec.ts index ad3ed3d220..97a6d161b5 100644 --- a/server/src/domain/media/media.service.spec.ts +++ b/server/src/domain/media/media.service.spec.ts @@ -1,8 +1,8 @@ import { Stats } from 'node:fs'; import { JobName } from 'src/domain/job/job.constants'; import { MediaService } from 'src/domain/media/media.service'; -import { AssetType } from 'src/infra/entities/asset.entity'; -import { ExifEntity } from 'src/infra/entities/exif.entity'; +import { AssetType } from 'src/entities/asset.entity'; +import { ExifEntity } from 'src/entities/exif.entity'; import { AudioCodec, Colorspace, @@ -11,7 +11,7 @@ import { TranscodeHWAccel, TranscodePolicy, VideoCodec, -} from 'src/infra/entities/system-config.entity'; +} from 'src/entities/system-config.entity'; import { IAssetRepository, WithoutProperty } from 'src/interfaces/asset.repository'; import { ICryptoRepository } from 'src/interfaces/crypto.repository'; import { IJobRepository, JobStatus } from 'src/interfaces/job.repository'; diff --git a/server/src/domain/media/media.service.ts b/server/src/domain/media/media.service.ts index 6807e962ad..c254689b4e 100644 --- a/server/src/domain/media/media.service.ts +++ b/server/src/domain/media/media.service.ts @@ -14,8 +14,8 @@ import { VP9Config, } from 'src/domain/media/media.util'; import { SystemConfigFFmpegDto } from 'src/domain/system-config/dto/system-config-ffmpeg.dto'; -import { AssetEntity, AssetType } from 'src/infra/entities/asset.entity'; -import { AssetPathType } from 'src/infra/entities/move.entity'; +import { AssetEntity, AssetType } from 'src/entities/asset.entity'; +import { AssetPathType } from 'src/entities/move.entity'; import { AudioCodec, Colorspace, @@ -23,7 +23,7 @@ import { TranscodePolicy, TranscodeTarget, VideoCodec, -} from 'src/infra/entities/system-config.entity'; +} from 'src/entities/system-config.entity'; import { ImmichLogger } from 'src/infra/logger'; import { IAssetRepository, WithoutProperty } from 'src/interfaces/asset.repository'; import { ICryptoRepository } from 'src/interfaces/crypto.repository'; diff --git a/server/src/domain/media/media.util.ts b/server/src/domain/media/media.util.ts index bc9fa4887e..3e58ca81ac 100644 --- a/server/src/domain/media/media.util.ts +++ b/server/src/domain/media/media.util.ts @@ -1,11 +1,5 @@ import { SystemConfigFFmpegDto } from 'src/domain/system-config/dto/system-config-ffmpeg.dto'; -import { - CQMode, - ToneMapping, - TranscodeHWAccel, - TranscodeTarget, - VideoCodec, -} from 'src/infra/entities/system-config.entity'; +import { CQMode, ToneMapping, TranscodeHWAccel, TranscodeTarget, VideoCodec } from 'src/entities/system-config.entity'; import { AudioStreamInfo, BitrateDistribution, diff --git a/server/src/domain/metadata/metadata.service.spec.ts b/server/src/domain/metadata/metadata.service.spec.ts index f8483d6ef8..2108c5fc48 100644 --- a/server/src/domain/metadata/metadata.service.spec.ts +++ b/server/src/domain/metadata/metadata.service.spec.ts @@ -5,9 +5,9 @@ import { Stats } from 'node:fs'; import { constants } from 'node:fs/promises'; import { JobName } from 'src/domain/job/job.constants'; import { MetadataService, Orientation } from 'src/domain/metadata/metadata.service'; -import { AssetType } from 'src/infra/entities/asset.entity'; -import { ExifEntity } from 'src/infra/entities/exif.entity'; -import { SystemConfigKey } from 'src/infra/entities/system-config.entity'; +import { AssetType } from 'src/entities/asset.entity'; +import { ExifEntity } from 'src/entities/exif.entity'; +import { SystemConfigKey } from 'src/entities/system-config.entity'; import { IAlbumRepository } from 'src/interfaces/album.repository'; import { IAssetRepository, WithoutProperty } from 'src/interfaces/asset.repository'; import { ClientEvent, ICommunicationRepository } from 'src/interfaces/communication.repository'; diff --git a/server/src/domain/metadata/metadata.service.ts b/server/src/domain/metadata/metadata.service.ts index d7f98e245b..0e949626cd 100644 --- a/server/src/domain/metadata/metadata.service.ts +++ b/server/src/domain/metadata/metadata.service.ts @@ -10,8 +10,8 @@ import { StorageCore } from 'src/cores/storage.core'; import { FeatureFlag, SystemConfigCore } from 'src/cores/system-config.core'; import { JOBS_ASSET_PAGINATION_SIZE, JobName, QueueName } from 'src/domain/job/job.constants'; import { IBaseJob, IEntityJob, ISidecarWriteJob } from 'src/domain/job/job.interface'; -import { AssetEntity, AssetType } from 'src/infra/entities/asset.entity'; -import { ExifEntity } from 'src/infra/entities/exif.entity'; +import { AssetEntity, AssetType } from 'src/entities/asset.entity'; +import { ExifEntity } from 'src/entities/exif.entity'; import { ImmichLogger } from 'src/infra/logger'; import { IAlbumRepository } from 'src/interfaces/album.repository'; import { IAssetRepository, WithoutProperty } from 'src/interfaces/asset.repository'; diff --git a/server/src/domain/partner/partner.service.spec.ts b/server/src/domain/partner/partner.service.spec.ts index 487818b3d8..7d48212823 100644 --- a/server/src/domain/partner/partner.service.spec.ts +++ b/server/src/domain/partner/partner.service.spec.ts @@ -1,7 +1,7 @@ import { BadRequestException } from '@nestjs/common'; import { PartnerResponseDto } from 'src/domain/partner/partner.dto'; import { PartnerService } from 'src/domain/partner/partner.service'; -import { UserAvatarColor } from 'src/infra/entities/user.entity'; +import { UserAvatarColor } from 'src/entities/user.entity'; import { IAccessRepository } from 'src/interfaces/access.repository'; import { IPartnerRepository, PartnerDirection } from 'src/interfaces/partner.repository'; import { authStub } from 'test/fixtures/auth.stub'; diff --git a/server/src/domain/partner/partner.service.ts b/server/src/domain/partner/partner.service.ts index 2528b44be2..34a88a7ea9 100644 --- a/server/src/domain/partner/partner.service.ts +++ b/server/src/domain/partner/partner.service.ts @@ -3,7 +3,7 @@ import { AccessCore, Permission } from 'src/cores/access.core'; import { AuthDto } from 'src/domain/auth/auth.dto'; import { PartnerResponseDto, UpdatePartnerDto } from 'src/domain/partner/partner.dto'; import { mapUser } from 'src/domain/user/response-dto/user-response.dto'; -import { PartnerEntity } from 'src/infra/entities/partner.entity'; +import { PartnerEntity } from 'src/entities/partner.entity'; import { IAccessRepository } from 'src/interfaces/access.repository'; import { IPartnerRepository, PartnerDirection, PartnerIds } from 'src/interfaces/partner.repository'; diff --git a/server/src/domain/person/person.dto.ts b/server/src/domain/person/person.dto.ts index f3699499aa..4153ba8132 100644 --- a/server/src/domain/person/person.dto.ts +++ b/server/src/domain/person/person.dto.ts @@ -2,8 +2,8 @@ import { ApiProperty } from '@nestjs/swagger'; import { Type } from 'class-transformer'; import { IsArray, IsNotEmpty, IsString, MaxDate, ValidateNested } from 'class-validator'; import { AuthDto } from 'src/domain/auth/auth.dto'; -import { AssetFaceEntity } from 'src/infra/entities/asset-face.entity'; -import { PersonEntity } from 'src/infra/entities/person.entity'; +import { AssetFaceEntity } from 'src/entities/asset-face.entity'; +import { PersonEntity } from 'src/entities/person.entity'; import { Optional, ValidateBoolean, ValidateDate, ValidateUUID } from 'src/validation'; export class PersonCreateDto { diff --git a/server/src/domain/person/person.service.spec.ts b/server/src/domain/person/person.service.spec.ts index 042469d7ea..9da66e8686 100644 --- a/server/src/domain/person/person.service.spec.ts +++ b/server/src/domain/person/person.service.spec.ts @@ -3,8 +3,8 @@ import { BulkIdErrorReason } from 'src/domain/asset/response-dto/asset-ids-respo import { JobName } from 'src/domain/job/job.constants'; import { PersonResponseDto, mapFaces, mapPerson } from 'src/domain/person/person.dto'; import { PersonService } from 'src/domain/person/person.service'; -import { AssetFaceEntity } from 'src/infra/entities/asset-face.entity'; -import { Colorspace, SystemConfigKey } from 'src/infra/entities/system-config.entity'; +import { AssetFaceEntity } from 'src/entities/asset-face.entity'; +import { Colorspace, SystemConfigKey } from 'src/entities/system-config.entity'; import { IAssetRepository, WithoutProperty } from 'src/interfaces/asset.repository'; import { ICryptoRepository } from 'src/interfaces/crypto.repository'; import { IJobRepository, JobStatus } from 'src/interfaces/job.repository'; diff --git a/server/src/domain/person/person.service.ts b/server/src/domain/person/person.service.ts index 9e56e4b18f..cd7ba92246 100644 --- a/server/src/domain/person/person.service.ts +++ b/server/src/domain/person/person.service.ts @@ -24,8 +24,8 @@ import { mapFaces, mapPerson, } from 'src/domain/person/person.dto'; -import { PersonPathType } from 'src/infra/entities/move.entity'; -import { PersonEntity } from 'src/infra/entities/person.entity'; +import { PersonPathType } from 'src/entities/move.entity'; +import { PersonEntity } from 'src/entities/person.entity'; import { ImmichLogger } from 'src/infra/logger'; import { IAccessRepository } from 'src/interfaces/access.repository'; import { IAssetRepository, WithoutProperty } from 'src/interfaces/asset.repository'; diff --git a/server/src/domain/search/dto/search.dto.ts b/server/src/domain/search/dto/search.dto.ts index 52090b9456..4f77517b3b 100644 --- a/server/src/domain/search/dto/search.dto.ts +++ b/server/src/domain/search/dto/search.dto.ts @@ -1,9 +1,9 @@ import { ApiProperty } from '@nestjs/swagger'; import { Type } from 'class-transformer'; import { IsEnum, IsInt, IsNotEmpty, IsString, Max, Min } from 'class-validator'; -import { AssetOrder } from 'src/infra/entities/album.entity'; -import { AssetType } from 'src/infra/entities/asset.entity'; -import { GeodataPlacesEntity } from 'src/infra/entities/geodata-places.entity'; +import { AssetOrder } from 'src/entities/album.entity'; +import { AssetType } from 'src/entities/asset.entity'; +import { GeodataPlacesEntity } from 'src/entities/geodata-places.entity'; import { Optional, ValidateBoolean, ValidateDate, ValidateUUID } from 'src/validation'; class BaseSearchDto { diff --git a/server/src/domain/search/search.service.spec.ts b/server/src/domain/search/search.service.spec.ts index f9313d2775..f722128098 100644 --- a/server/src/domain/search/search.service.spec.ts +++ b/server/src/domain/search/search.service.spec.ts @@ -1,7 +1,7 @@ import { mapAsset } from 'src/domain/asset/response-dto/asset-response.dto'; import { SearchDto } from 'src/domain/search/dto/search.dto'; import { SearchService } from 'src/domain/search/search.service'; -import { SystemConfigKey } from 'src/infra/entities/system-config.entity'; +import { SystemConfigKey } from 'src/entities/system-config.entity'; import { IAssetRepository } from 'src/interfaces/asset.repository'; import { IMachineLearningRepository } from 'src/interfaces/machine-learning.repository'; import { IMetadataRepository } from 'src/interfaces/metadata.repository'; diff --git a/server/src/domain/search/search.service.ts b/server/src/domain/search/search.service.ts index 9778c6d3d9..cedee68d05 100644 --- a/server/src/domain/search/search.service.ts +++ b/server/src/domain/search/search.service.ts @@ -14,8 +14,8 @@ import { mapPlaces, } from 'src/domain/search/dto/search.dto'; import { SearchResponseDto } from 'src/domain/search/response-dto/search-response.dto'; -import { AssetOrder } from 'src/infra/entities/album.entity'; -import { AssetEntity } from 'src/infra/entities/asset.entity'; +import { AssetOrder } from 'src/entities/album.entity'; +import { AssetEntity } from 'src/entities/asset.entity'; import { IAssetRepository } from 'src/interfaces/asset.repository'; import { IMachineLearningRepository } from 'src/interfaces/machine-learning.repository'; import { IMetadataRepository } from 'src/interfaces/metadata.repository'; diff --git a/server/src/domain/server-info/server-info.service.spec.ts b/server/src/domain/server-info/server-info.service.spec.ts index 05f05cc8fa..1685f8bdaf 100644 --- a/server/src/domain/server-info/server-info.service.spec.ts +++ b/server/src/domain/server-info/server-info.service.spec.ts @@ -1,6 +1,6 @@ import { serverVersion } from 'src/domain/domain.constant'; import { ServerInfoService } from 'src/domain/server-info/server-info.service'; -import { SystemMetadataKey } from 'src/infra/entities/system-metadata.entity'; +import { SystemMetadataKey } from 'src/entities/system-metadata.entity'; import { ICommunicationRepository } from 'src/interfaces/communication.repository'; import { IServerInfoRepository } from 'src/interfaces/server-info.repository'; import { IStorageRepository } from 'src/interfaces/storage.repository'; diff --git a/server/src/domain/server-info/server-info.service.ts b/server/src/domain/server-info/server-info.service.ts index 533bb42d9f..13921949cf 100644 --- a/server/src/domain/server-info/server-info.service.ts +++ b/server/src/domain/server-info/server-info.service.ts @@ -12,7 +12,7 @@ import { ServerStatsResponseDto, UsageByUserDto, } from 'src/domain/server-info/server-info.dto'; -import { SystemMetadataKey } from 'src/infra/entities/system-metadata.entity'; +import { SystemMetadataKey } from 'src/entities/system-metadata.entity'; import { ImmichLogger } from 'src/infra/logger'; import { ClientEvent, ICommunicationRepository } from 'src/interfaces/communication.repository'; import { IServerInfoRepository } from 'src/interfaces/server-info.repository'; diff --git a/server/src/domain/shared-link/shared-link-response.dto.ts b/server/src/domain/shared-link/shared-link-response.dto.ts index 034b45f1c1..44024506f5 100644 --- a/server/src/domain/shared-link/shared-link-response.dto.ts +++ b/server/src/domain/shared-link/shared-link-response.dto.ts @@ -2,7 +2,7 @@ import { ApiProperty } from '@nestjs/swagger'; import _ from 'lodash'; import { AlbumResponseDto, mapAlbumWithoutAssets } from 'src/domain/album/album-response.dto'; import { AssetResponseDto, mapAsset } from 'src/domain/asset/response-dto/asset-response.dto'; -import { SharedLinkEntity, SharedLinkType } from 'src/infra/entities/shared-link.entity'; +import { SharedLinkEntity, SharedLinkType } from 'src/entities/shared-link.entity'; export class SharedLinkResponseDto { id!: string; diff --git a/server/src/domain/shared-link/shared-link.dto.ts b/server/src/domain/shared-link/shared-link.dto.ts index 7ef9a77334..73928aac23 100644 --- a/server/src/domain/shared-link/shared-link.dto.ts +++ b/server/src/domain/shared-link/shared-link.dto.ts @@ -1,6 +1,6 @@ import { ApiProperty } from '@nestjs/swagger'; import { IsEnum, IsString } from 'class-validator'; -import { SharedLinkType } from 'src/infra/entities/shared-link.entity'; +import { SharedLinkType } from 'src/entities/shared-link.entity'; import { Optional, ValidateBoolean, ValidateDate, ValidateUUID } from 'src/validation'; export class SharedLinkCreateDto { diff --git a/server/src/domain/shared-link/shared-link.service.spec.ts b/server/src/domain/shared-link/shared-link.service.spec.ts index 3b15138f46..926ec16b13 100644 --- a/server/src/domain/shared-link/shared-link.service.spec.ts +++ b/server/src/domain/shared-link/shared-link.service.spec.ts @@ -2,7 +2,7 @@ import { BadRequestException, ForbiddenException, UnauthorizedException } from ' import _ from 'lodash'; import { AssetIdErrorReason } from 'src/domain/asset/response-dto/asset-ids-response.dto'; import { SharedLinkService } from 'src/domain/shared-link/shared-link.service'; -import { SharedLinkType } from 'src/infra/entities/shared-link.entity'; +import { SharedLinkType } from 'src/entities/shared-link.entity'; import { ICryptoRepository } from 'src/interfaces/crypto.repository'; import { ISharedLinkRepository } from 'src/interfaces/shared-link.repository'; import { albumStub } from 'test/fixtures/album.stub'; diff --git a/server/src/domain/shared-link/shared-link.service.ts b/server/src/domain/shared-link/shared-link.service.ts index 34619cc5ca..e01deee7b9 100644 --- a/server/src/domain/shared-link/shared-link.service.ts +++ b/server/src/domain/shared-link/shared-link.service.ts @@ -9,8 +9,8 @@ import { mapSharedLinkWithoutMetadata, } from 'src/domain/shared-link/shared-link-response.dto'; import { SharedLinkCreateDto, SharedLinkEditDto, SharedLinkPasswordDto } from 'src/domain/shared-link/shared-link.dto'; -import { AssetEntity } from 'src/infra/entities/asset.entity'; -import { SharedLinkEntity, SharedLinkType } from 'src/infra/entities/shared-link.entity'; +import { AssetEntity } from 'src/entities/asset.entity'; +import { SharedLinkEntity, SharedLinkType } from 'src/entities/shared-link.entity'; import { IAccessRepository } from 'src/interfaces/access.repository'; import { ICryptoRepository } from 'src/interfaces/crypto.repository'; import { ISharedLinkRepository } from 'src/interfaces/shared-link.repository'; diff --git a/server/src/domain/smart-info/smart-info.service.spec.ts b/server/src/domain/smart-info/smart-info.service.spec.ts index fec43eb080..29ce75fb47 100644 --- a/server/src/domain/smart-info/smart-info.service.spec.ts +++ b/server/src/domain/smart-info/smart-info.service.spec.ts @@ -1,8 +1,8 @@ import { JobName } from 'src/domain/job/job.constants'; import { cleanModelName, getCLIPModelInfo } from 'src/domain/smart-info/smart-info.constant'; import { SmartInfoService } from 'src/domain/smart-info/smart-info.service'; -import { AssetEntity } from 'src/infra/entities/asset.entity'; -import { SystemConfigKey } from 'src/infra/entities/system-config.entity'; +import { AssetEntity } from 'src/entities/asset.entity'; +import { SystemConfigKey } from 'src/entities/system-config.entity'; import { IAssetRepository, WithoutProperty } from 'src/interfaces/asset.repository'; import { IDatabaseRepository } from 'src/interfaces/database.repository'; import { IJobRepository } from 'src/interfaces/job.repository'; diff --git a/server/src/domain/storage-template/storage-template.service.spec.ts b/server/src/domain/storage-template/storage-template.service.spec.ts index c73dfbdcfd..ecadb3e864 100644 --- a/server/src/domain/storage-template/storage-template.service.spec.ts +++ b/server/src/domain/storage-template/storage-template.service.spec.ts @@ -2,8 +2,8 @@ import { when } from 'jest-when'; import { Stats } from 'node:fs'; import { SystemConfigCore, defaults } from 'src/cores/system-config.core'; import { StorageTemplateService } from 'src/domain/storage-template/storage-template.service'; -import { AssetPathType } from 'src/infra/entities/move.entity'; -import { SystemConfig, SystemConfigKey } from 'src/infra/entities/system-config.entity'; +import { AssetPathType } from 'src/entities/move.entity'; +import { SystemConfig, SystemConfigKey } from 'src/entities/system-config.entity'; import { IAlbumRepository } from 'src/interfaces/album.repository'; import { IAssetRepository } from 'src/interfaces/asset.repository'; import { ICryptoRepository } from 'src/interfaces/crypto.repository'; diff --git a/server/src/domain/storage-template/storage-template.service.ts b/server/src/domain/storage-template/storage-template.service.ts index 480f973683..b4af03a9f7 100644 --- a/server/src/domain/storage-template/storage-template.service.ts +++ b/server/src/domain/storage-template/storage-template.service.ts @@ -17,9 +17,9 @@ import { supportedWeekTokens, supportedYearTokens, } from 'src/domain/system-config/system-config.constants'; -import { AssetEntity, AssetType } from 'src/infra/entities/asset.entity'; -import { AssetPathType } from 'src/infra/entities/move.entity'; -import { SystemConfig } from 'src/infra/entities/system-config.entity'; +import { AssetEntity, AssetType } from 'src/entities/asset.entity'; +import { AssetPathType } from 'src/entities/move.entity'; +import { SystemConfig } from 'src/entities/system-config.entity'; import { ImmichLogger } from 'src/infra/logger'; import { IAlbumRepository } from 'src/interfaces/album.repository'; import { IAssetRepository } from 'src/interfaces/asset.repository'; diff --git a/server/src/domain/system-config/dto/system-config-ffmpeg.dto.ts b/server/src/domain/system-config/dto/system-config-ffmpeg.dto.ts index 16f81b37ca..017f69c2db 100644 --- a/server/src/domain/system-config/dto/system-config-ffmpeg.dto.ts +++ b/server/src/domain/system-config/dto/system-config-ffmpeg.dto.ts @@ -8,7 +8,7 @@ import { TranscodeHWAccel, TranscodePolicy, VideoCodec, -} from 'src/infra/entities/system-config.entity'; +} from 'src/entities/system-config.entity'; import { ValidateBoolean } from 'src/validation'; export class SystemConfigFFmpegDto { diff --git a/server/src/domain/system-config/dto/system-config-logging.dto.ts b/server/src/domain/system-config/dto/system-config-logging.dto.ts index f41b568a24..53ef5d2f0f 100644 --- a/server/src/domain/system-config/dto/system-config-logging.dto.ts +++ b/server/src/domain/system-config/dto/system-config-logging.dto.ts @@ -1,6 +1,6 @@ import { ApiProperty } from '@nestjs/swagger'; import { IsEnum } from 'class-validator'; -import { LogLevel } from 'src/infra/entities/system-config.entity'; +import { LogLevel } from 'src/entities/system-config.entity'; import { ValidateBoolean } from 'src/validation'; export class SystemConfigLoggingDto { diff --git a/server/src/domain/system-config/dto/system-config-thumbnail.dto.ts b/server/src/domain/system-config/dto/system-config-thumbnail.dto.ts index 2f156894f7..d3240efb12 100644 --- a/server/src/domain/system-config/dto/system-config-thumbnail.dto.ts +++ b/server/src/domain/system-config/dto/system-config-thumbnail.dto.ts @@ -1,7 +1,7 @@ import { ApiProperty } from '@nestjs/swagger'; import { Type } from 'class-transformer'; import { IsEnum, IsInt, Max, Min } from 'class-validator'; -import { Colorspace } from 'src/infra/entities/system-config.entity'; +import { Colorspace } from 'src/entities/system-config.entity'; export class SystemConfigThumbnailDto { @IsInt() diff --git a/server/src/domain/system-config/dto/system-config.dto.ts b/server/src/domain/system-config/dto/system-config.dto.ts index 4f97975bc2..9aef923038 100644 --- a/server/src/domain/system-config/dto/system-config.dto.ts +++ b/server/src/domain/system-config/dto/system-config.dto.ts @@ -16,7 +16,7 @@ import { SystemConfigThemeDto } from 'src/domain/system-config/dto/system-config import { SystemConfigThumbnailDto } from 'src/domain/system-config/dto/system-config-thumbnail.dto'; import { SystemConfigTrashDto } from 'src/domain/system-config/dto/system-config-trash.dto'; import { SystemConfigUserDto } from 'src/domain/system-config/dto/system-config-user.dto'; -import { SystemConfig } from 'src/infra/entities/system-config.entity'; +import { SystemConfig } from 'src/entities/system-config.entity'; export class SystemConfigDto implements SystemConfig { @Type(() => SystemConfigFFmpegDto) diff --git a/server/src/domain/system-config/system-config.service.spec.ts b/server/src/domain/system-config/system-config.service.spec.ts index 94db09bab2..f81d726eb0 100644 --- a/server/src/domain/system-config/system-config.service.spec.ts +++ b/server/src/domain/system-config/system-config.service.spec.ts @@ -14,7 +14,7 @@ import { TranscodeHWAccel, TranscodePolicy, VideoCodec, -} from 'src/infra/entities/system-config.entity'; +} from 'src/entities/system-config.entity'; import { ImmichLogger } from 'src/infra/logger'; import { ICommunicationRepository, ServerEvent } from 'src/interfaces/communication.repository'; import { ISearchRepository } from 'src/interfaces/search.repository'; diff --git a/server/src/domain/system-config/system-config.service.ts b/server/src/domain/system-config/system-config.service.ts index bd2c308054..d69593d217 100644 --- a/server/src/domain/system-config/system-config.service.ts +++ b/server/src/domain/system-config/system-config.service.ts @@ -15,7 +15,7 @@ import { supportedWeekTokens, supportedYearTokens, } from 'src/domain/system-config/system-config.constants'; -import { LogLevel, SystemConfig } from 'src/infra/entities/system-config.entity'; +import { LogLevel, SystemConfig } from 'src/entities/system-config.entity'; import { ImmichLogger } from 'src/infra/logger'; import { ClientEvent, diff --git a/server/src/domain/tag/tag-response.dto.ts b/server/src/domain/tag/tag-response.dto.ts index 04ee9540b8..535efcf434 100644 --- a/server/src/domain/tag/tag-response.dto.ts +++ b/server/src/domain/tag/tag-response.dto.ts @@ -1,5 +1,5 @@ import { ApiProperty } from '@nestjs/swagger'; -import { TagEntity, TagType } from 'src/infra/entities/tag.entity'; +import { TagEntity, TagType } from 'src/entities/tag.entity'; export class TagResponseDto { id!: string; diff --git a/server/src/domain/tag/tag.dto.ts b/server/src/domain/tag/tag.dto.ts index 322f40acf0..abf9549d81 100644 --- a/server/src/domain/tag/tag.dto.ts +++ b/server/src/domain/tag/tag.dto.ts @@ -1,6 +1,6 @@ import { ApiProperty } from '@nestjs/swagger'; import { IsEnum, IsNotEmpty, IsString } from 'class-validator'; -import { TagType } from 'src/infra/entities/tag.entity'; +import { TagType } from 'src/entities/tag.entity'; import { Optional } from 'src/validation'; export class CreateTagDto { diff --git a/server/src/domain/tag/tag.service.spec.ts b/server/src/domain/tag/tag.service.spec.ts index 012a745eeb..9f630cdc0c 100644 --- a/server/src/domain/tag/tag.service.spec.ts +++ b/server/src/domain/tag/tag.service.spec.ts @@ -2,7 +2,7 @@ import { BadRequestException } from '@nestjs/common'; import { when } from 'jest-when'; import { AssetIdErrorReason } from 'src/domain/asset/response-dto/asset-ids-response.dto'; import { TagService } from 'src/domain/tag/tag.service'; -import { TagType } from 'src/infra/entities/tag.entity'; +import { TagType } from 'src/entities/tag.entity'; import { ITagRepository } from 'src/interfaces/tag.repository'; import { assetStub } from 'test/fixtures/asset.stub'; import { authStub } from 'test/fixtures/auth.stub'; diff --git a/server/src/domain/user/dto/update-user.dto.ts b/server/src/domain/user/dto/update-user.dto.ts index c7c47c4cff..059971e6c6 100644 --- a/server/src/domain/user/dto/update-user.dto.ts +++ b/server/src/domain/user/dto/update-user.dto.ts @@ -1,7 +1,7 @@ import { ApiProperty } from '@nestjs/swagger'; import { Transform } from 'class-transformer'; import { IsEmail, IsEnum, IsNotEmpty, IsNumber, IsPositive, IsString, IsUUID } from 'class-validator'; -import { UserAvatarColor } from 'src/infra/entities/user.entity'; +import { UserAvatarColor } from 'src/entities/user.entity'; import { Optional, ValidateBoolean, toEmail, toSanitized } from 'src/validation'; export class UpdateUserDto { diff --git a/server/src/domain/user/response-dto/user-response.dto.ts b/server/src/domain/user/response-dto/user-response.dto.ts index b2a5d12cf5..12ffca48c2 100644 --- a/server/src/domain/user/response-dto/user-response.dto.ts +++ b/server/src/domain/user/response-dto/user-response.dto.ts @@ -1,6 +1,6 @@ import { ApiProperty } from '@nestjs/swagger'; import { IsEnum } from 'class-validator'; -import { UserAvatarColor, UserEntity, UserStatus } from 'src/infra/entities/user.entity'; +import { UserAvatarColor, UserEntity, UserStatus } from 'src/entities/user.entity'; export const getRandomAvatarColor = (user: UserEntity): UserAvatarColor => { const values = Object.values(UserAvatarColor); diff --git a/server/src/domain/user/user.service.spec.ts b/server/src/domain/user/user.service.spec.ts index c187e71cc4..5b9a1de957 100644 --- a/server/src/domain/user/user.service.spec.ts +++ b/server/src/domain/user/user.service.spec.ts @@ -9,7 +9,7 @@ import { JobName } from 'src/domain/job/job.constants'; import { UpdateUserDto } from 'src/domain/user/dto/update-user.dto'; import { mapUser } from 'src/domain/user/response-dto/user-response.dto'; import { UserService } from 'src/domain/user/user.service'; -import { UserEntity, UserStatus } from 'src/infra/entities/user.entity'; +import { UserEntity, UserStatus } from 'src/entities/user.entity'; import { IAlbumRepository } from 'src/interfaces/album.repository'; import { ICryptoRepository } from 'src/interfaces/crypto.repository'; import { IJobRepository } from 'src/interfaces/job.repository'; diff --git a/server/src/domain/user/user.service.ts b/server/src/domain/user/user.service.ts index 3b2bbf370f..349a775ec5 100644 --- a/server/src/domain/user/user.service.ts +++ b/server/src/domain/user/user.service.ts @@ -15,7 +15,7 @@ import { mapCreateProfileImageResponse, } from 'src/domain/user/response-dto/create-profile-image-response.dto'; import { UserResponseDto, mapUser } from 'src/domain/user/response-dto/user-response.dto'; -import { UserEntity, UserStatus } from 'src/infra/entities/user.entity'; +import { UserEntity, UserStatus } from 'src/entities/user.entity'; import { ImmichLogger } from 'src/infra/logger'; import { IAlbumRepository } from 'src/interfaces/album.repository'; import { ICryptoRepository } from 'src/interfaces/crypto.repository'; diff --git a/server/src/infra/entities/activity.entity.ts b/server/src/entities/activity.entity.ts similarity index 86% rename from server/src/infra/entities/activity.entity.ts rename to server/src/entities/activity.entity.ts index 4785955563..8de76ac894 100644 --- a/server/src/infra/entities/activity.entity.ts +++ b/server/src/entities/activity.entity.ts @@ -1,6 +1,6 @@ -import { AlbumEntity } from 'src/infra/entities/album.entity'; -import { AssetEntity } from 'src/infra/entities/asset.entity'; -import { UserEntity } from 'src/infra/entities/user.entity'; +import { AlbumEntity } from 'src/entities/album.entity'; +import { AssetEntity } from 'src/entities/asset.entity'; +import { UserEntity } from 'src/entities/user.entity'; import { Check, Column, diff --git a/server/src/infra/entities/album.entity.ts b/server/src/entities/album.entity.ts similarity index 88% rename from server/src/infra/entities/album.entity.ts rename to server/src/entities/album.entity.ts index ab15d401d4..99fae4f23d 100644 --- a/server/src/infra/entities/album.entity.ts +++ b/server/src/entities/album.entity.ts @@ -1,6 +1,6 @@ -import { AssetEntity } from 'src/infra/entities/asset.entity'; -import { SharedLinkEntity } from 'src/infra/entities/shared-link.entity'; -import { UserEntity } from 'src/infra/entities/user.entity'; +import { AssetEntity } from 'src/entities/asset.entity'; +import { SharedLinkEntity } from 'src/entities/shared-link.entity'; +import { UserEntity } from 'src/entities/user.entity'; import { Column, CreateDateColumn, diff --git a/server/src/infra/entities/api-key.entity.ts b/server/src/entities/api-key.entity.ts similarity index 90% rename from server/src/infra/entities/api-key.entity.ts rename to server/src/entities/api-key.entity.ts index 0d1893398f..18aaa83041 100644 --- a/server/src/infra/entities/api-key.entity.ts +++ b/server/src/entities/api-key.entity.ts @@ -1,4 +1,4 @@ -import { UserEntity } from 'src/infra/entities/user.entity'; +import { UserEntity } from 'src/entities/user.entity'; import { Column, CreateDateColumn, Entity, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from 'typeorm'; @Entity('api_keys') diff --git a/server/src/infra/entities/asset-face.entity.ts b/server/src/entities/asset-face.entity.ts similarity index 91% rename from server/src/infra/entities/asset-face.entity.ts rename to server/src/entities/asset-face.entity.ts index afd2a263ac..38fcd46063 100644 --- a/server/src/infra/entities/asset-face.entity.ts +++ b/server/src/entities/asset-face.entity.ts @@ -1,5 +1,5 @@ -import { AssetEntity } from 'src/infra/entities/asset.entity'; -import { PersonEntity } from 'src/infra/entities/person.entity'; +import { AssetEntity } from 'src/entities/asset.entity'; +import { PersonEntity } from 'src/entities/person.entity'; import { Column, Entity, Index, ManyToOne, PrimaryGeneratedColumn } from 'typeorm'; @Entity('asset_faces', { synchronize: false }) diff --git a/server/src/infra/entities/asset-job-status.entity.ts b/server/src/entities/asset-job-status.entity.ts similarity index 88% rename from server/src/infra/entities/asset-job-status.entity.ts rename to server/src/entities/asset-job-status.entity.ts index 22d98e367d..b500752037 100644 --- a/server/src/infra/entities/asset-job-status.entity.ts +++ b/server/src/entities/asset-job-status.entity.ts @@ -1,4 +1,4 @@ -import { AssetEntity } from 'src/infra/entities/asset.entity'; +import { AssetEntity } from 'src/entities/asset.entity'; import { Column, Entity, JoinColumn, OneToOne, PrimaryColumn } from 'typeorm'; @Entity('asset_job_status') diff --git a/server/src/infra/entities/asset-stack.entity.ts b/server/src/entities/asset-stack.entity.ts similarity index 88% rename from server/src/infra/entities/asset-stack.entity.ts rename to server/src/entities/asset-stack.entity.ts index 372fac1e40..28607e7ab6 100644 --- a/server/src/infra/entities/asset-stack.entity.ts +++ b/server/src/entities/asset-stack.entity.ts @@ -1,4 +1,4 @@ -import { AssetEntity } from 'src/infra/entities/asset.entity'; +import { AssetEntity } from 'src/entities/asset.entity'; import { Column, Entity, JoinColumn, OneToMany, OneToOne, PrimaryGeneratedColumn } from 'typeorm'; @Entity('asset_stack') diff --git a/server/src/infra/entities/asset.entity.ts b/server/src/entities/asset.entity.ts similarity index 85% rename from server/src/infra/entities/asset.entity.ts rename to server/src/entities/asset.entity.ts index e82bbfb00d..9166361153 100644 --- a/server/src/infra/entities/asset.entity.ts +++ b/server/src/entities/asset.entity.ts @@ -1,14 +1,14 @@ -import { AlbumEntity } from 'src/infra/entities/album.entity'; -import { AssetFaceEntity } from 'src/infra/entities/asset-face.entity'; -import { AssetJobStatusEntity } from 'src/infra/entities/asset-job-status.entity'; -import { AssetStackEntity } from 'src/infra/entities/asset-stack.entity'; -import { ExifEntity } from 'src/infra/entities/exif.entity'; -import { LibraryEntity } from 'src/infra/entities/library.entity'; -import { SharedLinkEntity } from 'src/infra/entities/shared-link.entity'; -import { SmartInfoEntity } from 'src/infra/entities/smart-info.entity'; -import { SmartSearchEntity } from 'src/infra/entities/smart-search.entity'; -import { TagEntity } from 'src/infra/entities/tag.entity'; -import { UserEntity } from 'src/infra/entities/user.entity'; +import { AlbumEntity } from 'src/entities/album.entity'; +import { AssetFaceEntity } from 'src/entities/asset-face.entity'; +import { AssetJobStatusEntity } from 'src/entities/asset-job-status.entity'; +import { AssetStackEntity } from 'src/entities/asset-stack.entity'; +import { ExifEntity } from 'src/entities/exif.entity'; +import { LibraryEntity } from 'src/entities/library.entity'; +import { SharedLinkEntity } from 'src/entities/shared-link.entity'; +import { SmartInfoEntity } from 'src/entities/smart-info.entity'; +import { SmartSearchEntity } from 'src/entities/smart-search.entity'; +import { TagEntity } from 'src/entities/tag.entity'; +import { UserEntity } from 'src/entities/user.entity'; import { Column, CreateDateColumn, diff --git a/server/src/infra/entities/audit.entity.ts b/server/src/entities/audit.entity.ts similarity index 100% rename from server/src/infra/entities/audit.entity.ts rename to server/src/entities/audit.entity.ts diff --git a/server/src/infra/entities/exif.entity.ts b/server/src/entities/exif.entity.ts similarity index 98% rename from server/src/infra/entities/exif.entity.ts rename to server/src/entities/exif.entity.ts index 8ed645d11b..6f7aafadf4 100644 --- a/server/src/infra/entities/exif.entity.ts +++ b/server/src/entities/exif.entity.ts @@ -1,4 +1,4 @@ -import { AssetEntity } from 'src/infra/entities/asset.entity'; +import { AssetEntity } from 'src/entities/asset.entity'; import { Index, JoinColumn, OneToOne, PrimaryColumn } from 'typeorm'; import { Column } from 'typeorm/decorator/columns/Column.js'; import { Entity } from 'typeorm/decorator/entity/Entity.js'; diff --git a/server/src/infra/entities/geodata-places.entity.ts b/server/src/entities/geodata-places.entity.ts similarity index 100% rename from server/src/infra/entities/geodata-places.entity.ts rename to server/src/entities/geodata-places.entity.ts diff --git a/server/src/entities/index.ts b/server/src/entities/index.ts new file mode 100644 index 0000000000..33b5f00135 --- /dev/null +++ b/server/src/entities/index.ts @@ -0,0 +1,47 @@ +import { ActivityEntity } from 'src/entities/activity.entity'; +import { AlbumEntity } from 'src/entities/album.entity'; +import { APIKeyEntity } from 'src/entities/api-key.entity'; +import { AssetFaceEntity } from 'src/entities/asset-face.entity'; +import { AssetJobStatusEntity } from 'src/entities/asset-job-status.entity'; +import { AssetStackEntity } from 'src/entities/asset-stack.entity'; +import { AssetEntity } from 'src/entities/asset.entity'; +import { AuditEntity } from 'src/entities/audit.entity'; +import { ExifEntity } from 'src/entities/exif.entity'; +import { GeodataPlacesEntity } from 'src/entities/geodata-places.entity'; +import { LibraryEntity } from 'src/entities/library.entity'; +import { MoveEntity } from 'src/entities/move.entity'; +import { PartnerEntity } from 'src/entities/partner.entity'; +import { PersonEntity } from 'src/entities/person.entity'; +import { SharedLinkEntity } from 'src/entities/shared-link.entity'; +import { SmartInfoEntity } from 'src/entities/smart-info.entity'; +import { SmartSearchEntity } from 'src/entities/smart-search.entity'; +import { SystemConfigEntity } from 'src/entities/system-config.entity'; +import { SystemMetadataEntity } from 'src/entities/system-metadata.entity'; +import { TagEntity } from 'src/entities/tag.entity'; +import { UserTokenEntity } from 'src/entities/user-token.entity'; +import { UserEntity } from 'src/entities/user.entity'; + +export const databaseEntities = [ + ActivityEntity, + AlbumEntity, + APIKeyEntity, + AssetEntity, + AssetStackEntity, + AssetFaceEntity, + AssetJobStatusEntity, + AuditEntity, + ExifEntity, + GeodataPlacesEntity, + MoveEntity, + PartnerEntity, + PersonEntity, + SharedLinkEntity, + SmartInfoEntity, + SmartSearchEntity, + SystemConfigEntity, + SystemMetadataEntity, + TagEntity, + UserEntity, + UserTokenEntity, + LibraryEntity, +]; diff --git a/server/src/infra/entities/library.entity.ts b/server/src/entities/library.entity.ts similarity index 90% rename from server/src/infra/entities/library.entity.ts rename to server/src/entities/library.entity.ts index f68a380952..8be560a889 100644 --- a/server/src/infra/entities/library.entity.ts +++ b/server/src/entities/library.entity.ts @@ -1,5 +1,5 @@ -import { AssetEntity } from 'src/infra/entities/asset.entity'; -import { UserEntity } from 'src/infra/entities/user.entity'; +import { AssetEntity } from 'src/entities/asset.entity'; +import { UserEntity } from 'src/entities/user.entity'; import { Column, CreateDateColumn, diff --git a/server/src/infra/entities/move.entity.ts b/server/src/entities/move.entity.ts similarity index 100% rename from server/src/infra/entities/move.entity.ts rename to server/src/entities/move.entity.ts diff --git a/server/src/infra/entities/partner.entity.ts b/server/src/entities/partner.entity.ts similarity index 92% rename from server/src/infra/entities/partner.entity.ts rename to server/src/entities/partner.entity.ts index abf0400dae..189f6f51a7 100644 --- a/server/src/infra/entities/partner.entity.ts +++ b/server/src/entities/partner.entity.ts @@ -1,4 +1,4 @@ -import { UserEntity } from 'src/infra/entities/user.entity'; +import { UserEntity } from 'src/entities/user.entity'; import { Column, CreateDateColumn, Entity, JoinColumn, ManyToOne, PrimaryColumn, UpdateDateColumn } from 'typeorm'; @Entity('partners') diff --git a/server/src/infra/entities/person.entity.ts b/server/src/entities/person.entity.ts similarity index 88% rename from server/src/infra/entities/person.entity.ts rename to server/src/entities/person.entity.ts index 046ac9d407..bc60efcd6e 100644 --- a/server/src/infra/entities/person.entity.ts +++ b/server/src/entities/person.entity.ts @@ -1,5 +1,5 @@ -import { AssetFaceEntity } from 'src/infra/entities/asset-face.entity'; -import { UserEntity } from 'src/infra/entities/user.entity'; +import { AssetFaceEntity } from 'src/entities/asset-face.entity'; +import { UserEntity } from 'src/entities/user.entity'; import { Check, Column, diff --git a/server/src/infra/entities/shared-link.entity.ts b/server/src/entities/shared-link.entity.ts similarity index 89% rename from server/src/infra/entities/shared-link.entity.ts rename to server/src/entities/shared-link.entity.ts index 7370146df2..f328192f7f 100644 --- a/server/src/infra/entities/shared-link.entity.ts +++ b/server/src/entities/shared-link.entity.ts @@ -1,6 +1,6 @@ -import { AlbumEntity } from 'src/infra/entities/album.entity'; -import { AssetEntity } from 'src/infra/entities/asset.entity'; -import { UserEntity } from 'src/infra/entities/user.entity'; +import { AlbumEntity } from 'src/entities/album.entity'; +import { AssetEntity } from 'src/entities/asset.entity'; +import { UserEntity } from 'src/entities/user.entity'; import { Column, CreateDateColumn, diff --git a/server/src/infra/entities/smart-info.entity.ts b/server/src/entities/smart-info.entity.ts similarity index 89% rename from server/src/infra/entities/smart-info.entity.ts rename to server/src/entities/smart-info.entity.ts index 5bd65e7fbe..86190c174d 100644 --- a/server/src/infra/entities/smart-info.entity.ts +++ b/server/src/entities/smart-info.entity.ts @@ -1,4 +1,4 @@ -import { AssetEntity } from 'src/infra/entities/asset.entity'; +import { AssetEntity } from 'src/entities/asset.entity'; import { Column, Entity, JoinColumn, OneToOne, PrimaryColumn } from 'typeorm'; @Entity('smart_info', { synchronize: false }) diff --git a/server/src/infra/entities/smart-search.entity.ts b/server/src/entities/smart-search.entity.ts similarity index 89% rename from server/src/infra/entities/smart-search.entity.ts rename to server/src/entities/smart-search.entity.ts index bbd966fd4e..4595ad2403 100644 --- a/server/src/infra/entities/smart-search.entity.ts +++ b/server/src/entities/smart-search.entity.ts @@ -1,4 +1,4 @@ -import { AssetEntity } from 'src/infra/entities/asset.entity'; +import { AssetEntity } from 'src/entities/asset.entity'; import { Column, Entity, Index, JoinColumn, OneToOne, PrimaryColumn } from 'typeorm'; @Entity('smart_search', { synchronize: false }) diff --git a/server/src/infra/entities/system-config.entity.ts b/server/src/entities/system-config.entity.ts similarity index 100% rename from server/src/infra/entities/system-config.entity.ts rename to server/src/entities/system-config.entity.ts diff --git a/server/src/infra/entities/system-metadata.entity.ts b/server/src/entities/system-metadata.entity.ts similarity index 100% rename from server/src/infra/entities/system-metadata.entity.ts rename to server/src/entities/system-metadata.entity.ts diff --git a/server/src/infra/entities/tag.entity.ts b/server/src/entities/tag.entity.ts similarity index 88% rename from server/src/infra/entities/tag.entity.ts rename to server/src/entities/tag.entity.ts index b159dcb2eb..93edcb0555 100644 --- a/server/src/infra/entities/tag.entity.ts +++ b/server/src/entities/tag.entity.ts @@ -1,5 +1,5 @@ -import { AssetEntity } from 'src/infra/entities/asset.entity'; -import { UserEntity } from 'src/infra/entities/user.entity'; +import { AssetEntity } from 'src/entities/asset.entity'; +import { UserEntity } from 'src/entities/user.entity'; import { Column, Entity, ManyToMany, ManyToOne, PrimaryGeneratedColumn, Unique } from 'typeorm'; @Entity('tags') diff --git a/server/src/infra/entities/user-token.entity.ts b/server/src/entities/user-token.entity.ts similarity index 91% rename from server/src/infra/entities/user-token.entity.ts rename to server/src/entities/user-token.entity.ts index fd04c20dd1..3c2cf2cf6c 100644 --- a/server/src/infra/entities/user-token.entity.ts +++ b/server/src/entities/user-token.entity.ts @@ -1,4 +1,4 @@ -import { UserEntity } from 'src/infra/entities/user.entity'; +import { UserEntity } from 'src/entities/user.entity'; import { Column, CreateDateColumn, Entity, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from 'typeorm'; @Entity('user_token') diff --git a/server/src/infra/entities/user.entity.ts b/server/src/entities/user.entity.ts similarity index 93% rename from server/src/infra/entities/user.entity.ts rename to server/src/entities/user.entity.ts index 888655d3ba..4d6361abad 100644 --- a/server/src/infra/entities/user.entity.ts +++ b/server/src/entities/user.entity.ts @@ -1,5 +1,5 @@ -import { AssetEntity } from 'src/infra/entities/asset.entity'; -import { TagEntity } from 'src/infra/entities/tag.entity'; +import { AssetEntity } from 'src/entities/asset.entity'; +import { TagEntity } from 'src/entities/tag.entity'; import { Column, CreateDateColumn, diff --git a/server/src/immich-admin/main.ts b/server/src/immich-admin/main.ts index 0b569dd9ad..4a561ec884 100755 --- a/server/src/immich-admin/main.ts +++ b/server/src/immich-admin/main.ts @@ -1,6 +1,6 @@ import { CommandFactory } from 'nest-commander'; +import { LogLevel } from 'src/entities/system-config.entity'; import { AppModule } from 'src/immich-admin/app.module'; -import { LogLevel } from 'src/infra/entities/system-config.entity'; export async function bootstrap() { process.env.LOG_LEVEL = LogLevel.WARN; diff --git a/server/src/immich/api-v1/asset/asset-repository.ts b/server/src/immich/api-v1/asset/asset-repository.ts index 12a6278758..e7b870239c 100644 --- a/server/src/immich/api-v1/asset/asset-repository.ts +++ b/server/src/immich/api-v1/asset/asset-repository.ts @@ -1,12 +1,12 @@ import { Injectable } from '@nestjs/common'; import { InjectRepository } from '@nestjs/typeorm'; +import { AssetEntity } from 'src/entities/asset.entity'; +import { ExifEntity } from 'src/entities/exif.entity'; import { AssetSearchDto } from 'src/immich/api-v1/asset/dto/asset-search.dto'; import { CheckExistingAssetsDto } from 'src/immich/api-v1/asset/dto/check-existing-assets.dto'; import { SearchPropertiesDto } from 'src/immich/api-v1/asset/dto/search-properties.dto'; import { CuratedLocationsResponseDto } from 'src/immich/api-v1/asset/response-dto/curated-locations-response.dto'; import { CuratedObjectsResponseDto } from 'src/immich/api-v1/asset/response-dto/curated-objects-response.dto'; -import { AssetEntity } from 'src/infra/entities/asset.entity'; -import { ExifEntity } from 'src/infra/entities/exif.entity'; import { OptionalBetween } from 'src/infra/infra.utils'; import { In } from 'typeorm/find-options/operator/In.js'; import { Repository } from 'typeorm/repository/Repository.js'; diff --git a/server/src/immich/api-v1/asset/asset.service.spec.ts b/server/src/immich/api-v1/asset/asset.service.spec.ts index 37f1a540fd..d10590475f 100644 --- a/server/src/immich/api-v1/asset/asset.service.spec.ts +++ b/server/src/immich/api-v1/asset/asset.service.spec.ts @@ -1,11 +1,11 @@ import { when } from 'jest-when'; import { JobName } from 'src/domain/job/job.constants'; +import { ASSET_CHECKSUM_CONSTRAINT, AssetEntity, AssetType } from 'src/entities/asset.entity'; +import { ExifEntity } from 'src/entities/exif.entity'; import { IAssetRepositoryV1 } from 'src/immich/api-v1/asset/asset-repository'; import { AssetService } from 'src/immich/api-v1/asset/asset.service'; import { CreateAssetDto } from 'src/immich/api-v1/asset/dto/create-asset.dto'; import { AssetRejectReason, AssetUploadAction } from 'src/immich/api-v1/asset/response-dto/asset-check-response.dto'; -import { ASSET_CHECKSUM_CONSTRAINT, AssetEntity, AssetType } from 'src/infra/entities/asset.entity'; -import { ExifEntity } from 'src/infra/entities/exif.entity'; import { IAssetRepository } from 'src/interfaces/asset.repository'; import { IJobRepository } from 'src/interfaces/job.repository'; import { ILibraryRepository } from 'src/interfaces/library.repository'; diff --git a/server/src/immich/api-v1/asset/asset.service.ts b/server/src/immich/api-v1/asset/asset.service.ts index 879128077f..0a57226901 100644 --- a/server/src/immich/api-v1/asset/asset.service.ts +++ b/server/src/immich/api-v1/asset/asset.service.ts @@ -11,6 +11,8 @@ import { AssetResponseDto, mapAsset } from 'src/domain/asset/response-dto/asset- import { AuthDto } from 'src/domain/auth/auth.dto'; import { mimeTypes } from 'src/domain/domain.constant'; import { JobName } from 'src/domain/job/job.constants'; +import { ASSET_CHECKSUM_CONSTRAINT, AssetEntity, AssetType } from 'src/entities/asset.entity'; +import { LibraryType } from 'src/entities/library.entity'; import { IAssetRepositoryV1 } from 'src/immich/api-v1/asset/asset-repository'; import { AssetBulkUploadCheckDto } from 'src/immich/api-v1/asset/dto/asset-check.dto'; import { AssetSearchDto } from 'src/immich/api-v1/asset/dto/asset-search.dto'; @@ -27,8 +29,6 @@ import { AssetFileUploadResponseDto } from 'src/immich/api-v1/asset/response-dto import { CheckExistingAssetsResponseDto } from 'src/immich/api-v1/asset/response-dto/check-existing-assets-response.dto'; import { CuratedLocationsResponseDto } from 'src/immich/api-v1/asset/response-dto/curated-locations-response.dto'; import { CuratedObjectsResponseDto } from 'src/immich/api-v1/asset/response-dto/curated-objects-response.dto'; -import { ASSET_CHECKSUM_CONSTRAINT, AssetEntity, AssetType } from 'src/infra/entities/asset.entity'; -import { LibraryType } from 'src/infra/entities/library.entity'; import { ImmichLogger } from 'src/infra/logger'; import { IAccessRepository } from 'src/interfaces/access.repository'; import { IAssetRepository } from 'src/interfaces/asset.repository'; diff --git a/server/src/immich/app.module.ts b/server/src/immich/app.module.ts index 66edf2341f..a5b88473e7 100644 --- a/server/src/immich/app.module.ts +++ b/server/src/immich/app.module.ts @@ -24,12 +24,12 @@ import { TagController } from 'src/controllers/tag.controller'; import { TrashController } from 'src/controllers/trash.controller'; import { UserController } from 'src/controllers/user.controller'; import { DomainModule } from 'src/domain/domain.module'; +import { AssetEntity } from 'src/entities/asset.entity'; +import { ExifEntity } from 'src/entities/exif.entity'; import { AssetRepositoryV1, IAssetRepositoryV1 } from 'src/immich/api-v1/asset/asset-repository'; import { AssetController as AssetControllerV1 } from 'src/immich/api-v1/asset/asset.controller'; import { AssetService as AssetServiceV1 } from 'src/immich/api-v1/asset/asset.service'; import { AppService } from 'src/immich/app.service'; -import { AssetEntity } from 'src/infra/entities/asset.entity'; -import { ExifEntity } from 'src/infra/entities/exif.entity'; import { InfraModule } from 'src/infra/infra.module'; import { AuthGuard } from 'src/middleware/auth.guard'; import { ErrorInterceptor } from 'src/middleware/error.interceptor'; diff --git a/server/src/infra/database.config.ts b/server/src/infra/database.config.ts index fd6286f1bb..572288c59c 100644 --- a/server/src/infra/database.config.ts +++ b/server/src/infra/database.config.ts @@ -16,11 +16,11 @@ const urlOrParts = url /* eslint unicorn/prefer-module: "off" -- We can fix this when migrating to ESM*/ export const databaseConfig: PostgresConnectionOptions = { type: 'postgres', - entities: [__dirname + '/entities/*.entity.{js,ts}'], - synchronize: false, - migrations: [__dirname + '/migrations/*.{js,ts}'], - subscribers: [__dirname + '/subscribers/*.{js,ts}'], + entities: [__dirname + '/../entities/*.entity.{js,ts}'], + migrations: [__dirname + '/../migrations/*.{js,ts}'], + subscribers: [__dirname + '/../subscribers/*.{js,ts}'], migrationsRun: false, + synchronize: false, connectTimeoutMS: 10_000, // 10 seconds parseInt8: true, ...urlOrParts, diff --git a/server/src/infra/entities/index.ts b/server/src/infra/entities/index.ts deleted file mode 100644 index 47fc3c7f19..0000000000 --- a/server/src/infra/entities/index.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { ActivityEntity } from 'src/infra/entities/activity.entity'; -import { AlbumEntity } from 'src/infra/entities/album.entity'; -import { APIKeyEntity } from 'src/infra/entities/api-key.entity'; -import { AssetFaceEntity } from 'src/infra/entities/asset-face.entity'; -import { AssetJobStatusEntity } from 'src/infra/entities/asset-job-status.entity'; -import { AssetStackEntity } from 'src/infra/entities/asset-stack.entity'; -import { AssetEntity } from 'src/infra/entities/asset.entity'; -import { AuditEntity } from 'src/infra/entities/audit.entity'; -import { ExifEntity } from 'src/infra/entities/exif.entity'; -import { GeodataPlacesEntity } from 'src/infra/entities/geodata-places.entity'; -import { LibraryEntity } from 'src/infra/entities/library.entity'; -import { MoveEntity } from 'src/infra/entities/move.entity'; -import { PartnerEntity } from 'src/infra/entities/partner.entity'; -import { PersonEntity } from 'src/infra/entities/person.entity'; -import { SharedLinkEntity } from 'src/infra/entities/shared-link.entity'; -import { SmartInfoEntity } from 'src/infra/entities/smart-info.entity'; -import { SmartSearchEntity } from 'src/infra/entities/smart-search.entity'; -import { SystemConfigEntity } from 'src/infra/entities/system-config.entity'; -import { SystemMetadataEntity } from 'src/infra/entities/system-metadata.entity'; -import { TagEntity } from 'src/infra/entities/tag.entity'; -import { UserTokenEntity } from 'src/infra/entities/user-token.entity'; -import { UserEntity } from 'src/infra/entities/user.entity'; - -export const databaseEntities = [ - ActivityEntity, - AlbumEntity, - APIKeyEntity, - AssetEntity, - AssetStackEntity, - AssetFaceEntity, - AssetJobStatusEntity, - AuditEntity, - ExifEntity, - GeodataPlacesEntity, - MoveEntity, - PartnerEntity, - PersonEntity, - SharedLinkEntity, - SmartInfoEntity, - SmartSearchEntity, - SystemConfigEntity, - SystemMetadataEntity, - TagEntity, - UserEntity, - UserTokenEntity, - LibraryEntity, -]; diff --git a/server/src/infra/infra.module.ts b/server/src/infra/infra.module.ts index 9864a01917..b0387ba96a 100644 --- a/server/src/infra/infra.module.ts +++ b/server/src/infra/infra.module.ts @@ -6,36 +6,9 @@ import { ScheduleModule, SchedulerRegistry } from '@nestjs/schedule'; import { TypeOrmModule } from '@nestjs/typeorm'; import { OpenTelemetryModule } from 'nestjs-otel'; import { bullConfig, bullQueues, immichAppConfig } from 'src/config'; +import { databaseEntities } from 'src/entities'; import { databaseConfig } from 'src/infra/database.config'; -import { databaseEntities } from 'src/infra/entities'; import { otelConfig } from 'src/infra/instrumentation'; -import { AccessRepository } from 'src/infra/repositories/access.repository'; -import { ActivityRepository } from 'src/infra/repositories/activity.repository'; -import { AlbumRepository } from 'src/infra/repositories/album.repository'; -import { ApiKeyRepository } from 'src/infra/repositories/api-key.repository'; -import { AssetStackRepository } from 'src/infra/repositories/asset-stack.repository'; -import { AssetRepository } from 'src/infra/repositories/asset.repository'; -import { AuditRepository } from 'src/infra/repositories/audit.repository'; -import { CommunicationRepository } from 'src/infra/repositories/communication.repository'; -import { CryptoRepository } from 'src/infra/repositories/crypto.repository'; -import { DatabaseRepository } from 'src/infra/repositories/database.repository'; -import { FilesystemProvider } from 'src/infra/repositories/filesystem.provider'; -import { JobRepository } from 'src/infra/repositories/job.repository'; -import { LibraryRepository } from 'src/infra/repositories/library.repository'; -import { MachineLearningRepository } from 'src/infra/repositories/machine-learning.repository'; -import { MediaRepository } from 'src/infra/repositories/media.repository'; -import { MetadataRepository } from 'src/infra/repositories/metadata.repository'; -import { MoveRepository } from 'src/infra/repositories/move.repository'; -import { PartnerRepository } from 'src/infra/repositories/partner.repository'; -import { PersonRepository } from 'src/infra/repositories/person.repository'; -import { SearchRepository } from 'src/infra/repositories/search.repository'; -import { ServerInfoRepository } from 'src/infra/repositories/server-info.repository'; -import { SharedLinkRepository } from 'src/infra/repositories/shared-link.repository'; -import { SystemConfigRepository } from 'src/infra/repositories/system-config.repository'; -import { SystemMetadataRepository } from 'src/infra/repositories/system-metadata.repository'; -import { TagRepository } from 'src/infra/repositories/tag.repository'; -import { UserTokenRepository } from 'src/infra/repositories/user-token.repository'; -import { UserRepository } from 'src/infra/repositories/user.repository'; import { IAccessRepository } from 'src/interfaces/access.repository'; import { IActivityRepository } from 'src/interfaces/activity.repository'; import { IAlbumRepository } from 'src/interfaces/album.repository'; @@ -63,6 +36,33 @@ import { ISystemMetadataRepository } from 'src/interfaces/system-metadata.reposi import { ITagRepository } from 'src/interfaces/tag.repository'; import { IUserTokenRepository } from 'src/interfaces/user-token.repository'; import { IUserRepository } from 'src/interfaces/user.repository'; +import { AccessRepository } from 'src/repositories/access.repository'; +import { ActivityRepository } from 'src/repositories/activity.repository'; +import { AlbumRepository } from 'src/repositories/album.repository'; +import { ApiKeyRepository } from 'src/repositories/api-key.repository'; +import { AssetStackRepository } from 'src/repositories/asset-stack.repository'; +import { AssetRepository } from 'src/repositories/asset.repository'; +import { AuditRepository } from 'src/repositories/audit.repository'; +import { CommunicationRepository } from 'src/repositories/communication.repository'; +import { CryptoRepository } from 'src/repositories/crypto.repository'; +import { DatabaseRepository } from 'src/repositories/database.repository'; +import { FilesystemProvider } from 'src/repositories/filesystem.provider'; +import { JobRepository } from 'src/repositories/job.repository'; +import { LibraryRepository } from 'src/repositories/library.repository'; +import { MachineLearningRepository } from 'src/repositories/machine-learning.repository'; +import { MediaRepository } from 'src/repositories/media.repository'; +import { MetadataRepository } from 'src/repositories/metadata.repository'; +import { MoveRepository } from 'src/repositories/move.repository'; +import { PartnerRepository } from 'src/repositories/partner.repository'; +import { PersonRepository } from 'src/repositories/person.repository'; +import { SearchRepository } from 'src/repositories/search.repository'; +import { ServerInfoRepository } from 'src/repositories/server-info.repository'; +import { SharedLinkRepository } from 'src/repositories/shared-link.repository'; +import { SystemConfigRepository } from 'src/repositories/system-config.repository'; +import { SystemMetadataRepository } from 'src/repositories/system-metadata.repository'; +import { TagRepository } from 'src/repositories/tag.repository'; +import { UserTokenRepository } from 'src/repositories/user-token.repository'; +import { UserRepository } from 'src/repositories/user.repository'; const providers: Provider[] = [ { provide: IActivityRepository, useClass: ActivityRepository }, diff --git a/server/src/infra/infra.utils.ts b/server/src/infra/infra.utils.ts index 36f1ef4bf4..2b75af3798 100644 --- a/server/src/infra/infra.utils.ts +++ b/server/src/infra/infra.utils.ts @@ -1,5 +1,5 @@ import _ from 'lodash'; -import { AssetEntity } from 'src/infra/entities/asset.entity'; +import { AssetEntity } from 'src/entities/asset.entity'; import { AssetSearchBuilderOptions } from 'src/interfaces/search.repository'; import { Paginated, PaginatedBuilderOptions, PaginationMode, PaginationOptions, PaginationResult } from 'src/utils'; import { diff --git a/server/src/infra/logger.ts b/server/src/infra/logger.ts index dcc87a8752..fef13a8fbb 100644 --- a/server/src/infra/logger.ts +++ b/server/src/infra/logger.ts @@ -1,6 +1,6 @@ import { ConsoleLogger } from '@nestjs/common'; import { isLogLevelEnabled } from '@nestjs/common/services/utils/is-log-level-enabled.util'; -import { LogLevel } from 'src/infra/entities/system-config.entity'; +import { LogLevel } from 'src/entities/system-config.entity'; const LOG_LEVELS = [LogLevel.VERBOSE, LogLevel.DEBUG, LogLevel.LOG, LogLevel.WARN, LogLevel.ERROR, LogLevel.FATAL]; diff --git a/server/src/infra/sql-generator/index.ts b/server/src/infra/sql-generator/index.ts index a117568d82..10730fc36e 100644 --- a/server/src/infra/sql-generator/index.ts +++ b/server/src/infra/sql-generator/index.ts @@ -6,26 +6,26 @@ import { TypeOrmModule } from '@nestjs/typeorm'; import { mkdir, rm, writeFile } from 'node:fs/promises'; import { join } from 'node:path'; import { GENERATE_SQL_KEY, GenerateSqlQueries } from 'src/decorators'; +import { databaseEntities } from 'src/entities'; import { databaseConfig } from 'src/infra/database.config'; -import { databaseEntities } from 'src/infra/entities'; -import { AccessRepository } from 'src/infra/repositories/access.repository'; -import { AlbumRepository } from 'src/infra/repositories/album.repository'; -import { ApiKeyRepository } from 'src/infra/repositories/api-key.repository'; -import { AssetRepository } from 'src/infra/repositories/asset.repository'; -import { AuditRepository } from 'src/infra/repositories/audit.repository'; -import { LibraryRepository } from 'src/infra/repositories/library.repository'; -import { MoveRepository } from 'src/infra/repositories/move.repository'; -import { PartnerRepository } from 'src/infra/repositories/partner.repository'; -import { PersonRepository } from 'src/infra/repositories/person.repository'; -import { SearchRepository } from 'src/infra/repositories/search.repository'; -import { SharedLinkRepository } from 'src/infra/repositories/shared-link.repository'; -import { SystemConfigRepository } from 'src/infra/repositories/system-config.repository'; -import { SystemMetadataRepository } from 'src/infra/repositories/system-metadata.repository'; -import { TagRepository } from 'src/infra/repositories/tag.repository'; -import { UserTokenRepository } from 'src/infra/repositories/user-token.repository'; -import { UserRepository } from 'src/infra/repositories/user.repository'; import { SqlLogger } from 'src/infra/sql-generator/sql.logger'; import { ISystemConfigRepository } from 'src/interfaces/system-config.repository'; +import { AccessRepository } from 'src/repositories/access.repository'; +import { AlbumRepository } from 'src/repositories/album.repository'; +import { ApiKeyRepository } from 'src/repositories/api-key.repository'; +import { AssetRepository } from 'src/repositories/asset.repository'; +import { AuditRepository } from 'src/repositories/audit.repository'; +import { LibraryRepository } from 'src/repositories/library.repository'; +import { MoveRepository } from 'src/repositories/move.repository'; +import { PartnerRepository } from 'src/repositories/partner.repository'; +import { PersonRepository } from 'src/repositories/person.repository'; +import { SearchRepository } from 'src/repositories/search.repository'; +import { SharedLinkRepository } from 'src/repositories/shared-link.repository'; +import { SystemConfigRepository } from 'src/repositories/system-config.repository'; +import { SystemMetadataRepository } from 'src/repositories/system-metadata.repository'; +import { TagRepository } from 'src/repositories/tag.repository'; +import { UserTokenRepository } from 'src/repositories/user-token.repository'; +import { UserRepository } from 'src/repositories/user.repository'; const reflector = new Reflector(); const repositories = [ diff --git a/server/src/interfaces/activity.repository.ts b/server/src/interfaces/activity.repository.ts index 39eb5da6b5..5e7b4d2c72 100644 --- a/server/src/interfaces/activity.repository.ts +++ b/server/src/interfaces/activity.repository.ts @@ -1,5 +1,5 @@ -import { ActivityEntity } from 'src/infra/entities/activity.entity'; -import { ActivitySearch } from 'src/infra/repositories/activity.repository'; +import { ActivityEntity } from 'src/entities/activity.entity'; +import { ActivitySearch } from 'src/repositories/activity.repository'; export const IActivityRepository = 'IActivityRepository'; diff --git a/server/src/interfaces/album.repository.ts b/server/src/interfaces/album.repository.ts index 2133094129..230e94e2a2 100644 --- a/server/src/interfaces/album.repository.ts +++ b/server/src/interfaces/album.repository.ts @@ -1,4 +1,4 @@ -import { AlbumEntity } from 'src/infra/entities/album.entity'; +import { AlbumEntity } from 'src/entities/album.entity'; export const IAlbumRepository = 'IAlbumRepository'; diff --git a/server/src/interfaces/api-key.repository.ts b/server/src/interfaces/api-key.repository.ts index ff6d97dd55..731b7ff6fb 100644 --- a/server/src/interfaces/api-key.repository.ts +++ b/server/src/interfaces/api-key.repository.ts @@ -1,4 +1,4 @@ -import { APIKeyEntity } from 'src/infra/entities/api-key.entity'; +import { APIKeyEntity } from 'src/entities/api-key.entity'; export const IKeyRepository = 'IKeyRepository'; diff --git a/server/src/interfaces/asset-stack.repository.ts b/server/src/interfaces/asset-stack.repository.ts index 32c45b0d19..1e037d38eb 100644 --- a/server/src/interfaces/asset-stack.repository.ts +++ b/server/src/interfaces/asset-stack.repository.ts @@ -1,4 +1,4 @@ -import { AssetStackEntity } from 'src/infra/entities/asset-stack.entity'; +import { AssetStackEntity } from 'src/entities/asset-stack.entity'; export const IAssetStackRepository = 'IAssetStackRepository'; diff --git a/server/src/interfaces/asset.repository.ts b/server/src/interfaces/asset.repository.ts index a362d23499..9bca4a6df8 100644 --- a/server/src/interfaces/asset.repository.ts +++ b/server/src/interfaces/asset.repository.ts @@ -1,7 +1,7 @@ -import { AssetOrder } from 'src/infra/entities/album.entity'; -import { AssetJobStatusEntity } from 'src/infra/entities/asset-job-status.entity'; -import { AssetEntity, AssetType } from 'src/infra/entities/asset.entity'; -import { ExifEntity } from 'src/infra/entities/exif.entity'; +import { AssetOrder } from 'src/entities/album.entity'; +import { AssetJobStatusEntity } from 'src/entities/asset-job-status.entity'; +import { AssetEntity, AssetType } from 'src/entities/asset.entity'; +import { ExifEntity } from 'src/entities/exif.entity'; import { ReverseGeocodeResult } from 'src/interfaces/metadata.repository'; import { AssetSearchOptions, SearchExploreItem } from 'src/interfaces/search.repository'; import { Paginated, PaginationOptions } from 'src/utils'; diff --git a/server/src/interfaces/audit.repository.ts b/server/src/interfaces/audit.repository.ts index 36112bfb8e..767a4bc2f6 100644 --- a/server/src/interfaces/audit.repository.ts +++ b/server/src/interfaces/audit.repository.ts @@ -1,4 +1,4 @@ -import { AuditEntity, DatabaseAction, EntityType } from 'src/infra/entities/audit.entity'; +import { AuditEntity, DatabaseAction, EntityType } from 'src/entities/audit.entity'; export const IAuditRepository = 'IAuditRepository'; diff --git a/server/src/interfaces/communication.repository.ts b/server/src/interfaces/communication.repository.ts index 38315a9bb9..870c0d9375 100644 --- a/server/src/interfaces/communication.repository.ts +++ b/server/src/interfaces/communication.repository.ts @@ -1,6 +1,6 @@ import { AssetResponseDto } from 'src/domain/asset/response-dto/asset-response.dto'; import { ReleaseNotification, ServerVersionResponseDto } from 'src/domain/server-info/server-info.dto'; -import { SystemConfig } from 'src/infra/entities/system-config.entity'; +import { SystemConfig } from 'src/entities/system-config.entity'; export const ICommunicationRepository = 'ICommunicationRepository'; diff --git a/server/src/interfaces/library.repository.ts b/server/src/interfaces/library.repository.ts index 39b94f87cc..5638d60249 100644 --- a/server/src/interfaces/library.repository.ts +++ b/server/src/interfaces/library.repository.ts @@ -1,5 +1,5 @@ import { LibraryStatsResponseDto } from 'src/domain/library/library.dto'; -import { LibraryEntity, LibraryType } from 'src/infra/entities/library.entity'; +import { LibraryEntity, LibraryType } from 'src/entities/library.entity'; export const ILibraryRepository = 'ILibraryRepository'; diff --git a/server/src/interfaces/media.repository.ts b/server/src/interfaces/media.repository.ts index 09bcd7eeff..0e34227d33 100644 --- a/server/src/interfaces/media.repository.ts +++ b/server/src/interfaces/media.repository.ts @@ -1,5 +1,5 @@ import { Writable } from 'node:stream'; -import { TranscodeTarget, VideoCodec } from 'src/infra/entities/system-config.entity'; +import { TranscodeTarget, VideoCodec } from 'src/entities/system-config.entity'; export const IMediaRepository = 'IMediaRepository'; diff --git a/server/src/interfaces/move.repository.ts b/server/src/interfaces/move.repository.ts index eb191021f3..c9d39e78cf 100644 --- a/server/src/interfaces/move.repository.ts +++ b/server/src/interfaces/move.repository.ts @@ -1,4 +1,4 @@ -import { MoveEntity, PathType } from 'src/infra/entities/move.entity'; +import { MoveEntity, PathType } from 'src/entities/move.entity'; export const IMoveRepository = 'IMoveRepository'; diff --git a/server/src/interfaces/partner.repository.ts b/server/src/interfaces/partner.repository.ts index 5606fc4953..842745a51e 100644 --- a/server/src/interfaces/partner.repository.ts +++ b/server/src/interfaces/partner.repository.ts @@ -1,4 +1,4 @@ -import { PartnerEntity } from 'src/infra/entities/partner.entity'; +import { PartnerEntity } from 'src/entities/partner.entity'; export interface PartnerIds { sharedById: string; diff --git a/server/src/interfaces/person.repository.ts b/server/src/interfaces/person.repository.ts index f00fce44ef..cba11fbb97 100644 --- a/server/src/interfaces/person.repository.ts +++ b/server/src/interfaces/person.repository.ts @@ -1,6 +1,6 @@ -import { AssetFaceEntity } from 'src/infra/entities/asset-face.entity'; -import { AssetEntity } from 'src/infra/entities/asset.entity'; -import { PersonEntity } from 'src/infra/entities/person.entity'; +import { AssetFaceEntity } from 'src/entities/asset-face.entity'; +import { AssetEntity } from 'src/entities/asset.entity'; +import { PersonEntity } from 'src/entities/person.entity'; import { Paginated, PaginationOptions } from 'src/utils'; import { FindManyOptions, FindOptionsRelations, FindOptionsSelect } from 'typeorm'; diff --git a/server/src/interfaces/search.repository.ts b/server/src/interfaces/search.repository.ts index a54147f1f9..29eaa32b73 100644 --- a/server/src/interfaces/search.repository.ts +++ b/server/src/interfaces/search.repository.ts @@ -1,7 +1,7 @@ -import { AssetFaceEntity } from 'src/infra/entities/asset-face.entity'; -import { AssetEntity, AssetType } from 'src/infra/entities/asset.entity'; -import { GeodataPlacesEntity } from 'src/infra/entities/geodata-places.entity'; -import { SmartInfoEntity } from 'src/infra/entities/smart-info.entity'; +import { AssetFaceEntity } from 'src/entities/asset-face.entity'; +import { AssetEntity, AssetType } from 'src/entities/asset.entity'; +import { GeodataPlacesEntity } from 'src/entities/geodata-places.entity'; +import { SmartInfoEntity } from 'src/entities/smart-info.entity'; import { Paginated } from 'src/utils'; export const ISearchRepository = 'ISearchRepository'; diff --git a/server/src/interfaces/shared-link.repository.ts b/server/src/interfaces/shared-link.repository.ts index 0d5e8eca71..fe08a62941 100644 --- a/server/src/interfaces/shared-link.repository.ts +++ b/server/src/interfaces/shared-link.repository.ts @@ -1,4 +1,4 @@ -import { SharedLinkEntity } from 'src/infra/entities/shared-link.entity'; +import { SharedLinkEntity } from 'src/entities/shared-link.entity'; export const ISharedLinkRepository = 'ISharedLinkRepository'; diff --git a/server/src/interfaces/system-config.repository.ts b/server/src/interfaces/system-config.repository.ts index 86b3114856..f591a6671d 100644 --- a/server/src/interfaces/system-config.repository.ts +++ b/server/src/interfaces/system-config.repository.ts @@ -1,4 +1,4 @@ -import { SystemConfigEntity } from 'src/infra/entities/system-config.entity'; +import { SystemConfigEntity } from 'src/entities/system-config.entity'; export const ISystemConfigRepository = 'ISystemConfigRepository'; diff --git a/server/src/interfaces/system-metadata.repository.ts b/server/src/interfaces/system-metadata.repository.ts index d28713226e..cbbce44e26 100644 --- a/server/src/interfaces/system-metadata.repository.ts +++ b/server/src/interfaces/system-metadata.repository.ts @@ -1,4 +1,4 @@ -import { SystemMetadata } from 'src/infra/entities/system-metadata.entity'; +import { SystemMetadata } from 'src/entities/system-metadata.entity'; export const ISystemMetadataRepository = 'ISystemMetadataRepository'; diff --git a/server/src/interfaces/tag.repository.ts b/server/src/interfaces/tag.repository.ts index 47c3f40fa7..8071461dfc 100644 --- a/server/src/interfaces/tag.repository.ts +++ b/server/src/interfaces/tag.repository.ts @@ -1,5 +1,5 @@ -import { AssetEntity } from 'src/infra/entities/asset.entity'; -import { TagEntity } from 'src/infra/entities/tag.entity'; +import { AssetEntity } from 'src/entities/asset.entity'; +import { TagEntity } from 'src/entities/tag.entity'; export const ITagRepository = 'ITagRepository'; diff --git a/server/src/interfaces/user-token.repository.ts b/server/src/interfaces/user-token.repository.ts index 2d342a2fcc..0fcec39fdc 100644 --- a/server/src/interfaces/user-token.repository.ts +++ b/server/src/interfaces/user-token.repository.ts @@ -1,4 +1,4 @@ -import { UserTokenEntity } from 'src/infra/entities/user-token.entity'; +import { UserTokenEntity } from 'src/entities/user-token.entity'; export const IUserTokenRepository = 'IUserTokenRepository'; diff --git a/server/src/interfaces/user.repository.ts b/server/src/interfaces/user.repository.ts index be5ef165d5..ebc70688ea 100644 --- a/server/src/interfaces/user.repository.ts +++ b/server/src/interfaces/user.repository.ts @@ -1,4 +1,4 @@ -import { UserEntity } from 'src/infra/entities/user.entity'; +import { UserEntity } from 'src/entities/user.entity'; export interface UserListFilter { withDeleted?: boolean; diff --git a/server/src/infra/migrations/1645130759468-CreateUserTable.ts b/server/src/migrations/1645130759468-CreateUserTable.ts similarity index 100% rename from server/src/infra/migrations/1645130759468-CreateUserTable.ts rename to server/src/migrations/1645130759468-CreateUserTable.ts diff --git a/server/src/infra/migrations/1645130777674-CreateDeviceInfoTable.ts b/server/src/migrations/1645130777674-CreateDeviceInfoTable.ts similarity index 100% rename from server/src/infra/migrations/1645130777674-CreateDeviceInfoTable.ts rename to server/src/migrations/1645130777674-CreateDeviceInfoTable.ts diff --git a/server/src/infra/migrations/1645130805273-CreateAssetsTable.ts b/server/src/migrations/1645130805273-CreateAssetsTable.ts similarity index 100% rename from server/src/infra/migrations/1645130805273-CreateAssetsTable.ts rename to server/src/migrations/1645130805273-CreateAssetsTable.ts diff --git a/server/src/infra/migrations/1645130817965-CreateExifTable.ts b/server/src/migrations/1645130817965-CreateExifTable.ts similarity index 100% rename from server/src/infra/migrations/1645130817965-CreateExifTable.ts rename to server/src/migrations/1645130817965-CreateExifTable.ts diff --git a/server/src/infra/migrations/1645130870184-CreateSmartInfoTable.ts b/server/src/migrations/1645130870184-CreateSmartInfoTable.ts similarity index 100% rename from server/src/infra/migrations/1645130870184-CreateSmartInfoTable.ts rename to server/src/migrations/1645130870184-CreateSmartInfoTable.ts diff --git a/server/src/infra/migrations/1646249209023-AddExifTextSearchColumn.ts b/server/src/migrations/1646249209023-AddExifTextSearchColumn.ts similarity index 100% rename from server/src/infra/migrations/1646249209023-AddExifTextSearchColumn.ts rename to server/src/migrations/1646249209023-AddExifTextSearchColumn.ts diff --git a/server/src/infra/migrations/1646249734844-CreateExifTextSearchIndex.ts b/server/src/migrations/1646249734844-CreateExifTextSearchIndex.ts similarity index 100% rename from server/src/infra/migrations/1646249734844-CreateExifTextSearchIndex.ts rename to server/src/migrations/1646249734844-CreateExifTextSearchIndex.ts diff --git a/server/src/infra/migrations/1646709533213-AddRegionCityToExIf.ts b/server/src/migrations/1646709533213-AddRegionCityToExIf.ts similarity index 100% rename from server/src/infra/migrations/1646709533213-AddRegionCityToExIf.ts rename to server/src/migrations/1646709533213-AddRegionCityToExIf.ts diff --git a/server/src/infra/migrations/1646710459852-AddLocationToExifTextSearch.ts b/server/src/migrations/1646710459852-AddLocationToExifTextSearch.ts similarity index 100% rename from server/src/infra/migrations/1646710459852-AddLocationToExifTextSearch.ts rename to server/src/migrations/1646710459852-AddLocationToExifTextSearch.ts diff --git a/server/src/infra/migrations/1648317474768-AddObjectColumnToSmartInfo.ts b/server/src/migrations/1648317474768-AddObjectColumnToSmartInfo.ts similarity index 100% rename from server/src/infra/migrations/1648317474768-AddObjectColumnToSmartInfo.ts rename to server/src/migrations/1648317474768-AddObjectColumnToSmartInfo.ts diff --git a/server/src/infra/migrations/1649643216111-CreateSharedAlbumAndRelatedTables.ts b/server/src/migrations/1649643216111-CreateSharedAlbumAndRelatedTables.ts similarity index 100% rename from server/src/infra/migrations/1649643216111-CreateSharedAlbumAndRelatedTables.ts rename to server/src/migrations/1649643216111-CreateSharedAlbumAndRelatedTables.ts diff --git a/server/src/infra/migrations/1652633525943-UpdateUserTableWithAdminAndName.ts b/server/src/migrations/1652633525943-UpdateUserTableWithAdminAndName.ts similarity index 100% rename from server/src/infra/migrations/1652633525943-UpdateUserTableWithAdminAndName.ts rename to server/src/migrations/1652633525943-UpdateUserTableWithAdminAndName.ts diff --git a/server/src/infra/migrations/1653214255670-UpdateAssetTableWithWebpPath.ts b/server/src/migrations/1653214255670-UpdateAssetTableWithWebpPath.ts similarity index 100% rename from server/src/infra/migrations/1653214255670-UpdateAssetTableWithWebpPath.ts rename to server/src/migrations/1653214255670-UpdateAssetTableWithWebpPath.ts diff --git a/server/src/infra/migrations/1654299904583-UpdateAssetTableWithEncodeVideoPath.ts b/server/src/migrations/1654299904583-UpdateAssetTableWithEncodeVideoPath.ts similarity index 100% rename from server/src/infra/migrations/1654299904583-UpdateAssetTableWithEncodeVideoPath.ts rename to server/src/migrations/1654299904583-UpdateAssetTableWithEncodeVideoPath.ts diff --git a/server/src/infra/migrations/1655401127251-RenameSharedAlbums.ts b/server/src/migrations/1655401127251-RenameSharedAlbums.ts similarity index 100% rename from server/src/infra/migrations/1655401127251-RenameSharedAlbums.ts rename to server/src/migrations/1655401127251-RenameSharedAlbums.ts diff --git a/server/src/infra/migrations/1656338626260-RenameIsFirstLoggedInColumn.ts b/server/src/migrations/1656338626260-RenameIsFirstLoggedInColumn.ts similarity index 100% rename from server/src/infra/migrations/1656338626260-RenameIsFirstLoggedInColumn.ts rename to server/src/migrations/1656338626260-RenameIsFirstLoggedInColumn.ts diff --git a/server/src/infra/migrations/1656888591977-RenameAssetAlbumIdSequence.ts b/server/src/migrations/1656888591977-RenameAssetAlbumIdSequence.ts similarity index 100% rename from server/src/infra/migrations/1656888591977-RenameAssetAlbumIdSequence.ts rename to server/src/migrations/1656888591977-RenameAssetAlbumIdSequence.ts diff --git a/server/src/infra/migrations/1656888918620-DropExifTextSearchableColumn.ts b/server/src/migrations/1656888918620-DropExifTextSearchableColumn.ts similarity index 100% rename from server/src/infra/migrations/1656888918620-DropExifTextSearchableColumn.ts rename to server/src/migrations/1656888918620-DropExifTextSearchableColumn.ts diff --git a/server/src/infra/migrations/1656889061566-MatchMigrationsWithTypeORMEntities.ts b/server/src/migrations/1656889061566-MatchMigrationsWithTypeORMEntities.ts similarity index 100% rename from server/src/infra/migrations/1656889061566-MatchMigrationsWithTypeORMEntities.ts rename to server/src/migrations/1656889061566-MatchMigrationsWithTypeORMEntities.ts diff --git a/server/src/infra/migrations/1658860470248-AddExifImageNameAsSearchableText.ts b/server/src/migrations/1658860470248-AddExifImageNameAsSearchableText.ts similarity index 100% rename from server/src/infra/migrations/1658860470248-AddExifImageNameAsSearchableText.ts rename to server/src/migrations/1658860470248-AddExifImageNameAsSearchableText.ts diff --git a/server/src/infra/migrations/1661011331242-AddCaption.ts b/server/src/migrations/1661011331242-AddCaption.ts similarity index 100% rename from server/src/infra/migrations/1661011331242-AddCaption.ts rename to server/src/migrations/1661011331242-AddCaption.ts diff --git a/server/src/infra/migrations/1661528919411-ChangeExifFileSizeInByteToBigInt.ts b/server/src/migrations/1661528919411-ChangeExifFileSizeInByteToBigInt.ts similarity index 100% rename from server/src/infra/migrations/1661528919411-ChangeExifFileSizeInByteToBigInt.ts rename to server/src/migrations/1661528919411-ChangeExifFileSizeInByteToBigInt.ts diff --git a/server/src/infra/migrations/1661881837496-AddAssetChecksum.ts b/server/src/migrations/1661881837496-AddAssetChecksum.ts similarity index 100% rename from server/src/infra/migrations/1661881837496-AddAssetChecksum.ts rename to server/src/migrations/1661881837496-AddAssetChecksum.ts diff --git a/server/src/infra/migrations/1661971370662-UpdateAssetTableWithNewUniqueConstraint.ts b/server/src/migrations/1661971370662-UpdateAssetTableWithNewUniqueConstraint.ts similarity index 100% rename from server/src/infra/migrations/1661971370662-UpdateAssetTableWithNewUniqueConstraint.ts rename to server/src/migrations/1661971370662-UpdateAssetTableWithNewUniqueConstraint.ts diff --git a/server/src/infra/migrations/1662427365521-FixTimestampDataTypeInAssetTable.ts b/server/src/migrations/1662427365521-FixTimestampDataTypeInAssetTable.ts similarity index 100% rename from server/src/infra/migrations/1662427365521-FixTimestampDataTypeInAssetTable.ts rename to server/src/migrations/1662427365521-FixTimestampDataTypeInAssetTable.ts diff --git a/server/src/infra/migrations/1665540663419-CreateSystemConfigTable.ts b/server/src/migrations/1665540663419-CreateSystemConfigTable.ts similarity index 100% rename from server/src/infra/migrations/1665540663419-CreateSystemConfigTable.ts rename to server/src/migrations/1665540663419-CreateSystemConfigTable.ts diff --git a/server/src/infra/migrations/1667762360744-AddingDeletedAtColumnInUserEntity.ts b/server/src/migrations/1667762360744-AddingDeletedAtColumnInUserEntity.ts similarity index 100% rename from server/src/infra/migrations/1667762360744-AddingDeletedAtColumnInUserEntity.ts rename to server/src/migrations/1667762360744-AddingDeletedAtColumnInUserEntity.ts diff --git a/server/src/infra/migrations/1668383120461-AddLivePhotosRelatedColumnToAssetTable.ts b/server/src/migrations/1668383120461-AddLivePhotosRelatedColumnToAssetTable.ts similarity index 100% rename from server/src/infra/migrations/1668383120461-AddLivePhotosRelatedColumnToAssetTable.ts rename to server/src/migrations/1668383120461-AddLivePhotosRelatedColumnToAssetTable.ts diff --git a/server/src/infra/migrations/1668835311083-UpdateUserTableForOIDC.ts b/server/src/migrations/1668835311083-UpdateUserTableForOIDC.ts similarity index 100% rename from server/src/infra/migrations/1668835311083-UpdateUserTableForOIDC.ts rename to server/src/migrations/1668835311083-UpdateUserTableForOIDC.ts diff --git a/server/src/infra/migrations/1670104716264-OAuthId.ts b/server/src/migrations/1670104716264-OAuthId.ts similarity index 100% rename from server/src/infra/migrations/1670104716264-OAuthId.ts rename to server/src/migrations/1670104716264-OAuthId.ts diff --git a/server/src/infra/migrations/1670257571385-CreateTagsTable.ts b/server/src/migrations/1670257571385-CreateTagsTable.ts similarity index 100% rename from server/src/infra/migrations/1670257571385-CreateTagsTable.ts rename to server/src/migrations/1670257571385-CreateTagsTable.ts diff --git a/server/src/infra/migrations/1670607437008-TruncateOldConfigItems.ts b/server/src/migrations/1670607437008-TruncateOldConfigItems.ts similarity index 100% rename from server/src/infra/migrations/1670607437008-TruncateOldConfigItems.ts rename to server/src/migrations/1670607437008-TruncateOldConfigItems.ts diff --git a/server/src/infra/migrations/1670633210032-AddUserEmailUniqueConstraint.ts b/server/src/migrations/1670633210032-AddUserEmailUniqueConstraint.ts similarity index 100% rename from server/src/infra/migrations/1670633210032-AddUserEmailUniqueConstraint.ts rename to server/src/migrations/1670633210032-AddUserEmailUniqueConstraint.ts diff --git a/server/src/infra/migrations/1672109862870-DropSaltColumn.ts b/server/src/migrations/1672109862870-DropSaltColumn.ts similarity index 100% rename from server/src/infra/migrations/1672109862870-DropSaltColumn.ts rename to server/src/migrations/1672109862870-DropSaltColumn.ts diff --git a/server/src/infra/migrations/1672502270115-AddAPIKeys.ts b/server/src/migrations/1672502270115-AddAPIKeys.ts similarity index 100% rename from server/src/infra/migrations/1672502270115-AddAPIKeys.ts rename to server/src/migrations/1672502270115-AddAPIKeys.ts diff --git a/server/src/infra/migrations/1673150490490-AddSharedLinkTable.ts b/server/src/migrations/1673150490490-AddSharedLinkTable.ts similarity index 100% rename from server/src/infra/migrations/1673150490490-AddSharedLinkTable.ts rename to server/src/migrations/1673150490490-AddSharedLinkTable.ts diff --git a/server/src/infra/migrations/1673907194740-AddMorePermissionToSharedLink.ts b/server/src/migrations/1673907194740-AddMorePermissionToSharedLink.ts similarity index 100% rename from server/src/infra/migrations/1673907194740-AddMorePermissionToSharedLink.ts rename to server/src/migrations/1673907194740-AddMorePermissionToSharedLink.ts diff --git a/server/src/infra/migrations/1674263302005-RemoveVideoCodecConfigOption.ts b/server/src/migrations/1674263302005-RemoveVideoCodecConfigOption.ts similarity index 100% rename from server/src/infra/migrations/1674263302005-RemoveVideoCodecConfigOption.ts rename to server/src/migrations/1674263302005-RemoveVideoCodecConfigOption.ts diff --git a/server/src/infra/migrations/1674342044239-CreateUserTokenEntity.ts b/server/src/migrations/1674342044239-CreateUserTokenEntity.ts similarity index 100% rename from server/src/infra/migrations/1674342044239-CreateUserTokenEntity.ts rename to server/src/migrations/1674342044239-CreateUserTokenEntity.ts diff --git a/server/src/infra/migrations/1674757936889-AlterExifExposureTimeToString.ts b/server/src/migrations/1674757936889-AlterExifExposureTimeToString.ts similarity index 100% rename from server/src/infra/migrations/1674757936889-AlterExifExposureTimeToString.ts rename to server/src/migrations/1674757936889-AlterExifExposureTimeToString.ts diff --git a/server/src/infra/migrations/1674774248319-TruncateAPIKeys.ts b/server/src/migrations/1674774248319-TruncateAPIKeys.ts similarity index 100% rename from server/src/infra/migrations/1674774248319-TruncateAPIKeys.ts rename to server/src/migrations/1674774248319-TruncateAPIKeys.ts diff --git a/server/src/infra/migrations/1674939383309-AddSharedLinkUserForeignKeyConstraint.ts b/server/src/migrations/1674939383309-AddSharedLinkUserForeignKeyConstraint.ts similarity index 100% rename from server/src/infra/migrations/1674939383309-AddSharedLinkUserForeignKeyConstraint.ts rename to server/src/migrations/1674939383309-AddSharedLinkUserForeignKeyConstraint.ts diff --git a/server/src/infra/migrations/1675667878312-AddUpdatedAtColumnToAlbumsUsersAssets.ts b/server/src/migrations/1675667878312-AddUpdatedAtColumnToAlbumsUsersAssets.ts similarity index 100% rename from server/src/infra/migrations/1675667878312-AddUpdatedAtColumnToAlbumsUsersAssets.ts rename to server/src/migrations/1675667878312-AddUpdatedAtColumnToAlbumsUsersAssets.ts diff --git a/server/src/infra/migrations/1675701909594-AddAlbumUserForeignKeyConstraint.ts b/server/src/migrations/1675701909594-AddAlbumUserForeignKeyConstraint.ts similarity index 100% rename from server/src/infra/migrations/1675701909594-AddAlbumUserForeignKeyConstraint.ts rename to server/src/migrations/1675701909594-AddAlbumUserForeignKeyConstraint.ts diff --git a/server/src/infra/migrations/1675808874445-APIKeyUUIDPrimaryKey.ts b/server/src/migrations/1675808874445-APIKeyUUIDPrimaryKey.ts similarity index 100% rename from server/src/infra/migrations/1675808874445-APIKeyUUIDPrimaryKey.ts rename to server/src/migrations/1675808874445-APIKeyUUIDPrimaryKey.ts diff --git a/server/src/infra/migrations/1675812532822-FixAlbumEntityTypeORM.ts b/server/src/migrations/1675812532822-FixAlbumEntityTypeORM.ts similarity index 100% rename from server/src/infra/migrations/1675812532822-FixAlbumEntityTypeORM.ts rename to server/src/migrations/1675812532822-FixAlbumEntityTypeORM.ts diff --git a/server/src/infra/migrations/1676437878377-AppleContentIdentifier.ts b/server/src/migrations/1676437878377-AppleContentIdentifier.ts similarity index 100% rename from server/src/infra/migrations/1676437878377-AppleContentIdentifier.ts rename to server/src/migrations/1676437878377-AppleContentIdentifier.ts diff --git a/server/src/infra/migrations/1676680127415-FixAssetRelations.ts b/server/src/migrations/1676680127415-FixAssetRelations.ts similarity index 100% rename from server/src/infra/migrations/1676680127415-FixAssetRelations.ts rename to server/src/migrations/1676680127415-FixAssetRelations.ts diff --git a/server/src/infra/migrations/1676721296440-AssetCreatedAtField.ts b/server/src/migrations/1676721296440-AssetCreatedAtField.ts similarity index 100% rename from server/src/infra/migrations/1676721296440-AssetCreatedAtField.ts rename to server/src/migrations/1676721296440-AssetCreatedAtField.ts diff --git a/server/src/infra/migrations/1676848629119-ExifEntityDefinitionFixes.ts b/server/src/migrations/1676848629119-ExifEntityDefinitionFixes.ts similarity index 100% rename from server/src/infra/migrations/1676848629119-ExifEntityDefinitionFixes.ts rename to server/src/migrations/1676848629119-ExifEntityDefinitionFixes.ts diff --git a/server/src/infra/migrations/1676848694786-SharedLinkEntityDefinitionFixes.ts b/server/src/migrations/1676848694786-SharedLinkEntityDefinitionFixes.ts similarity index 100% rename from server/src/infra/migrations/1676848694786-SharedLinkEntityDefinitionFixes.ts rename to server/src/migrations/1676848694786-SharedLinkEntityDefinitionFixes.ts diff --git a/server/src/infra/migrations/1676852143506-SmartInfoEntityDefinitionFixes.ts b/server/src/migrations/1676852143506-SmartInfoEntityDefinitionFixes.ts similarity index 100% rename from server/src/infra/migrations/1676852143506-SmartInfoEntityDefinitionFixes.ts rename to server/src/migrations/1676852143506-SmartInfoEntityDefinitionFixes.ts diff --git a/server/src/infra/migrations/1677497925328-AddExifTimeZone.ts b/server/src/migrations/1677497925328-AddExifTimeZone.ts similarity index 100% rename from server/src/infra/migrations/1677497925328-AddExifTimeZone.ts rename to server/src/migrations/1677497925328-AddExifTimeZone.ts diff --git a/server/src/infra/migrations/1677535643119-AddIndexForAlbumInSharedLinkTable.ts b/server/src/migrations/1677535643119-AddIndexForAlbumInSharedLinkTable.ts similarity index 100% rename from server/src/infra/migrations/1677535643119-AddIndexForAlbumInSharedLinkTable.ts rename to server/src/migrations/1677535643119-AddIndexForAlbumInSharedLinkTable.ts diff --git a/server/src/infra/migrations/1677613712565-AlbumThumbnailRelation.ts b/server/src/migrations/1677613712565-AlbumThumbnailRelation.ts similarity index 100% rename from server/src/infra/migrations/1677613712565-AlbumThumbnailRelation.ts rename to server/src/migrations/1677613712565-AlbumThumbnailRelation.ts diff --git a/server/src/infra/migrations/1677971458822-AddCLIPEncodeDataColumn.ts b/server/src/migrations/1677971458822-AddCLIPEncodeDataColumn.ts similarity index 100% rename from server/src/infra/migrations/1677971458822-AddCLIPEncodeDataColumn.ts rename to server/src/migrations/1677971458822-AddCLIPEncodeDataColumn.ts diff --git a/server/src/infra/migrations/1679751316282-UpdateTranscodeOption.ts b/server/src/migrations/1679751316282-UpdateTranscodeOption.ts similarity index 100% rename from server/src/infra/migrations/1679751316282-UpdateTranscodeOption.ts rename to server/src/migrations/1679751316282-UpdateTranscodeOption.ts diff --git a/server/src/infra/migrations/1679901204458-ClipEmbeddingFloat4.ts b/server/src/migrations/1679901204458-ClipEmbeddingFloat4.ts similarity index 100% rename from server/src/infra/migrations/1679901204458-ClipEmbeddingFloat4.ts rename to server/src/migrations/1679901204458-ClipEmbeddingFloat4.ts diff --git a/server/src/infra/migrations/1680632845740-AddIsArchivedColumn.ts b/server/src/migrations/1680632845740-AddIsArchivedColumn.ts similarity index 100% rename from server/src/infra/migrations/1680632845740-AddIsArchivedColumn.ts rename to server/src/migrations/1680632845740-AddIsArchivedColumn.ts diff --git a/server/src/infra/migrations/1680694465853-RemoveRedundantConstraints.ts b/server/src/migrations/1680694465853-RemoveRedundantConstraints.ts similarity index 100% rename from server/src/infra/migrations/1680694465853-RemoveRedundantConstraints.ts rename to server/src/migrations/1680694465853-RemoveRedundantConstraints.ts diff --git a/server/src/infra/migrations/1681144628393-AddOriginalFileNameToAssetTable.ts b/server/src/migrations/1681144628393-AddOriginalFileNameToAssetTable.ts similarity index 100% rename from server/src/infra/migrations/1681144628393-AddOriginalFileNameToAssetTable.ts rename to server/src/migrations/1681144628393-AddOriginalFileNameToAssetTable.ts diff --git a/server/src/infra/migrations/1681159594469-RemoveImageNameFromEXIFTable.ts b/server/src/migrations/1681159594469-RemoveImageNameFromEXIFTable.ts similarity index 100% rename from server/src/infra/migrations/1681159594469-RemoveImageNameFromEXIFTable.ts rename to server/src/migrations/1681159594469-RemoveImageNameFromEXIFTable.ts diff --git a/server/src/infra/migrations/1682371561743-FixNullableRelations.ts b/server/src/migrations/1682371561743-FixNullableRelations.ts similarity index 100% rename from server/src/infra/migrations/1682371561743-FixNullableRelations.ts rename to server/src/migrations/1682371561743-FixNullableRelations.ts diff --git a/server/src/infra/migrations/1682371791038-AddDeviceInfoToUserToken.ts b/server/src/migrations/1682371791038-AddDeviceInfoToUserToken.ts similarity index 100% rename from server/src/infra/migrations/1682371791038-AddDeviceInfoToUserToken.ts rename to server/src/migrations/1682371791038-AddDeviceInfoToUserToken.ts diff --git a/server/src/infra/migrations/1682710252424-DropDeviceInfoTable.ts b/server/src/migrations/1682710252424-DropDeviceInfoTable.ts similarity index 100% rename from server/src/infra/migrations/1682710252424-DropDeviceInfoTable.ts rename to server/src/migrations/1682710252424-DropDeviceInfoTable.ts diff --git a/server/src/infra/migrations/1683808254676-AddPartnersTable.ts b/server/src/migrations/1683808254676-AddPartnersTable.ts similarity index 100% rename from server/src/infra/migrations/1683808254676-AddPartnersTable.ts rename to server/src/migrations/1683808254676-AddPartnersTable.ts diff --git a/server/src/infra/migrations/1684255168091-AddFacialTables.ts b/server/src/migrations/1684255168091-AddFacialTables.ts similarity index 100% rename from server/src/infra/migrations/1684255168091-AddFacialTables.ts rename to server/src/migrations/1684255168091-AddFacialTables.ts diff --git a/server/src/infra/migrations/1684273840676-AddSidecarFile.ts b/server/src/migrations/1684273840676-AddSidecarFile.ts similarity index 100% rename from server/src/infra/migrations/1684273840676-AddSidecarFile.ts rename to server/src/migrations/1684273840676-AddSidecarFile.ts diff --git a/server/src/infra/migrations/1684328185099-RequireChecksumNotNull.ts b/server/src/migrations/1684328185099-RequireChecksumNotNull.ts similarity index 100% rename from server/src/infra/migrations/1684328185099-RequireChecksumNotNull.ts rename to server/src/migrations/1684328185099-RequireChecksumNotNull.ts diff --git a/server/src/infra/migrations/1684410565398-AddStorageLabel.ts b/server/src/migrations/1684410565398-AddStorageLabel.ts similarity index 100% rename from server/src/infra/migrations/1684410565398-AddStorageLabel.ts rename to server/src/migrations/1684410565398-AddStorageLabel.ts diff --git a/server/src/infra/migrations/1684867360825-AddUserTokenAndAPIKeyCascades.ts b/server/src/migrations/1684867360825-AddUserTokenAndAPIKeyCascades.ts similarity index 100% rename from server/src/infra/migrations/1684867360825-AddUserTokenAndAPIKeyCascades.ts rename to server/src/migrations/1684867360825-AddUserTokenAndAPIKeyCascades.ts diff --git a/server/src/infra/migrations/1685044328272-AddSharedLinkCascade.ts b/server/src/migrations/1685044328272-AddSharedLinkCascade.ts similarity index 100% rename from server/src/infra/migrations/1685044328272-AddSharedLinkCascade.ts rename to server/src/migrations/1685044328272-AddSharedLinkCascade.ts diff --git a/server/src/infra/migrations/1685370430343-UserDatesTimestamptz.ts b/server/src/migrations/1685370430343-UserDatesTimestamptz.ts similarity index 100% rename from server/src/infra/migrations/1685370430343-UserDatesTimestamptz.ts rename to server/src/migrations/1685370430343-UserDatesTimestamptz.ts diff --git a/server/src/infra/migrations/1685731372040-RemoveInvalidCoordinates.ts b/server/src/migrations/1685731372040-RemoveInvalidCoordinates.ts similarity index 100% rename from server/src/infra/migrations/1685731372040-RemoveInvalidCoordinates.ts rename to server/src/migrations/1685731372040-RemoveInvalidCoordinates.ts diff --git a/server/src/infra/migrations/1686584273471-ImportAsset.ts b/server/src/migrations/1686584273471-ImportAsset.ts similarity index 100% rename from server/src/infra/migrations/1686584273471-ImportAsset.ts rename to server/src/migrations/1686584273471-ImportAsset.ts diff --git a/server/src/infra/migrations/1686762895180-AddThumbhashColumn.ts b/server/src/migrations/1686762895180-AddThumbhashColumn.ts similarity index 100% rename from server/src/infra/migrations/1686762895180-AddThumbhashColumn.ts rename to server/src/migrations/1686762895180-AddThumbhashColumn.ts diff --git a/server/src/infra/migrations/1688241394489-AddDetectFaceResultInfo.ts b/server/src/migrations/1688241394489-AddDetectFaceResultInfo.ts similarity index 100% rename from server/src/infra/migrations/1688241394489-AddDetectFaceResultInfo.ts rename to server/src/migrations/1688241394489-AddDetectFaceResultInfo.ts diff --git a/server/src/infra/migrations/1688392120838-AddLibraryTable.ts b/server/src/migrations/1688392120838-AddLibraryTable.ts similarity index 100% rename from server/src/infra/migrations/1688392120838-AddLibraryTable.ts rename to server/src/migrations/1688392120838-AddLibraryTable.ts diff --git a/server/src/infra/migrations/1689001889950-DropMimeTypeColumn.ts b/server/src/migrations/1689001889950-DropMimeTypeColumn.ts similarity index 100% rename from server/src/infra/migrations/1689001889950-DropMimeTypeColumn.ts rename to server/src/migrations/1689001889950-DropMimeTypeColumn.ts diff --git a/server/src/infra/migrations/1689281196844-AddHiddenFaces.ts b/server/src/migrations/1689281196844-AddHiddenFaces.ts similarity index 100% rename from server/src/infra/migrations/1689281196844-AddHiddenFaces.ts rename to server/src/migrations/1689281196844-AddHiddenFaces.ts diff --git a/server/src/infra/migrations/1690469489288-Panoramas.ts b/server/src/migrations/1690469489288-Panoramas.ts similarity index 100% rename from server/src/infra/migrations/1690469489288-Panoramas.ts rename to server/src/migrations/1690469489288-Panoramas.ts diff --git a/server/src/infra/migrations/1691209138541-AddAlbumDescription.ts b/server/src/migrations/1691209138541-AddAlbumDescription.ts similarity index 100% rename from server/src/infra/migrations/1691209138541-AddAlbumDescription.ts rename to server/src/migrations/1691209138541-AddAlbumDescription.ts diff --git a/server/src/infra/migrations/1691600216749-UserMemoryPreference.ts b/server/src/migrations/1691600216749-UserMemoryPreference.ts similarity index 100% rename from server/src/infra/migrations/1691600216749-UserMemoryPreference.ts rename to server/src/migrations/1691600216749-UserMemoryPreference.ts diff --git a/server/src/infra/migrations/1692057328660-fixGPSNullIsland.ts b/server/src/migrations/1692057328660-fixGPSNullIsland.ts similarity index 100% rename from server/src/infra/migrations/1692057328660-fixGPSNullIsland.ts rename to server/src/migrations/1692057328660-fixGPSNullIsland.ts diff --git a/server/src/infra/migrations/1692112147855-AddPersonBirthDate.ts b/server/src/migrations/1692112147855-AddPersonBirthDate.ts similarity index 100% rename from server/src/infra/migrations/1692112147855-AddPersonBirthDate.ts rename to server/src/migrations/1692112147855-AddPersonBirthDate.ts diff --git a/server/src/infra/migrations/1692804658140-AddAuditTable.ts b/server/src/migrations/1692804658140-AddAuditTable.ts similarity index 100% rename from server/src/infra/migrations/1692804658140-AddAuditTable.ts rename to server/src/migrations/1692804658140-AddAuditTable.ts diff --git a/server/src/infra/migrations/1693236627291-RenameMLEnableFlags.ts b/server/src/migrations/1693236627291-RenameMLEnableFlags.ts similarity index 100% rename from server/src/infra/migrations/1693236627291-RenameMLEnableFlags.ts rename to server/src/migrations/1693236627291-RenameMLEnableFlags.ts diff --git a/server/src/infra/migrations/1693833336881-AddPersonFaceAssetId.ts b/server/src/migrations/1693833336881-AddPersonFaceAssetId.ts similarity index 100% rename from server/src/infra/migrations/1693833336881-AddPersonFaceAssetId.ts rename to server/src/migrations/1693833336881-AddPersonFaceAssetId.ts diff --git a/server/src/infra/migrations/1694204416744-AddAssetDeletedAtColumn.ts b/server/src/migrations/1694204416744-AddAssetDeletedAtColumn.ts similarity index 100% rename from server/src/infra/migrations/1694204416744-AddAssetDeletedAtColumn.ts rename to server/src/migrations/1694204416744-AddAssetDeletedAtColumn.ts diff --git a/server/src/infra/migrations/1694525143117-AddLocalDateTime.ts b/server/src/migrations/1694525143117-AddLocalDateTime.ts similarity index 100% rename from server/src/infra/migrations/1694525143117-AddLocalDateTime.ts rename to server/src/migrations/1694525143117-AddLocalDateTime.ts diff --git a/server/src/infra/migrations/1694638413248-AddDeletedAtToAlbums.ts b/server/src/migrations/1694638413248-AddDeletedAtToAlbums.ts similarity index 100% rename from server/src/infra/migrations/1694638413248-AddDeletedAtToAlbums.ts rename to server/src/migrations/1694638413248-AddDeletedAtToAlbums.ts diff --git a/server/src/infra/migrations/1694750975773-AddExifColorSpace.ts b/server/src/migrations/1694750975773-AddExifColorSpace.ts similarity index 100% rename from server/src/infra/migrations/1694750975773-AddExifColorSpace.ts rename to server/src/migrations/1694750975773-AddExifColorSpace.ts diff --git a/server/src/infra/migrations/1694758412194-UpdateOpusCodecToLibopus.ts b/server/src/migrations/1694758412194-UpdateOpusCodecToLibopus.ts similarity index 100% rename from server/src/infra/migrations/1694758412194-UpdateOpusCodecToLibopus.ts rename to server/src/migrations/1694758412194-UpdateOpusCodecToLibopus.ts diff --git a/server/src/infra/migrations/1695354433573-AddStackParentIdToAssets.ts b/server/src/migrations/1695354433573-AddStackParentIdToAssets.ts similarity index 100% rename from server/src/infra/migrations/1695354433573-AddStackParentIdToAssets.ts rename to server/src/migrations/1695354433573-AddStackParentIdToAssets.ts diff --git a/server/src/infra/migrations/1695660378655-RemoveInvalidCoordinates.ts b/server/src/migrations/1695660378655-RemoveInvalidCoordinates.ts similarity index 100% rename from server/src/infra/migrations/1695660378655-RemoveInvalidCoordinates.ts rename to server/src/migrations/1695660378655-RemoveInvalidCoordinates.ts diff --git a/server/src/infra/migrations/1696888644031-AddOriginalPathIndex.ts b/server/src/migrations/1696888644031-AddOriginalPathIndex.ts similarity index 100% rename from server/src/infra/migrations/1696888644031-AddOriginalPathIndex.ts rename to server/src/migrations/1696888644031-AddOriginalPathIndex.ts diff --git a/server/src/infra/migrations/1696968880063-AddMoveTable.ts b/server/src/migrations/1696968880063-AddMoveTable.ts similarity index 100% rename from server/src/infra/migrations/1696968880063-AddMoveTable.ts rename to server/src/migrations/1696968880063-AddMoveTable.ts diff --git a/server/src/infra/migrations/1697272818851-UnassignFace.ts b/server/src/migrations/1697272818851-UnassignFace.ts similarity index 100% rename from server/src/infra/migrations/1697272818851-UnassignFace.ts rename to server/src/migrations/1697272818851-UnassignFace.ts diff --git a/server/src/infra/migrations/1698290827089-AddPasswordToSharedLinks.ts b/server/src/migrations/1698290827089-AddPasswordToSharedLinks.ts similarity index 100% rename from server/src/infra/migrations/1698290827089-AddPasswordToSharedLinks.ts rename to server/src/migrations/1698290827089-AddPasswordToSharedLinks.ts diff --git a/server/src/infra/migrations/1698693294632-AddActivity.ts b/server/src/migrations/1698693294632-AddActivity.ts similarity index 100% rename from server/src/infra/migrations/1698693294632-AddActivity.ts rename to server/src/migrations/1698693294632-AddActivity.ts diff --git a/server/src/infra/migrations/1699268680508-DisableActivity.ts b/server/src/migrations/1699268680508-DisableActivity.ts similarity index 100% rename from server/src/infra/migrations/1699268680508-DisableActivity.ts rename to server/src/migrations/1699268680508-DisableActivity.ts diff --git a/server/src/infra/migrations/1699322864544-UserNameConsolidation.ts b/server/src/migrations/1699322864544-UserNameConsolidation.ts similarity index 100% rename from server/src/infra/migrations/1699322864544-UserNameConsolidation.ts rename to server/src/migrations/1699322864544-UserNameConsolidation.ts diff --git a/server/src/infra/migrations/1699345863886-AddJobStatus.ts b/server/src/migrations/1699345863886-AddJobStatus.ts similarity index 100% rename from server/src/infra/migrations/1699345863886-AddJobStatus.ts rename to server/src/migrations/1699345863886-AddJobStatus.ts diff --git a/server/src/infra/migrations/1699562570201-AdddInTimelineToPartnersTable.ts b/server/src/migrations/1699562570201-AdddInTimelineToPartnersTable.ts similarity index 100% rename from server/src/infra/migrations/1699562570201-AdddInTimelineToPartnersTable.ts rename to server/src/migrations/1699562570201-AdddInTimelineToPartnersTable.ts diff --git a/server/src/infra/migrations/1699727044012-EditFaceAssetForeignKey.ts b/server/src/migrations/1699727044012-EditFaceAssetForeignKey.ts similarity index 100% rename from server/src/infra/migrations/1699727044012-EditFaceAssetForeignKey.ts rename to server/src/migrations/1699727044012-EditFaceAssetForeignKey.ts diff --git a/server/src/infra/migrations/1699889987493-AddAvatarColor.ts b/server/src/migrations/1699889987493-AddAvatarColor.ts similarity index 100% rename from server/src/infra/migrations/1699889987493-AddAvatarColor.ts rename to server/src/migrations/1699889987493-AddAvatarColor.ts diff --git a/server/src/infra/migrations/1700345818045-SystemMetadata.ts b/server/src/migrations/1700345818045-SystemMetadata.ts similarity index 100% rename from server/src/infra/migrations/1700345818045-SystemMetadata.ts rename to server/src/migrations/1700345818045-SystemMetadata.ts diff --git a/server/src/infra/migrations/1700362016675-Geodata.ts b/server/src/migrations/1700362016675-Geodata.ts similarity index 100% rename from server/src/infra/migrations/1700362016675-Geodata.ts rename to server/src/migrations/1700362016675-Geodata.ts diff --git a/server/src/infra/migrations/1700713871511-UsePgVectors.ts b/server/src/migrations/1700713871511-UsePgVectors.ts similarity index 100% rename from server/src/infra/migrations/1700713871511-UsePgVectors.ts rename to server/src/migrations/1700713871511-UsePgVectors.ts diff --git a/server/src/infra/migrations/1700713994428-AddCLIPEmbeddingIndex.ts b/server/src/migrations/1700713994428-AddCLIPEmbeddingIndex.ts similarity index 100% rename from server/src/infra/migrations/1700713994428-AddCLIPEmbeddingIndex.ts rename to server/src/migrations/1700713994428-AddCLIPEmbeddingIndex.ts diff --git a/server/src/infra/migrations/1700714033632-AddFaceEmbeddingIndex.ts b/server/src/migrations/1700714033632-AddFaceEmbeddingIndex.ts similarity index 100% rename from server/src/infra/migrations/1700714033632-AddFaceEmbeddingIndex.ts rename to server/src/migrations/1700714033632-AddFaceEmbeddingIndex.ts diff --git a/server/src/infra/migrations/1700714072055-AddSmartInfoTagsIndex.ts b/server/src/migrations/1700714072055-AddSmartInfoTagsIndex.ts similarity index 100% rename from server/src/infra/migrations/1700714072055-AddSmartInfoTagsIndex.ts rename to server/src/migrations/1700714072055-AddSmartInfoTagsIndex.ts diff --git a/server/src/infra/migrations/1700714140297-CreateSmartInfoTextSearchIndex.ts b/server/src/migrations/1700714140297-CreateSmartInfoTextSearchIndex.ts similarity index 100% rename from server/src/infra/migrations/1700714140297-CreateSmartInfoTextSearchIndex.ts rename to server/src/migrations/1700714140297-CreateSmartInfoTextSearchIndex.ts diff --git a/server/src/infra/migrations/1700752078178-AddAssetFaceIndicies.ts b/server/src/migrations/1700752078178-AddAssetFaceIndicies.ts similarity index 100% rename from server/src/infra/migrations/1700752078178-AddAssetFaceIndicies.ts rename to server/src/migrations/1700752078178-AddAssetFaceIndicies.ts diff --git a/server/src/infra/migrations/1701665867595-AddExifCityIndex.ts b/server/src/migrations/1701665867595-AddExifCityIndex.ts similarity index 100% rename from server/src/infra/migrations/1701665867595-AddExifCityIndex.ts rename to server/src/migrations/1701665867595-AddExifCityIndex.ts diff --git a/server/src/infra/migrations/1702084989965-AddWebSocketAttachmentTable.ts b/server/src/migrations/1702084989965-AddWebSocketAttachmentTable.ts similarity index 100% rename from server/src/infra/migrations/1702084989965-AddWebSocketAttachmentTable.ts rename to server/src/migrations/1702084989965-AddWebSocketAttachmentTable.ts diff --git a/server/src/infra/migrations/1702257380990-DropNullIslandLatLong.ts b/server/src/migrations/1702257380990-DropNullIslandLatLong.ts similarity index 100% rename from server/src/infra/migrations/1702257380990-DropNullIslandLatLong.ts rename to server/src/migrations/1702257380990-DropNullIslandLatLong.ts diff --git a/server/src/infra/migrations/1702938928766-NullifyFutureBirthDatesAndAddCheckConstraint.ts b/server/src/migrations/1702938928766-NullifyFutureBirthDatesAndAddCheckConstraint.ts similarity index 100% rename from server/src/infra/migrations/1702938928766-NullifyFutureBirthDatesAndAddCheckConstraint.ts rename to server/src/migrations/1702938928766-NullifyFutureBirthDatesAndAddCheckConstraint.ts diff --git a/server/src/infra/migrations/1702942303661-FixRemovedAssetsSharedLink.ts b/server/src/migrations/1702942303661-FixRemovedAssetsSharedLink.ts similarity index 100% rename from server/src/infra/migrations/1702942303661-FixRemovedAssetsSharedLink.ts rename to server/src/migrations/1702942303661-FixRemovedAssetsSharedLink.ts diff --git a/server/src/infra/migrations/1703035138085-AddAutoStackId.ts b/server/src/migrations/1703035138085-AddAutoStackId.ts similarity index 100% rename from server/src/infra/migrations/1703035138085-AddAutoStackId.ts rename to server/src/migrations/1703035138085-AddAutoStackId.ts diff --git a/server/src/infra/migrations/1703288449127-DefaultStorageTemplateOnForExistingInstallations.ts b/server/src/migrations/1703288449127-DefaultStorageTemplateOnForExistingInstallations.ts similarity index 100% rename from server/src/infra/migrations/1703288449127-DefaultStorageTemplateOnForExistingInstallations.ts rename to server/src/migrations/1703288449127-DefaultStorageTemplateOnForExistingInstallations.ts diff --git a/server/src/infra/migrations/1704382918223-AddQuotaColumnsToUser.ts b/server/src/migrations/1704382918223-AddQuotaColumnsToUser.ts similarity index 100% rename from server/src/infra/migrations/1704382918223-AddQuotaColumnsToUser.ts rename to server/src/migrations/1704382918223-AddQuotaColumnsToUser.ts diff --git a/server/src/infra/migrations/1704571051932-DefaultOnboardingForExistingInstallations.ts b/server/src/migrations/1704571051932-DefaultOnboardingForExistingInstallations.ts similarity index 100% rename from server/src/infra/migrations/1704571051932-DefaultOnboardingForExistingInstallations.ts rename to server/src/migrations/1704571051932-DefaultOnboardingForExistingInstallations.ts diff --git a/server/src/infra/migrations/1704943345360-SetAssetFaceNullOnPersonDelete.ts b/server/src/migrations/1704943345360-SetAssetFaceNullOnPersonDelete.ts similarity index 100% rename from server/src/infra/migrations/1704943345360-SetAssetFaceNullOnPersonDelete.ts rename to server/src/migrations/1704943345360-SetAssetFaceNullOnPersonDelete.ts diff --git a/server/src/infra/migrations/1705094221536-AddMetadataExtractedAt.ts b/server/src/migrations/1705094221536-AddMetadataExtractedAt.ts similarity index 100% rename from server/src/infra/migrations/1705094221536-AddMetadataExtractedAt.ts rename to server/src/migrations/1705094221536-AddMetadataExtractedAt.ts diff --git a/server/src/infra/migrations/1705306747072-AddOriginalFileNameIndex.ts b/server/src/migrations/1705306747072-AddOriginalFileNameIndex.ts similarity index 100% rename from server/src/infra/migrations/1705306747072-AddOriginalFileNameIndex.ts rename to server/src/migrations/1705306747072-AddOriginalFileNameIndex.ts diff --git a/server/src/infra/migrations/1705363967169-CreateAssetStackTable.ts b/server/src/migrations/1705363967169-CreateAssetStackTable.ts similarity index 100% rename from server/src/infra/migrations/1705363967169-CreateAssetStackTable.ts rename to server/src/migrations/1705363967169-CreateAssetStackTable.ts diff --git a/server/src/infra/migrations/1707000751533-AddVectorsToSearchPath.ts b/server/src/migrations/1707000751533-AddVectorsToSearchPath.ts similarity index 100% rename from server/src/infra/migrations/1707000751533-AddVectorsToSearchPath.ts rename to server/src/migrations/1707000751533-AddVectorsToSearchPath.ts diff --git a/server/src/infra/migrations/1708059341865-GeodataLocationSearch.ts b/server/src/migrations/1708059341865-GeodataLocationSearch.ts similarity index 100% rename from server/src/infra/migrations/1708059341865-GeodataLocationSearch.ts rename to server/src/migrations/1708059341865-GeodataLocationSearch.ts diff --git a/server/src/infra/migrations/1708116312820-GeonamesEnhancement.ts b/server/src/migrations/1708116312820-GeonamesEnhancement.ts similarity index 100% rename from server/src/infra/migrations/1708116312820-GeonamesEnhancement.ts rename to server/src/migrations/1708116312820-GeonamesEnhancement.ts diff --git a/server/src/infra/migrations/1708227417898-AddFileCreatedAtIndex.ts b/server/src/migrations/1708227417898-AddFileCreatedAtIndex.ts similarity index 100% rename from server/src/infra/migrations/1708227417898-AddFileCreatedAtIndex.ts rename to server/src/migrations/1708227417898-AddFileCreatedAtIndex.ts diff --git a/server/src/infra/migrations/1708425975121-RemoveExternalPath.ts b/server/src/migrations/1708425975121-RemoveExternalPath.ts similarity index 100% rename from server/src/infra/migrations/1708425975121-RemoveExternalPath.ts rename to server/src/migrations/1708425975121-RemoveExternalPath.ts diff --git a/server/src/infra/migrations/1709150004123-RemoveLibraryWatchPollingOption.ts b/server/src/migrations/1709150004123-RemoveLibraryWatchPollingOption.ts similarity index 100% rename from server/src/infra/migrations/1709150004123-RemoveLibraryWatchPollingOption.ts rename to server/src/migrations/1709150004123-RemoveLibraryWatchPollingOption.ts diff --git a/server/src/infra/migrations/1709608140355-AddAssetOriginalPathTrigramIndex.ts b/server/src/migrations/1709608140355-AddAssetOriginalPathTrigramIndex.ts similarity index 100% rename from server/src/infra/migrations/1709608140355-AddAssetOriginalPathTrigramIndex.ts rename to server/src/migrations/1709608140355-AddAssetOriginalPathTrigramIndex.ts diff --git a/server/src/infra/migrations/1709763765506-AddExtensionToOriginalFileName.ts b/server/src/migrations/1709763765506-AddExtensionToOriginalFileName.ts similarity index 100% rename from server/src/infra/migrations/1709763765506-AddExtensionToOriginalFileName.ts rename to server/src/migrations/1709763765506-AddExtensionToOriginalFileName.ts diff --git a/server/src/infra/migrations/1709825430031-CascadeSharedLinksDelete.ts b/server/src/migrations/1709825430031-CascadeSharedLinksDelete.ts similarity index 100% rename from server/src/infra/migrations/1709825430031-CascadeSharedLinksDelete.ts rename to server/src/migrations/1709825430031-CascadeSharedLinksDelete.ts diff --git a/server/src/infra/migrations/1709870213078-AddUserStatus.ts b/server/src/migrations/1709870213078-AddUserStatus.ts similarity index 100% rename from server/src/infra/migrations/1709870213078-AddUserStatus.ts rename to server/src/migrations/1709870213078-AddUserStatus.ts diff --git a/server/src/infra/migrations/1710182081326-AscendingOrderAlbum.ts b/server/src/migrations/1710182081326-AscendingOrderAlbum.ts similarity index 100% rename from server/src/infra/migrations/1710182081326-AscendingOrderAlbum.ts rename to server/src/migrations/1710182081326-AscendingOrderAlbum.ts diff --git a/server/src/infra/migrations/1710293990203-AddAssetRelationIndices.ts b/server/src/migrations/1710293990203-AddAssetRelationIndices.ts similarity index 100% rename from server/src/infra/migrations/1710293990203-AddAssetRelationIndices.ts rename to server/src/migrations/1710293990203-AddAssetRelationIndices.ts diff --git a/server/src/infra/repositories/access.repository.ts b/server/src/repositories/access.repository.ts similarity index 95% rename from server/src/infra/repositories/access.repository.ts rename to server/src/repositories/access.repository.ts index c6b7bc0fd9..418cf542f9 100644 --- a/server/src/infra/repositories/access.repository.ts +++ b/server/src/repositories/access.repository.ts @@ -1,14 +1,14 @@ import { InjectRepository } from '@nestjs/typeorm'; import { ChunkedSet, DummyValue, GenerateSql } from 'src/decorators'; -import { ActivityEntity } from 'src/infra/entities/activity.entity'; -import { AlbumEntity } from 'src/infra/entities/album.entity'; -import { AssetFaceEntity } from 'src/infra/entities/asset-face.entity'; -import { AssetEntity } from 'src/infra/entities/asset.entity'; -import { LibraryEntity } from 'src/infra/entities/library.entity'; -import { PartnerEntity } from 'src/infra/entities/partner.entity'; -import { PersonEntity } from 'src/infra/entities/person.entity'; -import { SharedLinkEntity } from 'src/infra/entities/shared-link.entity'; -import { UserTokenEntity } from 'src/infra/entities/user-token.entity'; +import { ActivityEntity } from 'src/entities/activity.entity'; +import { AlbumEntity } from 'src/entities/album.entity'; +import { AssetFaceEntity } from 'src/entities/asset-face.entity'; +import { AssetEntity } from 'src/entities/asset.entity'; +import { LibraryEntity } from 'src/entities/library.entity'; +import { PartnerEntity } from 'src/entities/partner.entity'; +import { PersonEntity } from 'src/entities/person.entity'; +import { SharedLinkEntity } from 'src/entities/shared-link.entity'; +import { UserTokenEntity } from 'src/entities/user-token.entity'; import { Instrumentation } from 'src/infra/instrumentation'; import { IAccessRepository } from 'src/interfaces/access.repository'; import { Brackets, In, Repository } from 'typeorm'; diff --git a/server/src/infra/repositories/activity.repository.ts b/server/src/repositories/activity.repository.ts similarity index 96% rename from server/src/infra/repositories/activity.repository.ts rename to server/src/repositories/activity.repository.ts index 4c1cec6d64..bec4a4f175 100644 --- a/server/src/infra/repositories/activity.repository.ts +++ b/server/src/repositories/activity.repository.ts @@ -1,7 +1,7 @@ import { Injectable } from '@nestjs/common'; import { InjectRepository } from '@nestjs/typeorm'; import { DummyValue, GenerateSql } from 'src/decorators'; -import { ActivityEntity } from 'src/infra/entities/activity.entity'; +import { ActivityEntity } from 'src/entities/activity.entity'; import { Instrumentation } from 'src/infra/instrumentation'; import { IActivityRepository } from 'src/interfaces/activity.repository'; import { IsNull, Repository } from 'typeorm'; diff --git a/server/src/infra/repositories/album.repository.ts b/server/src/repositories/album.repository.ts similarity index 98% rename from server/src/infra/repositories/album.repository.ts rename to server/src/repositories/album.repository.ts index ca4d4a9132..4646ef3d9f 100644 --- a/server/src/infra/repositories/album.repository.ts +++ b/server/src/repositories/album.repository.ts @@ -2,9 +2,9 @@ import { Injectable } from '@nestjs/common'; import { InjectDataSource, InjectRepository } from '@nestjs/typeorm'; import _ from 'lodash'; import { Chunked, ChunkedArray, DATABASE_PARAMETER_CHUNK_SIZE, DummyValue, GenerateSql } from 'src/decorators'; +import { AlbumEntity } from 'src/entities/album.entity'; +import { AssetEntity } from 'src/entities/asset.entity'; import { dataSource } from 'src/infra/database.config'; -import { AlbumEntity } from 'src/infra/entities/album.entity'; -import { AssetEntity } from 'src/infra/entities/asset.entity'; import { Instrumentation } from 'src/infra/instrumentation'; import { AlbumAsset, diff --git a/server/src/infra/repositories/api-key.repository.ts b/server/src/repositories/api-key.repository.ts similarity index 96% rename from server/src/infra/repositories/api-key.repository.ts rename to server/src/repositories/api-key.repository.ts index 0add8512a8..14a7db9c9e 100644 --- a/server/src/infra/repositories/api-key.repository.ts +++ b/server/src/repositories/api-key.repository.ts @@ -1,7 +1,7 @@ import { Injectable } from '@nestjs/common'; import { InjectRepository } from '@nestjs/typeorm'; import { DummyValue, GenerateSql } from 'src/decorators'; -import { APIKeyEntity } from 'src/infra/entities/api-key.entity'; +import { APIKeyEntity } from 'src/entities/api-key.entity'; import { Instrumentation } from 'src/infra/instrumentation'; import { IKeyRepository } from 'src/interfaces/api-key.repository'; import { Repository } from 'typeorm'; diff --git a/server/src/infra/repositories/asset-stack.repository.ts b/server/src/repositories/asset-stack.repository.ts similarity index 94% rename from server/src/infra/repositories/asset-stack.repository.ts rename to server/src/repositories/asset-stack.repository.ts index 0f984f4ea2..9859c5fadc 100644 --- a/server/src/infra/repositories/asset-stack.repository.ts +++ b/server/src/repositories/asset-stack.repository.ts @@ -1,6 +1,6 @@ import { Injectable } from '@nestjs/common'; import { InjectRepository } from '@nestjs/typeorm'; -import { AssetStackEntity } from 'src/infra/entities/asset-stack.entity'; +import { AssetStackEntity } from 'src/entities/asset-stack.entity'; import { Instrumentation } from 'src/infra/instrumentation'; import { IAssetStackRepository } from 'src/interfaces/asset-stack.repository'; import { Repository } from 'typeorm'; diff --git a/server/src/infra/repositories/asset.repository.ts b/server/src/repositories/asset.repository.ts similarity index 98% rename from server/src/infra/repositories/asset.repository.ts rename to server/src/repositories/asset.repository.ts index 3026c5386c..71bef17efb 100644 --- a/server/src/infra/repositories/asset.repository.ts +++ b/server/src/repositories/asset.repository.ts @@ -3,11 +3,11 @@ import { InjectRepository } from '@nestjs/typeorm'; import { DateTime } from 'luxon'; import path from 'node:path'; import { Chunked, ChunkedArray, DummyValue, GenerateSql } from 'src/decorators'; -import { AssetOrder } from 'src/infra/entities/album.entity'; -import { AssetJobStatusEntity } from 'src/infra/entities/asset-job-status.entity'; -import { AssetEntity, AssetType } from 'src/infra/entities/asset.entity'; -import { ExifEntity } from 'src/infra/entities/exif.entity'; -import { SmartInfoEntity } from 'src/infra/entities/smart-info.entity'; +import { AssetOrder } from 'src/entities/album.entity'; +import { AssetJobStatusEntity } from 'src/entities/asset-job-status.entity'; +import { AssetEntity, AssetType } from 'src/entities/asset.entity'; +import { ExifEntity } from 'src/entities/exif.entity'; +import { SmartInfoEntity } from 'src/entities/smart-info.entity'; import { OptionalBetween, paginate, paginatedBuilder, searchAssetBuilder } from 'src/infra/infra.utils'; import { Instrumentation } from 'src/infra/instrumentation'; import { diff --git a/server/src/infra/repositories/audit.repository.ts b/server/src/repositories/audit.repository.ts similarity index 94% rename from server/src/infra/repositories/audit.repository.ts rename to server/src/repositories/audit.repository.ts index bfd55336d1..1d892dab25 100644 --- a/server/src/infra/repositories/audit.repository.ts +++ b/server/src/repositories/audit.repository.ts @@ -1,5 +1,5 @@ import { InjectRepository } from '@nestjs/typeorm'; -import { AuditEntity } from 'src/infra/entities/audit.entity'; +import { AuditEntity } from 'src/entities/audit.entity'; import { Instrumentation } from 'src/infra/instrumentation'; import { AuditSearch, IAuditRepository } from 'src/interfaces/audit.repository'; import { LessThan, MoreThan, Repository } from 'typeorm'; diff --git a/server/src/infra/repositories/communication.repository.ts b/server/src/repositories/communication.repository.ts similarity index 100% rename from server/src/infra/repositories/communication.repository.ts rename to server/src/repositories/communication.repository.ts diff --git a/server/src/infra/repositories/crypto.repository.ts b/server/src/repositories/crypto.repository.ts similarity index 100% rename from server/src/infra/repositories/crypto.repository.ts rename to server/src/repositories/crypto.repository.ts diff --git a/server/src/infra/repositories/database.repository.ts b/server/src/repositories/database.repository.ts similarity index 100% rename from server/src/infra/repositories/database.repository.ts rename to server/src/repositories/database.repository.ts diff --git a/server/src/infra/repositories/filesystem.provider.spec.ts b/server/src/repositories/filesystem.provider.spec.ts similarity index 98% rename from server/src/infra/repositories/filesystem.provider.spec.ts rename to server/src/repositories/filesystem.provider.spec.ts index 9b12187ed2..56f54b0360 100644 --- a/server/src/infra/repositories/filesystem.provider.spec.ts +++ b/server/src/repositories/filesystem.provider.spec.ts @@ -1,6 +1,6 @@ import mockfs from 'mock-fs'; import { CrawlOptionsDto } from 'src/domain/library/library.dto'; -import { FilesystemProvider } from 'src/infra/repositories/filesystem.provider'; +import { FilesystemProvider } from 'src/repositories/filesystem.provider'; interface Test { test: string; diff --git a/server/src/infra/repositories/filesystem.provider.ts b/server/src/repositories/filesystem.provider.ts similarity index 100% rename from server/src/infra/repositories/filesystem.provider.ts rename to server/src/repositories/filesystem.provider.ts diff --git a/server/src/infra/repositories/job.repository.ts b/server/src/repositories/job.repository.ts similarity index 100% rename from server/src/infra/repositories/job.repository.ts rename to server/src/repositories/job.repository.ts diff --git a/server/src/infra/repositories/library.repository.ts b/server/src/repositories/library.repository.ts similarity index 98% rename from server/src/infra/repositories/library.repository.ts rename to server/src/repositories/library.repository.ts index ae6a1e3438..7171aad0d8 100644 --- a/server/src/infra/repositories/library.repository.ts +++ b/server/src/repositories/library.repository.ts @@ -2,7 +2,7 @@ import { Injectable } from '@nestjs/common'; import { InjectRepository } from '@nestjs/typeorm'; import { DummyValue, GenerateSql } from 'src/decorators'; import { LibraryStatsResponseDto } from 'src/domain/library/library.dto'; -import { LibraryEntity, LibraryType } from 'src/infra/entities/library.entity'; +import { LibraryEntity, LibraryType } from 'src/entities/library.entity'; import { Instrumentation } from 'src/infra/instrumentation'; import { ILibraryRepository } from 'src/interfaces/library.repository'; import { IsNull, Not } from 'typeorm'; diff --git a/server/src/infra/repositories/machine-learning.repository.ts b/server/src/repositories/machine-learning.repository.ts similarity index 100% rename from server/src/infra/repositories/machine-learning.repository.ts rename to server/src/repositories/machine-learning.repository.ts diff --git a/server/src/infra/repositories/media.repository.ts b/server/src/repositories/media.repository.ts similarity index 98% rename from server/src/infra/repositories/media.repository.ts rename to server/src/repositories/media.repository.ts index 8c143d0493..d0f4332b4d 100644 --- a/server/src/infra/repositories/media.repository.ts +++ b/server/src/repositories/media.repository.ts @@ -3,7 +3,7 @@ import fs from 'node:fs/promises'; import { Writable } from 'node:stream'; import { promisify } from 'node:util'; import sharp from 'sharp'; -import { Colorspace } from 'src/infra/entities/system-config.entity'; +import { Colorspace } from 'src/entities/system-config.entity'; import { Instrumentation } from 'src/infra/instrumentation'; import { ImmichLogger } from 'src/infra/logger'; import { diff --git a/server/src/infra/repositories/metadata.repository.ts b/server/src/repositories/metadata.repository.ts similarity index 97% rename from server/src/infra/repositories/metadata.repository.ts rename to server/src/repositories/metadata.repository.ts index a5e82535c1..5da664f14e 100644 --- a/server/src/infra/repositories/metadata.repository.ts +++ b/server/src/repositories/metadata.repository.ts @@ -14,9 +14,9 @@ import { geodataCities500Path, geodataDatePath, } from 'src/domain/domain.constant'; -import { ExifEntity } from 'src/infra/entities/exif.entity'; -import { GeodataPlacesEntity } from 'src/infra/entities/geodata-places.entity'; -import { SystemMetadataKey } from 'src/infra/entities/system-metadata.entity'; +import { ExifEntity } from 'src/entities/exif.entity'; +import { GeodataPlacesEntity } from 'src/entities/geodata-places.entity'; +import { SystemMetadataKey } from 'src/entities/system-metadata.entity'; import { Instrumentation } from 'src/infra/instrumentation'; import { ImmichLogger } from 'src/infra/logger'; import { GeoPoint, IMetadataRepository, ImmichTags, ReverseGeocodeResult } from 'src/interfaces/metadata.repository'; diff --git a/server/src/infra/repositories/move.repository.ts b/server/src/repositories/move.repository.ts similarity index 93% rename from server/src/infra/repositories/move.repository.ts rename to server/src/repositories/move.repository.ts index 7f7595125f..e567bcca35 100644 --- a/server/src/infra/repositories/move.repository.ts +++ b/server/src/repositories/move.repository.ts @@ -1,7 +1,7 @@ import { Injectable } from '@nestjs/common'; import { InjectRepository } from '@nestjs/typeorm'; import { DummyValue, GenerateSql } from 'src/decorators'; -import { MoveEntity, PathType } from 'src/infra/entities/move.entity'; +import { MoveEntity, PathType } from 'src/entities/move.entity'; import { Instrumentation } from 'src/infra/instrumentation'; import { IMoveRepository, MoveCreate } from 'src/interfaces/move.repository'; import { Repository } from 'typeorm'; diff --git a/server/src/infra/repositories/partner.repository.ts b/server/src/repositories/partner.repository.ts similarity index 95% rename from server/src/infra/repositories/partner.repository.ts rename to server/src/repositories/partner.repository.ts index f8b9866cac..4c4bbc0ed5 100644 --- a/server/src/infra/repositories/partner.repository.ts +++ b/server/src/repositories/partner.repository.ts @@ -1,6 +1,6 @@ import { Injectable } from '@nestjs/common'; import { InjectRepository } from '@nestjs/typeorm'; -import { PartnerEntity } from 'src/infra/entities/partner.entity'; +import { PartnerEntity } from 'src/entities/partner.entity'; import { Instrumentation } from 'src/infra/instrumentation'; import { IPartnerRepository, PartnerIds } from 'src/interfaces/partner.repository'; import { DeepPartial, Repository } from 'typeorm'; diff --git a/server/src/infra/repositories/person.repository.ts b/server/src/repositories/person.repository.ts similarity index 97% rename from server/src/infra/repositories/person.repository.ts rename to server/src/repositories/person.repository.ts index 5096032da2..6a0008c3dc 100644 --- a/server/src/infra/repositories/person.repository.ts +++ b/server/src/repositories/person.repository.ts @@ -1,9 +1,9 @@ import { InjectRepository } from '@nestjs/typeorm'; import _ from 'lodash'; import { ChunkedArray, DummyValue, GenerateSql } from 'src/decorators'; -import { AssetFaceEntity } from 'src/infra/entities/asset-face.entity'; -import { AssetEntity } from 'src/infra/entities/asset.entity'; -import { PersonEntity } from 'src/infra/entities/person.entity'; +import { AssetFaceEntity } from 'src/entities/asset-face.entity'; +import { AssetEntity } from 'src/entities/asset.entity'; +import { PersonEntity } from 'src/entities/person.entity'; import { asVector, paginate } from 'src/infra/infra.utils'; import { Instrumentation } from 'src/infra/instrumentation'; import { diff --git a/server/src/infra/repositories/search.repository.ts b/server/src/repositories/search.repository.ts similarity index 97% rename from server/src/infra/repositories/search.repository.ts rename to server/src/repositories/search.repository.ts index 83bbef6671..aefb3c9339 100644 --- a/server/src/infra/repositories/search.repository.ts +++ b/server/src/repositories/search.repository.ts @@ -2,12 +2,12 @@ import { Injectable } from '@nestjs/common'; import { InjectRepository } from '@nestjs/typeorm'; import { DummyValue, GenerateSql } from 'src/decorators'; import { getCLIPModelInfo } from 'src/domain/smart-info/smart-info.constant'; +import { AssetFaceEntity } from 'src/entities/asset-face.entity'; +import { AssetEntity, AssetType } from 'src/entities/asset.entity'; +import { GeodataPlacesEntity } from 'src/entities/geodata-places.entity'; +import { SmartInfoEntity } from 'src/entities/smart-info.entity'; +import { SmartSearchEntity } from 'src/entities/smart-search.entity'; import { vectorExt } from 'src/infra/database.config'; -import { AssetFaceEntity } from 'src/infra/entities/asset-face.entity'; -import { AssetEntity, AssetType } from 'src/infra/entities/asset.entity'; -import { GeodataPlacesEntity } from 'src/infra/entities/geodata-places.entity'; -import { SmartInfoEntity } from 'src/infra/entities/smart-info.entity'; -import { SmartSearchEntity } from 'src/infra/entities/smart-search.entity'; import { asVector, paginatedBuilder, searchAssetBuilder } from 'src/infra/infra.utils'; import { Instrumentation } from 'src/infra/instrumentation'; import { ImmichLogger } from 'src/infra/logger'; diff --git a/server/src/infra/repositories/server-info.repository.ts b/server/src/repositories/server-info.repository.ts similarity index 100% rename from server/src/infra/repositories/server-info.repository.ts rename to server/src/repositories/server-info.repository.ts diff --git a/server/src/infra/repositories/shared-link.repository.ts b/server/src/repositories/shared-link.repository.ts similarity index 96% rename from server/src/infra/repositories/shared-link.repository.ts rename to server/src/repositories/shared-link.repository.ts index 93aacf1f28..968b6dd731 100644 --- a/server/src/infra/repositories/shared-link.repository.ts +++ b/server/src/repositories/shared-link.repository.ts @@ -1,7 +1,7 @@ import { Injectable } from '@nestjs/common'; import { InjectRepository } from '@nestjs/typeorm'; import { DummyValue, GenerateSql } from 'src/decorators'; -import { SharedLinkEntity } from 'src/infra/entities/shared-link.entity'; +import { SharedLinkEntity } from 'src/entities/shared-link.entity'; import { Instrumentation } from 'src/infra/instrumentation'; import { ISharedLinkRepository } from 'src/interfaces/shared-link.repository'; import { Repository } from 'typeorm'; diff --git a/server/src/infra/repositories/system-config.repository.ts b/server/src/repositories/system-config.repository.ts similarity index 94% rename from server/src/infra/repositories/system-config.repository.ts rename to server/src/repositories/system-config.repository.ts index ba3ee0aa0f..af6296ce03 100644 --- a/server/src/infra/repositories/system-config.repository.ts +++ b/server/src/repositories/system-config.repository.ts @@ -1,7 +1,7 @@ import { InjectRepository } from '@nestjs/typeorm'; import { readFile } from 'node:fs/promises'; import { Chunked, DummyValue, GenerateSql } from 'src/decorators'; -import { SystemConfigEntity } from 'src/infra/entities/system-config.entity'; +import { SystemConfigEntity } from 'src/entities/system-config.entity'; import { Instrumentation } from 'src/infra/instrumentation'; import { ISystemConfigRepository } from 'src/interfaces/system-config.repository'; import { In, Repository } from 'typeorm'; diff --git a/server/src/infra/repositories/system-metadata.repository.ts b/server/src/repositories/system-metadata.repository.ts similarity index 90% rename from server/src/infra/repositories/system-metadata.repository.ts rename to server/src/repositories/system-metadata.repository.ts index 12c72c090f..978dba9bdd 100644 --- a/server/src/infra/repositories/system-metadata.repository.ts +++ b/server/src/repositories/system-metadata.repository.ts @@ -1,5 +1,5 @@ import { InjectRepository } from '@nestjs/typeorm'; -import { SystemMetadata, SystemMetadataEntity } from 'src/infra/entities/system-metadata.entity'; +import { SystemMetadata, SystemMetadataEntity } from 'src/entities/system-metadata.entity'; import { Instrumentation } from 'src/infra/instrumentation'; import { ISystemMetadataRepository } from 'src/interfaces/system-metadata.repository'; import { Repository } from 'typeorm'; diff --git a/server/src/infra/repositories/tag.repository.ts b/server/src/repositories/tag.repository.ts similarity index 96% rename from server/src/infra/repositories/tag.repository.ts rename to server/src/repositories/tag.repository.ts index c44b0763a3..a2ae74878f 100644 --- a/server/src/infra/repositories/tag.repository.ts +++ b/server/src/repositories/tag.repository.ts @@ -1,7 +1,7 @@ import { Injectable } from '@nestjs/common'; import { InjectRepository } from '@nestjs/typeorm'; -import { AssetEntity } from 'src/infra/entities/asset.entity'; -import { TagEntity } from 'src/infra/entities/tag.entity'; +import { AssetEntity } from 'src/entities/asset.entity'; +import { TagEntity } from 'src/entities/tag.entity'; import { Instrumentation } from 'src/infra/instrumentation'; import { ITagRepository } from 'src/interfaces/tag.repository'; import { Repository } from 'typeorm'; diff --git a/server/src/infra/repositories/user-token.repository.ts b/server/src/repositories/user-token.repository.ts similarity index 95% rename from server/src/infra/repositories/user-token.repository.ts rename to server/src/repositories/user-token.repository.ts index 19dcafc1e1..31d6d21901 100644 --- a/server/src/infra/repositories/user-token.repository.ts +++ b/server/src/repositories/user-token.repository.ts @@ -1,7 +1,7 @@ import { Injectable } from '@nestjs/common'; import { InjectRepository } from '@nestjs/typeorm'; import { DummyValue, GenerateSql } from 'src/decorators'; -import { UserTokenEntity } from 'src/infra/entities/user-token.entity'; +import { UserTokenEntity } from 'src/entities/user-token.entity'; import { Instrumentation } from 'src/infra/instrumentation'; import { IUserTokenRepository } from 'src/interfaces/user-token.repository'; import { Repository } from 'typeorm'; diff --git a/server/src/infra/repositories/user.repository.ts b/server/src/repositories/user.repository.ts similarity index 97% rename from server/src/infra/repositories/user.repository.ts rename to server/src/repositories/user.repository.ts index 7432937666..bd94e71a52 100644 --- a/server/src/infra/repositories/user.repository.ts +++ b/server/src/repositories/user.repository.ts @@ -1,8 +1,8 @@ import { Injectable } from '@nestjs/common'; import { InjectRepository } from '@nestjs/typeorm'; import { DummyValue, GenerateSql } from 'src/decorators'; -import { AssetEntity } from 'src/infra/entities/asset.entity'; -import { UserEntity } from 'src/infra/entities/user.entity'; +import { AssetEntity } from 'src/entities/asset.entity'; +import { UserEntity } from 'src/entities/user.entity'; import { Instrumentation } from 'src/infra/instrumentation'; import { IUserRepository, diff --git a/server/src/infra/subscribers/audit.subscriber.ts b/server/src/subscribers/audit.subscriber.ts similarity index 84% rename from server/src/infra/subscribers/audit.subscriber.ts rename to server/src/subscribers/audit.subscriber.ts index ddfc5d0d74..3d65507aec 100644 --- a/server/src/infra/subscribers/audit.subscriber.ts +++ b/server/src/subscribers/audit.subscriber.ts @@ -1,6 +1,6 @@ -import { AlbumEntity } from 'src/infra/entities/album.entity'; -import { AssetEntity } from 'src/infra/entities/asset.entity'; -import { AuditEntity, DatabaseAction, EntityType } from 'src/infra/entities/audit.entity'; +import { AlbumEntity } from 'src/entities/album.entity'; +import { AssetEntity } from 'src/entities/asset.entity'; +import { AuditEntity, DatabaseAction, EntityType } from 'src/entities/audit.entity'; import { EntitySubscriberInterface, EventSubscriber, RemoveEvent } from 'typeorm'; @EventSubscriber() diff --git a/server/src/test-utils/utils.ts b/server/src/test-utils/utils.ts index b9e74f767d..9b8ab059bf 100644 --- a/server/src/test-utils/utils.ts +++ b/server/src/test-utils/utils.ts @@ -11,11 +11,11 @@ import { AppModule } from 'src/immich/app.module'; import { AppService } from 'src/immich/app.service'; import { dataSource } from 'src/infra/database.config'; import { InfraModule, InfraTestModule } from 'src/infra/infra.module'; -import { MediaRepository } from 'src/infra/repositories/media.repository'; import { IJobRepository, JobItem, JobItemHandler } from 'src/interfaces/job.repository'; import { IMediaRepository } from 'src/interfaces/media.repository'; import { StorageEventType } from 'src/interfaces/storage.repository'; import { AppService as MicroAppService } from 'src/microservices/app.service'; +import { MediaRepository } from 'src/repositories/media.repository'; import { EntityTarget, ObjectLiteral } from 'typeorm'; export const IMMICH_TEST_ASSET_PATH = process.env.IMMICH_TEST_ASSET_PATH as string; diff --git a/server/test/fixtures/activity.stub.ts b/server/test/fixtures/activity.stub.ts index ae33699a0a..4805f6604d 100644 --- a/server/test/fixtures/activity.stub.ts +++ b/server/test/fixtures/activity.stub.ts @@ -1,4 +1,4 @@ -import { ActivityEntity } from 'src/infra/entities/activity.entity'; +import { ActivityEntity } from 'src/entities/activity.entity'; import { albumStub } from 'test/fixtures/album.stub'; import { assetStub } from 'test/fixtures/asset.stub'; import { authStub } from 'test/fixtures/auth.stub'; diff --git a/server/test/fixtures/album.stub.ts b/server/test/fixtures/album.stub.ts index 18be7d4ffb..ff9348167d 100644 --- a/server/test/fixtures/album.stub.ts +++ b/server/test/fixtures/album.stub.ts @@ -1,4 +1,4 @@ -import { AlbumEntity, AssetOrder } from 'src/infra/entities/album.entity'; +import { AlbumEntity, AssetOrder } from 'src/entities/album.entity'; import { assetStub } from 'test/fixtures/asset.stub'; import { authStub } from 'test/fixtures/auth.stub'; import { userStub } from 'test/fixtures/user.stub'; diff --git a/server/test/fixtures/api-key.stub.ts b/server/test/fixtures/api-key.stub.ts index bc6f85c65c..954c8f35a0 100644 --- a/server/test/fixtures/api-key.stub.ts +++ b/server/test/fixtures/api-key.stub.ts @@ -1,4 +1,4 @@ -import { APIKeyEntity } from 'src/infra/entities/api-key.entity'; +import { APIKeyEntity } from 'src/entities/api-key.entity'; import { authStub } from 'test/fixtures/auth.stub'; import { userStub } from 'test/fixtures/user.stub'; diff --git a/server/test/fixtures/asset.stub.ts b/server/test/fixtures/asset.stub.ts index d2daeaaff8..e9b4650c28 100644 --- a/server/test/fixtures/asset.stub.ts +++ b/server/test/fixtures/asset.stub.ts @@ -1,6 +1,6 @@ -import { AssetStackEntity } from 'src/infra/entities/asset-stack.entity'; -import { AssetEntity, AssetType } from 'src/infra/entities/asset.entity'; -import { ExifEntity } from 'src/infra/entities/exif.entity'; +import { AssetStackEntity } from 'src/entities/asset-stack.entity'; +import { AssetEntity, AssetType } from 'src/entities/asset.entity'; +import { ExifEntity } from 'src/entities/exif.entity'; import { authStub } from 'test/fixtures/auth.stub'; import { fileStub } from 'test/fixtures/file.stub'; import { libraryStub } from 'test/fixtures/library.stub'; diff --git a/server/test/fixtures/audit.stub.ts b/server/test/fixtures/audit.stub.ts index 2c7ef67822..bca1d33491 100644 --- a/server/test/fixtures/audit.stub.ts +++ b/server/test/fixtures/audit.stub.ts @@ -1,4 +1,4 @@ -import { AuditEntity, DatabaseAction, EntityType } from 'src/infra/entities/audit.entity'; +import { AuditEntity, DatabaseAction, EntityType } from 'src/entities/audit.entity'; import { authStub } from 'test/fixtures/auth.stub'; export const auditStub = { diff --git a/server/test/fixtures/auth.stub.ts b/server/test/fixtures/auth.stub.ts index f05285fd6b..e0add44d23 100644 --- a/server/test/fixtures/auth.stub.ts +++ b/server/test/fixtures/auth.stub.ts @@ -1,7 +1,7 @@ import { AuthDto } from 'src/domain/auth/auth.dto'; -import { SharedLinkEntity } from 'src/infra/entities/shared-link.entity'; -import { UserTokenEntity } from 'src/infra/entities/user-token.entity'; -import { UserEntity } from 'src/infra/entities/user.entity'; +import { SharedLinkEntity } from 'src/entities/shared-link.entity'; +import { UserTokenEntity } from 'src/entities/user-token.entity'; +import { UserEntity } from 'src/entities/user.entity'; export const adminSignupStub = { name: 'Immich Admin', diff --git a/server/test/fixtures/face.stub.ts b/server/test/fixtures/face.stub.ts index 58a0179275..2d2acec40d 100644 --- a/server/test/fixtures/face.stub.ts +++ b/server/test/fixtures/face.stub.ts @@ -1,4 +1,4 @@ -import { AssetFaceEntity } from 'src/infra/entities/asset-face.entity'; +import { AssetFaceEntity } from 'src/entities/asset-face.entity'; import { assetStub } from 'test/fixtures/asset.stub'; import { personStub } from 'test/fixtures/person.stub'; diff --git a/server/test/fixtures/library.stub.ts b/server/test/fixtures/library.stub.ts index 0c5296595f..b3fa4b7f02 100644 --- a/server/test/fixtures/library.stub.ts +++ b/server/test/fixtures/library.stub.ts @@ -1,7 +1,7 @@ import { join } from 'node:path'; import { THUMBNAIL_DIR } from 'src/cores/storage.core'; import { APP_MEDIA_LOCATION } from 'src/domain/domain.constant'; -import { LibraryEntity, LibraryType } from 'src/infra/entities/library.entity'; +import { LibraryEntity, LibraryType } from 'src/entities/library.entity'; import { userStub } from 'test/fixtures/user.stub'; export const libraryStub = { diff --git a/server/test/fixtures/partner.stub.ts b/server/test/fixtures/partner.stub.ts index 1277e2e21f..4e5643bc1c 100644 --- a/server/test/fixtures/partner.stub.ts +++ b/server/test/fixtures/partner.stub.ts @@ -1,4 +1,4 @@ -import { PartnerEntity } from 'src/infra/entities/partner.entity'; +import { PartnerEntity } from 'src/entities/partner.entity'; import { userStub } from 'test/fixtures/user.stub'; export const partnerStub = { diff --git a/server/test/fixtures/person.stub.ts b/server/test/fixtures/person.stub.ts index a573d72e30..5e5a2214ed 100644 --- a/server/test/fixtures/person.stub.ts +++ b/server/test/fixtures/person.stub.ts @@ -1,4 +1,4 @@ -import { PersonEntity } from 'src/infra/entities/person.entity'; +import { PersonEntity } from 'src/entities/person.entity'; import { userStub } from 'test/fixtures/user.stub'; export const personStub = { diff --git a/server/test/fixtures/shared-link.stub.ts b/server/test/fixtures/shared-link.stub.ts index d3b3d51519..6855c8c7a2 100644 --- a/server/test/fixtures/shared-link.stub.ts +++ b/server/test/fixtures/shared-link.stub.ts @@ -3,10 +3,10 @@ import { AssetResponseDto } from 'src/domain/asset/response-dto/asset-response.d import { ExifResponseDto } from 'src/domain/asset/response-dto/exif-response.dto'; import { SharedLinkResponseDto } from 'src/domain/shared-link/shared-link-response.dto'; import { mapUser } from 'src/domain/user/response-dto/user-response.dto'; -import { AssetOrder } from 'src/infra/entities/album.entity'; -import { AssetType } from 'src/infra/entities/asset.entity'; -import { SharedLinkEntity, SharedLinkType } from 'src/infra/entities/shared-link.entity'; -import { UserEntity } from 'src/infra/entities/user.entity'; +import { AssetOrder } from 'src/entities/album.entity'; +import { AssetType } from 'src/entities/asset.entity'; +import { SharedLinkEntity, SharedLinkType } from 'src/entities/shared-link.entity'; +import { UserEntity } from 'src/entities/user.entity'; import { assetStub } from 'test/fixtures/asset.stub'; import { authStub } from 'test/fixtures/auth.stub'; import { libraryStub } from 'test/fixtures/library.stub'; diff --git a/server/test/fixtures/system-config.stub.ts b/server/test/fixtures/system-config.stub.ts index 2de5398481..b557644efa 100644 --- a/server/test/fixtures/system-config.stub.ts +++ b/server/test/fixtures/system-config.stub.ts @@ -1,4 +1,4 @@ -import { SystemConfigEntity, SystemConfigKey } from 'src/infra/entities/system-config.entity'; +import { SystemConfigEntity, SystemConfigKey } from 'src/entities/system-config.entity'; export const systemConfigStub: Record = { defaults: [], diff --git a/server/test/fixtures/tag.stub.ts b/server/test/fixtures/tag.stub.ts index a480055281..27123ddb67 100644 --- a/server/test/fixtures/tag.stub.ts +++ b/server/test/fixtures/tag.stub.ts @@ -1,5 +1,5 @@ import { TagResponseDto } from 'src/domain/tag/tag-response.dto'; -import { TagEntity, TagType } from 'src/infra/entities/tag.entity'; +import { TagEntity, TagType } from 'src/entities/tag.entity'; import { userStub } from 'test/fixtures/user.stub'; export const tagStub = { diff --git a/server/test/fixtures/user-token.stub.ts b/server/test/fixtures/user-token.stub.ts index de42d1d322..2f6fcc0cd5 100644 --- a/server/test/fixtures/user-token.stub.ts +++ b/server/test/fixtures/user-token.stub.ts @@ -1,4 +1,4 @@ -import { UserTokenEntity } from 'src/infra/entities/user-token.entity'; +import { UserTokenEntity } from 'src/entities/user-token.entity'; import { userStub } from 'test/fixtures/user.stub'; export const userTokenStub = { diff --git a/server/test/fixtures/user.stub.ts b/server/test/fixtures/user.stub.ts index 7809583c7f..5cf5acfc3b 100644 --- a/server/test/fixtures/user.stub.ts +++ b/server/test/fixtures/user.stub.ts @@ -1,4 +1,4 @@ -import { UserAvatarColor, UserEntity } from 'src/infra/entities/user.entity'; +import { UserAvatarColor, UserEntity } from 'src/entities/user.entity'; import { authStub } from 'test/fixtures/auth.stub'; export const userDto = {