mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
fix: use create if not exists clause for indexes (#20728)
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
parent
9c8c52874a
commit
f1c494ef97
10 changed files with 22 additions and 17 deletions
8
mobile/test/drift/main/generated/schema_v7.dart
generated
8
mobile/test/drift/main/generated/schema_v7.dart
generated
|
|
@ -6383,11 +6383,11 @@ class DatabaseAtV7 extends GeneratedDatabase {
|
|||
LocalAlbumAssetEntity(this);
|
||||
late final Index idxLocalAssetChecksum = Index(
|
||||
'idx_local_asset_checksum',
|
||||
'CREATE INDEX idx_local_asset_checksum ON local_asset_entity (checksum)',
|
||||
'CREATE INDEX IF NOT EXISTS idx_local_asset_checksum ON local_asset_entity (checksum)',
|
||||
);
|
||||
late final Index idxRemoteAssetOwnerChecksum = Index(
|
||||
'idx_remote_asset_owner_checksum',
|
||||
'CREATE INDEX idx_remote_asset_owner_checksum ON remote_asset_entity (owner_id, checksum)',
|
||||
'CREATE INDEX IF NOT EXISTS idx_remote_asset_owner_checksum ON remote_asset_entity (owner_id, checksum)',
|
||||
);
|
||||
late final Index uQRemoteAssetsOwnerChecksum = Index(
|
||||
'UQ_remote_assets_owner_checksum',
|
||||
|
|
@ -6399,7 +6399,7 @@ class DatabaseAtV7 extends GeneratedDatabase {
|
|||
);
|
||||
late final Index idxRemoteAssetChecksum = Index(
|
||||
'idx_remote_asset_checksum',
|
||||
'CREATE INDEX idx_remote_asset_checksum ON remote_asset_entity (checksum)',
|
||||
'CREATE INDEX IF NOT EXISTS idx_remote_asset_checksum ON remote_asset_entity (checksum)',
|
||||
);
|
||||
late final UserMetadataEntity userMetadataEntity = UserMetadataEntity(this);
|
||||
late final PartnerEntity partnerEntity = PartnerEntity(this);
|
||||
|
|
@ -6415,7 +6415,7 @@ class DatabaseAtV7 extends GeneratedDatabase {
|
|||
late final AssetFaceEntity assetFaceEntity = AssetFaceEntity(this);
|
||||
late final Index idxLatLng = Index(
|
||||
'idx_lat_lng',
|
||||
'CREATE INDEX idx_lat_lng ON remote_exif_entity (latitude, longitude)',
|
||||
'CREATE INDEX IF NOT EXISTS idx_lat_lng ON remote_exif_entity (latitude, longitude)',
|
||||
);
|
||||
@override
|
||||
Iterable<TableInfo<Table, Object?>> get allTables =>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue