chore: add indexes for foreign keys (#25925)

* chore: add indexes for foreign keys

* update idx_asset_face_person_id index

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
shenlong
2026-02-12 19:58:31 +05:30
committed by GitHub
parent ec4de54ea2
commit 78c8f1d5a9
22 changed files with 9002 additions and 1 deletions

View File

@@ -97,7 +97,7 @@ class Drift extends $Drift implements IDatabaseRepository {
}
@override
int get schemaVersion => 18;
int get schemaVersion => 19;
@override
MigrationStrategy get migration => MigrationStrategy(
@@ -213,6 +213,19 @@ class Drift extends $Drift implements IDatabaseRepository {
from17To18: (m, v18) async {
await m.createIndex(v18.idxRemoteAssetCloudId);
},
from18To19: (m, v19) async {
await m.createIndex(v19.idxAssetFacePersonId);
await m.createIndex(v19.idxAssetFaceAssetId);
await m.createIndex(v19.idxLocalAlbumAssetAlbumAsset);
await m.createIndex(v19.idxPartnerSharedWithId);
await m.createIndex(v19.idxPersonOwnerId);
await m.createIndex(v19.idxRemoteAlbumOwnerId);
await m.createIndex(v19.idxRemoteAlbumAssetAlbumAsset);
await m.createIndex(v19.idxRemoteAssetStackId);
await m.createIndex(v19.idxRemoteAssetLocalDateTimeDay);
await m.createIndex(v19.idxRemoteAssetLocalDateTimeMonth);
await m.createIndex(v19.idxStackPrimaryAssetId);
},
),
);