mirror of
https://github.com/immich-app/immich.git
synced 2026-02-28 17:49:05 +03:00
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:
@@ -588,6 +588,10 @@ typedef $$AssetFaceEntityTableProcessedTableManager =
|
||||
i1.AssetFaceEntityData,
|
||||
i0.PrefetchHooks Function({bool assetId, bool personId})
|
||||
>;
|
||||
i0.Index get idxAssetFacePersonId => i0.Index(
|
||||
'idx_asset_face_person_id',
|
||||
'CREATE INDEX IF NOT EXISTS idx_asset_face_person_id ON asset_face_entity (person_id)',
|
||||
);
|
||||
|
||||
class $AssetFaceEntityTable extends i2.AssetFaceEntity
|
||||
with i0.TableInfo<$AssetFaceEntityTable, i1.AssetFaceEntityData> {
|
||||
@@ -1207,3 +1211,8 @@ class AssetFaceEntityCompanion
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
||||
i0.Index get idxAssetFaceAssetId => i0.Index(
|
||||
'idx_asset_face_asset_id',
|
||||
'CREATE INDEX IF NOT EXISTS idx_asset_face_asset_id ON asset_face_entity (asset_id)',
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user