mirror of
https://github.com/immich-app/immich.git
synced 2026-02-28 09:38:43 +03: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:
@@ -106,10 +106,13 @@ class Drift extends $Drift implements IDatabaseRepository {
|
||||
from5To6: (m, v6) async {
|
||||
// Drops the (checksum, ownerId) and adds it back as (ownerId, checksum)
|
||||
await customStatement('DROP INDEX IF EXISTS UQ_remote_asset_owner_checksum');
|
||||
await m.drop(v6.idxRemoteAssetOwnerChecksum);
|
||||
await m.create(v6.idxRemoteAssetOwnerChecksum);
|
||||
// Adds libraryId to remote_asset_entity
|
||||
await m.addColumn(v6.remoteAssetEntity, v6.remoteAssetEntity.libraryId);
|
||||
await m.drop(v6.uQRemoteAssetsOwnerChecksum);
|
||||
await m.create(v6.uQRemoteAssetsOwnerChecksum);
|
||||
await m.drop(v6.uQRemoteAssetsOwnerLibraryChecksum);
|
||||
await m.create(v6.uQRemoteAssetsOwnerLibraryChecksum);
|
||||
},
|
||||
from6To7: (m, v7) async {
|
||||
|
||||
Reference in New Issue
Block a user