[mob] Add migration for filedata
This commit is contained in:
@@ -46,6 +46,7 @@ class MLDataDB {
|
||||
createNotPersonFeedbackTable,
|
||||
fcClusterIDIndex,
|
||||
createClipEmbeddingsTable,
|
||||
createFileDataTable,
|
||||
];
|
||||
|
||||
// only have a single app-wide reference to the database
|
||||
@@ -237,6 +238,7 @@ class MLDataDB {
|
||||
await db.execute(deleteClusterSummaryTable);
|
||||
await db.execute(deleteNotPersonFeedbackTable);
|
||||
await db.execute(deleteClipEmbeddingsTable);
|
||||
await db.execute(deleteFileDataTable);
|
||||
}
|
||||
|
||||
Future<Iterable<Uint8List>> getFaceEmbeddingsForCluster(
|
||||
|
||||
@@ -106,3 +106,16 @@ CREATE TABLE IF NOT EXISTS $clipTable (
|
||||
''';
|
||||
|
||||
const deleteClipEmbeddingsTable = 'DELETE FROM $clipTable';
|
||||
|
||||
const fileDataTable = 'filedata';
|
||||
const createFileDataTable = '''
|
||||
CREATE TABLE IF NOT EXISTS $fileDataTable (
|
||||
$fileIDColumn INTEGER NOT NULL,
|
||||
type TEXT NOT NULL,
|
||||
size INTEGER NOT NULL,
|
||||
updated_at INTEGER NOT NULL,
|
||||
PRIMARY KEY ($fileIDColumn, type)
|
||||
);
|
||||
''';
|
||||
|
||||
const deleteFileDataTable = 'DELETE FROM $fileDataTable';
|
||||
|
||||
Reference in New Issue
Block a user