use a separate table instead of a column on remote asset

This commit is contained in:
shenlong-tanwen
2025-09-06 01:50:48 +05:30
parent 5236a72fb3
commit 03cd491197
16 changed files with 853 additions and 216 deletions
@@ -19,7 +19,6 @@ ON remote_asset_entity (owner_id, library_id, checksum)
WHERE (library_id IS NOT NULL);
''')
@TableIndex.sql('CREATE INDEX IF NOT EXISTS idx_remote_asset_checksum ON remote_asset_entity (checksum)')
@TableIndex.sql('CREATE INDEX IF NOT EXISTS idx_remote_asset_cloud_id ON remote_asset_entity (cloud_id);')
class RemoteAssetEntity extends Table with DriftDefaultsMixin, AssetEntityMixin {
const RemoteAssetEntity();
@@ -45,8 +44,6 @@ class RemoteAssetEntity extends Table with DriftDefaultsMixin, AssetEntityMixin
TextColumn get libraryId => text().nullable()();
TextColumn get cloudId => text().nullable()();
@override
Set<Column> get primaryKey => {id};
}