π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Remove pet clustering tables, indexed files table, and redundant migration drops
Amrithesh Kakkoth Ente8a5f049c543c
diff --git a/mobile/apps/photos/lib/db/ml/db.dart b/mobile/apps/photos/lib/db/ml/db.dartindex ab9771312f..fbd993c30d 100644--- a/mobile/apps/photos/lib/db/ml/db.dart+++ b/mobile/apps/photos/lib/db/ml/db.dart@@ -104,19 +104,8 @@ class MLDataDB with SqlDbBase implements IMLDataDB<int> {createClusterCentroidVectorIdMappingTable,createPetFacesTable,createPetBodiesTable,- createPetFaceClustersTable,- petFcClusterIDIndex,- createPetClusterSummaryTable,createPetFaceVectorIdMappingTable,createPetBodyVectorIdMappingTable,- createPetIndexedFilesTable,- dropPetIndexedFilesTable,- dropPetFaceClustersTable,- dropPetClusterSummaryTable,- dropPetFacesTable, // 23: recreate with UNIQUE faceVectorId- createPetFacesTable,- dropPetBodiesTable, // 25: recreate with UNIQUE bodyVectorId- createPetBodiesTable,];static const List<String> _offlineMigrationScripts = [..._defaultMigrationScripts,diff --git a/mobile/apps/photos/lib/db/ml/schema.dart b/mobile/apps/photos/lib/db/ml/schema.dartindex 30feb458e7..1c3b075368 100644--- a/mobile/apps/photos/lib/db/ml/schema.dart+++ b/mobile/apps/photos/lib/db/ml/schema.dart@@ -236,38 +236,6 @@ const createPetBodiesTable = '''CREATE TABLE IF NOT EXISTS $petBodiesTable (const deletePetBodiesTable = 'DELETE FROM $petBodiesTable';-// ββ Clustering Tables ββ--const petFaceClustersTable = 'pet_face_clusters';--const createPetFaceClustersTable = '''-CREATE TABLE IF NOT EXISTS $petFaceClustersTable (- $petFaceIDColumn TEXT NOT NULL,- $clusterIDColumn TEXT NOT NULL,- PRIMARY KEY($petFaceIDColumn)-);-''';--const petFcClusterIDIndex =- '''CREATE INDEX IF NOT EXISTS idx_petFcClusterID ON $petFaceClustersTable($clusterIDColumn);''';--const dropPetFaceClustersTable = 'DROP TABLE IF EXISTS $petFaceClustersTable';--const petClusterSummaryTable = 'pet_cluster_summary';--const createPetClusterSummaryTable = '''-CREATE TABLE IF NOT EXISTS $petClusterSummaryTable (- $clusterIDColumn TEXT NOT NULL,- $avgColumn BLOB NOT NULL,- $countColumn INTEGER NOT NULL,- $speciesColumn INTEGER NOT NULL,- PRIMARY KEY($clusterIDColumn)-);-''';--const dropPetClusterSummaryTable =- 'DROP TABLE IF EXISTS $petClusterSummaryTable';-// ββ Vector ID Mapping Tables ββ/// Maps pet_face_id (string) β integer for face usearch index@@ -297,20 +265,3 @@ CREATE TABLE IF NOT EXISTS $petBodyVectorIdMappingTable (const deletePetBodyVectorIdMappingTable ='DELETE FROM $petBodyVectorIdMappingTable';--// ββ Pet Indexing Tracking Table ββ--const petIndexedFilesTable = 'pet_indexed_files';--const createPetIndexedFilesTable = '''-CREATE TABLE IF NOT EXISTS $petIndexedFilesTable (- $fileIDColumn INTEGER NOT NULL PRIMARY KEY,- $mlVersionColumn INTEGER NOT NULL DEFAULT -1-);-''';--const dropPetIndexedFilesTable = 'DROP TABLE IF EXISTS $petIndexedFilesTable';--// ββ Recreate pet tables with UNIQUE vector ID columns ββ-const dropPetFacesTable = 'DROP TABLE IF EXISTS $petFacesTable';-const dropPetBodiesTable = 'DROP TABLE IF EXISTS $petBodiesTable';diff --git a/mobile/apps/photos/pubspec.lock b/mobile/apps/photos/pubspec.lockindex 19e191fc51..5a5e9677c5 100644--- a/mobile/apps/photos/pubspec.lock+++ b/mobile/apps/photos/pubspec.lock@@ -3196,5 +3196,5 @@ packages:source: hostedversion: "3.1.3"sdks:- dart: ">=3.8.0 <4.0.0"+ dart: ">=3.8.1 <4.0.0"flutter: ">=3.32.0"