High performance self-hosted photo and video management solution.
TypeScript backup-toolfluttergoogle-photosgoogle-photos-alternativejavascriptmobile-appnestjsnodejsphoto-galleryphotosphotos-managementself-hostedsveltesveltekittypescriptvideos
feat: add toggle to switch between Isar and Sqlite (#19953)
shenlong531515daf9c9
diff --git a/i18n/en.json b/i18n/en.jsonindex fb0c15d9fc..6cabcecf7d 100644--- a/i18n/en.json+++ b/i18n/en.json@@ -373,6 +373,8 @@"admin_password": "Admin Password","administration": "Administration","advanced": "Advanced",+ "advanced_settings_beta_timeline_subtitle": "Try the new app experience.",+ "advanced_settings_beta_timeline_title": "Beta Timeline","advanced_settings_enable_alternate_media_filter_subtitle": "Use this option to filter media during sync based on alternate criteria. Only try this if you have issues with the app detecting all albums.","advanced_settings_enable_alternate_media_filter_title": "[EXPERIMENTAL] Use alternate device album sync filter","advanced_settings_log_level_title": "Log level: {level}",diff --git a/mobile/drift_schemas/main/drift_schema_v2.json b/mobile/drift_schemas/main/drift_schema_v2.jsonnew file mode 100644index 0000000000..4c1e3d68a1--- /dev/null+++ b/mobile/drift_schemas/main/drift_schema_v2.json@@ -0,0 +1 @@+{"_meta":{"description":"This file contains a serialized version of schema entities for drift.","version":"1.2.0"},"options":{"store_date_time_values_as_text":true},"entities":[{"id":0,"references":[],"type":"table","data":{"name":"user_entity","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"name","getter_name":"name","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"is_admin","getter_name":"isAdmin","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"is_admin\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"is_admin\" IN (0, 1))"},"default_dart":"const CustomExpression('0')","default_client_dart":null,"dsl_features":[]},{"name":"email","getter_name":"email","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"profile_image_path","getter_name":"profileImagePath","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"updated_at","getter_name":"updatedAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"const CustomExpression('CURRENT_TIMESTAMP')","default_client_dart":null,"dsl_features":[]},{"name":"quota_size_in_bytes","getter_name":"quotaSizeInBytes","moor_type":"int","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"quota_usage_in_bytes","getter_name":"quotaUsageInBytes","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":"const CustomExpression('0')","default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":true,"constraints":[],"strict":true,"explicit_pk":["id"]}},{"id":1,"references":[0],"type":"table","data":{"name":"remote_asset_entity","was_declared_in_moor":false,"columns":[{"name":"name","getter_name":"name","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"type","getter_name":"type","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumIndexConverter<AssetType>(AssetType.values)","dart_type_name":"AssetType"}},{"name":"created_at","getter_name":"createdAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"const CustomExpression('CURRENT_TIMESTAMP')","default_client_dart":null,"dsl_features":[]},{"name":"updated_at","getter_name":"updatedAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"const CustomExpression('CURRENT_TIMESTAMP')","default_client_dart":null,"dsl_features":[]},{"name":"width","getter_name":"width","moor_type":"int","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"height","getter_name":"height","moor_type":"int","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"duration_in_seconds","getter_name":"durationInSeconds","moor_type":"int","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"id","getter_name":"id","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"checksum","getter_name":"checksum","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"is_favorite","getter_name":"isFavorite","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"is_favorite\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"is_favorite\" IN (0, 1))"},"default_dart":"const CustomExpression('0')","default_client_dart":null,"dsl_features":[]},{"name":"owner_id","getter_name":"ownerId","moor_type":"string","nullable":false,"customConstraints":null,"defaultConstraints":"REFERENCES user_entity (id) ON DELETE CASCADE","dialectAwareDefaultConstraints":{"sqlite":"REFERENCES user_entity (id) ON DELETE CASCADE"},"default_dart":null,"default_client_dart":null,"dsl_features":["unknown"]},{"name":"local_date_time","getter_name":"localDateTime","moor_type":"dateTime","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"thumb_hash","getter_name":"thumbHash","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"deleted_at","getter_name":"deletedAt","moor_type":"dateTime","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"live_photo_video_id","getter_name":"livePhotoVideoId","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"visibility","getter_name":"visibility","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumIndexConverter<AssetVisibility>(AssetVisibility.values)","dart_type_name":"AssetVisibility"}}],"is_virtual":false,"without_rowid":true,"constraints":[],"strict":true,"explicit_pk":["id"]}},{"id":2,"references":[],"type":"table","data":{"name":"local_asset_entity","was_declared_in_moor":false,"columns":[{"name":"name","getter_name":"name","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"type","getter_name":"type","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumIndexConverter<AssetType>(AssetType.values)","dart_type_name":"AssetType"}},{"name":"created_at","getter_name":"createdAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"const CustomExpression('CURRENT_TIMESTAMP')","default_client_dart":null,"dsl_features":[]},{"name":"updated_at","getter_name":"updatedAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"const CustomExpression('CURRENT_TIMESTAMP')","default_client_dart":null,"dsl_features":[]},{"name":"width","getter_name":"width","moor_type":"int","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"height","getter_name":"height","moor_type":"int","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"duration_in_seconds","getter_name":"durationInSeconds","moor_type":"int","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"id","getter_name":"id","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"checksum","getter_name":"checksum","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"is_favorite","getter_name":"isFavorite","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"is_favorite\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"is_favorite\" IN (0, 1))"},"default_dart":"const CustomExpression('0')","default_client_dart":null,"dsl_features":[]},{"name":"orientation","getter_name":"orientation","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":"const CustomExpression('0')","default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":true,"constraints":[],"strict":true,"explicit_pk":["id"]}},{"id":3,"references":[2],"type":"index","data":{"on":2,"name":"idx_local_asset_checksum","sql":null,"unique":false,"columns":["checksum"]}},{"id":4,"references":[1],"type":"index","data":{"on":1,"name":"UQ_remote_asset_owner_checksum","sql":null,"unique":true,"columns":["checksum","owner_id"]}},{"id":5,"references":[1],"type":"index","data":{"on":1,"name":"idx_remote_asset_checksum","sql":null,"unique":false,"columns":["checksum"]}},{"id":6,"references":[0],"type":"table","data":{"name":"user_metadata_entity","was_declared_in_moor":false,"columns":[{"name":"user_id","getter_name":"userId","moor_type":"string","nullable":false,"customConstraints":null,"defaultConstraints":"REFERENCES user_entity (id) ON DELETE CASCADE","dialectAwareDefaultConstraints":{"sqlite":"REFERENCES user_entity (id) ON DELETE CASCADE"},"default_dart":null,"default_client_dart":null,"dsl_features":["unknown"]},{"name":"key","getter_name":"key","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumIndexConverter<UserMetadataKey>(UserMetadataKey.values)","dart_type_name":"UserMetadataKey"}},{"name":"value","getter_name":"value","moor_type":"blob","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"userMetadataConverter","dart_type_name":"Map<String, Object?>"}}],"is_virtual":false,"without_rowid":true,"constraints":[],"strict":true,"explicit_pk":["user_id","key"]}},{"id":7,"references":[0],"type":"table","data":{"name":"partner_entity","was_declared_in_moor":false,"columns":[{"name":"shared_by_id","getter_name":"sharedById","moor_type":"string","nullable":false,"customConstraints":null,"defaultConstraints":"REFERENCES user_entity (id) ON DELETE CASCADE","dialectAwareDefaultConstraints":{"sqlite":"REFERENCES user_entity (id) ON DELETE CASCADE"},"default_dart":null,"default_client_dart":null,"dsl_features":["unknown"]},{"name":"shared_with_id","getter_name":"sharedWithId","moor_type":"string","nullable":false,"customConstraints":null,"defaultConstraints":"REFERENCES user_entity (id) ON DELETE CASCADE","dialectAwareDefaultConstraints":{"sqlite":"REFERENCES user_entity (id) ON DELETE CASCADE"},"default_dart":null,"default_client_dart":null,"dsl_features":["unknown"]},{"name":"in_timeline","getter_name":"inTimeline","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"in_timeline\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"in_timeline\" IN (0, 1))"},"default_dart":"const CustomExpression('0')","default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":true,"constraints":[],"strict":true,"explicit_pk":["shared_by_id","shared_with_id"]}},{"id":8,"references":[],"type":"table","data":{"name":"local_album_entity","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"name","getter_name":"name","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"updated_at","getter_name":"updatedAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"const CustomExpression('CURRENT_TIMESTAMP')","default_client_dart":null,"dsl_features":[]},{"name":"backup_selection","getter_name":"backupSelection","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumIndexConverter<BackupSelection>(BackupSelection.values)","dart_type_name":"BackupSelection"}},{"name":"is_ios_shared_album","getter_name":"isIosSharedAlbum","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"is_ios_shared_album\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"is_ios_shared_album\" IN (0, 1))"},"default_dart":"const CustomExpression('0')","default_client_dart":null,"dsl_features":[]},{"name":"marker","getter_name":"marker_","moor_type":"bool","nullable":true,"customConstraints":null,"defaultConstraints":"CHECK (\"marker\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"marker\" IN (0, 1))"},"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":true,"constraints":[],"strict":true,"explicit_pk":["id"]}},{"id":9,"references":[2,8],"type":"table","data":{"name":"local_album_asset_entity","was_declared_in_moor":false,"columns":[{"name":"asset_id","getter_name":"assetId","moor_type":"string","nullable":false,"customConstraints":null,"defaultConstraints":"REFERENCES local_asset_entity (id) ON DELETE CASCADE","dialectAwareDefaultConstraints":{"sqlite":"REFERENCES local_asset_entity (id) ON DELETE CASCADE"},"default_dart":null,"default_client_dart":null,"dsl_features":["unknown"]},{"name":"album_id","getter_name":"albumId","moor_type":"string","nullable":false,"customConstraints":null,"defaultConstraints":"REFERENCES local_album_entity (id) ON DELETE CASCADE","dialectAwareDefaultConstraints":{"sqlite":"REFERENCES local_album_entity (id) ON DELETE CASCADE"},"default_dart":null,"default_client_dart":null,"dsl_features":["unknown"]}],"is_virtual":false,"without_rowid":true,"constraints":[],"strict":true,"explicit_pk":["asset_id","album_id"]}},{"id":10,"references":[1],"type":"table","data":{"name":"remote_exif_entity","was_declared_in_moor":false,"columns":[{"name":"asset_id","getter_name":"assetId","moor_type":"string","nullable":false,"customConstraints":null,"defaultConstraints":"REFERENCES remote_asset_entity (id) ON DELETE CASCADE","dialectAwareDefaultConstraints":{"sqlite":"REFERENCES remote_asset_entity (id) ON DELETE CASCADE"},"default_dart":null,"default_client_dart":null,"dsl_features":["unknown"]},{"name":"city","getter_name":"city","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"state","getter_name":"state","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"country","getter_name":"country","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"date_time_original","getter_name":"dateTimeOriginal","moor_type":"dateTime","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"description","getter_name":"description","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"height","getter_name":"height","moor_type":"int","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"width","getter_name":"width","moor_type":"int","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"exposure_time","getter_name":"exposureTime","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"f_number","getter_name":"fNumber","moor_type":"double","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"file_size","getter_name":"fileSize","moor_type":"int","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"focal_length","getter_name":"focalLength","moor_type":"double","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"latitude","getter_name":"latitude","moor_type":"double","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"longitude","getter_name":"longitude","moor_type":"double","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"iso","getter_name":"iso","moor_type":"int","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"make","getter_name":"make","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"model","getter_name":"model","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"lens","getter_name":"lens","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"orientation","getter_name":"orientation","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"time_zone","getter_name":"timeZone","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"rating","getter_name":"rating","moor_type":"int","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"projection_type","getter_name":"projectionType","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":true,"constraints":[],"strict":true,"explicit_pk":["asset_id"]}},{"id":11,"references":[0,1],"type":"table","data":{"name":"remote_album_entity","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"name","getter_name":"name","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"description","getter_name":"description","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const CustomExpression('\\'\\'')","default_client_dart":null,"dsl_features":[]},{"name":"created_at","getter_name":"createdAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"const CustomExpression('CURRENT_TIMESTAMP')","default_client_dart":null,"dsl_features":[]},{"name":"updated_at","getter_name":"updatedAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"const CustomExpression('CURRENT_TIMESTAMP')","default_client_dart":null,"dsl_features":[]},{"name":"owner_id","getter_name":"ownerId","moor_type":"string","nullable":false,"customConstraints":null,"defaultConstraints":"REFERENCES user_entity (id) ON DELETE CASCADE","dialectAwareDefaultConstraints":{"sqlite":"REFERENCES user_entity (id) ON DELETE CASCADE"},"default_dart":null,"default_client_dart":null,"dsl_features":["unknown"]},{"name":"thumbnail_asset_id","getter_name":"thumbnailAssetId","moor_type":"string","nullable":true,"customConstraints":null,"defaultConstraints":"REFERENCES remote_asset_entity (id) ON DELETE SET NULL","dialectAwareDefaultConstraints":{"sqlite":"REFERENCES remote_asset_entity (id) ON DELETE SET NULL"},"default_dart":null,"default_client_dart":null,"dsl_features":["unknown"]},{"name":"is_activity_enabled","getter_name":"isActivityEnabled","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"is_activity_enabled\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"is_activity_enabled\" IN (0, 1))"},"default_dart":"const CustomExpression('1')","default_client_dart":null,"dsl_features":[]},{"name":"order","getter_name":"order","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumIndexConverter<AlbumAssetOrder>(AlbumAssetOrder.values)","dart_type_name":"AlbumAssetOrder"}}],"is_virtual":false,"without_rowid":true,"constraints":[],"strict":true,"explicit_pk":["id"]}},{"id":12,"references":[1,11],"type":"table","data":{"name":"remote_album_asset_entity","was_declared_in_moor":false,"columns":[{"name":"asset_id","getter_name":"assetId","moor_type":"string","nullable":false,"customConstraints":null,"defaultConstraints":"REFERENCES remote_asset_entity (id) ON DELETE CASCADE","dialectAwareDefaultConstraints":{"sqlite":"REFERENCES remote_asset_entity (id) ON DELETE CASCADE"},"default_dart":null,"default_client_dart":null,"dsl_features":["unknown"]},{"name":"album_id","getter_name":"albumId","moor_type":"string","nullable":false,"customConstraints":null,"defaultConstraints":"REFERENCES remote_album_entity (id) ON DELETE CASCADE","dialectAwareDefaultConstraints":{"sqlite":"REFERENCES remote_album_entity (id) ON DELETE CASCADE"},"default_dart":null,"default_client_dart":null,"dsl_features":["unknown"]}],"is_virtual":false,"without_rowid":true,"constraints":[],"strict":true,"explicit_pk":["asset_id","album_id"]}},{"id":13,"references":[11,0],"type":"table","data":{"name":"remote_album_user_entity","was_declared_in_moor":false,"columns":[{"name":"album_id","getter_name":"albumId","moor_type":"string","nullable":false,"customConstraints":null,"defaultConstraints":"REFERENCES remote_album_entity (id) ON DELETE CASCADE","dialectAwareDefaultConstraints":{"sqlite":"REFERENCES remote_album_entity (id) ON DELETE CASCADE"},"default_dart":null,"default_client_dart":null,"dsl_features":["unknown"]},{"name":"user_id","getter_name":"userId","moor_type":"string","nullable":false,"customConstraints":null,"defaultConstraints":"REFERENCES user_entity (id) ON DELETE CASCADE","dialectAwareDefaultConstraints":{"sqlite":"REFERENCES user_entity (id) ON DELETE CASCADE"},"default_dart":null,"default_client_dart":null,"dsl_features":["unknown"]},{"name":"role","getter_name":"role","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumIndexConverter<AlbumUserRole>(AlbumUserRole.values)","dart_type_name":"AlbumUserRole"}}],"is_virtual":false,"without_rowid":true,"constraints":[],"strict":true,"explicit_pk":["album_id","user_id"]}},{"id":14,"references":[0],"type":"table","data":{"name":"memory_entity","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"created_at","getter_name":"createdAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"const CustomExpression('CURRENT_TIMESTAMP')","default_client_dart":null,"dsl_features":[]},{"name":"updated_at","getter_name":"updatedAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"const CustomExpression('CURRENT_TIMESTAMP')","default_client_dart":null,"dsl_features":[]},{"name":"deleted_at","getter_name":"deletedAt","moor_type":"dateTime","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"owner_id","getter_name":"ownerId","moor_type":"string","nullable":false,"customConstraints":null,"defaultConstraints":"REFERENCES user_entity (id) ON DELETE CASCADE","dialectAwareDefaultConstraints":{"sqlite":"REFERENCES user_entity (id) ON DELETE CASCADE"},"default_dart":null,"default_client_dart":null,"dsl_features":["unknown"]},{"name":"type","getter_name":"type","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumIndexConverter<MemoryTypeEnum>(MemoryTypeEnum.values)","dart_type_name":"MemoryTypeEnum"}},{"name":"data","getter_name":"data","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"is_saved","getter_name":"isSaved","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"is_saved\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"is_saved\" IN (0, 1))"},"default_dart":"const CustomExpression('0')","default_client_dart":null,"dsl_features":[]},{"name":"memory_at","getter_name":"memoryAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"seen_at","getter_name":"seenAt","moor_type":"dateTime","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"show_at","getter_name":"showAt","moor_type":"dateTime","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"hide_at","getter_name":"hideAt","moor_type":"dateTime","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":true,"constraints":[],"strict":true,"explicit_pk":["id"]}},{"id":15,"references":[1,14],"type":"table","data":{"name":"memory_asset_entity","was_declared_in_moor":false,"columns":[{"name":"asset_id","getter_name":"assetId","moor_type":"string","nullable":false,"customConstraints":null,"defaultConstraints":"REFERENCES remote_asset_entity (id) ON DELETE CASCADE","dialectAwareDefaultConstraints":{"sqlite":"REFERENCES remote_asset_entity (id) ON DELETE CASCADE"},"default_dart":null,"default_client_dart":null,"dsl_features":["unknown"]},{"name":"memory_id","getter_name":"memoryId","moor_type":"string","nullable":false,"customConstraints":null,"defaultConstraints":"REFERENCES memory_entity (id) ON DELETE CASCADE","dialectAwareDefaultConstraints":{"sqlite":"REFERENCES memory_entity (id) ON DELETE CASCADE"},"default_dart":null,"default_client_dart":null,"dsl_features":["unknown"]}],"is_virtual":false,"without_rowid":true,"constraints":[],"strict":true,"explicit_pk":["asset_id","memory_id"]}},{"id":16,"references":[0,1],"type":"table","data":{"name":"stack_entity","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"created_at","getter_name":"createdAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"const CustomExpression('CURRENT_TIMESTAMP')","default_client_dart":null,"dsl_features":[]},{"name":"updated_at","getter_name":"updatedAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"const CustomExpression('CURRENT_TIMESTAMP')","default_client_dart":null,"dsl_features":[]},{"name":"owner_id","getter_name":"ownerId","moor_type":"string","nullable":false,"customConstraints":null,"defaultConstraints":"REFERENCES user_entity (id) ON DELETE CASCADE","dialectAwareDefaultConstraints":{"sqlite":"REFERENCES user_entity (id) ON DELETE CASCADE"},"default_dart":null,"default_client_dart":null,"dsl_features":["unknown"]},{"name":"primary_asset_id","getter_name":"primaryAssetId","moor_type":"string","nullable":false,"customConstraints":null,"defaultConstraints":"REFERENCES remote_asset_entity (id)","dialectAwareDefaultConstraints":{"sqlite":"REFERENCES remote_asset_entity (id)"},"default_dart":null,"default_client_dart":null,"dsl_features":["unknown"]}],"is_virtual":false,"without_rowid":true,"constraints":[],"strict":true,"explicit_pk":["id"]}}]}\ No newline at end of filediff --git a/mobile/lib/domain/models/store.model.dart b/mobile/lib/domain/models/store.model.dartindex a96e8d3bce..61c5807ba8 100644--- a/mobile/lib/domain/models/store.model.dart+++ b/mobile/lib/domain/models/store.model.dart@@ -68,7 +68,9 @@ enum StoreKey<T> {manageLocalMediaAndroid<bool>._(137),// Experimental stuff- photoManagerCustomFilter<bool>._(1000);+ photoManagerCustomFilter<bool>._(1000),+ betaPromptShown<bool>._(1001),+ betaTimeline<bool>._(1002);const StoreKey._(this.id);final int id;diff --git a/mobile/lib/domain/services/store.service.dart b/mobile/lib/domain/services/store.service.dartindex 359ce8cf60..b1e991b348 100644--- a/mobile/lib/domain/services/store.service.dart+++ b/mobile/lib/domain/services/store.service.dart@@ -93,6 +93,8 @@ class StoreService {await _storeRepository.deleteAll();_cache.clear();}++ bool get isBetaTimelineEnabled => tryGet(StoreKey.betaTimeline) ?? false;}class StoreKeyNotFoundException implements Exception {diff --git a/mobile/lib/infrastructure/repositories/db.repository.dart b/mobile/lib/infrastructure/repositories/db.repository.dartindex a7920cf7b2..200ec47516 100644--- a/mobile/lib/infrastructure/repositories/db.repository.dart+++ b/mobile/lib/infrastructure/repositories/db.repository.dart@@ -2,6 +2,7 @@ import 'dart:async';import 'package:drift/drift.dart';import 'package:drift_flutter/drift_flutter.dart';+import 'package:flutter/foundation.dart';import 'package:immich_mobile/domain/interfaces/db.interface.dart';import 'package:immich_mobile/infrastructure/entities/exif.entity.dart';import 'package:immich_mobile/infrastructure/entities/local_album.entity.dart';@@ -17,6 +18,7 @@ import 'package:immich_mobile/infrastructure/entities/remote_asset.entity.dart';import 'package:immich_mobile/infrastructure/entities/stack.entity.dart';import 'package:immich_mobile/infrastructure/entities/user.entity.dart';import 'package:immich_mobile/infrastructure/entities/user_metadata.entity.dart';+import 'package:immich_mobile/infrastructure/repositories/db.repository.steps.dart';import 'package:isar/isar.dart';import 'db.repository.drift.dart';@@ -68,10 +70,36 @@ class Drift extends $Drift implements IDatabaseRepository {);@override- int get schemaVersion => 1;+ int get schemaVersion => 2;@overrideMigrationStrategy get migration => MigrationStrategy(+ onUpgrade: (m, from, to) async {+ // Run migration steps without foreign keys and re-enable them later+ await customStatement('PRAGMA foreign_keys = OFF');++ await m.runMigrationSteps(+ from: from,+ to: to,+ steps: migrationSteps(+ from1To2: (m, _) async {+ for (final entity in allSchemaEntities) {+ await m.drop(entity);+ await m.create(entity);+ }+ },+ ),+ );++ if (kDebugMode) {+ // Fail if the migration broke foreign keys+ final wrongFKs =+ await customSelect('PRAGMA foreign_key_check').get();+ assert(wrongFKs.isEmpty, '${wrongFKs.map((e) => e.data)}');+ }++ await customStatement('PRAGMA foreign_keys = ON;');+ },beforeOpen: (details) async {await customStatement('PRAGMA foreign_keys = ON');await customStatement('PRAGMA synchronous = NORMAL');diff --git a/mobile/lib/infrastructure/repositories/db.repository.steps.dart b/mobile/lib/infrastructure/repositories/db.repository.steps.dartnew file mode 100644index 0000000000..5815d31978--- /dev/null+++ b/mobile/lib/infrastructure/repositories/db.repository.steps.dart@@ -0,0 +1,864 @@+// dart format width=80+import 'package:drift/internal/versioned_schema.dart' as i0;+import 'package:drift/drift.dart' as i1;+import 'dart:typed_data' as i2;+import 'package:drift/drift.dart'; // ignore_for_file: type=lint,unused_import++// GENERATED BY drift_dev, DO NOT MODIFY.+final class Schema2 extends i0.VersionedSchema {+ Schema2({required super.database}) : super(version: 2);+ @override+ late final List<i1.DatabaseSchemaEntity> entities = [+ userEntity,+ remoteAssetEntity,+ localAssetEntity,+ idxLocalAssetChecksum,+ uQRemoteAssetOwnerChecksum,+ idxRemoteAssetChecksum,+ userMetadataEntity,+ partnerEntity,+ localAlbumEntity,+ localAlbumAssetEntity,+ remoteExifEntity,+ remoteAlbumEntity,+ remoteAlbumAssetEntity,+ remoteAlbumUserEntity,+ memoryEntity,+ memoryAssetEntity,+ stackEntity,+ ];+ late final Shape0 userEntity = Shape0(+ source: i0.VersionedTable(+ entityName: 'user_entity',+ withoutRowId: true,+ isStrict: true,+ tableConstraints: [+ 'PRIMARY KEY(id)',+ ],+ columns: [+ _column_0,+ _column_1,+ _column_2,+ _column_3,+ _column_4,+ _column_5,+ _column_6,+ _column_7,+ ],+ attachedDatabase: database,+ ),+ alias: null);+ late final Shape1 remoteAssetEntity = Shape1(+ source: i0.VersionedTable(+ entityName: 'remote_asset_entity',+ withoutRowId: true,+ isStrict: true,+ tableConstraints: [+ 'PRIMARY KEY(id)',+ ],+ columns: [+ _column_1,+ _column_8,+ _column_9,+ _column_5,+ _column_10,+ _column_11,+ _column_12,+ _column_0,+ _column_13,+ _column_14,+ _column_15,+ _column_16,+ _column_17,+ _column_18,+ _column_19,+ _column_20,+ ],+ attachedDatabase: database,+ ),+ alias: null);+ late final Shape2 localAssetEntity = Shape2(+ source: i0.VersionedTable(+ entityName: 'local_asset_entity',+ withoutRowId: true,+ isStrict: true,+ tableConstraints: [+ 'PRIMARY KEY(id)',+ ],+ columns: [+ _column_1,+ _column_8,+ _column_9,+ _column_5,+ _column_10,+ _column_11,+ _column_12,+ _column_0,+ _column_21,+ _column_14,+ _column_22,+ ],+ attachedDatabase: database,+ ),+ alias: null);+ final i1.Index idxLocalAssetChecksum = i1.Index('idx_local_asset_checksum',+ 'CREATE INDEX idx_local_asset_checksum ON local_asset_entity (checksum)');+ final i1.Index uQRemoteAssetOwnerChecksum = i1.Index(+ 'UQ_remote_asset_owner_checksum',+ 'CREATE UNIQUE INDEX UQ_remote_asset_owner_checksum ON remote_asset_entity (checksum, owner_id)');+ final i1.Index idxRemoteAssetChecksum = i1.Index('idx_remote_asset_checksum',+ 'CREATE INDEX idx_remote_asset_checksum ON remote_asset_entity (checksum)');+ late final Shape3 userMetadataEntity = Shape3(+ source: i0.VersionedTable(+ entityName: 'user_metadata_entity',+ withoutRowId: true,+ isStrict: true,+ tableConstraints: [+ 'PRIMARY KEY(user_id, "key")',+ ],+ columns: [+ _column_23,+ _column_24,+ _column_25,+ ],+ attachedDatabase: database,+ ),+ alias: null);+ late final Shape4 partnerEntity = Shape4(+ source: i0.VersionedTable(+ entityName: 'partner_entity',+ withoutRowId: true,+ isStrict: true,+ tableConstraints: [+ 'PRIMARY KEY(shared_by_id, shared_with_id)',+ ],+ columns: [+ _column_26,+ _column_27,+ _column_28,+ ],+ attachedDatabase: database,+ ),+ alias: null);+ late final Shape5 localAlbumEntity = Shape5(+ source: i0.VersionedTable(+ entityName: 'local_album_entity',+ withoutRowId: true,+ isStrict: true,+ tableConstraints: [+ 'PRIMARY KEY(id)',+ ],+ columns: [+ _column_0,+ _column_1,+ _column_5,+ _column_29,+ _column_30,+ _column_31,+ ],+ attachedDatabase: database,+ ),+ alias: null);+ late final Shape6 localAlbumAssetEntity = Shape6(+ source: i0.VersionedTable(+ entityName: 'local_album_asset_entity',+ withoutRowId: true,+ isStrict: true,+ tableConstraints: [+ 'PRIMARY KEY(asset_id, album_id)',+ ],+ columns: [+ _column_32,+ _column_33,+ ],+ attachedDatabase: database,+ ),+ alias: null);+ late final Shape7 remoteExifEntity = Shape7(+ source: i0.VersionedTable(+ entityName: 'remote_exif_entity',+ withoutRowId: true,+ isStrict: true,+ tableConstraints: [+ 'PRIMARY KEY(asset_id)',+ ],+ columns: [+ _column_34,+ _column_35,+ _column_36,+ _column_37,+ _column_38,+ _column_39,+ _column_11,+ _column_10,+ _column_40,+ _column_41,+ _column_42,+ _column_43,+ _column_44,+ _column_45,+ _column_46,+ _column_47,+ _column_48,+ _column_49,+ _column_50,+ _column_51,+ _column_52,+ _column_53,+ ],+ attachedDatabase: database,+ ),+ alias: null);+ late final Shape8 remoteAlbumEntity = Shape8(+ source: i0.VersionedTable(+ entityName: 'remote_album_entity',+ withoutRowId: true,+ isStrict: true,+ tableConstraints: [+ 'PRIMARY KEY(id)',+ ],+ columns: [+ _column_0,+ _column_1,+ _column_54,+ _column_9,+ _column_5,+ _column_15,+ _column_55,+ _column_56,+ _column_57,+ ],+ attachedDatabase: database,+ ),+ alias: null);+ late final Shape6 remoteAlbumAssetEntity = Shape6(+ source: i0.VersionedTable(+ entityName: 'remote_album_asset_entity',+ withoutRowId: true,+ isStrict: true,+ tableConstraints: [+ 'PRIMARY KEY(asset_id, album_id)',+ ],+ columns: [+ _column_34,+ _column_58,+ ],+ attachedDatabase: database,+ ),+ alias: null);+ late final Shape9 remoteAlbumUserEntity = Shape9(+ source: i0.VersionedTable(+ entityName: 'remote_album_user_entity',+ withoutRowId: true,+ isStrict: true,+ tableConstraints: [+ 'PRIMARY KEY(album_id, user_id)',+ ],+ columns: [+ _column_58,+ _column_23,+ _column_59,+ ],+ attachedDatabase: database,+ ),+ alias: null);+ late final Shape10 memoryEntity = Shape10(+ source: i0.VersionedTable(+ entityName: 'memory_entity',+ withoutRowId: true,+ isStrict: true,+ tableConstraints: [+ 'PRIMARY KEY(id)',+ ],+ columns: [+ _column_0,+ _column_9,+ _column_5,+ _column_18,+ _column_15,+ _column_8,+ _column_60,+ _column_61,+ _column_62,+ _column_63,+ _column_64,+ _column_65,+ ],+ attachedDatabase: database,+ ),+ alias: null);+ late final Shape11 memoryAssetEntity = Shape11(+ source: i0.VersionedTable(+ entityName: 'memory_asset_entity',+ withoutRowId: true,+ isStrict: true,+ tableConstraints: [+ 'PRIMARY KEY(asset_id, memory_id)',+ ],+ columns: [+ _column_34,+ _column_66,+ ],+ attachedDatabase: database,+ ),+ alias: null);+ late final Shape12 stackEntity = Shape12(+ source: i0.VersionedTable(+ entityName: 'stack_entity',+ withoutRowId: true,+ isStrict: true,+ tableConstraints: [+ 'PRIMARY KEY(id)',+ ],+ columns: [+ _column_0,+ _column_9,+ _column_5,+ _column_15,+ _column_67,+ ],+ attachedDatabase: database,+ ),+ alias: null);+}++class Shape0 extends i0.VersionedTable {+ Shape0({required super.source, required super.alias}) : super.aliased();+ i1.GeneratedColumn<String> get id =>+ columnsByName['id']! as i1.GeneratedColumn<String>;+ i1.GeneratedColumn<String> get name =>+ columnsByName['name']! as i1.GeneratedColumn<String>;+ i1.GeneratedColumn<bool> get isAdmin =>+ columnsByName['is_admin']! as i1.GeneratedColumn<bool>;+ i1.GeneratedColumn<String> get email =>+ columnsByName['email']! as i1.GeneratedColumn<String>;+ i1.GeneratedColumn<String> get profileImagePath =>+ columnsByName['profile_image_path']! as i1.GeneratedColumn<String>;+ i1.GeneratedColumn<DateTime> get updatedAt =>+ columnsByName['updated_at']! as i1.GeneratedColumn<DateTime>;+ i1.GeneratedColumn<int> get quotaSizeInBytes =>+ columnsByName['quota_size_in_bytes']! as i1.GeneratedColumn<int>;+ i1.GeneratedColumn<int> get quotaUsageInBytes =>+ columnsByName['quota_usage_in_bytes']! as i1.GeneratedColumn<int>;+}++i1.GeneratedColumn<String> _column_0(String aliasedName) =>+ i1.GeneratedColumn<String>('id', aliasedName, false,+ type: i1.DriftSqlType.string);+i1.GeneratedColumn<String> _column_1(String aliasedName) =>+ i1.GeneratedColumn<String>('name', aliasedName, false,+ type: i1.DriftSqlType.string);+i1.GeneratedColumn<bool> _column_2(String aliasedName) =>+ i1.GeneratedColumn<bool>('is_admin', aliasedName, false,+ type: i1.DriftSqlType.bool,+ defaultConstraints: i1.GeneratedColumn.constraintIsAlways(+ 'CHECK ("is_admin" IN (0, 1))'),+ defaultValue: const CustomExpression('0'));+i1.GeneratedColumn<String> _column_3(String aliasedName) =>+ i1.GeneratedColumn<String>('email', aliasedName, false,+ type: i1.DriftSqlType.string);+i1.GeneratedColumn<String> _column_4(String aliasedName) =>+ i1.GeneratedColumn<String>('profile_image_path', aliasedName, true,+ type: i1.DriftSqlType.string);+i1.GeneratedColumn<DateTime> _column_5(String aliasedName) =>+ i1.GeneratedColumn<DateTime>('updated_at', aliasedName, false,+ type: i1.DriftSqlType.dateTime,+ defaultValue: const CustomExpression('CURRENT_TIMESTAMP'));+i1.GeneratedColumn<int> _column_6(String aliasedName) =>+ i1.GeneratedColumn<int>('quota_size_in_bytes', aliasedName, true,+ type: i1.DriftSqlType.int);+i1.GeneratedColumn<int> _column_7(String aliasedName) =>+ i1.GeneratedColumn<int>('quota_usage_in_bytes', aliasedName, false,+ type: i1.DriftSqlType.int, defaultValue: const CustomExpression('0'));++class Shape1 extends i0.VersionedTable {+ Shape1({required super.source, required super.alias}) : super.aliased();+ i1.GeneratedColumn<String> get name =>+ columnsByName['name']! as i1.GeneratedColumn<String>;+ i1.GeneratedColumn<int> get type =>+ columnsByName['type']! as i1.GeneratedColumn<int>;+ i1.GeneratedColumn<DateTime> get createdAt =>+ columnsByName['created_at']! as i1.GeneratedColumn<DateTime>;+ i1.GeneratedColumn<DateTime> get updatedAt =>+ columnsByName['updated_at']! as i1.GeneratedColumn<DateTime>;+ i1.GeneratedColumn<int> get width =>+ columnsByName['width']! as i1.GeneratedColumn<int>;+ i1.GeneratedColumn<int> get height =>+ columnsByName['height']! as i1.GeneratedColumn<int>;+ i1.GeneratedColumn<int> get durationInSeconds =>+ columnsByName['duration_in_seconds']! as i1.GeneratedColumn<int>;+ i1.GeneratedColumn<String> get id =>+ columnsByName['id']! as i1.GeneratedColumn<String>;+ i1.GeneratedColumn<String> get checksum =>+ columnsByName['checksum']! as i1.GeneratedColumn<String>;+ i1.GeneratedColumn<bool> get isFavorite =>+ columnsByName['is_favorite']! as i1.GeneratedColumn<bool>;+ i1.GeneratedColumn<String> get ownerId =>+ columnsByName['owner_id']! as i1.GeneratedColumn<String>;+ i1.GeneratedColumn<DateTime> get localDateTime =>+ columnsByName['local_date_time']! as i1.GeneratedColumn<DateTime>;+ i1.GeneratedColumn<String> get thumbHash =>+ columnsByName['thumb_hash']! as i1.GeneratedColumn<String>;+ i1.GeneratedColumn<DateTime> get deletedAt =>+ columnsByName['deleted_at']! as i1.GeneratedColumn<DateTime>;+ i1.GeneratedColumn<String> get livePhotoVideoId =>+ columnsByName['live_photo_video_id']! as i1.GeneratedColumn<String>;+ i1.GeneratedColumn<int> get visibility =>+ columnsByName['visibility']! as i1.GeneratedColumn<int>;+}++i1.GeneratedColumn<int> _column_8(String aliasedName) =>+ i1.GeneratedColumn<int>('type', aliasedName, false,+ type: i1.DriftSqlType.int);+i1.GeneratedColumn<DateTime> _column_9(String aliasedName) =>+ i1.GeneratedColumn<DateTime>('created_at', aliasedName, false,+ type: i1.DriftSqlType.dateTime,+ defaultValue: const CustomExpression('CURRENT_TIMESTAMP'));+i1.GeneratedColumn<int> _column_10(String aliasedName) =>+ i1.GeneratedColumn<int>('width', aliasedName, true,+ type: i1.DriftSqlType.int);+i1.GeneratedColumn<int> _column_11(String aliasedName) =>+ i1.GeneratedColumn<int>('height', aliasedName, true,+ type: i1.DriftSqlType.int);+i1.GeneratedColumn<int> _column_12(String aliasedName) =>+ i1.GeneratedColumn<int>('duration_in_seconds', aliasedName, true,+ type: i1.DriftSqlType.int);+i1.GeneratedColumn<String> _column_13(String aliasedName) =>+ i1.GeneratedColumn<String>('checksum', aliasedName, false,+ type: i1.DriftSqlType.string);+i1.GeneratedColumn<bool> _column_14(String aliasedName) =>+ i1.GeneratedColumn<bool>('is_favorite', aliasedName, false,+ type: i1.DriftSqlType.bool,+ defaultConstraints: i1.GeneratedColumn.constraintIsAlways(+ 'CHECK ("is_favorite" IN (0, 1))'),+ defaultValue: const CustomExpression('0'));+i1.GeneratedColumn<String> _column_15(String aliasedName) =>+ i1.GeneratedColumn<String>('owner_id', aliasedName, false,+ type: i1.DriftSqlType.string,+ defaultConstraints: i1.GeneratedColumn.constraintIsAlways(+ 'REFERENCES user_entity (id) ON DELETE CASCADE'));+i1.GeneratedColumn<DateTime> _column_16(String aliasedName) =>+ i1.GeneratedColumn<DateTime>('local_date_time', aliasedName, true,+ type: i1.DriftSqlType.dateTime);+i1.GeneratedColumn<String> _column_17(String aliasedName) =>+ i1.GeneratedColumn<String>('thumb_hash', aliasedName, true,+ type: i1.DriftSqlType.string);+i1.GeneratedColumn<DateTime> _column_18(String aliasedName) =>+ i1.GeneratedColumn<DateTime>('deleted_at', aliasedName, true,+ type: i1.DriftSqlType.dateTime);+i1.GeneratedColumn<String> _column_19(String aliasedName) =>+ i1.GeneratedColumn<String>('live_photo_video_id', aliasedName, true,+ type: i1.DriftSqlType.string);+i1.GeneratedColumn<int> _column_20(String aliasedName) =>+ i1.GeneratedColumn<int>('visibility', aliasedName, false,+ type: i1.DriftSqlType.int);++class Shape2 extends i0.VersionedTable {+ Shape2({required super.source, required super.alias}) : super.aliased();+ i1.GeneratedColumn<String> get name =>+ columnsByName['name']! as i1.GeneratedColumn<String>;+ i1.GeneratedColumn<int> get type =>+ columnsByName['type']! as i1.GeneratedColumn<int>;+ i1.GeneratedColumn<DateTime> get createdAt =>+ columnsByName['created_at']! as i1.GeneratedColumn<DateTime>;+ i1.GeneratedColumn<DateTime> get updatedAt =>+ columnsByName['updated_at']! as i1.GeneratedColumn<DateTime>;+ i1.GeneratedColumn<int> get width =>+ columnsByName['width']! as i1.GeneratedColumn<int>;+ i1.GeneratedColumn<int> get height =>+ columnsByName['height']! as i1.GeneratedColumn<int>;+ i1.GeneratedColumn<int> get durationInSeconds =>+ columnsByName['duration_in_seconds']! as i1.GeneratedColumn<int>;+ i1.GeneratedColumn<String> get id =>+ columnsByName['id']! as i1.GeneratedColumn<String>;+ i1.GeneratedColumn<String> get checksum =>+ columnsByName['checksum']! as i1.GeneratedColumn<String>;+ i1.GeneratedColumn<bool> get isFavorite =>+ columnsByName['is_favorite']! as i1.GeneratedColumn<bool>;+ i1.GeneratedColumn<int> get orientation =>+ columnsByName['orientation']! as i1.GeneratedColumn<int>;+}++i1.GeneratedColumn<String> _column_21(String aliasedName) =>+ i1.GeneratedColumn<String>('checksum', aliasedName, true,+ type: i1.DriftSqlType.string);+i1.GeneratedColumn<int> _column_22(String aliasedName) =>+ i1.GeneratedColumn<int>('orientation', aliasedName, false,+ type: i1.DriftSqlType.int, defaultValue: const CustomExpression('0'));++class Shape3 extends i0.VersionedTable {+ Shape3({required super.source, required super.alias}) : super.aliased();+ i1.GeneratedColumn<String> get userId =>+ columnsByName['user_id']! as i1.GeneratedColumn<String>;+ i1.GeneratedColumn<int> get key =>+ columnsByName['key']! as i1.GeneratedColumn<int>;+ i1.GeneratedColumn<i2.Uint8List> get value =>+ columnsByName['value']! as i1.GeneratedColumn<i2.Uint8List>;+}++i1.GeneratedColumn<String> _column_23(String aliasedName) =>+ i1.GeneratedColumn<String>('user_id', aliasedName, false,+ type: i1.DriftSqlType.string,+ defaultConstraints: i1.GeneratedColumn.constraintIsAlways(+ 'REFERENCES user_entity (id) ON DELETE CASCADE'));+i1.GeneratedColumn<int> _column_24(String aliasedName) =>+ i1.GeneratedColumn<int>('key', aliasedName, false,+ type: i1.DriftSqlType.int);+i1.GeneratedColumn<i2.Uint8List> _column_25(String aliasedName) =>+ i1.GeneratedColumn<i2.Uint8List>('value', aliasedName, false,+ type: i1.DriftSqlType.blob);++class Shape4 extends i0.VersionedTable {+ Shape4({required super.source, required super.alias}) : super.aliased();+ i1.GeneratedColumn<String> get sharedById =>+ columnsByName['shared_by_id']! as i1.GeneratedColumn<String>;+ i1.GeneratedColumn<String> get sharedWithId =>+ columnsByName['shared_with_id']! as i1.GeneratedColumn<String>;+ i1.GeneratedColumn<bool> get inTimeline =>+ columnsByName['in_timeline']! as i1.GeneratedColumn<bool>;+}++i1.GeneratedColumn<String> _column_26(String aliasedName) =>+ i1.GeneratedColumn<String>('shared_by_id', aliasedName, false,+ type: i1.DriftSqlType.string,+ defaultConstraints: i1.GeneratedColumn.constraintIsAlways(+ 'REFERENCES user_entity (id) ON DELETE CASCADE'));+i1.GeneratedColumn<String> _column_27(String aliasedName) =>+ i1.GeneratedColumn<String>('shared_with_id', aliasedName, false,+ type: i1.DriftSqlType.string,+ defaultConstraints: i1.GeneratedColumn.constraintIsAlways(+ 'REFERENCES user_entity (id) ON DELETE CASCADE'));+i1.GeneratedColumn<bool> _column_28(String aliasedName) =>+ i1.GeneratedColumn<bool>('in_timeline', aliasedName, false,+ type: i1.DriftSqlType.bool,+ defaultConstraints: i1.GeneratedColumn.constraintIsAlways(+ 'CHECK ("in_timeline" IN (0, 1))'),+ defaultValue: const CustomExpression('0'));++class Shape5 extends i0.VersionedTable {+ Shape5({required super.source, required super.alias}) : super.aliased();+ i1.GeneratedColumn<String> get id =>+ columnsByName['id']! as i1.GeneratedColumn<String>;+ i1.GeneratedColumn<String> get name =>+ columnsByName['name']! as i1.GeneratedColumn<String>;+ i1.GeneratedColumn<DateTime> get updatedAt =>+ columnsByName['updated_at']! as i1.GeneratedColumn<DateTime>;+ i1.GeneratedColumn<int> get backupSelection =>+ columnsByName['backup_selection']! as i1.GeneratedColumn<int>;+ i1.GeneratedColumn<bool> get isIosSharedAlbum =>+ columnsByName['is_ios_shared_album']! as i1.GeneratedColumn<bool>;+ i1.GeneratedColumn<bool> get marker_ =>+ columnsByName['marker']! as i1.GeneratedColumn<bool>;+}++i1.GeneratedColumn<int> _column_29(String aliasedName) =>+ i1.GeneratedColumn<int>('backup_selection', aliasedName, false,+ type: i1.DriftSqlType.int);+i1.GeneratedColumn<bool> _column_30(String aliasedName) =>+ i1.GeneratedColumn<bool>('is_ios_shared_album', aliasedName, false,+ type: i1.DriftSqlType.bool,+ defaultConstraints: i1.GeneratedColumn.constraintIsAlways(+ 'CHECK ("is_ios_shared_album" IN (0, 1))'),+ defaultValue: const CustomExpression('0'));+i1.GeneratedColumn<bool> _column_31(String aliasedName) =>+ i1.GeneratedColumn<bool>('marker', aliasedName, true,+ type: i1.DriftSqlType.bool,+ defaultConstraints: i1.GeneratedColumn.constraintIsAlways(+ 'CHECK ("marker" IN (0, 1))'));++class Shape6 extends i0.VersionedTable {+ Shape6({required super.source, required super.alias}) : super.aliased();+ i1.GeneratedColumn<String> get assetId =>+ columnsByName['asset_id']! as i1.GeneratedColumn<String>;+ i1.GeneratedColumn<String> get albumId =>+ columnsByName['album_id']! as i1.GeneratedColumn<String>;+}++i1.GeneratedColumn<String> _column_32(String aliasedName) =>+ i1.GeneratedColumn<String>('asset_id', aliasedName, false,+ type: i1.DriftSqlType.string,+ defaultConstraints: i1.GeneratedColumn.constraintIsAlways(+ 'REFERENCES local_asset_entity (id) ON DELETE CASCADE'));+i1.GeneratedColumn<String> _column_33(String aliasedName) =>+ i1.GeneratedColumn<String>('album_id', aliasedName, false,+ type: i1.DriftSqlType.string,+ defaultConstraints: i1.GeneratedColumn.constraintIsAlways(+ 'REFERENCES local_album_entity (id) ON DELETE CASCADE'));++class Shape7 extends i0.VersionedTable {+ Shape7({required super.source, required super.alias}) : super.aliased();+ i1.GeneratedColumn<String> get assetId =>+ columnsByName['asset_id']! as i1.GeneratedColumn<String>;+ i1.GeneratedColumn<String> get city =>+ columnsByName['city']! as i1.GeneratedColumn<String>;+ i1.GeneratedColumn<String> get state =>+ columnsByName['state']! as i1.GeneratedColumn<String>;+ i1.GeneratedColumn<String> get country =>+ columnsByName['country']! as i1.GeneratedColumn<String>;+ i1.GeneratedColumn<DateTime> get dateTimeOriginal =>+ columnsByName['date_time_original']! as i1.GeneratedColumn<DateTime>;+ i1.GeneratedColumn<String> get description =>+ columnsByName['description']! as i1.GeneratedColumn<String>;+ i1.GeneratedColumn<int> get height =>+ columnsByName['height']! as i1.GeneratedColumn<int>;+ i1.GeneratedColumn<int> get width =>+ columnsByName['width']! as i1.GeneratedColumn<int>;+ i1.GeneratedColumn<String> get exposureTime =>+ columnsByName['exposure_time']! as i1.GeneratedColumn<String>;+ i1.GeneratedColumn<double> get fNumber =>+ columnsByName['f_number']! as i1.GeneratedColumn<double>;+ i1.GeneratedColumn<int> get fileSize =>+ columnsByName['file_size']! as i1.GeneratedColumn<int>;+ i1.GeneratedColumn<double> get focalLength =>+ columnsByName['focal_length']! as i1.GeneratedColumn<double>;+ i1.GeneratedColumn<double> get latitude =>+ columnsByName['latitude']! as i1.GeneratedColumn<double>;+ i1.GeneratedColumn<double> get longitude =>+ columnsByName['longitude']! as i1.GeneratedColumn<double>;+ i1.GeneratedColumn<int> get iso =>+ columnsByName['iso']! as i1.GeneratedColumn<int>;+ i1.GeneratedColumn<String> get make =>+ columnsByName['make']! as i1.GeneratedColumn<String>;+ i1.GeneratedColumn<String> get model =>+ columnsByName['model']! as i1.GeneratedColumn<String>;+ i1.GeneratedColumn<String> get lens =>+ columnsByName['lens']! as i1.GeneratedColumn<String>;+ i1.GeneratedColumn<String> get orientation =>+ columnsByName['orientation']! as i1.GeneratedColumn<String>;+ i1.GeneratedColumn<String> get timeZone =>+ columnsByName['time_zone']! as i1.GeneratedColumn<String>;+ i1.GeneratedColumn<int> get rating =>+ columnsByName['rating']! as i1.GeneratedColumn<int>;+ i1.GeneratedColumn<String> get projectionType =>+ columnsByName['projection_type']! as i1.GeneratedColumn<String>;+}++i1.GeneratedColumn<String> _column_34(String aliasedName) =>+ i1.GeneratedColumn<String>('asset_id', aliasedName, false,+ type: i1.DriftSqlType.string,+ defaultConstraints: i1.GeneratedColumn.constraintIsAlways(+ 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE'));+i1.GeneratedColumn<String> _column_35(String aliasedName) =>+ i1.GeneratedColumn<String>('city', aliasedName, true,+ type: i1.DriftSqlType.string);+i1.GeneratedColumn<String> _column_36(String aliasedName) =>+ i1.GeneratedColumn<String>('state', aliasedName, true,+ type: i1.DriftSqlType.string);+i1.GeneratedColumn<String> _column_37(String aliasedName) =>+ i1.GeneratedColumn<String>('country', aliasedName, true,+ type: i1.DriftSqlType.string);+i1.GeneratedColumn<DateTime> _column_38(String aliasedName) =>+ i1.GeneratedColumn<DateTime>('date_time_original', aliasedName, true,+ type: i1.DriftSqlType.dateTime);+i1.GeneratedColumn<String> _column_39(String aliasedName) =>+ i1.GeneratedColumn<String>('description', aliasedName, true,+ type: i1.DriftSqlType.string);+i1.GeneratedColumn<String> _column_40(String aliasedName) =>+ i1.GeneratedColumn<String>('exposure_time', aliasedName, true,+ type: i1.DriftSqlType.string);+i1.GeneratedColumn<double> _column_41(String aliasedName) =>+ i1.GeneratedColumn<double>('f_number', aliasedName, true,+ type: i1.DriftSqlType.double);+i1.GeneratedColumn<int> _column_42(String aliasedName) =>+ i1.GeneratedColumn<int>('file_size', aliasedName, true,+ type: i1.DriftSqlType.int);+i1.GeneratedColumn<double> _column_43(String aliasedName) =>+ i1.GeneratedColumn<double>('focal_length', aliasedName, true,+ type: i1.DriftSqlType.double);+i1.GeneratedColumn<double> _column_44(String aliasedName) =>+ i1.GeneratedColumn<double>('latitude', aliasedName, true,+ type: i1.DriftSqlType.double);+i1.GeneratedColumn<double> _column_45(String aliasedName) =>+ i1.GeneratedColumn<double>('longitude', aliasedName, true,+ type: i1.DriftSqlType.double);+i1.GeneratedColumn<int> _column_46(String aliasedName) =>+ i1.GeneratedColumn<int>('iso', aliasedName, true,+ type: i1.DriftSqlType.int);+i1.GeneratedColumn<String> _column_47(String aliasedName) =>+ i1.GeneratedColumn<String>('make', aliasedName, true,+ type: i1.DriftSqlType.string);+i1.GeneratedColumn<String> _column_48(String aliasedName) =>+ i1.GeneratedColumn<String>('model', aliasedName, true,+ type: i1.DriftSqlType.string);+i1.GeneratedColumn<String> _column_49(String aliasedName) =>+ i1.GeneratedColumn<String>('lens', aliasedName, true,+ type: i1.DriftSqlType.string);+i1.GeneratedColumn<String> _column_50(String aliasedName) =>+ i1.GeneratedColumn<String>('orientation', aliasedName, true,+ type: i1.DriftSqlType.string);+i1.GeneratedColumn<String> _column_51(String aliasedName) =>+ i1.GeneratedColumn<String>('time_zone', aliasedName, true,+ type: i1.DriftSqlType.string);+i1.GeneratedColumn<int> _column_52(String aliasedName) =>+ i1.GeneratedColumn<int>('rating', aliasedName, true,+ type: i1.DriftSqlType.int);+i1.GeneratedColumn<String> _column_53(String aliasedName) =>+ i1.GeneratedColumn<String>('projection_type', aliasedName, true,+ type: i1.DriftSqlType.string);++class Shape8 extends i0.VersionedTable {+ Shape8({required super.source, required super.alias}) : super.aliased();+ i1.GeneratedColumn<String> get id =>+ columnsByName['id']! as i1.GeneratedColumn<String>;+ i1.GeneratedColumn<String> get name =>+ columnsByName['name']! as i1.GeneratedColumn<String>;+ i1.GeneratedColumn<String> get description =>+ columnsByName['description']! as i1.GeneratedColumn<String>;+ i1.GeneratedColumn<DateTime> get createdAt =>+ columnsByName['created_at']! as i1.GeneratedColumn<DateTime>;+ i1.GeneratedColumn<DateTime> get updatedAt =>+ columnsByName['updated_at']! as i1.GeneratedColumn<DateTime>;+ i1.GeneratedColumn<String> get ownerId =>+ columnsByName['owner_id']! as i1.GeneratedColumn<String>;+ i1.GeneratedColumn<String> get thumbnailAssetId =>+ columnsByName['thumbnail_asset_id']! as i1.GeneratedColumn<String>;+ i1.GeneratedColumn<bool> get isActivityEnabled =>+ columnsByName['is_activity_enabled']! as i1.GeneratedColumn<bool>;+ i1.GeneratedColumn<int> get order =>+ columnsByName['order']! as i1.GeneratedColumn<int>;+}++i1.GeneratedColumn<String> _column_54(String aliasedName) =>+ i1.GeneratedColumn<String>('description', aliasedName, false,+ type: i1.DriftSqlType.string,+ defaultValue: const CustomExpression('\'\''));+i1.GeneratedColumn<String> _column_55(String aliasedName) =>+ i1.GeneratedColumn<String>('thumbnail_asset_id', aliasedName, true,+ type: i1.DriftSqlType.string,+ defaultConstraints: i1.GeneratedColumn.constraintIsAlways(+ 'REFERENCES remote_asset_entity (id) ON DELETE SET NULL'));+i1.GeneratedColumn<bool> _column_56(String aliasedName) =>+ i1.GeneratedColumn<bool>('is_activity_enabled', aliasedName, false,+ type: i1.DriftSqlType.bool,+ defaultConstraints: i1.GeneratedColumn.constraintIsAlways(+ 'CHECK ("is_activity_enabled" IN (0, 1))'),+ defaultValue: const CustomExpression('1'));+i1.GeneratedColumn<int> _column_57(String aliasedName) =>+ i1.GeneratedColumn<int>('order', aliasedName, false,+ type: i1.DriftSqlType.int);+i1.GeneratedColumn<String> _column_58(String aliasedName) =>+ i1.GeneratedColumn<String>('album_id', aliasedName, false,+ type: i1.DriftSqlType.string,+ defaultConstraints: i1.GeneratedColumn.constraintIsAlways(+ 'REFERENCES remote_album_entity (id) ON DELETE CASCADE'));++class Shape9 extends i0.VersionedTable {+ Shape9({required super.source, required super.alias}) : super.aliased();+ i1.GeneratedColumn<String> get albumId =>+ columnsByName['album_id']! as i1.GeneratedColumn<String>;+ i1.GeneratedColumn<String> get userId =>+ columnsByName['user_id']! as i1.GeneratedColumn<String>;+ i1.GeneratedColumn<int> get role =>+ columnsByName['role']! as i1.GeneratedColumn<int>;+}++i1.GeneratedColumn<int> _column_59(String aliasedName) =>+ i1.GeneratedColumn<int>('role', aliasedName, false,+ type: i1.DriftSqlType.int);++class Shape10 extends i0.VersionedTable {+ Shape10({required super.source, required super.alias}) : super.aliased();+ i1.GeneratedColumn<String> get id =>+ columnsByName['id']! as i1.GeneratedColumn<String>;+ i1.GeneratedColumn<DateTime> get createdAt =>+ columnsByName['created_at']! as i1.GeneratedColumn<DateTime>;+ i1.GeneratedColumn<DateTime> get updatedAt =>+ columnsByName['updated_at']! as i1.GeneratedColumn<DateTime>;+ i1.GeneratedColumn<DateTime> get deletedAt =>+ columnsByName['deleted_at']! as i1.GeneratedColumn<DateTime>;+ i1.GeneratedColumn<String> get ownerId =>+ columnsByName['owner_id']! as i1.GeneratedColumn<String>;+ i1.GeneratedColumn<int> get type =>+ columnsByName['type']! as i1.GeneratedColumn<int>;+ i1.GeneratedColumn<String> get data =>+ columnsByName['data']! as i1.GeneratedColumn<String>;+ i1.GeneratedColumn<bool> get isSaved =>+ columnsByName['is_saved']! as i1.GeneratedColumn<bool>;+ i1.GeneratedColumn<DateTime> get memoryAt =>+ columnsByName['memory_at']! as i1.GeneratedColumn<DateTime>;+ i1.GeneratedColumn<DateTime> get seenAt =>+ columnsByName['seen_at']! as i1.GeneratedColumn<DateTime>;+ i1.GeneratedColumn<DateTime> get showAt =>+ columnsByName['show_at']! as i1.GeneratedColumn<DateTime>;+ i1.GeneratedColumn<DateTime> get hideAt =>+ columnsByName['hide_at']! as i1.GeneratedColumn<DateTime>;+}++i1.GeneratedColumn<String> _column_60(String aliasedName) =>+ i1.GeneratedColumn<String>('data', aliasedName, false,+ type: i1.DriftSqlType.string);+i1.GeneratedColumn<bool> _column_61(String aliasedName) =>+ i1.GeneratedColumn<bool>('is_saved', aliasedName, false,+ type: i1.DriftSqlType.bool,+ defaultConstraints: i1.GeneratedColumn.constraintIsAlways(+ 'CHECK ("is_saved" IN (0, 1))'),+ defaultValue: const CustomExpression('0'));+i1.GeneratedColumn<DateTime> _column_62(String aliasedName) =>+ i1.GeneratedColumn<DateTime>('memory_at', aliasedName, false,+ type: i1.DriftSqlType.dateTime);+i1.GeneratedColumn<DateTime> _column_63(String aliasedName) =>+ i1.GeneratedColumn<DateTime>('seen_at', aliasedName, true,+ type: i1.DriftSqlType.dateTime);+i1.GeneratedColumn<DateTime> _column_64(String aliasedName) =>+ i1.GeneratedColumn<DateTime>('show_at', aliasedName, true,+ type: i1.DriftSqlType.dateTime);+i1.GeneratedColumn<DateTime> _column_65(String aliasedName) =>+ i1.GeneratedColumn<DateTime>('hide_at', aliasedName, true,+ type: i1.DriftSqlType.dateTime);++class Shape11 extends i0.VersionedTable {+ Shape11({required super.source, required super.alias}) : super.aliased();+ i1.GeneratedColumn<String> get assetId =>+ columnsByName['asset_id']! as i1.GeneratedColumn<String>;+ i1.GeneratedColumn<String> get memoryId =>+ columnsByName['memory_id']! as i1.GeneratedColumn<String>;+}++i1.GeneratedColumn<String> _column_66(String aliasedName) =>+ i1.GeneratedColumn<String>('memory_id', aliasedName, false,+ type: i1.DriftSqlType.string,+ defaultConstraints: i1.GeneratedColumn.constraintIsAlways(+ 'REFERENCES memory_entity (id) ON DELETE CASCADE'));++class Shape12 extends i0.VersionedTable {+ Shape12({required super.source, required super.alias}) : super.aliased();+ i1.GeneratedColumn<String> get id =>+ columnsByName['id']! as i1.GeneratedColumn<String>;+ i1.GeneratedColumn<DateTime> get createdAt =>+ columnsByName['created_at']! as i1.GeneratedColumn<DateTime>;+ i1.GeneratedColumn<DateTime> get updatedAt =>+ columnsByName['updated_at']! as i1.GeneratedColumn<DateTime>;+ i1.GeneratedColumn<String> get ownerId =>+ columnsByName['owner_id']! as i1.GeneratedColumn<String>;+ i1.GeneratedColumn<String> get primaryAssetId =>+ columnsByName['primary_asset_id']! as i1.GeneratedColumn<String>;+}++i1.GeneratedColumn<String> _column_67(String aliasedName) =>+ i1.GeneratedColumn<String>('primary_asset_id', aliasedName, false,+ type: i1.DriftSqlType.string,+ defaultConstraints: i1.GeneratedColumn.constraintIsAlways(+ 'REFERENCES remote_asset_entity (id)'));+i0.MigrationStepWithVersion migrationSteps({+ required Future<void> Function(i1.Migrator m, Schema2 schema) from1To2,+}) {+ return (currentVersion, database) async {+ switch (currentVersion) {+ case 1:+ final schema = Schema2(database: database);+ final migrator = i1.Migrator(database, schema);+ await from1To2(migrator, schema);+ return 2;+ default:+ throw ArgumentError.value('Unknown migration from $currentVersion');+ }+ };+}++i1.OnUpgrade stepByStep({+ required Future<void> Function(i1.Migrator m, Schema2 schema) from1To2,+}) =>+ i0.VersionedSchema.stepByStepHelper(+ step: migrationSteps(+ from1To2: from1To2,+ ));diff --git a/mobile/lib/pages/common/change_experience.page.dart b/mobile/lib/pages/common/change_experience.page.dartnew file mode 100644index 0000000000..c54f627b61--- /dev/null+++ b/mobile/lib/pages/common/change_experience.page.dart@@ -0,0 +1,126 @@+import 'package:auto_route/auto_route.dart';+import 'package:flutter/material.dart';+import 'package:flutter/services.dart';+import 'package:hooks_riverpod/hooks_riverpod.dart';+import 'package:immich_mobile/extensions/build_context_extensions.dart';+import 'package:immich_mobile/providers/album/album.provider.dart';+import 'package:immich_mobile/providers/asset.provider.dart';+import 'package:immich_mobile/providers/background_sync.provider.dart';+import 'package:immich_mobile/providers/gallery_permission.provider.dart';+import 'package:immich_mobile/providers/infrastructure/db.provider.dart';+import 'package:immich_mobile/routing/router.dart';+import 'package:immich_mobile/utils/migration.dart';+import 'package:permission_handler/permission_handler.dart';++@RoutePage()+class ChangeExperiencePage extends ConsumerStatefulWidget {+ final bool switchingToBeta;++ const ChangeExperiencePage({super.key, required this.switchingToBeta});++ @override+ ConsumerState createState() => _ChangeExperiencePageState();+}++class _ChangeExperiencePageState extends ConsumerState<ChangeExperiencePage> {+ bool hasMigrated = false;++ @override+ void initState() {+ super.initState();+ WidgetsBinding.instance.addPostFrameCallback((_) => _handleMigration());+ }++ Future<void> _handleMigration() async {+ if (widget.switchingToBeta) {+ final assetNotifier = ref.read(assetProvider.notifier);+ if (assetNotifier.mounted) {+ assetNotifier.dispose();+ }+ final albumNotifier = ref.read(albumProvider.notifier);+ if (albumNotifier.mounted) {+ albumNotifier.dispose();+ }++ final permission = await ref+ .read(galleryPermissionNotifier.notifier)+ .requestGalleryPermission();++ if (permission.isGranted) {+ await ref.read(backgroundSyncProvider).syncLocal(full: true);+ await migrateDeviceAssetToSqlite(+ ref.read(isarProvider),+ ref.read(driftProvider),+ );+ }+ } else {+ await ref.read(backgroundSyncProvider).cancel();+ }++ Future.delayed(const Duration(seconds: 3), () {+ context.replaceRoute(+ widget.switchingToBeta+ ? const TabShellRoute()+ : const TabControllerRoute(),+ );+ });++ if (mounted) {+ setState(() {+ HapticFeedback.heavyImpact();+ hasMigrated = true;+ });+ }+ }++ @override+ Widget build(BuildContext context) {+ return Scaffold(+ body: Center(+ child: Column(+ mainAxisSize: MainAxisSize.min,+ children: [+ AnimatedSwitcher(+ duration: Durations.long4,+ child: hasMigrated+ ? const Icon(+ Icons.check_circle_rounded,+ color: Colors.green,+ size: 48.0,+ )+ : const SizedBox(+ width: 50.0,+ height: 50.0,+ child: CircularProgressIndicator(),+ ),+ ),+ const SizedBox(height: 16.0),+ Center(+ child: Column(+ children: [+ SizedBox(+ width: 300.0,+ child: AnimatedSwitcher(+ duration: Durations.long4,+ child: hasMigrated+ ? Text(+ "Migration success. Navigating to the new timeline...",+ style: context.textTheme.titleMedium,+ textAlign: TextAlign.center,+ )+ : Text(+ "Data migration in progress...\nPlease wait and don't close this page",+ style: context.textTheme.titleMedium,+ textAlign: TextAlign.center,+ ),+ ),+ ),+ ],+ ),+ ),+ ],+ ),+ ),+ );+ }+}diff --git a/mobile/lib/pages/common/settings.page.dart b/mobile/lib/pages/common/settings.page.dartindex 6fc4cf5d88..42d555a2ee 100644--- a/mobile/lib/pages/common/settings.page.dart+++ b/mobile/lib/pages/common/settings.page.dart@@ -8,6 +8,7 @@ import 'package:immich_mobile/widgets/settings/advanced_settings.dart';import 'package:immich_mobile/widgets/settings/asset_list_settings/asset_list_settings.dart';import 'package:immich_mobile/widgets/settings/asset_viewer_settings/asset_viewer_settings.dart';import 'package:immich_mobile/widgets/settings/backup_settings/backup_settings.dart';+import 'package:immich_mobile/widgets/settings/beta_timeline_list_tile.dart';import 'package:immich_mobile/widgets/settings/language_settings.dart';import 'package:immich_mobile/widgets/settings/networking_settings/networking_settings.dart';import 'package:immich_mobile/widgets/settings/notification_setting.dart';@@ -94,55 +95,59 @@ class _MobileLayout extends StatelessWidget {const _MobileLayout();@overrideWidget build(BuildContext context) {- return ListView(- physics: const ClampingScrollPhysics(),- padding: const EdgeInsets.symmetric(vertical: 10.0),- children: SettingSection.values- .map(- (setting) => Padding(- padding: const EdgeInsets.symmetric(- horizontal: 16.0,+ final List<Widget> settings = SettingSection.values+ .map(+ (setting) => Padding(+ padding: const EdgeInsets.symmetric(+ horizontal: 16.0,+ ),+ child: Card(+ elevation: 0,+ clipBehavior: Clip.antiAlias,+ color: context.colorScheme.surfaceContainer,+ shape: const RoundedRectangleBorder(+ borderRadius: BorderRadius.all(Radius.circular(16)),),- child: Card(- elevation: 0,- clipBehavior: Clip.antiAlias,- color: context.colorScheme.surfaceContainer,- shape: const RoundedRectangleBorder(- borderRadius: BorderRadius.all(Radius.circular(16)),+ margin: const EdgeInsets.symmetric(vertical: 4.0),+ child: ListTile(+ contentPadding: const EdgeInsets.symmetric(+ horizontal: 16.0,),- margin: const EdgeInsets.symmetric(vertical: 4.0),- child: ListTile(- contentPadding: const EdgeInsets.symmetric(- horizontal: 16.0,+ leading: Container(+ decoration: BoxDecoration(+ borderRadius: const BorderRadius.all(Radius.circular(16)),+ color: context.isDarkTheme+ ? Colors.black26+ : Colors.white.withAlpha(100),),- leading: Container(- decoration: BoxDecoration(- borderRadius: const BorderRadius.all(Radius.circular(16)),- color: context.isDarkTheme- ? Colors.black26- : Colors.white.withAlpha(100),- ),- padding: const EdgeInsets.all(16.0),- child: Icon(setting.icon, color: context.primaryColor),- ),- title: Text(- setting.title,- style: context.textTheme.titleMedium!.copyWith(- fontWeight: FontWeight.w600,- color: context.primaryColor,- ),- ).tr(),- subtitle: Text(- setting.subtitle,- style: context.textTheme.labelLarge,- ).tr(),- onTap: () =>- context.pushRoute(SettingsSubRoute(section: setting)),+ padding: const EdgeInsets.all(16.0),+ child: Icon(setting.icon, color: context.primaryColor),),+ title: Text(+ setting.title,+ style: context.textTheme.titleMedium!.copyWith(+ fontWeight: FontWeight.w600,+ color: context.primaryColor,+ ),+ ).tr(),+ subtitle: Text(+ setting.subtitle,+ style: context.textTheme.labelLarge,+ ).tr(),+ onTap: () =>+ context.pushRoute(SettingsSubRoute(section: setting)),),),- )- .toList(),+ ),+ )+ .toList();+ return ListView(+ physics: const ClampingScrollPhysics(),+ padding: const EdgeInsets.symmetric(vertical: 10.0),+ children: [+ const BetaTimelineListTile(),+ ...settings,+ ],);}}diff --git a/mobile/lib/pages/common/splash_screen.page.dart b/mobile/lib/pages/common/splash_screen.page.dartindex 4b7a10d612..598e920651 100644--- a/mobile/lib/pages/common/splash_screen.page.dart+++ b/mobile/lib/pages/common/splash_screen.page.dart@@ -73,7 +73,15 @@ class SplashScreenPageState extends ConsumerState<SplashScreenPage> {}if (context.router.current.name == SplashScreenRoute.name) {- context.replaceRoute(const TabControllerRoute());+ context.replaceRoute(+ Store.isBetaTimelineEnabled+ ? const TabShellRoute()+ : const TabControllerRoute(),+ );+ }++ if (Store.isBetaTimelineEnabled) {+ return;}final hasPermission =diff --git a/mobile/lib/pages/common/tab_shell.page.dart b/mobile/lib/pages/common/tab_shell.page.dartindex edaec6d336..c8ca7ea061 100644--- a/mobile/lib/pages/common/tab_shell.page.dart+++ b/mobile/lib/pages/common/tab_shell.page.dart@@ -10,13 +10,28 @@ import 'package:immich_mobile/providers/search/search_input_focus.provider.dart'import 'package:immich_mobile/providers/tab.provider.dart';import 'package:immich_mobile/providers/timeline/multiselect.provider.dart';import 'package:immich_mobile/routing/router.dart';+import 'package:immich_mobile/utils/migration.dart';@RoutePage()-class TabShellPage extends ConsumerWidget {+class TabShellPage extends ConsumerStatefulWidget {const TabShellPage({super.key});@override- Widget build(BuildContext context, WidgetRef ref) {+ ConsumerState<TabShellPage> createState() => _TabShellPageState();+}++class _TabShellPageState extends ConsumerState<TabShellPage> {+ @override+ void initState() {+ super.initState();++ WidgetsBinding.instance.addPostFrameCallback((_) {+ runNewSync(ref, full: true);+ });+ }++ @override+ Widget build(BuildContext context) {final isScreenLandscape = context.orientation == Orientation.landscape;Widget buildIcon({required Widget icon, required bool isProcessing}) {diff --git a/mobile/lib/pages/share_intent/share_intent.page.dart b/mobile/lib/pages/share_intent/share_intent.page.dartindex 3ff1b0c8ce..11c114e4a6 100644--- a/mobile/lib/pages/share_intent/share_intent.page.dart+++ b/mobile/lib/pages/share_intent/share_intent.page.dart@@ -3,6 +3,7 @@ import 'package:easy_localization/easy_localization.dart';import 'package:flutter/material.dart';import 'package:flutter_hooks/flutter_hooks.dart' hide Store;import 'package:hooks_riverpod/hooks_riverpod.dart';+import 'package:immich_mobile/entities/store.entity.dart';import 'package:immich_mobile/extensions/build_context_extensions.dart';import 'package:immich_mobile/models/upload/share_intent_attachment.model.dart';import 'package:immich_mobile/pages/common/large_leading_tile.dart';@@ -75,7 +76,9 @@ class ShareIntentPage extends HookConsumerWidget {leading: IconButton(onPressed: () {context.navigateTo(- const TabControllerRoute(),+ Store.isBetaTimelineEnabled+ ? const TabShellRoute()+ : const TabControllerRoute(),);},icon: const Icon(Icons.arrow_back),diff --git a/mobile/lib/providers/app_life_cycle.provider.dart b/mobile/lib/providers/app_life_cycle.provider.dartindex 3ec7813e2f..b4b7b0d406 100644--- a/mobile/lib/providers/app_life_cycle.provider.dart+++ b/mobile/lib/providers/app_life_cycle.provider.dart@@ -3,10 +3,12 @@ import 'dart:async';import 'package:flutter/foundation.dart';import 'package:hooks_riverpod/hooks_riverpod.dart';import 'package:immich_mobile/domain/services/log.service.dart';+import 'package:immich_mobile/entities/store.entity.dart';import 'package:immich_mobile/models/backup/backup_state.model.dart';import 'package:immich_mobile/providers/album/album.provider.dart';import 'package:immich_mobile/providers/asset.provider.dart';import 'package:immich_mobile/providers/auth.provider.dart';+import 'package:immich_mobile/providers/background_sync.provider.dart';import 'package:immich_mobile/providers/backup/backup.provider.dart';import 'package:immich_mobile/providers/backup/ios_background_settings.provider.dart';import 'package:immich_mobile/providers/backup/manual_upload.provider.dart';@@ -18,6 +20,7 @@ import 'package:immich_mobile/providers/tab.provider.dart';import 'package:immich_mobile/providers/websocket.provider.dart';import 'package:immich_mobile/services/background.service.dart';import 'package:isar/isar.dart';+import 'package:logging/logging.dart';import 'package:permission_handler/permission_handler.dart';enum AppLifeCycleEnum {@@ -57,29 +60,59 @@ class AppLifeCycleNotifier extends StateNotifier<AppLifeCycleEnum> {debugPrint("Using server URL: $endpoint");}- final permission = _ref.watch(galleryPermissionNotifier);- if (permission.isGranted || permission.isLimited) {- await _ref.read(backupProvider.notifier).resumeBackup();- await _ref.read(backgroundServiceProvider).resumeServiceIfEnabled();+ if (!Store.isBetaTimelineEnabled) {+ final permission = _ref.watch(galleryPermissionNotifier);+ if (permission.isGranted || permission.isLimited) {+ await _ref.read(backupProvider.notifier).resumeBackup();+ await _ref.read(backgroundServiceProvider).resumeServiceIfEnabled();+ }}await _ref.read(serverInfoProvider.notifier).getServerVersion();}- switch (_ref.read(tabProvider)) {- case TabEnum.home:- await _ref.read(assetProvider.notifier).getAllAsset();- break;- case TabEnum.search:- // nothing to do- break;-- case TabEnum.albums:- await _ref.read(albumProvider.notifier).refreshRemoteAlbums();- break;- case TabEnum.library:- // nothing to do- break;+ if (!Store.isBetaTimelineEnabled) {+ switch (_ref.read(tabProvider)) {+ case TabEnum.home:+ await _ref.read(assetProvider.notifier).getAllAsset();+ break;+ case TabEnum.search:+ // nothing to do+ break;++ case TabEnum.albums:+ await _ref.read(albumProvider.notifier).refreshRemoteAlbums();+ break;+ case TabEnum.library:+ // nothing to do+ break;+ }+ } else {+ _ref.read(backupProvider.notifier).cancelBackup();++ final backgroundManager = _ref.read(backgroundSyncProvider);+ // Ensure proper cleanup before starting new background tasks+ try {+ await Future.wait([+ backgroundManager.syncLocal().then(+ (_) {+ Logger("AppLifeCycleNotifier")+ .fine("Hashing assets after syncLocal");+ // Check if app is still active before hashing+ if (state == AppLifeCycleEnum.resumed) {+ backgroundManager.hashAssets();+ }+ },+ ),+ backgroundManager.syncRemote(),+ ]);+ } catch (e, stackTrace) {+ Logger("AppLifeCycleNotifier").severe(+ "Error during background sync",+ e,+ stackTrace,+ );+ }}_ref.read(websocketProvider.notifier).connect();@@ -92,9 +125,11 @@ class AppLifeCycleNotifier extends StateNotifier<AppLifeCycleEnum> {.read(galleryPermissionNotifier.notifier).getGalleryPermissionStatus();- await _ref.read(iOSBackgroundSettingsProvider.notifier).refresh();+ if (!Store.isBetaTimelineEnabled) {+ await _ref.read(iOSBackgroundSettingsProvider.notifier).refresh();- _ref.invalidate(memoryFutureProvider);+ _ref.invalidate(memoryFutureProvider);+ }}void handleAppInactivity() {@@ -106,7 +141,8 @@ class AppLifeCycleNotifier extends StateNotifier<AppLifeCycleEnum> {state = AppLifeCycleEnum.paused;_wasPaused = true;- if (_ref.read(authProvider).isAuthenticated) {+ if (!Store.isBetaTimelineEnabled &&+ _ref.read(authProvider).isAuthenticated) {// Do not cancel backup if manual upload is in progressif (_ref.read(backupProvider.notifier).backupProgress !=BackUpProgressEnum.manualInProgress) {@@ -115,15 +151,43 @@ class AppLifeCycleNotifier extends StateNotifier<AppLifeCycleEnum> {_ref.read(websocketProvider.notifier).disconnect();}- LogService.I.flush();+ try {+ LogService.I.flush();+ } catch (e) {+ // Ignore flush errors during pause+ }}Future<void> handleAppDetached() async {state = AppLifeCycleEnum.detached;- LogService.I.flush();- await Isar.getInstance()?.close();++ // Flush logs before closing database+ try {+ LogService.I.flush();+ } catch (e) {+ // Ignore flush errors during shutdown+ }++ // Close Isar database safely+ try {+ final isar = Isar.getInstance();+ if (isar != null && isar.isOpen) {+ await isar.close();+ }+ } catch (e) {+ // Ignore close errors during shutdown+ }++ if (Store.isBetaTimelineEnabled) {+ return;+ }+// no guarantee this is called at all- _ref.read(manualUploadProvider.notifier).cancelBackup();+ try {+ _ref.read(manualUploadProvider.notifier).cancelBackup();+ } catch (e) {+ // Ignore errors during shutdown+ }}void handleAppHidden() {diff --git a/mobile/lib/providers/infrastructure/db.provider.dart b/mobile/lib/providers/infrastructure/db.provider.dartindex 4eefbc556c..cdf934e508 100644--- a/mobile/lib/providers/infrastructure/db.provider.dart+++ b/mobile/lib/providers/infrastructure/db.provider.dart@@ -13,5 +13,6 @@ Isar isar(Ref ref) => throw UnimplementedError('isar');final driftProvider = Provider<Drift>((ref) {final drift = Drift();ref.onDispose(() => unawaited(drift.close()));+ ref.keepAlive();return drift;});diff --git a/mobile/lib/repositories/auth.repository.dart b/mobile/lib/repositories/auth.repository.dartindex 4ee4d8c131..eb86e1809f 100644--- a/mobile/lib/repositories/auth.repository.dart+++ b/mobile/lib/repositories/auth.repository.dart@@ -24,7 +24,25 @@ class AuthRepository extends DatabaseRepository {const AuthRepository(super.db, this._drift);- Future<void> clearLocalData() {+ Future<void> clearLocalData() async {+ // Drift deletions - child entities first (those with foreign keys)+ await Future.wait([+ _drift.memoryAssetEntity.deleteAll(),+ _drift.remoteAlbumAssetEntity.deleteAll(),+ _drift.remoteAlbumUserEntity.deleteAll(),+ _drift.remoteExifEntity.deleteAll(),+ _drift.userMetadataEntity.deleteAll(),+ _drift.partnerEntity.deleteAll(),+ _drift.stackEntity.deleteAll(),+ ]);+ // Drift deletions - parent entities+ await Future.wait([+ _drift.memoryEntity.deleteAll(),+ _drift.remoteAlbumEntity.deleteAll(),+ _drift.remoteAssetEntity.deleteAll(),+ _drift.userEntity.deleteAll(),+ ]);+return db.writeTxn(() {return Future.wait([db.assets.clear(),@@ -32,17 +50,6 @@ class AuthRepository extends DatabaseRepository {db.albums.clear(),db.eTags.clear(),db.users.clear(),- _drift.remoteAssetEntity.deleteAll(),- _drift.remoteExifEntity.deleteAll(),- _drift.userEntity.deleteAll(),- _drift.userMetadataEntity.deleteAll(),- _drift.partnerEntity.deleteAll(),- _drift.remoteAlbumEntity.deleteAll(),- _drift.remoteAlbumAssetEntity.deleteAll(),- _drift.remoteAlbumUserEntity.deleteAll(),- _drift.memoryEntity.deleteAll(),- _drift.memoryAssetEntity.deleteAll(),- _drift.stackEntity.deleteAll(),]);});}diff --git a/mobile/lib/routing/router.dart b/mobile/lib/routing/router.dartindex ddd630727d..a6666ec6eb 100644--- a/mobile/lib/routing/router.dart+++ b/mobile/lib/routing/router.dart@@ -29,6 +29,7 @@ import 'package:immich_mobile/pages/backup/failed_backup_status.page.dart';import 'package:immich_mobile/pages/common/activities.page.dart';import 'package:immich_mobile/pages/common/app_log.page.dart';import 'package:immich_mobile/pages/common/app_log_detail.page.dart';+import 'package:immich_mobile/pages/common/change_experience.page.dart';import 'package:immich_mobile/pages/common/create_album.page.dart';import 'package:immich_mobile/pages/common/gallery_viewer.page.dart';import 'package:immich_mobile/pages/common/headers_settings.page.dart';@@ -69,27 +70,27 @@ import 'package:immich_mobile/pages/search/person_result.page.dart';import 'package:immich_mobile/pages/search/recently_taken.page.dart';import 'package:immich_mobile/pages/search/search.page.dart';import 'package:immich_mobile/pages/share_intent/share_intent.page.dart';+import 'package:immich_mobile/presentation/pages/dev/feat_in_development.page.dart';+import 'package:immich_mobile/presentation/pages/dev/main_timeline.page.dart';+import 'package:immich_mobile/presentation/pages/dev/media_stat.page.dart';+import 'package:immich_mobile/presentation/pages/drift_album.page.dart';+import 'package:immich_mobile/presentation/pages/drift_archive.page.dart';+import 'package:immich_mobile/presentation/pages/drift_asset_selection_timeline.page.dart';+import 'package:immich_mobile/presentation/pages/drift_create_album.page.dart';import 'package:immich_mobile/presentation/pages/drift_favorite.page.dart';-import 'package:immich_mobile/presentation/pages/drift_partner_detail.page.dart';+import 'package:immich_mobile/presentation/pages/drift_library.page.dart';import 'package:immich_mobile/presentation/pages/drift_local_album.page.dart';+import 'package:immich_mobile/presentation/pages/drift_locked_folder.page.dart';+import 'package:immich_mobile/presentation/pages/drift_memory.page.dart';+import 'package:immich_mobile/presentation/pages/drift_partner_detail.page.dart';import 'package:immich_mobile/presentation/pages/drift_place.page.dart';import 'package:immich_mobile/presentation/pages/drift_place_detail.page.dart';import 'package:immich_mobile/presentation/pages/drift_recently_taken.page.dart';import 'package:immich_mobile/presentation/pages/drift_user_selection.page.dart';-import 'package:immich_mobile/presentation/pages/drift_video.page.dart';+import 'package:immich_mobile/presentation/pages/drift_remote_album.page.dart';import 'package:immich_mobile/presentation/pages/drift_trash.page.dart';-import 'package:immich_mobile/presentation/pages/drift_archive.page.dart';-import 'package:immich_mobile/presentation/pages/drift_locked_folder.page.dart';-import 'package:immich_mobile/presentation/pages/dev/feat_in_development.page.dart';+import 'package:immich_mobile/presentation/pages/drift_video.page.dart';import 'package:immich_mobile/presentation/pages/local_timeline.page.dart';-import 'package:immich_mobile/presentation/pages/dev/main_timeline.page.dart';-import 'package:immich_mobile/presentation/pages/dev/media_stat.page.dart';-import 'package:immich_mobile/presentation/pages/drift_remote_album.page.dart';-import 'package:immich_mobile/presentation/pages/drift_album.page.dart';-import 'package:immich_mobile/presentation/pages/drift_library.page.dart';-import 'package:immich_mobile/presentation/pages/drift_asset_selection_timeline.page.dart';-import 'package:immich_mobile/presentation/pages/drift_create_album.page.dart';-import 'package:immich_mobile/presentation/pages/drift_memory.page.dart';import 'package:immich_mobile/presentation/widgets/asset_viewer/asset_viewer.page.dart';import 'package:immich_mobile/providers/api.provider.dart';import 'package:immich_mobile/providers/gallery_permission.provider.dart';@@ -103,7 +104,6 @@ import 'package:immich_mobile/services/api.service.dart';import 'package:immich_mobile/services/local_auth.service.dart';import 'package:immich_mobile/services/secure_storage.service.dart';import 'package:immich_mobile/widgets/asset_grid/asset_grid_data_structure.dart';-import 'package:maplibre_gl/maplibre_gl.dart';part 'router.gr.dart';@@ -469,6 +469,10 @@ class AppRouter extends RootStackRouter {guards: [_authGuard, _duplicateGuard],),+ AutoRoute(+ page: ChangeExperienceRoute.page,+ guards: [_authGuard, _duplicateGuard],+ ),// required to handle all deeplinks in deep_link.service.dart// auto_route_library#1722RedirectRoute(path: '*', redirectTo: '/'),diff --git a/mobile/lib/routing/router.gr.dart b/mobile/lib/routing/router.gr.dartindex a8a26836c7..7412e1dee5 100644--- a/mobile/lib/routing/router.gr.dart+++ b/mobile/lib/routing/router.gr.dart@@ -503,6 +503,49 @@ class BackupOptionsRoute extends PageRouteInfo<void> {);}+/// generated route for+/// [ChangeExperiencePage]+class ChangeExperienceRoute extends PageRouteInfo<ChangeExperienceRouteArgs> {+ ChangeExperienceRoute({+ Key? key,+ required bool switchingToBeta,+ List<PageRouteInfo>? children,+ }) : super(+ ChangeExperienceRoute.name,+ args: ChangeExperienceRouteArgs(+ key: key,+ switchingToBeta: switchingToBeta,+ ),+ initialChildren: children,+ );++ static const String name = 'ChangeExperienceRoute';++ static PageInfo page = PageInfo(+ name,+ builder: (data) {+ final args = data.argsAs<ChangeExperienceRouteArgs>();+ return ChangeExperiencePage(+ key: args.key,+ switchingToBeta: args.switchingToBeta,+ );+ },+ );+}++class ChangeExperienceRouteArgs {+ const ChangeExperienceRouteArgs({this.key, required this.switchingToBeta});++ final Key? key;++ final bool switchingToBeta;++ @override+ String toString() {+ return 'ChangeExperienceRouteArgs{key: $key, switchingToBeta: $switchingToBeta}';+ }+}+/// generated route for/// [ChangePasswordPage]class ChangePasswordRoute extends PageRouteInfo<void> {diff --git a/mobile/lib/services/app_settings.service.dart b/mobile/lib/services/app_settings.service.dartindex 8d1f7c24a5..982dab1cae 100644--- a/mobile/lib/services/app_settings.service.dart+++ b/mobile/lib/services/app_settings.service.dart@@ -90,6 +90,7 @@ enum AppSettingsEnum<T> {null,true,),+ betaTimeline<bool>(StoreKey.betaTimeline, null, false),;const AppSettingsEnum(this.storeKey, this.hiveKey, this.defaultValue);diff --git a/mobile/lib/utils/isolate.dart b/mobile/lib/utils/isolate.dartindex 6b20fa7f37..2263bf3d76 100644--- a/mobile/lib/utils/isolate.dart+++ b/mobile/lib/utils/isolate.dart@@ -1,6 +1,7 @@import 'dart:async';import 'dart:ui';+import 'package:flutter/material.dart';import 'package:flutter/services.dart';import 'package:hooks_riverpod/hooks_riverpod.dart';import 'package:immich_mobile/domain/services/log.service.dart';@@ -59,9 +60,18 @@ Cancelable<T?> runInIsolateGentle<T>({stack,);} finally {- await LogService.I.flushBuffer();- ref.read(driftProvider).close();- ref.read(isarProvider).close();+ try {+ await LogService.I.flushBuffer();+ await ref.read(driftProvider).close();+ await ref.read(isarProvider).close();+ ref.dispose();+ } catch (error) {+ debugPrint("Error closing resources in isolate: $error");+ } finally {+ ref.dispose();+ // Delay to ensure all resources are released+ await Future.delayed(const Duration(seconds: 2));+ }}return null;});diff --git a/mobile/lib/utils/migration.dart b/mobile/lib/utils/migration.dartindex 3ec8ce5bbc..d09f2b9978 100644--- a/mobile/lib/utils/migration.dart+++ b/mobile/lib/utils/migration.dart@@ -4,6 +4,7 @@ import 'dart:io';import 'package:drift/drift.dart';import 'package:flutter/foundation.dart';+import 'package:hooks_riverpod/hooks_riverpod.dart';import 'package:immich_mobile/domain/models/store.model.dart';import 'package:immich_mobile/domain/utils/background_sync.dart';import 'package:immich_mobile/entities/album.entity.dart';@@ -18,12 +19,15 @@ import 'package:immich_mobile/infrastructure/entities/local_asset.entity.drift.dimport 'package:immich_mobile/infrastructure/entities/store.entity.dart';import 'package:immich_mobile/infrastructure/entities/user.entity.dart';import 'package:immich_mobile/infrastructure/repositories/db.repository.dart';+import 'package:immich_mobile/providers/background_sync.provider.dart';+import 'package:immich_mobile/providers/backup/backup.provider.dart';import 'package:immich_mobile/utils/diff.dart';import 'package:isar/isar.dart';+import 'package:logging/logging.dart';// ignore: import_rule_photo_managerimport 'package:photo_manager/photo_manager.dart';-const int targetVersion = 13;+const int targetVersion = 14;Future<void> migrateDatabaseIfNeeded(Isar db) async {final int version = Store.get(StoreKey.version, targetVersion);@@ -48,18 +52,22 @@ Future<void> migrateDatabaseIfNeeded(Isar db) async {await _migrateDeviceAsset(db);}- if (version < 12 && (!kReleaseMode)) {+ if (version < 13) {+ await Store.put(StoreKey.photoManagerCustomFilter, true);+ }++ if (version < 14) {+ if (!Store.isBetaTimelineEnabled) {+ // Try again when beta timeline is enabled and the app is restarted+ return;+ }final backgroundSync = BackgroundSyncManager();await backgroundSync.syncLocal();final drift = Drift();- await _migrateDeviceAssetToSqlite(db, drift);+ await migrateDeviceAssetToSqlite(db, drift);await drift.close();}- if (version < 13) {- await Store.put(StoreKey.photoManagerCustomFilter, true);- }-if (targetVersion >= 12) {await Store.put(StoreKey.version, targetVersion);return;@@ -175,33 +183,24 @@ Future<void> _migrateDeviceAsset(Isar db) async {});}-Future<void> _migrateDeviceAssetToSqlite(Isar db, Drift drift) async {+Future<void> migrateDeviceAssetToSqlite(Isar db, Drift drift) async {try {- final isarDeviceAssets =- await db.deviceAssetEntitys.where().sortByAssetId().findAll();+ final isarDeviceAssets = await db.deviceAssetEntitys.where().findAll();await drift.batch((batch) {for (final deviceAsset in isarDeviceAssets) {- final companion = LocalAssetEntityCompanion(- updatedAt: Value(deviceAsset.modifiedTime),- id: Value(deviceAsset.assetId),- checksum: Value(base64.encode(deviceAsset.hash)),- );- batch.insert<$LocalAssetEntityTable, LocalAssetEntityData>(+ batch.update(drift.localAssetEntity,- companion,- onConflict: DoUpdate(- (_) => companion,- where: (old) => old.updatedAt.equals(deviceAsset.modifiedTime),+ LocalAssetEntityCompanion(+ checksum: Value(base64.encode(deviceAsset.hash)),),+ where: (t) => t.id.equals(deviceAsset.assetId),);}});} catch (error) {- if (kDebugMode) {- debugPrint(- "[MIGRATION] Error while migrating device assets to SQLite: $error",- );- }+ debugPrint(+ "[MIGRATION] Error while migrating device assets to SQLite: $error",+ );}}@@ -212,3 +211,18 @@ class _DeviceAsset {const _DeviceAsset({required this.assetId, this.hash, this.dateTime});}++Future<void> runNewSync(WidgetRef ref, {bool full = false}) async {+ ref.read(backupProvider.notifier).cancelBackup();++ final backgroundManager = ref.read(backgroundSyncProvider);+ Future.wait([+ backgroundManager.syncLocal(full: full).then(+ (_) {+ Logger("runNewSync").fine("Hashing assets after syncLocal");+ backgroundManager.hashAssets();+ },+ ),+ backgroundManager.syncRemote(),+ ]);+}diff --git a/mobile/lib/widgets/common/immich_sliver_app_bar.dart b/mobile/lib/widgets/common/immich_sliver_app_bar.dartindex c2c5b79753..5ab60c913c 100644--- a/mobile/lib/widgets/common/immich_sliver_app_bar.dart+++ b/mobile/lib/widgets/common/immich_sliver_app_bar.dart@@ -6,7 +6,6 @@ import 'package:hooks_riverpod/hooks_riverpod.dart';import 'package:immich_mobile/extensions/build_context_extensions.dart';import 'package:immich_mobile/models/backup/backup_state.model.dart';import 'package:immich_mobile/models/server_info/server_info.model.dart';-import 'package:immich_mobile/providers/background_sync.provider.dart';import 'package:immich_mobile/providers/backup/backup.provider.dart';import 'package:immich_mobile/providers/cast.provider.dart';import 'package:immich_mobile/providers/server_info.provider.dart';@@ -51,7 +50,6 @@ class ImmichSliverAppBar extends ConsumerWidget {pinned: pinned,snap: snap,expandedHeight: expandedHeight,- backgroundColor: context.colorScheme.surfaceContainer,shape: const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(5),@@ -68,24 +66,6 @@ class ImmichSliverAppBar extends ConsumerWidget {child: action,),),- IconButton(- icon: const Icon(Icons.swipe_left_alt_rounded),- onPressed: () => context.pop(),- ),- IconButton(- onPressed: () {- ref.read(backgroundSyncProvider).syncLocal(full: true);- ref.read(backgroundSyncProvider).syncRemote();-- Future.delayed(- const Duration(seconds: 10),- () => ref.read(backgroundSyncProvider).hashAssets(),- );- },- icon: const Icon(- Icons.sync,- ),- ),if (isCasting)Padding(padding: const EdgeInsets.only(right: 12),@@ -127,13 +107,30 @@ class _ImmichLogoWithText extends StatelessWidget {children: [Builder(builder: (context) {- return Padding(- padding: const EdgeInsets.only(top: 3.0),- child: SvgPicture.asset(- context.isDarkTheme- ? 'assets/immich-logo-inline-dark.svg'- : 'assets/immich-logo-inline-light.svg',- height: 40,+ return Badge(+ padding:+ const EdgeInsets.symmetric(horizontal: 6, vertical: 4),+ backgroundColor: context.primaryColor,+ alignment: Alignment.centerRight,+ offset: const Offset(16, -8),+ label: Text(+ 'β',+ style: TextStyle(+ fontSize: 11,+ color: context.colorScheme.onPrimary,+ fontWeight: FontWeight.bold,+ fontFamily: 'OverpassMono',+ height: 1.2,+ ),+ ),+ child: Padding(+ padding: const EdgeInsets.only(top: 3.0),+ child: SvgPicture.asset(+ context.isDarkTheme+ ? 'assets/immich-logo-inline-dark.svg'+ : 'assets/immich-logo-inline-light.svg',+ height: 40,+ ),),);},diff --git a/mobile/lib/widgets/forms/login/login_form.dart b/mobile/lib/widgets/forms/login/login_form.dartindex 8ccd69930a..24a73b2cbc 100644--- a/mobile/lib/widgets/forms/login/login_form.dart+++ b/mobile/lib/widgets/forms/login/login_form.dart@@ -10,6 +10,7 @@ import 'package:flutter/services.dart';import 'package:flutter_hooks/flutter_hooks.dart' hide Store;import 'package:fluttertoast/fluttertoast.dart';import 'package:hooks_riverpod/hooks_riverpod.dart';+import 'package:immich_mobile/entities/store.entity.dart';import 'package:immich_mobile/extensions/build_context_extensions.dart';import 'package:immich_mobile/providers/auth.provider.dart';import 'package:immich_mobile/providers/backup/backup.provider.dart';@@ -17,6 +18,7 @@ import 'package:immich_mobile/providers/gallery_permission.provider.dart';import 'package:immich_mobile/providers/oauth.provider.dart';import 'package:immich_mobile/providers/server_info.provider.dart';import 'package:immich_mobile/routing/router.dart';+import 'package:immich_mobile/utils/migration.dart';import 'package:immich_mobile/utils/provider_utils.dart';import 'package:immich_mobile/utils/url_helper.dart';import 'package:immich_mobile/utils/version_compatibility.dart';@@ -192,6 +194,15 @@ class LoginForm extends HookConsumerWidget {if (result.shouldChangePassword && !result.isAdmin) {context.pushRoute(const ChangePasswordRoute());} else {+ final isBeta = Store.isBetaTimelineEnabled;+ if (isBeta) {+ await ref+ .read(galleryPermissionNotifier.notifier)+ .requestGalleryPermission();+ await runNewSync(ref);+ context.replaceRoute(const TabShellRoute());+ return;+ }context.replaceRoute(const TabControllerRoute());}} catch (error) {@@ -292,9 +303,18 @@ class LoginForm extends HookConsumerWidget {if (isSuccess) {isLoading.value = false;final permission = ref.watch(galleryPermissionNotifier);- if (permission.isGranted || permission.isLimited) {+ final isBeta = Store.isBetaTimelineEnabled;+ if (!isBeta && (permission.isGranted || permission.isLimited)) {ref.watch(backupProvider.notifier).resumeBackup();}+ if (isBeta) {+ await ref+ .read(galleryPermissionNotifier.notifier)+ .requestGalleryPermission();+ await runNewSync(ref);+ context.replaceRoute(const TabShellRoute());+ return;+ }context.replaceRoute(const TabControllerRoute());}} catch (error, stack) {diff --git a/mobile/lib/widgets/settings/beta_timeline_list_tile.dart b/mobile/lib/widgets/settings/beta_timeline_list_tile.dartnew file mode 100644index 0000000000..967c7f3e13--- /dev/null+++ b/mobile/lib/widgets/settings/beta_timeline_list_tile.dart@@ -0,0 +1,269 @@+import 'dart:math' as math;++import 'package:auto_route/auto_route.dart';+import 'package:flutter/material.dart';+import 'package:hooks_riverpod/hooks_riverpod.dart';+import 'package:immich_mobile/extensions/build_context_extensions.dart';+import 'package:immich_mobile/extensions/translate_extensions.dart';+import 'package:immich_mobile/providers/app_settings.provider.dart';+import 'package:immich_mobile/routing/router.dart';+import 'package:immich_mobile/services/app_settings.service.dart';++class BetaTimelineListTile extends ConsumerStatefulWidget {+ const BetaTimelineListTile({+ super.key,+ });++ @override+ ConsumerState<BetaTimelineListTile> createState() =>+ _BetaTimelineListTileState();+}++class _BetaTimelineListTileState extends ConsumerState<BetaTimelineListTile>+ with SingleTickerProviderStateMixin {+ late AnimationController _animationController;+ late Animation<double> _rotationAnimation;+ late Animation<double> _pulseAnimation;+ late Animation<double> _gradientAnimation;++ @override+ void initState() {+ super.initState();+ _animationController = AnimationController(+ duration: const Duration(seconds: 3),+ vsync: this,+ );++ _rotationAnimation = Tween<double>(begin: 0, end: 2 * math.pi).animate(+ CurvedAnimation(+ parent: _animationController,+ curve: Curves.linear,+ ),+ );++ _pulseAnimation = Tween<double>(begin: 1, end: 1.1).animate(+ CurvedAnimation(+ parent: _animationController,+ curve: Curves.easeInOut,+ ),+ );++ _gradientAnimation = Tween<double>(begin: 0, end: 1).animate(+ CurvedAnimation(+ parent: _animationController,+ curve: Curves.easeInOut,+ ),+ );++ _animationController.repeat(reverse: true);+ }++ @override+ void dispose() {+ _animationController.dispose();+ super.dispose();+ }++ @override+ Widget build(BuildContext context) {+ final betaTimelineValue = ref+ .watch(appSettingsServiceProvider)+ .getSetting<bool>(AppSettingsEnum.betaTimeline);++ return AnimatedBuilder(+ animation: _animationController,+ builder: (context, child) {+ void onSwitchChanged(bool value) {+ showDialog(+ context: context,+ builder: (context) {+ return AlertDialog(+ title: value+ ? const Text("Enable Beta Timeline")+ : const Text("Disable Beta Timeline"),+ content: value+ ? const Text(+ "Are you sure you want to enable the beta timeline?",+ )+ : const Text(+ "Are you sure you want to disable the beta timeline?",+ ),+ actions: [+ TextButton(+ onPressed: () async {+ Navigator.of(context).pop();+ await ref.read(appSettingsServiceProvider).setSetting(+ AppSettingsEnum.betaTimeline,+ value,+ );+ context.router.replaceAll(+ [ChangeExperienceRoute(switchingToBeta: value)],+ );+ },+ child: const Text("Yes"),+ ),+ TextButton(+ onPressed: () {+ Navigator.of(context).pop();+ },+ child: const Text("No"),+ ),+ ],+ );+ },+ );+ }++ final gradientColors = [+ Color.lerp(+ context.primaryColor.withValues(alpha: 0.3),+ context.primaryColor.withValues(alpha: 0.1),+ _gradientAnimation.value,+ )!,+ Color.lerp(+ context.primaryColor.withValues(alpha: 0.2),+ context.primaryColor.withValues(alpha: 0.4),+ _gradientAnimation.value,+ )!,+ Color.lerp(+ context.primaryColor.withValues(alpha: 0.1),+ context.primaryColor.withValues(alpha: 0.3),+ _gradientAnimation.value,+ )!,+ ];++ return Container(+ margin: const EdgeInsets.symmetric(horizontal: 16, vertical: 4),+ decoration: BoxDecoration(+ borderRadius: const BorderRadius.all(Radius.circular(12)),+ gradient: LinearGradient(+ colors: gradientColors,+ stops: const [0.0, 0.5, 1.0],+ begin: Alignment.topLeft,+ end: Alignment.bottomRight,+ transform: GradientRotation(_rotationAnimation.value * 0.1),+ ),+ boxShadow: [+ BoxShadow(+ color: context.primaryColor.withValues(alpha: 0.1),+ blurRadius: 8,+ offset: const Offset(0, 2),+ ),+ ],+ ),+ child: Container(+ margin: const EdgeInsets.all(1.5),+ decoration: BoxDecoration(+ borderRadius: const BorderRadius.all(Radius.circular(10.5)),+ color: context.scaffoldBackgroundColor,+ ),+ child: Material(+ color: Colors.transparent,+ borderRadius: const BorderRadius.all(Radius.circular(10.5)),+ child: InkWell(+ borderRadius: const BorderRadius.all(Radius.circular(10.5)),+ onTap: () => onSwitchChanged(!betaTimelineValue),+ child: Padding(+ padding:+ const EdgeInsets.symmetric(horizontal: 20, vertical: 16),+ child: Row(+ children: [+ Transform.scale(+ scale: _pulseAnimation.value,+ child: Transform.rotate(+ angle: _rotationAnimation.value * 0.02,+ child: Container(+ padding: const EdgeInsets.all(8),+ decoration: BoxDecoration(+ shape: BoxShape.circle,+ gradient: LinearGradient(+ colors: [+ context.primaryColor.withValues(alpha: 0.2),+ context.primaryColor.withValues(alpha: 0.1),+ ],+ ),+ ),+ child: Icon(+ Icons.auto_awesome,+ color: context.primaryColor,+ size: 20,+ ),+ ),+ ),+ ),+ const SizedBox(width: 16),+ Expanded(+ child: Column(+ crossAxisAlignment: CrossAxisAlignment.start,+ children: [+ Row(+ crossAxisAlignment: CrossAxisAlignment.center,+ children: [+ Text(+ "advanced_settings_beta_timeline_title"+ .t(context: context),+ style:+ context.textTheme.titleMedium?.copyWith(+ fontWeight: FontWeight.w600,+ ),+ ),+ const SizedBox(width: 8),+ Container(+ padding: const EdgeInsets.symmetric(+ horizontal: 6,+ vertical: 2,+ ),+ decoration: BoxDecoration(+ borderRadius: const BorderRadius.all(+ Radius.circular(8),+ ),+ gradient: LinearGradient(+ colors: [+ context.primaryColor+ .withValues(alpha: 0.8),+ context.primaryColor+ .withValues(alpha: 0.6),+ ],+ ),+ ),+ child: Text(+ 'NEW',+ style:+ context.textTheme.labelSmall?.copyWith(+ color: Colors.white,+ fontWeight: FontWeight.bold,+ fontSize: 10,+ height: 1.2,+ ),+ ),+ ),+ ],+ ),+ const SizedBox(height: 4),+ Text(+ "advanced_settings_beta_timeline_subtitle"+ .t(context: context),+ style: context.textTheme.labelLarge?.copyWith(+ color: context.textTheme.labelLarge?.color+ ?.withValues(alpha: 0.7),+ ),+ ),+ ],+ ),+ ),+ Switch.adaptive(+ value: betaTimelineValue,+ onChanged: onSwitchChanged,+ activeColor: context.primaryColor,+ ),+ ],+ ),+ ),+ ),+ ),+ ),+ );+ },+ );+ }+}diff --git a/mobile/pubspec.yaml b/mobile/pubspec.yamlindex f8059d7e3c..bbffb9f51b 100644--- a/mobile/pubspec.yaml+++ b/mobile/pubspec.yaml@@ -139,7 +139,6 @@ flutter:- family: OverpassMonofonts:- asset: fonts/overpass/OverpassMono.ttf-flutter_launcher_icons:image_path_android: 'assets/immich-logo.png'adaptive_icon_background: '#ffffff'diff --git a/mobile/test/drift/main/generated/schema.dart b/mobile/test/drift/main/generated/schema.dartnew file mode 100644index 0000000000..b2b7404b5a--- /dev/null+++ b/mobile/test/drift/main/generated/schema.dart@@ -0,0 +1,23 @@+// dart format width=80+// GENERATED CODE, DO NOT EDIT BY HAND.+// ignore_for_file: type=lint+import 'package:drift/drift.dart';+import 'package:drift/internal/migrations.dart';+import 'schema_v1.dart' as v1;+import 'schema_v2.dart' as v2;++class GeneratedHelper implements SchemaInstantiationHelper {+ @override+ GeneratedDatabase databaseForVersion(QueryExecutor db, int version) {+ switch (version) {+ case 1:+ return v1.DatabaseAtV1(db);+ case 2:+ return v2.DatabaseAtV2(db);+ default:+ throw MissingSchemaException(version, versions);+ }+ }++ static const versions = const [1, 2];+}diff --git a/mobile/test/drift/main/generated/schema_v1.dart b/mobile/test/drift/main/generated/schema_v1.dartnew file mode 100644index 0000000000..0172201921--- /dev/null+++ b/mobile/test/drift/main/generated/schema_v1.dart@@ -0,0 +1,4638 @@+// dart format width=80+// GENERATED CODE, DO NOT EDIT BY HAND.+// ignore_for_file: type=lint+import 'package:drift/drift.dart';++class UserEntity extends Table with TableInfo<UserEntity, UserEntityData> {+ @override+ final GeneratedDatabase attachedDatabase;+ final String? _alias;+ UserEntity(this.attachedDatabase, [this._alias]);+ late final GeneratedColumn<String> id = GeneratedColumn<String>(+ 'id', aliasedName, false,+ type: DriftSqlType.string, requiredDuringInsert: true);+ late final GeneratedColumn<String> name = GeneratedColumn<String>(+ 'name', aliasedName, false,+ type: DriftSqlType.string, requiredDuringInsert: true);+ late final GeneratedColumn<bool> isAdmin = GeneratedColumn<bool>(+ 'is_admin', aliasedName, false,+ type: DriftSqlType.bool,+ requiredDuringInsert: false,+ defaultConstraints:+ GeneratedColumn.constraintIsAlways('CHECK ("is_admin" IN (0, 1))'),+ defaultValue: const CustomExpression('0'));+ late final GeneratedColumn<String> email = GeneratedColumn<String>(+ 'email', aliasedName, false,+ type: DriftSqlType.string, requiredDuringInsert: true);+ late final GeneratedColumn<String> profileImagePath = GeneratedColumn<String>(+ 'profile_image_path', aliasedName, true,+ type: DriftSqlType.string, requiredDuringInsert: false);+ late final GeneratedColumn<DateTime> updatedAt = GeneratedColumn<DateTime>(+ 'updated_at', aliasedName, false,+ type: DriftSqlType.dateTime,+ requiredDuringInsert: false,+ defaultValue: const CustomExpression('CURRENT_TIMESTAMP'));+ late final GeneratedColumn<int> quotaSizeInBytes = GeneratedColumn<int>(+ 'quota_size_in_bytes', aliasedName, true,+ type: DriftSqlType.int, requiredDuringInsert: false);+ late final GeneratedColumn<int> quotaUsageInBytes = GeneratedColumn<int>(+ 'quota_usage_in_bytes', aliasedName, false,+ type: DriftSqlType.int,+ requiredDuringInsert: false,+ defaultValue: const CustomExpression('0'));+ @override+ List<GeneratedColumn> get $columns => [+ id,+ name,+ isAdmin,+ email,+ profileImagePath,+ updatedAt,+ quotaSizeInBytes,+ quotaUsageInBytes+ ];+ @override+ String get aliasedName => _alias ?? actualTableName;+ @override+ String get actualTableName => $name;+ static const String $name = 'user_entity';+ @override+ Set<GeneratedColumn> get $primaryKey => {id};+ @override+ UserEntityData map(Map<String, dynamic> data, {String? tablePrefix}) {+ final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';+ return UserEntityData(+ id: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}id'])!,+ name: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}name'])!,+ isAdmin: attachedDatabase.typeMapping+ .read(DriftSqlType.bool, data['${effectivePrefix}is_admin'])!,+ email: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}email'])!,+ profileImagePath: attachedDatabase.typeMapping.read(+ DriftSqlType.string, data['${effectivePrefix}profile_image_path']),+ updatedAt: attachedDatabase.typeMapping+ .read(DriftSqlType.dateTime, data['${effectivePrefix}updated_at'])!,+ quotaSizeInBytes: attachedDatabase.typeMapping.read(+ DriftSqlType.int, data['${effectivePrefix}quota_size_in_bytes']),+ quotaUsageInBytes: attachedDatabase.typeMapping.read(+ DriftSqlType.int, data['${effectivePrefix}quota_usage_in_bytes'])!,+ );+ }++ @override+ UserEntity createAlias(String alias) {+ return UserEntity(attachedDatabase, alias);+ }++ @override+ bool get withoutRowId => true;+ @override+ bool get isStrict => true;+}++class UserEntityData extends DataClass implements Insertable<UserEntityData> {+ final String id;+ final String name;+ final bool isAdmin;+ final String email;+ final String? profileImagePath;+ final DateTime updatedAt;+ final int? quotaSizeInBytes;+ final int quotaUsageInBytes;+ const UserEntityData(+ {required this.id,+ required this.name,+ required this.isAdmin,+ required this.email,+ this.profileImagePath,+ required this.updatedAt,+ this.quotaSizeInBytes,+ required this.quotaUsageInBytes});+ @override+ Map<String, Expression> toColumns(bool nullToAbsent) {+ final map = <String, Expression>{};+ map['id'] = Variable<String>(id);+ map['name'] = Variable<String>(name);+ map['is_admin'] = Variable<bool>(isAdmin);+ map['email'] = Variable<String>(email);+ if (!nullToAbsent || profileImagePath != null) {+ map['profile_image_path'] = Variable<String>(profileImagePath);+ }+ map['updated_at'] = Variable<DateTime>(updatedAt);+ if (!nullToAbsent || quotaSizeInBytes != null) {+ map['quota_size_in_bytes'] = Variable<int>(quotaSizeInBytes);+ }+ map['quota_usage_in_bytes'] = Variable<int>(quotaUsageInBytes);+ return map;+ }++ factory UserEntityData.fromJson(Map<String, dynamic> json,+ {ValueSerializer? serializer}) {+ serializer ??= driftRuntimeOptions.defaultSerializer;+ return UserEntityData(+ id: serializer.fromJson<String>(json['id']),+ name: serializer.fromJson<String>(json['name']),+ isAdmin: serializer.fromJson<bool>(json['isAdmin']),+ email: serializer.fromJson<String>(json['email']),+ profileImagePath: serializer.fromJson<String?>(json['profileImagePath']),+ updatedAt: serializer.fromJson<DateTime>(json['updatedAt']),+ quotaSizeInBytes: serializer.fromJson<int?>(json['quotaSizeInBytes']),+ quotaUsageInBytes: serializer.fromJson<int>(json['quotaUsageInBytes']),+ );+ }+ @override+ Map<String, dynamic> toJson({ValueSerializer? serializer}) {+ serializer ??= driftRuntimeOptions.defaultSerializer;+ return <String, dynamic>{+ 'id': serializer.toJson<String>(id),+ 'name': serializer.toJson<String>(name),+ 'isAdmin': serializer.toJson<bool>(isAdmin),+ 'email': serializer.toJson<String>(email),+ 'profileImagePath': serializer.toJson<String?>(profileImagePath),+ 'updatedAt': serializer.toJson<DateTime>(updatedAt),+ 'quotaSizeInBytes': serializer.toJson<int?>(quotaSizeInBytes),+ 'quotaUsageInBytes': serializer.toJson<int>(quotaUsageInBytes),+ };+ }++ UserEntityData copyWith(+ {String? id,+ String? name,+ bool? isAdmin,+ String? email,+ Value<String?> profileImagePath = const Value.absent(),+ DateTime? updatedAt,+ Value<int?> quotaSizeInBytes = const Value.absent(),+ int? quotaUsageInBytes}) =>+ UserEntityData(+ id: id ?? this.id,+ name: name ?? this.name,+ isAdmin: isAdmin ?? this.isAdmin,+ email: email ?? this.email,+ profileImagePath: profileImagePath.present+ ? profileImagePath.value+ : this.profileImagePath,+ updatedAt: updatedAt ?? this.updatedAt,+ quotaSizeInBytes: quotaSizeInBytes.present+ ? quotaSizeInBytes.value+ : this.quotaSizeInBytes,+ quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes,+ );+ UserEntityData copyWithCompanion(UserEntityCompanion data) {+ return UserEntityData(+ id: data.id.present ? data.id.value : this.id,+ name: data.name.present ? data.name.value : this.name,+ isAdmin: data.isAdmin.present ? data.isAdmin.value : this.isAdmin,+ email: data.email.present ? data.email.value : this.email,+ profileImagePath: data.profileImagePath.present+ ? data.profileImagePath.value+ : this.profileImagePath,+ updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt,+ quotaSizeInBytes: data.quotaSizeInBytes.present+ ? data.quotaSizeInBytes.value+ : this.quotaSizeInBytes,+ quotaUsageInBytes: data.quotaUsageInBytes.present+ ? data.quotaUsageInBytes.value+ : this.quotaUsageInBytes,+ );+ }++ @override+ String toString() {+ return (StringBuffer('UserEntityData(')+ ..write('id: $id, ')+ ..write('name: $name, ')+ ..write('isAdmin: $isAdmin, ')+ ..write('email: $email, ')+ ..write('profileImagePath: $profileImagePath, ')+ ..write('updatedAt: $updatedAt, ')+ ..write('quotaSizeInBytes: $quotaSizeInBytes, ')+ ..write('quotaUsageInBytes: $quotaUsageInBytes')+ ..write(')'))+ .toString();+ }++ @override+ int get hashCode => Object.hash(id, name, isAdmin, email, profileImagePath,+ updatedAt, quotaSizeInBytes, quotaUsageInBytes);+ @override+ bool operator ==(Object other) =>+ identical(this, other) ||+ (other is UserEntityData &&+ other.id == this.id &&+ other.name == this.name &&+ other.isAdmin == this.isAdmin &&+ other.email == this.email &&+ other.profileImagePath == this.profileImagePath &&+ other.updatedAt == this.updatedAt &&+ other.quotaSizeInBytes == this.quotaSizeInBytes &&+ other.quotaUsageInBytes == this.quotaUsageInBytes);+}++class UserEntityCompanion extends UpdateCompanion<UserEntityData> {+ final Value<String> id;+ final Value<String> name;+ final Value<bool> isAdmin;+ final Value<String> email;+ final Value<String?> profileImagePath;+ final Value<DateTime> updatedAt;+ final Value<int?> quotaSizeInBytes;+ final Value<int> quotaUsageInBytes;+ const UserEntityCompanion({+ this.id = const Value.absent(),+ this.name = const Value.absent(),+ this.isAdmin = const Value.absent(),+ this.email = const Value.absent(),+ this.profileImagePath = const Value.absent(),+ this.updatedAt = const Value.absent(),+ this.quotaSizeInBytes = const Value.absent(),+ this.quotaUsageInBytes = const Value.absent(),+ });+ UserEntityCompanion.insert({+ required String id,+ required String name,+ this.isAdmin = const Value.absent(),+ required String email,+ this.profileImagePath = const Value.absent(),+ this.updatedAt = const Value.absent(),+ this.quotaSizeInBytes = const Value.absent(),+ this.quotaUsageInBytes = const Value.absent(),+ }) : id = Value(id),+ name = Value(name),+ email = Value(email);+ static Insertable<UserEntityData> custom({+ Expression<String>? id,+ Expression<String>? name,+ Expression<bool>? isAdmin,+ Expression<String>? email,+ Expression<String>? profileImagePath,+ Expression<DateTime>? updatedAt,+ Expression<int>? quotaSizeInBytes,+ Expression<int>? quotaUsageInBytes,+ }) {+ return RawValuesInsertable({+ if (id != null) 'id': id,+ if (name != null) 'name': name,+ if (isAdmin != null) 'is_admin': isAdmin,+ if (email != null) 'email': email,+ if (profileImagePath != null) 'profile_image_path': profileImagePath,+ if (updatedAt != null) 'updated_at': updatedAt,+ if (quotaSizeInBytes != null) 'quota_size_in_bytes': quotaSizeInBytes,+ if (quotaUsageInBytes != null) 'quota_usage_in_bytes': quotaUsageInBytes,+ });+ }++ UserEntityCompanion copyWith(+ {Value<String>? id,+ Value<String>? name,+ Value<bool>? isAdmin,+ Value<String>? email,+ Value<String?>? profileImagePath,+ Value<DateTime>? updatedAt,+ Value<int?>? quotaSizeInBytes,+ Value<int>? quotaUsageInBytes}) {+ return UserEntityCompanion(+ id: id ?? this.id,+ name: name ?? this.name,+ isAdmin: isAdmin ?? this.isAdmin,+ email: email ?? this.email,+ profileImagePath: profileImagePath ?? this.profileImagePath,+ updatedAt: updatedAt ?? this.updatedAt,+ quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes,+ quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes,+ );+ }++ @override+ Map<String, Expression> toColumns(bool nullToAbsent) {+ final map = <String, Expression>{};+ if (id.present) {+ map['id'] = Variable<String>(id.value);+ }+ if (name.present) {+ map['name'] = Variable<String>(name.value);+ }+ if (isAdmin.present) {+ map['is_admin'] = Variable<bool>(isAdmin.value);+ }+ if (email.present) {+ map['email'] = Variable<String>(email.value);+ }+ if (profileImagePath.present) {+ map['profile_image_path'] = Variable<String>(profileImagePath.value);+ }+ if (updatedAt.present) {+ map['updated_at'] = Variable<DateTime>(updatedAt.value);+ }+ if (quotaSizeInBytes.present) {+ map['quota_size_in_bytes'] = Variable<int>(quotaSizeInBytes.value);+ }+ if (quotaUsageInBytes.present) {+ map['quota_usage_in_bytes'] = Variable<int>(quotaUsageInBytes.value);+ }+ return map;+ }++ @override+ String toString() {+ return (StringBuffer('UserEntityCompanion(')+ ..write('id: $id, ')+ ..write('name: $name, ')+ ..write('isAdmin: $isAdmin, ')+ ..write('email: $email, ')+ ..write('profileImagePath: $profileImagePath, ')+ ..write('updatedAt: $updatedAt, ')+ ..write('quotaSizeInBytes: $quotaSizeInBytes, ')+ ..write('quotaUsageInBytes: $quotaUsageInBytes')+ ..write(')'))+ .toString();+ }+}++class RemoteAssetEntity extends Table+ with TableInfo<RemoteAssetEntity, RemoteAssetEntityData> {+ @override+ final GeneratedDatabase attachedDatabase;+ final String? _alias;+ RemoteAssetEntity(this.attachedDatabase, [this._alias]);+ late final GeneratedColumn<String> name = GeneratedColumn<String>(+ 'name', aliasedName, false,+ type: DriftSqlType.string, requiredDuringInsert: true);+ late final GeneratedColumn<int> type = GeneratedColumn<int>(+ 'type', aliasedName, false,+ type: DriftSqlType.int, requiredDuringInsert: true);+ late final GeneratedColumn<DateTime> createdAt = GeneratedColumn<DateTime>(+ 'created_at', aliasedName, false,+ type: DriftSqlType.dateTime,+ requiredDuringInsert: false,+ defaultValue: const CustomExpression('CURRENT_TIMESTAMP'));+ late final GeneratedColumn<DateTime> updatedAt = GeneratedColumn<DateTime>(+ 'updated_at', aliasedName, false,+ type: DriftSqlType.dateTime,+ requiredDuringInsert: false,+ defaultValue: const CustomExpression('CURRENT_TIMESTAMP'));+ late final GeneratedColumn<int> width = GeneratedColumn<int>(+ 'width', aliasedName, true,+ type: DriftSqlType.int, requiredDuringInsert: false);+ late final GeneratedColumn<int> height = GeneratedColumn<int>(+ 'height', aliasedName, true,+ type: DriftSqlType.int, requiredDuringInsert: false);+ late final GeneratedColumn<int> durationInSeconds = GeneratedColumn<int>(+ 'duration_in_seconds', aliasedName, true,+ type: DriftSqlType.int, requiredDuringInsert: false);+ late final GeneratedColumn<String> id = GeneratedColumn<String>(+ 'id', aliasedName, false,+ type: DriftSqlType.string, requiredDuringInsert: true);+ late final GeneratedColumn<String> checksum = GeneratedColumn<String>(+ 'checksum', aliasedName, false,+ type: DriftSqlType.string, requiredDuringInsert: true);+ late final GeneratedColumn<bool> isFavorite = GeneratedColumn<bool>(+ 'is_favorite', aliasedName, false,+ type: DriftSqlType.bool,+ requiredDuringInsert: false,+ defaultConstraints:+ GeneratedColumn.constraintIsAlways('CHECK ("is_favorite" IN (0, 1))'),+ defaultValue: const CustomExpression('0'));+ late final GeneratedColumn<String> ownerId = GeneratedColumn<String>(+ 'owner_id', aliasedName, false,+ type: DriftSqlType.string,+ requiredDuringInsert: true,+ defaultConstraints: GeneratedColumn.constraintIsAlways(+ 'REFERENCES user_entity (id) ON DELETE CASCADE'));+ late final GeneratedColumn<DateTime> localDateTime =+ GeneratedColumn<DateTime>('local_date_time', aliasedName, true,+ type: DriftSqlType.dateTime, requiredDuringInsert: false);+ late final GeneratedColumn<String> thumbHash = GeneratedColumn<String>(+ 'thumb_hash', aliasedName, true,+ type: DriftSqlType.string, requiredDuringInsert: false);+ late final GeneratedColumn<DateTime> deletedAt = GeneratedColumn<DateTime>(+ 'deleted_at', aliasedName, true,+ type: DriftSqlType.dateTime, requiredDuringInsert: false);+ late final GeneratedColumn<int> visibility = GeneratedColumn<int>(+ 'visibility', aliasedName, false,+ type: DriftSqlType.int, requiredDuringInsert: true);+ @override+ List<GeneratedColumn> get $columns => [+ name,+ type,+ createdAt,+ updatedAt,+ width,+ height,+ durationInSeconds,+ id,+ checksum,+ isFavorite,+ ownerId,+ localDateTime,+ thumbHash,+ deletedAt,+ visibility+ ];+ @override+ String get aliasedName => _alias ?? actualTableName;+ @override+ String get actualTableName => $name;+ static const String $name = 'remote_asset_entity';+ @override+ Set<GeneratedColumn> get $primaryKey => {id};+ @override+ RemoteAssetEntityData map(Map<String, dynamic> data, {String? tablePrefix}) {+ final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';+ return RemoteAssetEntityData(+ name: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}name'])!,+ type: attachedDatabase.typeMapping+ .read(DriftSqlType.int, data['${effectivePrefix}type'])!,+ createdAt: attachedDatabase.typeMapping+ .read(DriftSqlType.dateTime, data['${effectivePrefix}created_at'])!,+ updatedAt: attachedDatabase.typeMapping+ .read(DriftSqlType.dateTime, data['${effectivePrefix}updated_at'])!,+ width: attachedDatabase.typeMapping+ .read(DriftSqlType.int, data['${effectivePrefix}width']),+ height: attachedDatabase.typeMapping+ .read(DriftSqlType.int, data['${effectivePrefix}height']),+ durationInSeconds: attachedDatabase.typeMapping.read(+ DriftSqlType.int, data['${effectivePrefix}duration_in_seconds']),+ id: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}id'])!,+ checksum: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}checksum'])!,+ isFavorite: attachedDatabase.typeMapping+ .read(DriftSqlType.bool, data['${effectivePrefix}is_favorite'])!,+ ownerId: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}owner_id'])!,+ localDateTime: attachedDatabase.typeMapping.read(+ DriftSqlType.dateTime, data['${effectivePrefix}local_date_time']),+ thumbHash: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}thumb_hash']),+ deletedAt: attachedDatabase.typeMapping+ .read(DriftSqlType.dateTime, data['${effectivePrefix}deleted_at']),+ visibility: attachedDatabase.typeMapping+ .read(DriftSqlType.int, data['${effectivePrefix}visibility'])!,+ );+ }++ @override+ RemoteAssetEntity createAlias(String alias) {+ return RemoteAssetEntity(attachedDatabase, alias);+ }++ @override+ bool get withoutRowId => true;+ @override+ bool get isStrict => true;+}++class RemoteAssetEntityData extends DataClass+ implements Insertable<RemoteAssetEntityData> {+ final String name;+ final int type;+ final DateTime createdAt;+ final DateTime updatedAt;+ final int? width;+ final int? height;+ final int? durationInSeconds;+ final String id;+ final String checksum;+ final bool isFavorite;+ final String ownerId;+ final DateTime? localDateTime;+ final String? thumbHash;+ final DateTime? deletedAt;+ final int visibility;+ const RemoteAssetEntityData(+ {required this.name,+ required this.type,+ required this.createdAt,+ required this.updatedAt,+ this.width,+ this.height,+ this.durationInSeconds,+ required this.id,+ required this.checksum,+ required this.isFavorite,+ required this.ownerId,+ this.localDateTime,+ this.thumbHash,+ this.deletedAt,+ required this.visibility});+ @override+ Map<String, Expression> toColumns(bool nullToAbsent) {+ final map = <String, Expression>{};+ map['name'] = Variable<String>(name);+ map['type'] = Variable<int>(type);+ map['created_at'] = Variable<DateTime>(createdAt);+ map['updated_at'] = Variable<DateTime>(updatedAt);+ if (!nullToAbsent || width != null) {+ map['width'] = Variable<int>(width);+ }+ if (!nullToAbsent || height != null) {+ map['height'] = Variable<int>(height);+ }+ if (!nullToAbsent || durationInSeconds != null) {+ map['duration_in_seconds'] = Variable<int>(durationInSeconds);+ }+ map['id'] = Variable<String>(id);+ map['checksum'] = Variable<String>(checksum);+ map['is_favorite'] = Variable<bool>(isFavorite);+ map['owner_id'] = Variable<String>(ownerId);+ if (!nullToAbsent || localDateTime != null) {+ map['local_date_time'] = Variable<DateTime>(localDateTime);+ }+ if (!nullToAbsent || thumbHash != null) {+ map['thumb_hash'] = Variable<String>(thumbHash);+ }+ if (!nullToAbsent || deletedAt != null) {+ map['deleted_at'] = Variable<DateTime>(deletedAt);+ }+ map['visibility'] = Variable<int>(visibility);+ return map;+ }++ factory RemoteAssetEntityData.fromJson(Map<String, dynamic> json,+ {ValueSerializer? serializer}) {+ serializer ??= driftRuntimeOptions.defaultSerializer;+ return RemoteAssetEntityData(+ name: serializer.fromJson<String>(json['name']),+ type: serializer.fromJson<int>(json['type']),+ createdAt: serializer.fromJson<DateTime>(json['createdAt']),+ updatedAt: serializer.fromJson<DateTime>(json['updatedAt']),+ width: serializer.fromJson<int?>(json['width']),+ height: serializer.fromJson<int?>(json['height']),+ durationInSeconds: serializer.fromJson<int?>(json['durationInSeconds']),+ id: serializer.fromJson<String>(json['id']),+ checksum: serializer.fromJson<String>(json['checksum']),+ isFavorite: serializer.fromJson<bool>(json['isFavorite']),+ ownerId: serializer.fromJson<String>(json['ownerId']),+ localDateTime: serializer.fromJson<DateTime?>(json['localDateTime']),+ thumbHash: serializer.fromJson<String?>(json['thumbHash']),+ deletedAt: serializer.fromJson<DateTime?>(json['deletedAt']),+ visibility: serializer.fromJson<int>(json['visibility']),+ );+ }+ @override+ Map<String, dynamic> toJson({ValueSerializer? serializer}) {+ serializer ??= driftRuntimeOptions.defaultSerializer;+ return <String, dynamic>{+ 'name': serializer.toJson<String>(name),+ 'type': serializer.toJson<int>(type),+ 'createdAt': serializer.toJson<DateTime>(createdAt),+ 'updatedAt': serializer.toJson<DateTime>(updatedAt),+ 'width': serializer.toJson<int?>(width),+ 'height': serializer.toJson<int?>(height),+ 'durationInSeconds': serializer.toJson<int?>(durationInSeconds),+ 'id': serializer.toJson<String>(id),+ 'checksum': serializer.toJson<String>(checksum),+ 'isFavorite': serializer.toJson<bool>(isFavorite),+ 'ownerId': serializer.toJson<String>(ownerId),+ 'localDateTime': serializer.toJson<DateTime?>(localDateTime),+ 'thumbHash': serializer.toJson<String?>(thumbHash),+ 'deletedAt': serializer.toJson<DateTime?>(deletedAt),+ 'visibility': serializer.toJson<int>(visibility),+ };+ }++ RemoteAssetEntityData copyWith(+ {String? name,+ int? type,+ DateTime? createdAt,+ DateTime? updatedAt,+ Value<int?> width = const Value.absent(),+ Value<int?> height = const Value.absent(),+ Value<int?> durationInSeconds = const Value.absent(),+ String? id,+ String? checksum,+ bool? isFavorite,+ String? ownerId,+ Value<DateTime?> localDateTime = const Value.absent(),+ Value<String?> thumbHash = const Value.absent(),+ Value<DateTime?> deletedAt = const Value.absent(),+ int? visibility}) =>+ RemoteAssetEntityData(+ name: name ?? this.name,+ type: type ?? this.type,+ createdAt: createdAt ?? this.createdAt,+ updatedAt: updatedAt ?? this.updatedAt,+ width: width.present ? width.value : this.width,+ height: height.present ? height.value : this.height,+ durationInSeconds: durationInSeconds.present+ ? durationInSeconds.value+ : this.durationInSeconds,+ id: id ?? this.id,+ checksum: checksum ?? this.checksum,+ isFavorite: isFavorite ?? this.isFavorite,+ ownerId: ownerId ?? this.ownerId,+ localDateTime:+ localDateTime.present ? localDateTime.value : this.localDateTime,+ thumbHash: thumbHash.present ? thumbHash.value : this.thumbHash,+ deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt,+ visibility: visibility ?? this.visibility,+ );+ RemoteAssetEntityData copyWithCompanion(RemoteAssetEntityCompanion data) {+ return RemoteAssetEntityData(+ name: data.name.present ? data.name.value : this.name,+ type: data.type.present ? data.type.value : this.type,+ createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt,+ updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt,+ width: data.width.present ? data.width.value : this.width,+ height: data.height.present ? data.height.value : this.height,+ durationInSeconds: data.durationInSeconds.present+ ? data.durationInSeconds.value+ : this.durationInSeconds,+ id: data.id.present ? data.id.value : this.id,+ checksum: data.checksum.present ? data.checksum.value : this.checksum,+ isFavorite:+ data.isFavorite.present ? data.isFavorite.value : this.isFavorite,+ ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId,+ localDateTime: data.localDateTime.present+ ? data.localDateTime.value+ : this.localDateTime,+ thumbHash: data.thumbHash.present ? data.thumbHash.value : this.thumbHash,+ deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt,+ visibility:+ data.visibility.present ? data.visibility.value : this.visibility,+ );+ }++ @override+ String toString() {+ return (StringBuffer('RemoteAssetEntityData(')+ ..write('name: $name, ')+ ..write('type: $type, ')+ ..write('createdAt: $createdAt, ')+ ..write('updatedAt: $updatedAt, ')+ ..write('width: $width, ')+ ..write('height: $height, ')+ ..write('durationInSeconds: $durationInSeconds, ')+ ..write('id: $id, ')+ ..write('checksum: $checksum, ')+ ..write('isFavorite: $isFavorite, ')+ ..write('ownerId: $ownerId, ')+ ..write('localDateTime: $localDateTime, ')+ ..write('thumbHash: $thumbHash, ')+ ..write('deletedAt: $deletedAt, ')+ ..write('visibility: $visibility')+ ..write(')'))+ .toString();+ }++ @override+ int get hashCode => Object.hash(+ name,+ type,+ createdAt,+ updatedAt,+ width,+ height,+ durationInSeconds,+ id,+ checksum,+ isFavorite,+ ownerId,+ localDateTime,+ thumbHash,+ deletedAt,+ visibility);+ @override+ bool operator ==(Object other) =>+ identical(this, other) ||+ (other is RemoteAssetEntityData &&+ other.name == this.name &&+ other.type == this.type &&+ other.createdAt == this.createdAt &&+ other.updatedAt == this.updatedAt &&+ other.width == this.width &&+ other.height == this.height &&+ other.durationInSeconds == this.durationInSeconds &&+ other.id == this.id &&+ other.checksum == this.checksum &&+ other.isFavorite == this.isFavorite &&+ other.ownerId == this.ownerId &&+ other.localDateTime == this.localDateTime &&+ other.thumbHash == this.thumbHash &&+ other.deletedAt == this.deletedAt &&+ other.visibility == this.visibility);+}++class RemoteAssetEntityCompanion+ extends UpdateCompanion<RemoteAssetEntityData> {+ final Value<String> name;+ final Value<int> type;+ final Value<DateTime> createdAt;+ final Value<DateTime> updatedAt;+ final Value<int?> width;+ final Value<int?> height;+ final Value<int?> durationInSeconds;+ final Value<String> id;+ final Value<String> checksum;+ final Value<bool> isFavorite;+ final Value<String> ownerId;+ final Value<DateTime?> localDateTime;+ final Value<String?> thumbHash;+ final Value<DateTime?> deletedAt;+ final Value<int> visibility;+ const RemoteAssetEntityCompanion({+ this.name = const Value.absent(),+ this.type = const Value.absent(),+ this.createdAt = const Value.absent(),+ this.updatedAt = const Value.absent(),+ this.width = const Value.absent(),+ this.height = const Value.absent(),+ this.durationInSeconds = const Value.absent(),+ this.id = const Value.absent(),+ this.checksum = const Value.absent(),+ this.isFavorite = const Value.absent(),+ this.ownerId = const Value.absent(),+ this.localDateTime = const Value.absent(),+ this.thumbHash = const Value.absent(),+ this.deletedAt = const Value.absent(),+ this.visibility = const Value.absent(),+ });+ RemoteAssetEntityCompanion.insert({+ required String name,+ required int type,+ this.createdAt = const Value.absent(),+ this.updatedAt = const Value.absent(),+ this.width = const Value.absent(),+ this.height = const Value.absent(),+ this.durationInSeconds = const Value.absent(),+ required String id,+ required String checksum,+ this.isFavorite = const Value.absent(),+ required String ownerId,+ this.localDateTime = const Value.absent(),+ this.thumbHash = const Value.absent(),+ this.deletedAt = const Value.absent(),+ required int visibility,+ }) : name = Value(name),+ type = Value(type),+ id = Value(id),+ checksum = Value(checksum),+ ownerId = Value(ownerId),+ visibility = Value(visibility);+ static Insertable<RemoteAssetEntityData> custom({+ Expression<String>? name,+ Expression<int>? type,+ Expression<DateTime>? createdAt,+ Expression<DateTime>? updatedAt,+ Expression<int>? width,+ Expression<int>? height,+ Expression<int>? durationInSeconds,+ Expression<String>? id,+ Expression<String>? checksum,+ Expression<bool>? isFavorite,+ Expression<String>? ownerId,+ Expression<DateTime>? localDateTime,+ Expression<String>? thumbHash,+ Expression<DateTime>? deletedAt,+ Expression<int>? visibility,+ }) {+ return RawValuesInsertable({+ if (name != null) 'name': name,+ if (type != null) 'type': type,+ if (createdAt != null) 'created_at': createdAt,+ if (updatedAt != null) 'updated_at': updatedAt,+ if (width != null) 'width': width,+ if (height != null) 'height': height,+ if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds,+ if (id != null) 'id': id,+ if (checksum != null) 'checksum': checksum,+ if (isFavorite != null) 'is_favorite': isFavorite,+ if (ownerId != null) 'owner_id': ownerId,+ if (localDateTime != null) 'local_date_time': localDateTime,+ if (thumbHash != null) 'thumb_hash': thumbHash,+ if (deletedAt != null) 'deleted_at': deletedAt,+ if (visibility != null) 'visibility': visibility,+ });+ }++ RemoteAssetEntityCompanion copyWith(+ {Value<String>? name,+ Value<int>? type,+ Value<DateTime>? createdAt,+ Value<DateTime>? updatedAt,+ Value<int?>? width,+ Value<int?>? height,+ Value<int?>? durationInSeconds,+ Value<String>? id,+ Value<String>? checksum,+ Value<bool>? isFavorite,+ Value<String>? ownerId,+ Value<DateTime?>? localDateTime,+ Value<String?>? thumbHash,+ Value<DateTime?>? deletedAt,+ Value<int>? visibility}) {+ return RemoteAssetEntityCompanion(+ name: name ?? this.name,+ type: type ?? this.type,+ createdAt: createdAt ?? this.createdAt,+ updatedAt: updatedAt ?? this.updatedAt,+ width: width ?? this.width,+ height: height ?? this.height,+ durationInSeconds: durationInSeconds ?? this.durationInSeconds,+ id: id ?? this.id,+ checksum: checksum ?? this.checksum,+ isFavorite: isFavorite ?? this.isFavorite,+ ownerId: ownerId ?? this.ownerId,+ localDateTime: localDateTime ?? this.localDateTime,+ thumbHash: thumbHash ?? this.thumbHash,+ deletedAt: deletedAt ?? this.deletedAt,+ visibility: visibility ?? this.visibility,+ );+ }++ @override+ Map<String, Expression> toColumns(bool nullToAbsent) {+ final map = <String, Expression>{};+ if (name.present) {+ map['name'] = Variable<String>(name.value);+ }+ if (type.present) {+ map['type'] = Variable<int>(type.value);+ }+ if (createdAt.present) {+ map['created_at'] = Variable<DateTime>(createdAt.value);+ }+ if (updatedAt.present) {+ map['updated_at'] = Variable<DateTime>(updatedAt.value);+ }+ if (width.present) {+ map['width'] = Variable<int>(width.value);+ }+ if (height.present) {+ map['height'] = Variable<int>(height.value);+ }+ if (durationInSeconds.present) {+ map['duration_in_seconds'] = Variable<int>(durationInSeconds.value);+ }+ if (id.present) {+ map['id'] = Variable<String>(id.value);+ }+ if (checksum.present) {+ map['checksum'] = Variable<String>(checksum.value);+ }+ if (isFavorite.present) {+ map['is_favorite'] = Variable<bool>(isFavorite.value);+ }+ if (ownerId.present) {+ map['owner_id'] = Variable<String>(ownerId.value);+ }+ if (localDateTime.present) {+ map['local_date_time'] = Variable<DateTime>(localDateTime.value);+ }+ if (thumbHash.present) {+ map['thumb_hash'] = Variable<String>(thumbHash.value);+ }+ if (deletedAt.present) {+ map['deleted_at'] = Variable<DateTime>(deletedAt.value);+ }+ if (visibility.present) {+ map['visibility'] = Variable<int>(visibility.value);+ }+ return map;+ }++ @override+ String toString() {+ return (StringBuffer('RemoteAssetEntityCompanion(')+ ..write('name: $name, ')+ ..write('type: $type, ')+ ..write('createdAt: $createdAt, ')+ ..write('updatedAt: $updatedAt, ')+ ..write('width: $width, ')+ ..write('height: $height, ')+ ..write('durationInSeconds: $durationInSeconds, ')+ ..write('id: $id, ')+ ..write('checksum: $checksum, ')+ ..write('isFavorite: $isFavorite, ')+ ..write('ownerId: $ownerId, ')+ ..write('localDateTime: $localDateTime, ')+ ..write('thumbHash: $thumbHash, ')+ ..write('deletedAt: $deletedAt, ')+ ..write('visibility: $visibility')+ ..write(')'))+ .toString();+ }+}++class LocalAssetEntity extends Table+ with TableInfo<LocalAssetEntity, LocalAssetEntityData> {+ @override+ final GeneratedDatabase attachedDatabase;+ final String? _alias;+ LocalAssetEntity(this.attachedDatabase, [this._alias]);+ late final GeneratedColumn<String> name = GeneratedColumn<String>(+ 'name', aliasedName, false,+ type: DriftSqlType.string, requiredDuringInsert: true);+ late final GeneratedColumn<int> type = GeneratedColumn<int>(+ 'type', aliasedName, false,+ type: DriftSqlType.int, requiredDuringInsert: true);+ late final GeneratedColumn<DateTime> createdAt = GeneratedColumn<DateTime>(+ 'created_at', aliasedName, false,+ type: DriftSqlType.dateTime,+ requiredDuringInsert: false,+ defaultValue: const CustomExpression('CURRENT_TIMESTAMP'));+ late final GeneratedColumn<DateTime> updatedAt = GeneratedColumn<DateTime>(+ 'updated_at', aliasedName, false,+ type: DriftSqlType.dateTime,+ requiredDuringInsert: false,+ defaultValue: const CustomExpression('CURRENT_TIMESTAMP'));+ late final GeneratedColumn<int> width = GeneratedColumn<int>(+ 'width', aliasedName, true,+ type: DriftSqlType.int, requiredDuringInsert: false);+ late final GeneratedColumn<int> height = GeneratedColumn<int>(+ 'height', aliasedName, true,+ type: DriftSqlType.int, requiredDuringInsert: false);+ late final GeneratedColumn<int> durationInSeconds = GeneratedColumn<int>(+ 'duration_in_seconds', aliasedName, true,+ type: DriftSqlType.int, requiredDuringInsert: false);+ late final GeneratedColumn<String> id = GeneratedColumn<String>(+ 'id', aliasedName, false,+ type: DriftSqlType.string, requiredDuringInsert: true);+ late final GeneratedColumn<String> checksum = GeneratedColumn<String>(+ 'checksum', aliasedName, true,+ type: DriftSqlType.string, requiredDuringInsert: false);+ late final GeneratedColumn<bool> isFavorite = GeneratedColumn<bool>(+ 'is_favorite', aliasedName, false,+ type: DriftSqlType.bool,+ requiredDuringInsert: false,+ defaultConstraints:+ GeneratedColumn.constraintIsAlways('CHECK ("is_favorite" IN (0, 1))'),+ defaultValue: const CustomExpression('0'));+ late final GeneratedColumn<int> orientation = GeneratedColumn<int>(+ 'orientation', aliasedName, false,+ type: DriftSqlType.int,+ requiredDuringInsert: false,+ defaultValue: const CustomExpression('0'));+ @override+ List<GeneratedColumn> get $columns => [+ name,+ type,+ createdAt,+ updatedAt,+ width,+ height,+ durationInSeconds,+ id,+ checksum,+ isFavorite,+ orientation+ ];+ @override+ String get aliasedName => _alias ?? actualTableName;+ @override+ String get actualTableName => $name;+ static const String $name = 'local_asset_entity';+ @override+ Set<GeneratedColumn> get $primaryKey => {id};+ @override+ LocalAssetEntityData map(Map<String, dynamic> data, {String? tablePrefix}) {+ final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';+ return LocalAssetEntityData(+ name: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}name'])!,+ type: attachedDatabase.typeMapping+ .read(DriftSqlType.int, data['${effectivePrefix}type'])!,+ createdAt: attachedDatabase.typeMapping+ .read(DriftSqlType.dateTime, data['${effectivePrefix}created_at'])!,+ updatedAt: attachedDatabase.typeMapping+ .read(DriftSqlType.dateTime, data['${effectivePrefix}updated_at'])!,+ width: attachedDatabase.typeMapping+ .read(DriftSqlType.int, data['${effectivePrefix}width']),+ height: attachedDatabase.typeMapping+ .read(DriftSqlType.int, data['${effectivePrefix}height']),+ durationInSeconds: attachedDatabase.typeMapping.read(+ DriftSqlType.int, data['${effectivePrefix}duration_in_seconds']),+ id: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}id'])!,+ checksum: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}checksum']),+ isFavorite: attachedDatabase.typeMapping+ .read(DriftSqlType.bool, data['${effectivePrefix}is_favorite'])!,+ orientation: attachedDatabase.typeMapping+ .read(DriftSqlType.int, data['${effectivePrefix}orientation'])!,+ );+ }++ @override+ LocalAssetEntity createAlias(String alias) {+ return LocalAssetEntity(attachedDatabase, alias);+ }++ @override+ bool get withoutRowId => true;+ @override+ bool get isStrict => true;+}++class LocalAssetEntityData extends DataClass+ implements Insertable<LocalAssetEntityData> {+ final String name;+ final int type;+ final DateTime createdAt;+ final DateTime updatedAt;+ final int? width;+ final int? height;+ final int? durationInSeconds;+ final String id;+ final String? checksum;+ final bool isFavorite;+ final int orientation;+ const LocalAssetEntityData(+ {required this.name,+ required this.type,+ required this.createdAt,+ required this.updatedAt,+ this.width,+ this.height,+ this.durationInSeconds,+ required this.id,+ this.checksum,+ required this.isFavorite,+ required this.orientation});+ @override+ Map<String, Expression> toColumns(bool nullToAbsent) {+ final map = <String, Expression>{};+ map['name'] = Variable<String>(name);+ map['type'] = Variable<int>(type);+ map['created_at'] = Variable<DateTime>(createdAt);+ map['updated_at'] = Variable<DateTime>(updatedAt);+ if (!nullToAbsent || width != null) {+ map['width'] = Variable<int>(width);+ }+ if (!nullToAbsent || height != null) {+ map['height'] = Variable<int>(height);+ }+ if (!nullToAbsent || durationInSeconds != null) {+ map['duration_in_seconds'] = Variable<int>(durationInSeconds);+ }+ map['id'] = Variable<String>(id);+ if (!nullToAbsent || checksum != null) {+ map['checksum'] = Variable<String>(checksum);+ }+ map['is_favorite'] = Variable<bool>(isFavorite);+ map['orientation'] = Variable<int>(orientation);+ return map;+ }++ factory LocalAssetEntityData.fromJson(Map<String, dynamic> json,+ {ValueSerializer? serializer}) {+ serializer ??= driftRuntimeOptions.defaultSerializer;+ return LocalAssetEntityData(+ name: serializer.fromJson<String>(json['name']),+ type: serializer.fromJson<int>(json['type']),+ createdAt: serializer.fromJson<DateTime>(json['createdAt']),+ updatedAt: serializer.fromJson<DateTime>(json['updatedAt']),+ width: serializer.fromJson<int?>(json['width']),+ height: serializer.fromJson<int?>(json['height']),+ durationInSeconds: serializer.fromJson<int?>(json['durationInSeconds']),+ id: serializer.fromJson<String>(json['id']),+ checksum: serializer.fromJson<String?>(json['checksum']),+ isFavorite: serializer.fromJson<bool>(json['isFavorite']),+ orientation: serializer.fromJson<int>(json['orientation']),+ );+ }+ @override+ Map<String, dynamic> toJson({ValueSerializer? serializer}) {+ serializer ??= driftRuntimeOptions.defaultSerializer;+ return <String, dynamic>{+ 'name': serializer.toJson<String>(name),+ 'type': serializer.toJson<int>(type),+ 'createdAt': serializer.toJson<DateTime>(createdAt),+ 'updatedAt': serializer.toJson<DateTime>(updatedAt),+ 'width': serializer.toJson<int?>(width),+ 'height': serializer.toJson<int?>(height),+ 'durationInSeconds': serializer.toJson<int?>(durationInSeconds),+ 'id': serializer.toJson<String>(id),+ 'checksum': serializer.toJson<String?>(checksum),+ 'isFavorite': serializer.toJson<bool>(isFavorite),+ 'orientation': serializer.toJson<int>(orientation),+ };+ }++ LocalAssetEntityData copyWith(+ {String? name,+ int? type,+ DateTime? createdAt,+ DateTime? updatedAt,+ Value<int?> width = const Value.absent(),+ Value<int?> height = const Value.absent(),+ Value<int?> durationInSeconds = const Value.absent(),+ String? id,+ Value<String?> checksum = const Value.absent(),+ bool? isFavorite,+ int? orientation}) =>+ LocalAssetEntityData(+ name: name ?? this.name,+ type: type ?? this.type,+ createdAt: createdAt ?? this.createdAt,+ updatedAt: updatedAt ?? this.updatedAt,+ width: width.present ? width.value : this.width,+ height: height.present ? height.value : this.height,+ durationInSeconds: durationInSeconds.present+ ? durationInSeconds.value+ : this.durationInSeconds,+ id: id ?? this.id,+ checksum: checksum.present ? checksum.value : this.checksum,+ isFavorite: isFavorite ?? this.isFavorite,+ orientation: orientation ?? this.orientation,+ );+ LocalAssetEntityData copyWithCompanion(LocalAssetEntityCompanion data) {+ return LocalAssetEntityData(+ name: data.name.present ? data.name.value : this.name,+ type: data.type.present ? data.type.value : this.type,+ createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt,+ updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt,+ width: data.width.present ? data.width.value : this.width,+ height: data.height.present ? data.height.value : this.height,+ durationInSeconds: data.durationInSeconds.present+ ? data.durationInSeconds.value+ : this.durationInSeconds,+ id: data.id.present ? data.id.value : this.id,+ checksum: data.checksum.present ? data.checksum.value : this.checksum,+ isFavorite:+ data.isFavorite.present ? data.isFavorite.value : this.isFavorite,+ orientation:+ data.orientation.present ? data.orientation.value : this.orientation,+ );+ }++ @override+ String toString() {+ return (StringBuffer('LocalAssetEntityData(')+ ..write('name: $name, ')+ ..write('type: $type, ')+ ..write('createdAt: $createdAt, ')+ ..write('updatedAt: $updatedAt, ')+ ..write('width: $width, ')+ ..write('height: $height, ')+ ..write('durationInSeconds: $durationInSeconds, ')+ ..write('id: $id, ')+ ..write('checksum: $checksum, ')+ ..write('isFavorite: $isFavorite, ')+ ..write('orientation: $orientation')+ ..write(')'))+ .toString();+ }++ @override+ int get hashCode => Object.hash(name, type, createdAt, updatedAt, width,+ height, durationInSeconds, id, checksum, isFavorite, orientation);+ @override+ bool operator ==(Object other) =>+ identical(this, other) ||+ (other is LocalAssetEntityData &&+ other.name == this.name &&+ other.type == this.type &&+ other.createdAt == this.createdAt &&+ other.updatedAt == this.updatedAt &&+ other.width == this.width &&+ other.height == this.height &&+ other.durationInSeconds == this.durationInSeconds &&+ other.id == this.id &&+ other.checksum == this.checksum &&+ other.isFavorite == this.isFavorite &&+ other.orientation == this.orientation);+}++class LocalAssetEntityCompanion extends UpdateCompanion<LocalAssetEntityData> {+ final Value<String> name;+ final Value<int> type;+ final Value<DateTime> createdAt;+ final Value<DateTime> updatedAt;+ final Value<int?> width;+ final Value<int?> height;+ final Value<int?> durationInSeconds;+ final Value<String> id;+ final Value<String?> checksum;+ final Value<bool> isFavorite;+ final Value<int> orientation;+ const LocalAssetEntityCompanion({+ this.name = const Value.absent(),+ this.type = const Value.absent(),+ this.createdAt = const Value.absent(),+ this.updatedAt = const Value.absent(),+ this.width = const Value.absent(),+ this.height = const Value.absent(),+ this.durationInSeconds = const Value.absent(),+ this.id = const Value.absent(),+ this.checksum = const Value.absent(),+ this.isFavorite = const Value.absent(),+ this.orientation = const Value.absent(),+ });+ LocalAssetEntityCompanion.insert({+ required String name,+ required int type,+ this.createdAt = const Value.absent(),+ this.updatedAt = const Value.absent(),+ this.width = const Value.absent(),+ this.height = const Value.absent(),+ this.durationInSeconds = const Value.absent(),+ required String id,+ this.checksum = const Value.absent(),+ this.isFavorite = const Value.absent(),+ this.orientation = const Value.absent(),+ }) : name = Value(name),+ type = Value(type),+ id = Value(id);+ static Insertable<LocalAssetEntityData> custom({+ Expression<String>? name,+ Expression<int>? type,+ Expression<DateTime>? createdAt,+ Expression<DateTime>? updatedAt,+ Expression<int>? width,+ Expression<int>? height,+ Expression<int>? durationInSeconds,+ Expression<String>? id,+ Expression<String>? checksum,+ Expression<bool>? isFavorite,+ Expression<int>? orientation,+ }) {+ return RawValuesInsertable({+ if (name != null) 'name': name,+ if (type != null) 'type': type,+ if (createdAt != null) 'created_at': createdAt,+ if (updatedAt != null) 'updated_at': updatedAt,+ if (width != null) 'width': width,+ if (height != null) 'height': height,+ if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds,+ if (id != null) 'id': id,+ if (checksum != null) 'checksum': checksum,+ if (isFavorite != null) 'is_favorite': isFavorite,+ if (orientation != null) 'orientation': orientation,+ });+ }++ LocalAssetEntityCompanion copyWith(+ {Value<String>? name,+ Value<int>? type,+ Value<DateTime>? createdAt,+ Value<DateTime>? updatedAt,+ Value<int?>? width,+ Value<int?>? height,+ Value<int?>? durationInSeconds,+ Value<String>? id,+ Value<String?>? checksum,+ Value<bool>? isFavorite,+ Value<int>? orientation}) {+ return LocalAssetEntityCompanion(+ name: name ?? this.name,+ type: type ?? this.type,+ createdAt: createdAt ?? this.createdAt,+ updatedAt: updatedAt ?? this.updatedAt,+ width: width ?? this.width,+ height: height ?? this.height,+ durationInSeconds: durationInSeconds ?? this.durationInSeconds,+ id: id ?? this.id,+ checksum: checksum ?? this.checksum,+ isFavorite: isFavorite ?? this.isFavorite,+ orientation: orientation ?? this.orientation,+ );+ }++ @override+ Map<String, Expression> toColumns(bool nullToAbsent) {+ final map = <String, Expression>{};+ if (name.present) {+ map['name'] = Variable<String>(name.value);+ }+ if (type.present) {+ map['type'] = Variable<int>(type.value);+ }+ if (createdAt.present) {+ map['created_at'] = Variable<DateTime>(createdAt.value);+ }+ if (updatedAt.present) {+ map['updated_at'] = Variable<DateTime>(updatedAt.value);+ }+ if (width.present) {+ map['width'] = Variable<int>(width.value);+ }+ if (height.present) {+ map['height'] = Variable<int>(height.value);+ }+ if (durationInSeconds.present) {+ map['duration_in_seconds'] = Variable<int>(durationInSeconds.value);+ }+ if (id.present) {+ map['id'] = Variable<String>(id.value);+ }+ if (checksum.present) {+ map['checksum'] = Variable<String>(checksum.value);+ }+ if (isFavorite.present) {+ map['is_favorite'] = Variable<bool>(isFavorite.value);+ }+ if (orientation.present) {+ map['orientation'] = Variable<int>(orientation.value);+ }+ return map;+ }++ @override+ String toString() {+ return (StringBuffer('LocalAssetEntityCompanion(')+ ..write('name: $name, ')+ ..write('type: $type, ')+ ..write('createdAt: $createdAt, ')+ ..write('updatedAt: $updatedAt, ')+ ..write('width: $width, ')+ ..write('height: $height, ')+ ..write('durationInSeconds: $durationInSeconds, ')+ ..write('id: $id, ')+ ..write('checksum: $checksum, ')+ ..write('isFavorite: $isFavorite, ')+ ..write('orientation: $orientation')+ ..write(')'))+ .toString();+ }+}++class UserMetadataEntity extends Table+ with TableInfo<UserMetadataEntity, UserMetadataEntityData> {+ @override+ final GeneratedDatabase attachedDatabase;+ final String? _alias;+ UserMetadataEntity(this.attachedDatabase, [this._alias]);+ late final GeneratedColumn<String> userId = GeneratedColumn<String>(+ 'user_id', aliasedName, false,+ type: DriftSqlType.string,+ requiredDuringInsert: true,+ defaultConstraints: GeneratedColumn.constraintIsAlways(+ 'REFERENCES user_entity (id) ON DELETE CASCADE'));+ late final GeneratedColumn<int> key = GeneratedColumn<int>(+ 'key', aliasedName, false,+ type: DriftSqlType.int, requiredDuringInsert: true);+ late final GeneratedColumn<Uint8List> value = GeneratedColumn<Uint8List>(+ 'value', aliasedName, false,+ type: DriftSqlType.blob, requiredDuringInsert: true);+ @override+ List<GeneratedColumn> get $columns => [userId, key, value];+ @override+ String get aliasedName => _alias ?? actualTableName;+ @override+ String get actualTableName => $name;+ static const String $name = 'user_metadata_entity';+ @override+ Set<GeneratedColumn> get $primaryKey => {userId, key};+ @override+ UserMetadataEntityData map(Map<String, dynamic> data, {String? tablePrefix}) {+ final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';+ return UserMetadataEntityData(+ userId: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}user_id'])!,+ key: attachedDatabase.typeMapping+ .read(DriftSqlType.int, data['${effectivePrefix}key'])!,+ value: attachedDatabase.typeMapping+ .read(DriftSqlType.blob, data['${effectivePrefix}value'])!,+ );+ }++ @override+ UserMetadataEntity createAlias(String alias) {+ return UserMetadataEntity(attachedDatabase, alias);+ }++ @override+ bool get withoutRowId => true;+ @override+ bool get isStrict => true;+}++class UserMetadataEntityData extends DataClass+ implements Insertable<UserMetadataEntityData> {+ final String userId;+ final int key;+ final Uint8List value;+ const UserMetadataEntityData(+ {required this.userId, required this.key, required this.value});+ @override+ Map<String, Expression> toColumns(bool nullToAbsent) {+ final map = <String, Expression>{};+ map['user_id'] = Variable<String>(userId);+ map['key'] = Variable<int>(key);+ map['value'] = Variable<Uint8List>(value);+ return map;+ }++ factory UserMetadataEntityData.fromJson(Map<String, dynamic> json,+ {ValueSerializer? serializer}) {+ serializer ??= driftRuntimeOptions.defaultSerializer;+ return UserMetadataEntityData(+ userId: serializer.fromJson<String>(json['userId']),+ key: serializer.fromJson<int>(json['key']),+ value: serializer.fromJson<Uint8List>(json['value']),+ );+ }+ @override+ Map<String, dynamic> toJson({ValueSerializer? serializer}) {+ serializer ??= driftRuntimeOptions.defaultSerializer;+ return <String, dynamic>{+ 'userId': serializer.toJson<String>(userId),+ 'key': serializer.toJson<int>(key),+ 'value': serializer.toJson<Uint8List>(value),+ };+ }++ UserMetadataEntityData copyWith(+ {String? userId, int? key, Uint8List? value}) =>+ UserMetadataEntityData(+ userId: userId ?? this.userId,+ key: key ?? this.key,+ value: value ?? this.value,+ );+ UserMetadataEntityData copyWithCompanion(UserMetadataEntityCompanion data) {+ return UserMetadataEntityData(+ userId: data.userId.present ? data.userId.value : this.userId,+ key: data.key.present ? data.key.value : this.key,+ value: data.value.present ? data.value.value : this.value,+ );+ }++ @override+ String toString() {+ return (StringBuffer('UserMetadataEntityData(')+ ..write('userId: $userId, ')+ ..write('key: $key, ')+ ..write('value: $value')+ ..write(')'))+ .toString();+ }++ @override+ int get hashCode => Object.hash(userId, key, $driftBlobEquality.hash(value));+ @override+ bool operator ==(Object other) =>+ identical(this, other) ||+ (other is UserMetadataEntityData &&+ other.userId == this.userId &&+ other.key == this.key &&+ $driftBlobEquality.equals(other.value, this.value));+}++class UserMetadataEntityCompanion+ extends UpdateCompanion<UserMetadataEntityData> {+ final Value<String> userId;+ final Value<int> key;+ final Value<Uint8List> value;+ const UserMetadataEntityCompanion({+ this.userId = const Value.absent(),+ this.key = const Value.absent(),+ this.value = const Value.absent(),+ });+ UserMetadataEntityCompanion.insert({+ required String userId,+ required int key,+ required Uint8List value,+ }) : userId = Value(userId),+ key = Value(key),+ value = Value(value);+ static Insertable<UserMetadataEntityData> custom({+ Expression<String>? userId,+ Expression<int>? key,+ Expression<Uint8List>? value,+ }) {+ return RawValuesInsertable({+ if (userId != null) 'user_id': userId,+ if (key != null) 'key': key,+ if (value != null) 'value': value,+ });+ }++ UserMetadataEntityCompanion copyWith(+ {Value<String>? userId, Value<int>? key, Value<Uint8List>? value}) {+ return UserMetadataEntityCompanion(+ userId: userId ?? this.userId,+ key: key ?? this.key,+ value: value ?? this.value,+ );+ }++ @override+ Map<String, Expression> toColumns(bool nullToAbsent) {+ final map = <String, Expression>{};+ if (userId.present) {+ map['user_id'] = Variable<String>(userId.value);+ }+ if (key.present) {+ map['key'] = Variable<int>(key.value);+ }+ if (value.present) {+ map['value'] = Variable<Uint8List>(value.value);+ }+ return map;+ }++ @override+ String toString() {+ return (StringBuffer('UserMetadataEntityCompanion(')+ ..write('userId: $userId, ')+ ..write('key: $key, ')+ ..write('value: $value')+ ..write(')'))+ .toString();+ }+}++class PartnerEntity extends Table+ with TableInfo<PartnerEntity, PartnerEntityData> {+ @override+ final GeneratedDatabase attachedDatabase;+ final String? _alias;+ PartnerEntity(this.attachedDatabase, [this._alias]);+ late final GeneratedColumn<String> sharedById = GeneratedColumn<String>(+ 'shared_by_id', aliasedName, false,+ type: DriftSqlType.string,+ requiredDuringInsert: true,+ defaultConstraints: GeneratedColumn.constraintIsAlways(+ 'REFERENCES user_entity (id) ON DELETE CASCADE'));+ late final GeneratedColumn<String> sharedWithId = GeneratedColumn<String>(+ 'shared_with_id', aliasedName, false,+ type: DriftSqlType.string,+ requiredDuringInsert: true,+ defaultConstraints: GeneratedColumn.constraintIsAlways(+ 'REFERENCES user_entity (id) ON DELETE CASCADE'));+ late final GeneratedColumn<bool> inTimeline = GeneratedColumn<bool>(+ 'in_timeline', aliasedName, false,+ type: DriftSqlType.bool,+ requiredDuringInsert: false,+ defaultConstraints:+ GeneratedColumn.constraintIsAlways('CHECK ("in_timeline" IN (0, 1))'),+ defaultValue: const CustomExpression('0'));+ @override+ List<GeneratedColumn> get $columns => [sharedById, sharedWithId, inTimeline];+ @override+ String get aliasedName => _alias ?? actualTableName;+ @override+ String get actualTableName => $name;+ static const String $name = 'partner_entity';+ @override+ Set<GeneratedColumn> get $primaryKey => {sharedById, sharedWithId};+ @override+ PartnerEntityData map(Map<String, dynamic> data, {String? tablePrefix}) {+ final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';+ return PartnerEntityData(+ sharedById: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}shared_by_id'])!,+ sharedWithId: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}shared_with_id'])!,+ inTimeline: attachedDatabase.typeMapping+ .read(DriftSqlType.bool, data['${effectivePrefix}in_timeline'])!,+ );+ }++ @override+ PartnerEntity createAlias(String alias) {+ return PartnerEntity(attachedDatabase, alias);+ }++ @override+ bool get withoutRowId => true;+ @override+ bool get isStrict => true;+}++class PartnerEntityData extends DataClass+ implements Insertable<PartnerEntityData> {+ final String sharedById;+ final String sharedWithId;+ final bool inTimeline;+ const PartnerEntityData(+ {required this.sharedById,+ required this.sharedWithId,+ required this.inTimeline});+ @override+ Map<String, Expression> toColumns(bool nullToAbsent) {+ final map = <String, Expression>{};+ map['shared_by_id'] = Variable<String>(sharedById);+ map['shared_with_id'] = Variable<String>(sharedWithId);+ map['in_timeline'] = Variable<bool>(inTimeline);+ return map;+ }++ factory PartnerEntityData.fromJson(Map<String, dynamic> json,+ {ValueSerializer? serializer}) {+ serializer ??= driftRuntimeOptions.defaultSerializer;+ return PartnerEntityData(+ sharedById: serializer.fromJson<String>(json['sharedById']),+ sharedWithId: serializer.fromJson<String>(json['sharedWithId']),+ inTimeline: serializer.fromJson<bool>(json['inTimeline']),+ );+ }+ @override+ Map<String, dynamic> toJson({ValueSerializer? serializer}) {+ serializer ??= driftRuntimeOptions.defaultSerializer;+ return <String, dynamic>{+ 'sharedById': serializer.toJson<String>(sharedById),+ 'sharedWithId': serializer.toJson<String>(sharedWithId),+ 'inTimeline': serializer.toJson<bool>(inTimeline),+ };+ }++ PartnerEntityData copyWith(+ {String? sharedById, String? sharedWithId, bool? inTimeline}) =>+ PartnerEntityData(+ sharedById: sharedById ?? this.sharedById,+ sharedWithId: sharedWithId ?? this.sharedWithId,+ inTimeline: inTimeline ?? this.inTimeline,+ );+ PartnerEntityData copyWithCompanion(PartnerEntityCompanion data) {+ return PartnerEntityData(+ sharedById:+ data.sharedById.present ? data.sharedById.value : this.sharedById,+ sharedWithId: data.sharedWithId.present+ ? data.sharedWithId.value+ : this.sharedWithId,+ inTimeline:+ data.inTimeline.present ? data.inTimeline.value : this.inTimeline,+ );+ }++ @override+ String toString() {+ return (StringBuffer('PartnerEntityData(')+ ..write('sharedById: $sharedById, ')+ ..write('sharedWithId: $sharedWithId, ')+ ..write('inTimeline: $inTimeline')+ ..write(')'))+ .toString();+ }++ @override+ int get hashCode => Object.hash(sharedById, sharedWithId, inTimeline);+ @override+ bool operator ==(Object other) =>+ identical(this, other) ||+ (other is PartnerEntityData &&+ other.sharedById == this.sharedById &&+ other.sharedWithId == this.sharedWithId &&+ other.inTimeline == this.inTimeline);+}++class PartnerEntityCompanion extends UpdateCompanion<PartnerEntityData> {+ final Value<String> sharedById;+ final Value<String> sharedWithId;+ final Value<bool> inTimeline;+ const PartnerEntityCompanion({+ this.sharedById = const Value.absent(),+ this.sharedWithId = const Value.absent(),+ this.inTimeline = const Value.absent(),+ });+ PartnerEntityCompanion.insert({+ required String sharedById,+ required String sharedWithId,+ this.inTimeline = const Value.absent(),+ }) : sharedById = Value(sharedById),+ sharedWithId = Value(sharedWithId);+ static Insertable<PartnerEntityData> custom({+ Expression<String>? sharedById,+ Expression<String>? sharedWithId,+ Expression<bool>? inTimeline,+ }) {+ return RawValuesInsertable({+ if (sharedById != null) 'shared_by_id': sharedById,+ if (sharedWithId != null) 'shared_with_id': sharedWithId,+ if (inTimeline != null) 'in_timeline': inTimeline,+ });+ }++ PartnerEntityCompanion copyWith(+ {Value<String>? sharedById,+ Value<String>? sharedWithId,+ Value<bool>? inTimeline}) {+ return PartnerEntityCompanion(+ sharedById: sharedById ?? this.sharedById,+ sharedWithId: sharedWithId ?? this.sharedWithId,+ inTimeline: inTimeline ?? this.inTimeline,+ );+ }++ @override+ Map<String, Expression> toColumns(bool nullToAbsent) {+ final map = <String, Expression>{};+ if (sharedById.present) {+ map['shared_by_id'] = Variable<String>(sharedById.value);+ }+ if (sharedWithId.present) {+ map['shared_with_id'] = Variable<String>(sharedWithId.value);+ }+ if (inTimeline.present) {+ map['in_timeline'] = Variable<bool>(inTimeline.value);+ }+ return map;+ }++ @override+ String toString() {+ return (StringBuffer('PartnerEntityCompanion(')+ ..write('sharedById: $sharedById, ')+ ..write('sharedWithId: $sharedWithId, ')+ ..write('inTimeline: $inTimeline')+ ..write(')'))+ .toString();+ }+}++class LocalAlbumEntity extends Table+ with TableInfo<LocalAlbumEntity, LocalAlbumEntityData> {+ @override+ final GeneratedDatabase attachedDatabase;+ final String? _alias;+ LocalAlbumEntity(this.attachedDatabase, [this._alias]);+ late final GeneratedColumn<String> id = GeneratedColumn<String>(+ 'id', aliasedName, false,+ type: DriftSqlType.string, requiredDuringInsert: true);+ late final GeneratedColumn<String> name = GeneratedColumn<String>(+ 'name', aliasedName, false,+ type: DriftSqlType.string, requiredDuringInsert: true);+ late final GeneratedColumn<DateTime> updatedAt = GeneratedColumn<DateTime>(+ 'updated_at', aliasedName, false,+ type: DriftSqlType.dateTime,+ requiredDuringInsert: false,+ defaultValue: const CustomExpression('CURRENT_TIMESTAMP'));+ late final GeneratedColumn<int> backupSelection = GeneratedColumn<int>(+ 'backup_selection', aliasedName, false,+ type: DriftSqlType.int, requiredDuringInsert: true);+ late final GeneratedColumn<bool> isIosSharedAlbum = GeneratedColumn<bool>(+ 'is_ios_shared_album', aliasedName, false,+ type: DriftSqlType.bool,+ requiredDuringInsert: false,+ defaultConstraints: GeneratedColumn.constraintIsAlways(+ 'CHECK ("is_ios_shared_album" IN (0, 1))'),+ defaultValue: const CustomExpression('0'));+ late final GeneratedColumn<bool> marker_ = GeneratedColumn<bool>(+ 'marker', aliasedName, true,+ type: DriftSqlType.bool,+ requiredDuringInsert: false,+ defaultConstraints:+ GeneratedColumn.constraintIsAlways('CHECK ("marker" IN (0, 1))'));+ @override+ List<GeneratedColumn> get $columns =>+ [id, name, updatedAt, backupSelection, isIosSharedAlbum, marker_];+ @override+ String get aliasedName => _alias ?? actualTableName;+ @override+ String get actualTableName => $name;+ static const String $name = 'local_album_entity';+ @override+ Set<GeneratedColumn> get $primaryKey => {id};+ @override+ LocalAlbumEntityData map(Map<String, dynamic> data, {String? tablePrefix}) {+ final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';+ return LocalAlbumEntityData(+ id: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}id'])!,+ name: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}name'])!,+ updatedAt: attachedDatabase.typeMapping+ .read(DriftSqlType.dateTime, data['${effectivePrefix}updated_at'])!,+ backupSelection: attachedDatabase.typeMapping+ .read(DriftSqlType.int, data['${effectivePrefix}backup_selection'])!,+ isIosSharedAlbum: attachedDatabase.typeMapping.read(+ DriftSqlType.bool, data['${effectivePrefix}is_ios_shared_album'])!,+ marker_: attachedDatabase.typeMapping+ .read(DriftSqlType.bool, data['${effectivePrefix}marker']),+ );+ }++ @override+ LocalAlbumEntity createAlias(String alias) {+ return LocalAlbumEntity(attachedDatabase, alias);+ }++ @override+ bool get withoutRowId => true;+ @override+ bool get isStrict => true;+}++class LocalAlbumEntityData extends DataClass+ implements Insertable<LocalAlbumEntityData> {+ final String id;+ final String name;+ final DateTime updatedAt;+ final int backupSelection;+ final bool isIosSharedAlbum;+ final bool? marker_;+ const LocalAlbumEntityData(+ {required this.id,+ required this.name,+ required this.updatedAt,+ required this.backupSelection,+ required this.isIosSharedAlbum,+ this.marker_});+ @override+ Map<String, Expression> toColumns(bool nullToAbsent) {+ final map = <String, Expression>{};+ map['id'] = Variable<String>(id);+ map['name'] = Variable<String>(name);+ map['updated_at'] = Variable<DateTime>(updatedAt);+ map['backup_selection'] = Variable<int>(backupSelection);+ map['is_ios_shared_album'] = Variable<bool>(isIosSharedAlbum);+ if (!nullToAbsent || marker_ != null) {+ map['marker'] = Variable<bool>(marker_);+ }+ return map;+ }++ factory LocalAlbumEntityData.fromJson(Map<String, dynamic> json,+ {ValueSerializer? serializer}) {+ serializer ??= driftRuntimeOptions.defaultSerializer;+ return LocalAlbumEntityData(+ id: serializer.fromJson<String>(json['id']),+ name: serializer.fromJson<String>(json['name']),+ updatedAt: serializer.fromJson<DateTime>(json['updatedAt']),+ backupSelection: serializer.fromJson<int>(json['backupSelection']),+ isIosSharedAlbum: serializer.fromJson<bool>(json['isIosSharedAlbum']),+ marker_: serializer.fromJson<bool?>(json['marker_']),+ );+ }+ @override+ Map<String, dynamic> toJson({ValueSerializer? serializer}) {+ serializer ??= driftRuntimeOptions.defaultSerializer;+ return <String, dynamic>{+ 'id': serializer.toJson<String>(id),+ 'name': serializer.toJson<String>(name),+ 'updatedAt': serializer.toJson<DateTime>(updatedAt),+ 'backupSelection': serializer.toJson<int>(backupSelection),+ 'isIosSharedAlbum': serializer.toJson<bool>(isIosSharedAlbum),+ 'marker_': serializer.toJson<bool?>(marker_),+ };+ }++ LocalAlbumEntityData copyWith(+ {String? id,+ String? name,+ DateTime? updatedAt,+ int? backupSelection,+ bool? isIosSharedAlbum,+ Value<bool?> marker_ = const Value.absent()}) =>+ LocalAlbumEntityData(+ id: id ?? this.id,+ name: name ?? this.name,+ updatedAt: updatedAt ?? this.updatedAt,+ backupSelection: backupSelection ?? this.backupSelection,+ isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum,+ marker_: marker_.present ? marker_.value : this.marker_,+ );+ LocalAlbumEntityData copyWithCompanion(LocalAlbumEntityCompanion data) {+ return LocalAlbumEntityData(+ id: data.id.present ? data.id.value : this.id,+ name: data.name.present ? data.name.value : this.name,+ updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt,+ backupSelection: data.backupSelection.present+ ? data.backupSelection.value+ : this.backupSelection,+ isIosSharedAlbum: data.isIosSharedAlbum.present+ ? data.isIosSharedAlbum.value+ : this.isIosSharedAlbum,+ marker_: data.marker_.present ? data.marker_.value : this.marker_,+ );+ }++ @override+ String toString() {+ return (StringBuffer('LocalAlbumEntityData(')+ ..write('id: $id, ')+ ..write('name: $name, ')+ ..write('updatedAt: $updatedAt, ')+ ..write('backupSelection: $backupSelection, ')+ ..write('isIosSharedAlbum: $isIosSharedAlbum, ')+ ..write('marker_: $marker_')+ ..write(')'))+ .toString();+ }++ @override+ int get hashCode => Object.hash(+ id, name, updatedAt, backupSelection, isIosSharedAlbum, marker_);+ @override+ bool operator ==(Object other) =>+ identical(this, other) ||+ (other is LocalAlbumEntityData &&+ other.id == this.id &&+ other.name == this.name &&+ other.updatedAt == this.updatedAt &&+ other.backupSelection == this.backupSelection &&+ other.isIosSharedAlbum == this.isIosSharedAlbum &&+ other.marker_ == this.marker_);+}++class LocalAlbumEntityCompanion extends UpdateCompanion<LocalAlbumEntityData> {+ final Value<String> id;+ final Value<String> name;+ final Value<DateTime> updatedAt;+ final Value<int> backupSelection;+ final Value<bool> isIosSharedAlbum;+ final Value<bool?> marker_;+ const LocalAlbumEntityCompanion({+ this.id = const Value.absent(),+ this.name = const Value.absent(),+ this.updatedAt = const Value.absent(),+ this.backupSelection = const Value.absent(),+ this.isIosSharedAlbum = const Value.absent(),+ this.marker_ = const Value.absent(),+ });+ LocalAlbumEntityCompanion.insert({+ required String id,+ required String name,+ this.updatedAt = const Value.absent(),+ required int backupSelection,+ this.isIosSharedAlbum = const Value.absent(),+ this.marker_ = const Value.absent(),+ }) : id = Value(id),+ name = Value(name),+ backupSelection = Value(backupSelection);+ static Insertable<LocalAlbumEntityData> custom({+ Expression<String>? id,+ Expression<String>? name,+ Expression<DateTime>? updatedAt,+ Expression<int>? backupSelection,+ Expression<bool>? isIosSharedAlbum,+ Expression<bool>? marker_,+ }) {+ return RawValuesInsertable({+ if (id != null) 'id': id,+ if (name != null) 'name': name,+ if (updatedAt != null) 'updated_at': updatedAt,+ if (backupSelection != null) 'backup_selection': backupSelection,+ if (isIosSharedAlbum != null) 'is_ios_shared_album': isIosSharedAlbum,+ if (marker_ != null) 'marker': marker_,+ });+ }++ LocalAlbumEntityCompanion copyWith(+ {Value<String>? id,+ Value<String>? name,+ Value<DateTime>? updatedAt,+ Value<int>? backupSelection,+ Value<bool>? isIosSharedAlbum,+ Value<bool?>? marker_}) {+ return LocalAlbumEntityCompanion(+ id: id ?? this.id,+ name: name ?? this.name,+ updatedAt: updatedAt ?? this.updatedAt,+ backupSelection: backupSelection ?? this.backupSelection,+ isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum,+ marker_: marker_ ?? this.marker_,+ );+ }++ @override+ Map<String, Expression> toColumns(bool nullToAbsent) {+ final map = <String, Expression>{};+ if (id.present) {+ map['id'] = Variable<String>(id.value);+ }+ if (name.present) {+ map['name'] = Variable<String>(name.value);+ }+ if (updatedAt.present) {+ map['updated_at'] = Variable<DateTime>(updatedAt.value);+ }+ if (backupSelection.present) {+ map['backup_selection'] = Variable<int>(backupSelection.value);+ }+ if (isIosSharedAlbum.present) {+ map['is_ios_shared_album'] = Variable<bool>(isIosSharedAlbum.value);+ }+ if (marker_.present) {+ map['marker'] = Variable<bool>(marker_.value);+ }+ return map;+ }++ @override+ String toString() {+ return (StringBuffer('LocalAlbumEntityCompanion(')+ ..write('id: $id, ')+ ..write('name: $name, ')+ ..write('updatedAt: $updatedAt, ')+ ..write('backupSelection: $backupSelection, ')+ ..write('isIosSharedAlbum: $isIosSharedAlbum, ')+ ..write('marker_: $marker_')+ ..write(')'))+ .toString();+ }+}++class LocalAlbumAssetEntity extends Table+ with TableInfo<LocalAlbumAssetEntity, LocalAlbumAssetEntityData> {+ @override+ final GeneratedDatabase attachedDatabase;+ final String? _alias;+ LocalAlbumAssetEntity(this.attachedDatabase, [this._alias]);+ late final GeneratedColumn<String> assetId = GeneratedColumn<String>(+ 'asset_id', aliasedName, false,+ type: DriftSqlType.string,+ requiredDuringInsert: true,+ defaultConstraints: GeneratedColumn.constraintIsAlways(+ 'REFERENCES local_asset_entity (id) ON DELETE CASCADE'));+ late final GeneratedColumn<String> albumId = GeneratedColumn<String>(+ 'album_id', aliasedName, false,+ type: DriftSqlType.string,+ requiredDuringInsert: true,+ defaultConstraints: GeneratedColumn.constraintIsAlways(+ 'REFERENCES local_album_entity (id) ON DELETE CASCADE'));+ @override+ List<GeneratedColumn> get $columns => [assetId, albumId];+ @override+ String get aliasedName => _alias ?? actualTableName;+ @override+ String get actualTableName => $name;+ static const String $name = 'local_album_asset_entity';+ @override+ Set<GeneratedColumn> get $primaryKey => {assetId, albumId};+ @override+ LocalAlbumAssetEntityData map(Map<String, dynamic> data,+ {String? tablePrefix}) {+ final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';+ return LocalAlbumAssetEntityData(+ assetId: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}asset_id'])!,+ albumId: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}album_id'])!,+ );+ }++ @override+ LocalAlbumAssetEntity createAlias(String alias) {+ return LocalAlbumAssetEntity(attachedDatabase, alias);+ }++ @override+ bool get withoutRowId => true;+ @override+ bool get isStrict => true;+}++class LocalAlbumAssetEntityData extends DataClass+ implements Insertable<LocalAlbumAssetEntityData> {+ final String assetId;+ final String albumId;+ const LocalAlbumAssetEntityData(+ {required this.assetId, required this.albumId});+ @override+ Map<String, Expression> toColumns(bool nullToAbsent) {+ final map = <String, Expression>{};+ map['asset_id'] = Variable<String>(assetId);+ map['album_id'] = Variable<String>(albumId);+ return map;+ }++ factory LocalAlbumAssetEntityData.fromJson(Map<String, dynamic> json,+ {ValueSerializer? serializer}) {+ serializer ??= driftRuntimeOptions.defaultSerializer;+ return LocalAlbumAssetEntityData(+ assetId: serializer.fromJson<String>(json['assetId']),+ albumId: serializer.fromJson<String>(json['albumId']),+ );+ }+ @override+ Map<String, dynamic> toJson({ValueSerializer? serializer}) {+ serializer ??= driftRuntimeOptions.defaultSerializer;+ return <String, dynamic>{+ 'assetId': serializer.toJson<String>(assetId),+ 'albumId': serializer.toJson<String>(albumId),+ };+ }++ LocalAlbumAssetEntityData copyWith({String? assetId, String? albumId}) =>+ LocalAlbumAssetEntityData(+ assetId: assetId ?? this.assetId,+ albumId: albumId ?? this.albumId,+ );+ LocalAlbumAssetEntityData copyWithCompanion(+ LocalAlbumAssetEntityCompanion data) {+ return LocalAlbumAssetEntityData(+ assetId: data.assetId.present ? data.assetId.value : this.assetId,+ albumId: data.albumId.present ? data.albumId.value : this.albumId,+ );+ }++ @override+ String toString() {+ return (StringBuffer('LocalAlbumAssetEntityData(')+ ..write('assetId: $assetId, ')+ ..write('albumId: $albumId')+ ..write(')'))+ .toString();+ }++ @override+ int get hashCode => Object.hash(assetId, albumId);+ @override+ bool operator ==(Object other) =>+ identical(this, other) ||+ (other is LocalAlbumAssetEntityData &&+ other.assetId == this.assetId &&+ other.albumId == this.albumId);+}++class LocalAlbumAssetEntityCompanion+ extends UpdateCompanion<LocalAlbumAssetEntityData> {+ final Value<String> assetId;+ final Value<String> albumId;+ const LocalAlbumAssetEntityCompanion({+ this.assetId = const Value.absent(),+ this.albumId = const Value.absent(),+ });+ LocalAlbumAssetEntityCompanion.insert({+ required String assetId,+ required String albumId,+ }) : assetId = Value(assetId),+ albumId = Value(albumId);+ static Insertable<LocalAlbumAssetEntityData> custom({+ Expression<String>? assetId,+ Expression<String>? albumId,+ }) {+ return RawValuesInsertable({+ if (assetId != null) 'asset_id': assetId,+ if (albumId != null) 'album_id': albumId,+ });+ }++ LocalAlbumAssetEntityCompanion copyWith(+ {Value<String>? assetId, Value<String>? albumId}) {+ return LocalAlbumAssetEntityCompanion(+ assetId: assetId ?? this.assetId,+ albumId: albumId ?? this.albumId,+ );+ }++ @override+ Map<String, Expression> toColumns(bool nullToAbsent) {+ final map = <String, Expression>{};+ if (assetId.present) {+ map['asset_id'] = Variable<String>(assetId.value);+ }+ if (albumId.present) {+ map['album_id'] = Variable<String>(albumId.value);+ }+ return map;+ }++ @override+ String toString() {+ return (StringBuffer('LocalAlbumAssetEntityCompanion(')+ ..write('assetId: $assetId, ')+ ..write('albumId: $albumId')+ ..write(')'))+ .toString();+ }+}++class RemoteExifEntity extends Table+ with TableInfo<RemoteExifEntity, RemoteExifEntityData> {+ @override+ final GeneratedDatabase attachedDatabase;+ final String? _alias;+ RemoteExifEntity(this.attachedDatabase, [this._alias]);+ late final GeneratedColumn<String> assetId = GeneratedColumn<String>(+ 'asset_id', aliasedName, false,+ type: DriftSqlType.string,+ requiredDuringInsert: true,+ defaultConstraints: GeneratedColumn.constraintIsAlways(+ 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE'));+ late final GeneratedColumn<String> city = GeneratedColumn<String>(+ 'city', aliasedName, true,+ type: DriftSqlType.string, requiredDuringInsert: false);+ late final GeneratedColumn<String> state = GeneratedColumn<String>(+ 'state', aliasedName, true,+ type: DriftSqlType.string, requiredDuringInsert: false);+ late final GeneratedColumn<String> country = GeneratedColumn<String>(+ 'country', aliasedName, true,+ type: DriftSqlType.string, requiredDuringInsert: false);+ late final GeneratedColumn<DateTime> dateTimeOriginal =+ GeneratedColumn<DateTime>('date_time_original', aliasedName, true,+ type: DriftSqlType.dateTime, requiredDuringInsert: false);+ late final GeneratedColumn<String> description = GeneratedColumn<String>(+ 'description', aliasedName, true,+ type: DriftSqlType.string, requiredDuringInsert: false);+ late final GeneratedColumn<int> height = GeneratedColumn<int>(+ 'height', aliasedName, true,+ type: DriftSqlType.int, requiredDuringInsert: false);+ late final GeneratedColumn<int> width = GeneratedColumn<int>(+ 'width', aliasedName, true,+ type: DriftSqlType.int, requiredDuringInsert: false);+ late final GeneratedColumn<String> exposureTime = GeneratedColumn<String>(+ 'exposure_time', aliasedName, true,+ type: DriftSqlType.string, requiredDuringInsert: false);+ late final GeneratedColumn<double> fNumber = GeneratedColumn<double>(+ 'f_number', aliasedName, true,+ type: DriftSqlType.double, requiredDuringInsert: false);+ late final GeneratedColumn<int> fileSize = GeneratedColumn<int>(+ 'file_size', aliasedName, true,+ type: DriftSqlType.int, requiredDuringInsert: false);+ late final GeneratedColumn<double> focalLength = GeneratedColumn<double>(+ 'focal_length', aliasedName, true,+ type: DriftSqlType.double, requiredDuringInsert: false);+ late final GeneratedColumn<double> latitude = GeneratedColumn<double>(+ 'latitude', aliasedName, true,+ type: DriftSqlType.double, requiredDuringInsert: false);+ late final GeneratedColumn<double> longitude = GeneratedColumn<double>(+ 'longitude', aliasedName, true,+ type: DriftSqlType.double, requiredDuringInsert: false);+ late final GeneratedColumn<int> iso = GeneratedColumn<int>(+ 'iso', aliasedName, true,+ type: DriftSqlType.int, requiredDuringInsert: false);+ late final GeneratedColumn<String> make = GeneratedColumn<String>(+ 'make', aliasedName, true,+ type: DriftSqlType.string, requiredDuringInsert: false);+ late final GeneratedColumn<String> model = GeneratedColumn<String>(+ 'model', aliasedName, true,+ type: DriftSqlType.string, requiredDuringInsert: false);+ late final GeneratedColumn<String> lens = GeneratedColumn<String>(+ 'lens', aliasedName, true,+ type: DriftSqlType.string, requiredDuringInsert: false);+ late final GeneratedColumn<String> orientation = GeneratedColumn<String>(+ 'orientation', aliasedName, true,+ type: DriftSqlType.string, requiredDuringInsert: false);+ late final GeneratedColumn<String> timeZone = GeneratedColumn<String>(+ 'time_zone', aliasedName, true,+ type: DriftSqlType.string, requiredDuringInsert: false);+ late final GeneratedColumn<int> rating = GeneratedColumn<int>(+ 'rating', aliasedName, true,+ type: DriftSqlType.int, requiredDuringInsert: false);+ late final GeneratedColumn<String> projectionType = GeneratedColumn<String>(+ 'projection_type', aliasedName, true,+ type: DriftSqlType.string, requiredDuringInsert: false);+ @override+ List<GeneratedColumn> get $columns => [+ assetId,+ city,+ state,+ country,+ dateTimeOriginal,+ description,+ height,+ width,+ exposureTime,+ fNumber,+ fileSize,+ focalLength,+ latitude,+ longitude,+ iso,+ make,+ model,+ lens,+ orientation,+ timeZone,+ rating,+ projectionType+ ];+ @override+ String get aliasedName => _alias ?? actualTableName;+ @override+ String get actualTableName => $name;+ static const String $name = 'remote_exif_entity';+ @override+ Set<GeneratedColumn> get $primaryKey => {assetId};+ @override+ RemoteExifEntityData map(Map<String, dynamic> data, {String? tablePrefix}) {+ final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';+ return RemoteExifEntityData(+ assetId: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}asset_id'])!,+ city: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}city']),+ state: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}state']),+ country: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}country']),+ dateTimeOriginal: attachedDatabase.typeMapping.read(+ DriftSqlType.dateTime, data['${effectivePrefix}date_time_original']),+ description: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}description']),+ height: attachedDatabase.typeMapping+ .read(DriftSqlType.int, data['${effectivePrefix}height']),+ width: attachedDatabase.typeMapping+ .read(DriftSqlType.int, data['${effectivePrefix}width']),+ exposureTime: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}exposure_time']),+ fNumber: attachedDatabase.typeMapping+ .read(DriftSqlType.double, data['${effectivePrefix}f_number']),+ fileSize: attachedDatabase.typeMapping+ .read(DriftSqlType.int, data['${effectivePrefix}file_size']),+ focalLength: attachedDatabase.typeMapping+ .read(DriftSqlType.double, data['${effectivePrefix}focal_length']),+ latitude: attachedDatabase.typeMapping+ .read(DriftSqlType.double, data['${effectivePrefix}latitude']),+ longitude: attachedDatabase.typeMapping+ .read(DriftSqlType.double, data['${effectivePrefix}longitude']),+ iso: attachedDatabase.typeMapping+ .read(DriftSqlType.int, data['${effectivePrefix}iso']),+ make: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}make']),+ model: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}model']),+ lens: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}lens']),+ orientation: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}orientation']),+ timeZone: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}time_zone']),+ rating: attachedDatabase.typeMapping+ .read(DriftSqlType.int, data['${effectivePrefix}rating']),+ projectionType: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}projection_type']),+ );+ }++ @override+ RemoteExifEntity createAlias(String alias) {+ return RemoteExifEntity(attachedDatabase, alias);+ }++ @override+ bool get withoutRowId => true;+ @override+ bool get isStrict => true;+}++class RemoteExifEntityData extends DataClass+ implements Insertable<RemoteExifEntityData> {+ final String assetId;+ final String? city;+ final String? state;+ final String? country;+ final DateTime? dateTimeOriginal;+ final String? description;+ final int? height;+ final int? width;+ final String? exposureTime;+ final double? fNumber;+ final int? fileSize;+ final double? focalLength;+ final double? latitude;+ final double? longitude;+ final int? iso;+ final String? make;+ final String? model;+ final String? lens;+ final String? orientation;+ final String? timeZone;+ final int? rating;+ final String? projectionType;+ const RemoteExifEntityData(+ {required this.assetId,+ this.city,+ this.state,+ this.country,+ this.dateTimeOriginal,+ this.description,+ this.height,+ this.width,+ this.exposureTime,+ this.fNumber,+ this.fileSize,+ this.focalLength,+ this.latitude,+ this.longitude,+ this.iso,+ this.make,+ this.model,+ this.lens,+ this.orientation,+ this.timeZone,+ this.rating,+ this.projectionType});+ @override+ Map<String, Expression> toColumns(bool nullToAbsent) {+ final map = <String, Expression>{};+ map['asset_id'] = Variable<String>(assetId);+ if (!nullToAbsent || city != null) {+ map['city'] = Variable<String>(city);+ }+ if (!nullToAbsent || state != null) {+ map['state'] = Variable<String>(state);+ }+ if (!nullToAbsent || country != null) {+ map['country'] = Variable<String>(country);+ }+ if (!nullToAbsent || dateTimeOriginal != null) {+ map['date_time_original'] = Variable<DateTime>(dateTimeOriginal);+ }+ if (!nullToAbsent || description != null) {+ map['description'] = Variable<String>(description);+ }+ if (!nullToAbsent || height != null) {+ map['height'] = Variable<int>(height);+ }+ if (!nullToAbsent || width != null) {+ map['width'] = Variable<int>(width);+ }+ if (!nullToAbsent || exposureTime != null) {+ map['exposure_time'] = Variable<String>(exposureTime);+ }+ if (!nullToAbsent || fNumber != null) {+ map['f_number'] = Variable<double>(fNumber);+ }+ if (!nullToAbsent || fileSize != null) {+ map['file_size'] = Variable<int>(fileSize);+ }+ if (!nullToAbsent || focalLength != null) {+ map['focal_length'] = Variable<double>(focalLength);+ }+ if (!nullToAbsent || latitude != null) {+ map['latitude'] = Variable<double>(latitude);+ }+ if (!nullToAbsent || longitude != null) {+ map['longitude'] = Variable<double>(longitude);+ }+ if (!nullToAbsent || iso != null) {+ map['iso'] = Variable<int>(iso);+ }+ if (!nullToAbsent || make != null) {+ map['make'] = Variable<String>(make);+ }+ if (!nullToAbsent || model != null) {+ map['model'] = Variable<String>(model);+ }+ if (!nullToAbsent || lens != null) {+ map['lens'] = Variable<String>(lens);+ }+ if (!nullToAbsent || orientation != null) {+ map['orientation'] = Variable<String>(orientation);+ }+ if (!nullToAbsent || timeZone != null) {+ map['time_zone'] = Variable<String>(timeZone);+ }+ if (!nullToAbsent || rating != null) {+ map['rating'] = Variable<int>(rating);+ }+ if (!nullToAbsent || projectionType != null) {+ map['projection_type'] = Variable<String>(projectionType);+ }+ return map;+ }++ factory RemoteExifEntityData.fromJson(Map<String, dynamic> json,+ {ValueSerializer? serializer}) {+ serializer ??= driftRuntimeOptions.defaultSerializer;+ return RemoteExifEntityData(+ assetId: serializer.fromJson<String>(json['assetId']),+ city: serializer.fromJson<String?>(json['city']),+ state: serializer.fromJson<String?>(json['state']),+ country: serializer.fromJson<String?>(json['country']),+ dateTimeOriginal:+ serializer.fromJson<DateTime?>(json['dateTimeOriginal']),+ description: serializer.fromJson<String?>(json['description']),+ height: serializer.fromJson<int?>(json['height']),+ width: serializer.fromJson<int?>(json['width']),+ exposureTime: serializer.fromJson<String?>(json['exposureTime']),+ fNumber: serializer.fromJson<double?>(json['fNumber']),+ fileSize: serializer.fromJson<int?>(json['fileSize']),+ focalLength: serializer.fromJson<double?>(json['focalLength']),+ latitude: serializer.fromJson<double?>(json['latitude']),+ longitude: serializer.fromJson<double?>(json['longitude']),+ iso: serializer.fromJson<int?>(json['iso']),+ make: serializer.fromJson<String?>(json['make']),+ model: serializer.fromJson<String?>(json['model']),+ lens: serializer.fromJson<String?>(json['lens']),+ orientation: serializer.fromJson<String?>(json['orientation']),+ timeZone: serializer.fromJson<String?>(json['timeZone']),+ rating: serializer.fromJson<int?>(json['rating']),+ projectionType: serializer.fromJson<String?>(json['projectionType']),+ );+ }+ @override+ Map<String, dynamic> toJson({ValueSerializer? serializer}) {+ serializer ??= driftRuntimeOptions.defaultSerializer;+ return <String, dynamic>{+ 'assetId': serializer.toJson<String>(assetId),+ 'city': serializer.toJson<String?>(city),+ 'state': serializer.toJson<String?>(state),+ 'country': serializer.toJson<String?>(country),+ 'dateTimeOriginal': serializer.toJson<DateTime?>(dateTimeOriginal),+ 'description': serializer.toJson<String?>(description),+ 'height': serializer.toJson<int?>(height),+ 'width': serializer.toJson<int?>(width),+ 'exposureTime': serializer.toJson<String?>(exposureTime),+ 'fNumber': serializer.toJson<double?>(fNumber),+ 'fileSize': serializer.toJson<int?>(fileSize),+ 'focalLength': serializer.toJson<double?>(focalLength),+ 'latitude': serializer.toJson<double?>(latitude),+ 'longitude': serializer.toJson<double?>(longitude),+ 'iso': serializer.toJson<int?>(iso),+ 'make': serializer.toJson<String?>(make),+ 'model': serializer.toJson<String?>(model),+ 'lens': serializer.toJson<String?>(lens),+ 'orientation': serializer.toJson<String?>(orientation),+ 'timeZone': serializer.toJson<String?>(timeZone),+ 'rating': serializer.toJson<int?>(rating),+ 'projectionType': serializer.toJson<String?>(projectionType),+ };+ }++ RemoteExifEntityData copyWith(+ {String? assetId,+ Value<String?> city = const Value.absent(),+ Value<String?> state = const Value.absent(),+ Value<String?> country = const Value.absent(),+ Value<DateTime?> dateTimeOriginal = const Value.absent(),+ Value<String?> description = const Value.absent(),+ Value<int?> height = const Value.absent(),+ Value<int?> width = const Value.absent(),+ Value<String?> exposureTime = const Value.absent(),+ Value<double?> fNumber = const Value.absent(),+ Value<int?> fileSize = const Value.absent(),+ Value<double?> focalLength = const Value.absent(),+ Value<double?> latitude = const Value.absent(),+ Value<double?> longitude = const Value.absent(),+ Value<int?> iso = const Value.absent(),+ Value<String?> make = const Value.absent(),+ Value<String?> model = const Value.absent(),+ Value<String?> lens = const Value.absent(),+ Value<String?> orientation = const Value.absent(),+ Value<String?> timeZone = const Value.absent(),+ Value<int?> rating = const Value.absent(),+ Value<String?> projectionType = const Value.absent()}) =>+ RemoteExifEntityData(+ assetId: assetId ?? this.assetId,+ city: city.present ? city.value : this.city,+ state: state.present ? state.value : this.state,+ country: country.present ? country.value : this.country,+ dateTimeOriginal: dateTimeOriginal.present+ ? dateTimeOriginal.value+ : this.dateTimeOriginal,+ description: description.present ? description.value : this.description,+ height: height.present ? height.value : this.height,+ width: width.present ? width.value : this.width,+ exposureTime:+ exposureTime.present ? exposureTime.value : this.exposureTime,+ fNumber: fNumber.present ? fNumber.value : this.fNumber,+ fileSize: fileSize.present ? fileSize.value : this.fileSize,+ focalLength: focalLength.present ? focalLength.value : this.focalLength,+ latitude: latitude.present ? latitude.value : this.latitude,+ longitude: longitude.present ? longitude.value : this.longitude,+ iso: iso.present ? iso.value : this.iso,+ make: make.present ? make.value : this.make,+ model: model.present ? model.value : this.model,+ lens: lens.present ? lens.value : this.lens,+ orientation: orientation.present ? orientation.value : this.orientation,+ timeZone: timeZone.present ? timeZone.value : this.timeZone,+ rating: rating.present ? rating.value : this.rating,+ projectionType:+ projectionType.present ? projectionType.value : this.projectionType,+ );+ RemoteExifEntityData copyWithCompanion(RemoteExifEntityCompanion data) {+ return RemoteExifEntityData(+ assetId: data.assetId.present ? data.assetId.value : this.assetId,+ city: data.city.present ? data.city.value : this.city,+ state: data.state.present ? data.state.value : this.state,+ country: data.country.present ? data.country.value : this.country,+ dateTimeOriginal: data.dateTimeOriginal.present+ ? data.dateTimeOriginal.value+ : this.dateTimeOriginal,+ description:+ data.description.present ? data.description.value : this.description,+ height: data.height.present ? data.height.value : this.height,+ width: data.width.present ? data.width.value : this.width,+ exposureTime: data.exposureTime.present+ ? data.exposureTime.value+ : this.exposureTime,+ fNumber: data.fNumber.present ? data.fNumber.value : this.fNumber,+ fileSize: data.fileSize.present ? data.fileSize.value : this.fileSize,+ focalLength:+ data.focalLength.present ? data.focalLength.value : this.focalLength,+ latitude: data.latitude.present ? data.latitude.value : this.latitude,+ longitude: data.longitude.present ? data.longitude.value : this.longitude,+ iso: data.iso.present ? data.iso.value : this.iso,+ make: data.make.present ? data.make.value : this.make,+ model: data.model.present ? data.model.value : this.model,+ lens: data.lens.present ? data.lens.value : this.lens,+ orientation:+ data.orientation.present ? data.orientation.value : this.orientation,+ timeZone: data.timeZone.present ? data.timeZone.value : this.timeZone,+ rating: data.rating.present ? data.rating.value : this.rating,+ projectionType: data.projectionType.present+ ? data.projectionType.value+ : this.projectionType,+ );+ }++ @override+ String toString() {+ return (StringBuffer('RemoteExifEntityData(')+ ..write('assetId: $assetId, ')+ ..write('city: $city, ')+ ..write('state: $state, ')+ ..write('country: $country, ')+ ..write('dateTimeOriginal: $dateTimeOriginal, ')+ ..write('description: $description, ')+ ..write('height: $height, ')+ ..write('width: $width, ')+ ..write('exposureTime: $exposureTime, ')+ ..write('fNumber: $fNumber, ')+ ..write('fileSize: $fileSize, ')+ ..write('focalLength: $focalLength, ')+ ..write('latitude: $latitude, ')+ ..write('longitude: $longitude, ')+ ..write('iso: $iso, ')+ ..write('make: $make, ')+ ..write('model: $model, ')+ ..write('lens: $lens, ')+ ..write('orientation: $orientation, ')+ ..write('timeZone: $timeZone, ')+ ..write('rating: $rating, ')+ ..write('projectionType: $projectionType')+ ..write(')'))+ .toString();+ }++ @override+ int get hashCode => Object.hashAll([+ assetId,+ city,+ state,+ country,+ dateTimeOriginal,+ description,+ height,+ width,+ exposureTime,+ fNumber,+ fileSize,+ focalLength,+ latitude,+ longitude,+ iso,+ make,+ model,+ lens,+ orientation,+ timeZone,+ rating,+ projectionType+ ]);+ @override+ bool operator ==(Object other) =>+ identical(this, other) ||+ (other is RemoteExifEntityData &&+ other.assetId == this.assetId &&+ other.city == this.city &&+ other.state == this.state &&+ other.country == this.country &&+ other.dateTimeOriginal == this.dateTimeOriginal &&+ other.description == this.description &&+ other.height == this.height &&+ other.width == this.width &&+ other.exposureTime == this.exposureTime &&+ other.fNumber == this.fNumber &&+ other.fileSize == this.fileSize &&+ other.focalLength == this.focalLength &&+ other.latitude == this.latitude &&+ other.longitude == this.longitude &&+ other.iso == this.iso &&+ other.make == this.make &&+ other.model == this.model &&+ other.lens == this.lens &&+ other.orientation == this.orientation &&+ other.timeZone == this.timeZone &&+ other.rating == this.rating &&+ other.projectionType == this.projectionType);+}++class RemoteExifEntityCompanion extends UpdateCompanion<RemoteExifEntityData> {+ final Value<String> assetId;+ final Value<String?> city;+ final Value<String?> state;+ final Value<String?> country;+ final Value<DateTime?> dateTimeOriginal;+ final Value<String?> description;+ final Value<int?> height;+ final Value<int?> width;+ final Value<String?> exposureTime;+ final Value<double?> fNumber;+ final Value<int?> fileSize;+ final Value<double?> focalLength;+ final Value<double?> latitude;+ final Value<double?> longitude;+ final Value<int?> iso;+ final Value<String?> make;+ final Value<String?> model;+ final Value<String?> lens;+ final Value<String?> orientation;+ final Value<String?> timeZone;+ final Value<int?> rating;+ final Value<String?> projectionType;+ const RemoteExifEntityCompanion({+ this.assetId = const Value.absent(),+ this.city = const Value.absent(),+ this.state = const Value.absent(),+ this.country = const Value.absent(),+ this.dateTimeOriginal = const Value.absent(),+ this.description = const Value.absent(),+ this.height = const Value.absent(),+ this.width = const Value.absent(),+ this.exposureTime = const Value.absent(),+ this.fNumber = const Value.absent(),+ this.fileSize = const Value.absent(),+ this.focalLength = const Value.absent(),+ this.latitude = const Value.absent(),+ this.longitude = const Value.absent(),+ this.iso = const Value.absent(),+ this.make = const Value.absent(),+ this.model = const Value.absent(),+ this.lens = const Value.absent(),+ this.orientation = const Value.absent(),+ this.timeZone = const Value.absent(),+ this.rating = const Value.absent(),+ this.projectionType = const Value.absent(),+ });+ RemoteExifEntityCompanion.insert({+ required String assetId,+ this.city = const Value.absent(),+ this.state = const Value.absent(),+ this.country = const Value.absent(),+ this.dateTimeOriginal = const Value.absent(),+ this.description = const Value.absent(),+ this.height = const Value.absent(),+ this.width = const Value.absent(),+ this.exposureTime = const Value.absent(),+ this.fNumber = const Value.absent(),+ this.fileSize = const Value.absent(),+ this.focalLength = const Value.absent(),+ this.latitude = const Value.absent(),+ this.longitude = const Value.absent(),+ this.iso = const Value.absent(),+ this.make = const Value.absent(),+ this.model = const Value.absent(),+ this.lens = const Value.absent(),+ this.orientation = const Value.absent(),+ this.timeZone = const Value.absent(),+ this.rating = const Value.absent(),+ this.projectionType = const Value.absent(),+ }) : assetId = Value(assetId);+ static Insertable<RemoteExifEntityData> custom({+ Expression<String>? assetId,+ Expression<String>? city,+ Expression<String>? state,+ Expression<String>? country,+ Expression<DateTime>? dateTimeOriginal,+ Expression<String>? description,+ Expression<int>? height,+ Expression<int>? width,+ Expression<String>? exposureTime,+ Expression<double>? fNumber,+ Expression<int>? fileSize,+ Expression<double>? focalLength,+ Expression<double>? latitude,+ Expression<double>? longitude,+ Expression<int>? iso,+ Expression<String>? make,+ Expression<String>? model,+ Expression<String>? lens,+ Expression<String>? orientation,+ Expression<String>? timeZone,+ Expression<int>? rating,+ Expression<String>? projectionType,+ }) {+ return RawValuesInsertable({+ if (assetId != null) 'asset_id': assetId,+ if (city != null) 'city': city,+ if (state != null) 'state': state,+ if (country != null) 'country': country,+ if (dateTimeOriginal != null) 'date_time_original': dateTimeOriginal,+ if (description != null) 'description': description,+ if (height != null) 'height': height,+ if (width != null) 'width': width,+ if (exposureTime != null) 'exposure_time': exposureTime,+ if (fNumber != null) 'f_number': fNumber,+ if (fileSize != null) 'file_size': fileSize,+ if (focalLength != null) 'focal_length': focalLength,+ if (latitude != null) 'latitude': latitude,+ if (longitude != null) 'longitude': longitude,+ if (iso != null) 'iso': iso,+ if (make != null) 'make': make,+ if (model != null) 'model': model,+ if (lens != null) 'lens': lens,+ if (orientation != null) 'orientation': orientation,+ if (timeZone != null) 'time_zone': timeZone,+ if (rating != null) 'rating': rating,+ if (projectionType != null) 'projection_type': projectionType,+ });+ }++ RemoteExifEntityCompanion copyWith(+ {Value<String>? assetId,+ Value<String?>? city,+ Value<String?>? state,+ Value<String?>? country,+ Value<DateTime?>? dateTimeOriginal,+ Value<String?>? description,+ Value<int?>? height,+ Value<int?>? width,+ Value<String?>? exposureTime,+ Value<double?>? fNumber,+ Value<int?>? fileSize,+ Value<double?>? focalLength,+ Value<double?>? latitude,+ Value<double?>? longitude,+ Value<int?>? iso,+ Value<String?>? make,+ Value<String?>? model,+ Value<String?>? lens,+ Value<String?>? orientation,+ Value<String?>? timeZone,+ Value<int?>? rating,+ Value<String?>? projectionType}) {+ return RemoteExifEntityCompanion(+ assetId: assetId ?? this.assetId,+ city: city ?? this.city,+ state: state ?? this.state,+ country: country ?? this.country,+ dateTimeOriginal: dateTimeOriginal ?? this.dateTimeOriginal,+ description: description ?? this.description,+ height: height ?? this.height,+ width: width ?? this.width,+ exposureTime: exposureTime ?? this.exposureTime,+ fNumber: fNumber ?? this.fNumber,+ fileSize: fileSize ?? this.fileSize,+ focalLength: focalLength ?? this.focalLength,+ latitude: latitude ?? this.latitude,+ longitude: longitude ?? this.longitude,+ iso: iso ?? this.iso,+ make: make ?? this.make,+ model: model ?? this.model,+ lens: lens ?? this.lens,+ orientation: orientation ?? this.orientation,+ timeZone: timeZone ?? this.timeZone,+ rating: rating ?? this.rating,+ projectionType: projectionType ?? this.projectionType,+ );+ }++ @override+ Map<String, Expression> toColumns(bool nullToAbsent) {+ final map = <String, Expression>{};+ if (assetId.present) {+ map['asset_id'] = Variable<String>(assetId.value);+ }+ if (city.present) {+ map['city'] = Variable<String>(city.value);+ }+ if (state.present) {+ map['state'] = Variable<String>(state.value);+ }+ if (country.present) {+ map['country'] = Variable<String>(country.value);+ }+ if (dateTimeOriginal.present) {+ map['date_time_original'] = Variable<DateTime>(dateTimeOriginal.value);+ }+ if (description.present) {+ map['description'] = Variable<String>(description.value);+ }+ if (height.present) {+ map['height'] = Variable<int>(height.value);+ }+ if (width.present) {+ map['width'] = Variable<int>(width.value);+ }+ if (exposureTime.present) {+ map['exposure_time'] = Variable<String>(exposureTime.value);+ }+ if (fNumber.present) {+ map['f_number'] = Variable<double>(fNumber.value);+ }+ if (fileSize.present) {+ map['file_size'] = Variable<int>(fileSize.value);+ }+ if (focalLength.present) {+ map['focal_length'] = Variable<double>(focalLength.value);+ }+ if (latitude.present) {+ map['latitude'] = Variable<double>(latitude.value);+ }+ if (longitude.present) {+ map['longitude'] = Variable<double>(longitude.value);+ }+ if (iso.present) {+ map['iso'] = Variable<int>(iso.value);+ }+ if (make.present) {+ map['make'] = Variable<String>(make.value);+ }+ if (model.present) {+ map['model'] = Variable<String>(model.value);+ }+ if (lens.present) {+ map['lens'] = Variable<String>(lens.value);+ }+ if (orientation.present) {+ map['orientation'] = Variable<String>(orientation.value);+ }+ if (timeZone.present) {+ map['time_zone'] = Variable<String>(timeZone.value);+ }+ if (rating.present) {+ map['rating'] = Variable<int>(rating.value);+ }+ if (projectionType.present) {+ map['projection_type'] = Variable<String>(projectionType.value);+ }+ return map;+ }++ @override+ String toString() {+ return (StringBuffer('RemoteExifEntityCompanion(')+ ..write('assetId: $assetId, ')+ ..write('city: $city, ')+ ..write('state: $state, ')+ ..write('country: $country, ')+ ..write('dateTimeOriginal: $dateTimeOriginal, ')+ ..write('description: $description, ')+ ..write('height: $height, ')+ ..write('width: $width, ')+ ..write('exposureTime: $exposureTime, ')+ ..write('fNumber: $fNumber, ')+ ..write('fileSize: $fileSize, ')+ ..write('focalLength: $focalLength, ')+ ..write('latitude: $latitude, ')+ ..write('longitude: $longitude, ')+ ..write('iso: $iso, ')+ ..write('make: $make, ')+ ..write('model: $model, ')+ ..write('lens: $lens, ')+ ..write('orientation: $orientation, ')+ ..write('timeZone: $timeZone, ')+ ..write('rating: $rating, ')+ ..write('projectionType: $projectionType')+ ..write(')'))+ .toString();+ }+}++class RemoteAlbumEntity extends Table+ with TableInfo<RemoteAlbumEntity, RemoteAlbumEntityData> {+ @override+ final GeneratedDatabase attachedDatabase;+ final String? _alias;+ RemoteAlbumEntity(this.attachedDatabase, [this._alias]);+ late final GeneratedColumn<String> id = GeneratedColumn<String>(+ 'id', aliasedName, false,+ type: DriftSqlType.string, requiredDuringInsert: true);+ late final GeneratedColumn<String> name = GeneratedColumn<String>(+ 'name', aliasedName, false,+ type: DriftSqlType.string, requiredDuringInsert: true);+ late final GeneratedColumn<String> description = GeneratedColumn<String>(+ 'description', aliasedName, false,+ type: DriftSqlType.string,+ requiredDuringInsert: false,+ defaultValue: const CustomExpression('\'\''));+ late final GeneratedColumn<DateTime> createdAt = GeneratedColumn<DateTime>(+ 'created_at', aliasedName, false,+ type: DriftSqlType.dateTime,+ requiredDuringInsert: false,+ defaultValue: const CustomExpression('CURRENT_TIMESTAMP'));+ late final GeneratedColumn<DateTime> updatedAt = GeneratedColumn<DateTime>(+ 'updated_at', aliasedName, false,+ type: DriftSqlType.dateTime,+ requiredDuringInsert: false,+ defaultValue: const CustomExpression('CURRENT_TIMESTAMP'));+ late final GeneratedColumn<String> ownerId = GeneratedColumn<String>(+ 'owner_id', aliasedName, false,+ type: DriftSqlType.string,+ requiredDuringInsert: true,+ defaultConstraints: GeneratedColumn.constraintIsAlways(+ 'REFERENCES user_entity (id) ON DELETE CASCADE'));+ late final GeneratedColumn<String> thumbnailAssetId = GeneratedColumn<String>(+ 'thumbnail_asset_id', aliasedName, true,+ type: DriftSqlType.string,+ requiredDuringInsert: false,+ defaultConstraints: GeneratedColumn.constraintIsAlways(+ 'REFERENCES remote_asset_entity (id) ON DELETE SET NULL'));+ late final GeneratedColumn<bool> isActivityEnabled = GeneratedColumn<bool>(+ 'is_activity_enabled', aliasedName, false,+ type: DriftSqlType.bool,+ requiredDuringInsert: false,+ defaultConstraints: GeneratedColumn.constraintIsAlways(+ 'CHECK ("is_activity_enabled" IN (0, 1))'),+ defaultValue: const CustomExpression('1'));+ late final GeneratedColumn<int> order = GeneratedColumn<int>(+ 'order', aliasedName, false,+ type: DriftSqlType.int, requiredDuringInsert: true);+ @override+ List<GeneratedColumn> get $columns => [+ id,+ name,+ description,+ createdAt,+ updatedAt,+ ownerId,+ thumbnailAssetId,+ isActivityEnabled,+ order+ ];+ @override+ String get aliasedName => _alias ?? actualTableName;+ @override+ String get actualTableName => $name;+ static const String $name = 'remote_album_entity';+ @override+ Set<GeneratedColumn> get $primaryKey => {id};+ @override+ RemoteAlbumEntityData map(Map<String, dynamic> data, {String? tablePrefix}) {+ final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';+ return RemoteAlbumEntityData(+ id: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}id'])!,+ name: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}name'])!,+ description: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}description'])!,+ createdAt: attachedDatabase.typeMapping+ .read(DriftSqlType.dateTime, data['${effectivePrefix}created_at'])!,+ updatedAt: attachedDatabase.typeMapping+ .read(DriftSqlType.dateTime, data['${effectivePrefix}updated_at'])!,+ ownerId: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}owner_id'])!,+ thumbnailAssetId: attachedDatabase.typeMapping.read(+ DriftSqlType.string, data['${effectivePrefix}thumbnail_asset_id']),+ isActivityEnabled: attachedDatabase.typeMapping.read(+ DriftSqlType.bool, data['${effectivePrefix}is_activity_enabled'])!,+ order: attachedDatabase.typeMapping+ .read(DriftSqlType.int, data['${effectivePrefix}order'])!,+ );+ }++ @override+ RemoteAlbumEntity createAlias(String alias) {+ return RemoteAlbumEntity(attachedDatabase, alias);+ }++ @override+ bool get withoutRowId => true;+ @override+ bool get isStrict => true;+}++class RemoteAlbumEntityData extends DataClass+ implements Insertable<RemoteAlbumEntityData> {+ final String id;+ final String name;+ final String description;+ final DateTime createdAt;+ final DateTime updatedAt;+ final String ownerId;+ final String? thumbnailAssetId;+ final bool isActivityEnabled;+ final int order;+ const RemoteAlbumEntityData(+ {required this.id,+ required this.name,+ required this.description,+ required this.createdAt,+ required this.updatedAt,+ required this.ownerId,+ this.thumbnailAssetId,+ required this.isActivityEnabled,+ required this.order});+ @override+ Map<String, Expression> toColumns(bool nullToAbsent) {+ final map = <String, Expression>{};+ map['id'] = Variable<String>(id);+ map['name'] = Variable<String>(name);+ map['description'] = Variable<String>(description);+ map['created_at'] = Variable<DateTime>(createdAt);+ map['updated_at'] = Variable<DateTime>(updatedAt);+ map['owner_id'] = Variable<String>(ownerId);+ if (!nullToAbsent || thumbnailAssetId != null) {+ map['thumbnail_asset_id'] = Variable<String>(thumbnailAssetId);+ }+ map['is_activity_enabled'] = Variable<bool>(isActivityEnabled);+ map['order'] = Variable<int>(order);+ return map;+ }++ factory RemoteAlbumEntityData.fromJson(Map<String, dynamic> json,+ {ValueSerializer? serializer}) {+ serializer ??= driftRuntimeOptions.defaultSerializer;+ return RemoteAlbumEntityData(+ id: serializer.fromJson<String>(json['id']),+ name: serializer.fromJson<String>(json['name']),+ description: serializer.fromJson<String>(json['description']),+ createdAt: serializer.fromJson<DateTime>(json['createdAt']),+ updatedAt: serializer.fromJson<DateTime>(json['updatedAt']),+ ownerId: serializer.fromJson<String>(json['ownerId']),+ thumbnailAssetId: serializer.fromJson<String?>(json['thumbnailAssetId']),+ isActivityEnabled: serializer.fromJson<bool>(json['isActivityEnabled']),+ order: serializer.fromJson<int>(json['order']),+ );+ }+ @override+ Map<String, dynamic> toJson({ValueSerializer? serializer}) {+ serializer ??= driftRuntimeOptions.defaultSerializer;+ return <String, dynamic>{+ 'id': serializer.toJson<String>(id),+ 'name': serializer.toJson<String>(name),+ 'description': serializer.toJson<String>(description),+ 'createdAt': serializer.toJson<DateTime>(createdAt),+ 'updatedAt': serializer.toJson<DateTime>(updatedAt),+ 'ownerId': serializer.toJson<String>(ownerId),+ 'thumbnailAssetId': serializer.toJson<String?>(thumbnailAssetId),+ 'isActivityEnabled': serializer.toJson<bool>(isActivityEnabled),+ 'order': serializer.toJson<int>(order),+ };+ }++ RemoteAlbumEntityData copyWith(+ {String? id,+ String? name,+ String? description,+ DateTime? createdAt,+ DateTime? updatedAt,+ String? ownerId,+ Value<String?> thumbnailAssetId = const Value.absent(),+ bool? isActivityEnabled,+ int? order}) =>+ RemoteAlbumEntityData(+ id: id ?? this.id,+ name: name ?? this.name,+ description: description ?? this.description,+ createdAt: createdAt ?? this.createdAt,+ updatedAt: updatedAt ?? this.updatedAt,+ ownerId: ownerId ?? this.ownerId,+ thumbnailAssetId: thumbnailAssetId.present+ ? thumbnailAssetId.value+ : this.thumbnailAssetId,+ isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled,+ order: order ?? this.order,+ );+ RemoteAlbumEntityData copyWithCompanion(RemoteAlbumEntityCompanion data) {+ return RemoteAlbumEntityData(+ id: data.id.present ? data.id.value : this.id,+ name: data.name.present ? data.name.value : this.name,+ description:+ data.description.present ? data.description.value : this.description,+ createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt,+ updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt,+ ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId,+ thumbnailAssetId: data.thumbnailAssetId.present+ ? data.thumbnailAssetId.value+ : this.thumbnailAssetId,+ isActivityEnabled: data.isActivityEnabled.present+ ? data.isActivityEnabled.value+ : this.isActivityEnabled,+ order: data.order.present ? data.order.value : this.order,+ );+ }++ @override+ String toString() {+ return (StringBuffer('RemoteAlbumEntityData(')+ ..write('id: $id, ')+ ..write('name: $name, ')+ ..write('description: $description, ')+ ..write('createdAt: $createdAt, ')+ ..write('updatedAt: $updatedAt, ')+ ..write('ownerId: $ownerId, ')+ ..write('thumbnailAssetId: $thumbnailAssetId, ')+ ..write('isActivityEnabled: $isActivityEnabled, ')+ ..write('order: $order')+ ..write(')'))+ .toString();+ }++ @override+ int get hashCode => Object.hash(id, name, description, createdAt, updatedAt,+ ownerId, thumbnailAssetId, isActivityEnabled, order);+ @override+ bool operator ==(Object other) =>+ identical(this, other) ||+ (other is RemoteAlbumEntityData &&+ other.id == this.id &&+ other.name == this.name &&+ other.description == this.description &&+ other.createdAt == this.createdAt &&+ other.updatedAt == this.updatedAt &&+ other.ownerId == this.ownerId &&+ other.thumbnailAssetId == this.thumbnailAssetId &&+ other.isActivityEnabled == this.isActivityEnabled &&+ other.order == this.order);+}++class RemoteAlbumEntityCompanion+ extends UpdateCompanion<RemoteAlbumEntityData> {+ final Value<String> id;+ final Value<String> name;+ final Value<String> description;+ final Value<DateTime> createdAt;+ final Value<DateTime> updatedAt;+ final Value<String> ownerId;+ final Value<String?> thumbnailAssetId;+ final Value<bool> isActivityEnabled;+ final Value<int> order;+ const RemoteAlbumEntityCompanion({+ this.id = const Value.absent(),+ this.name = const Value.absent(),+ this.description = const Value.absent(),+ this.createdAt = const Value.absent(),+ this.updatedAt = const Value.absent(),+ this.ownerId = const Value.absent(),+ this.thumbnailAssetId = const Value.absent(),+ this.isActivityEnabled = const Value.absent(),+ this.order = const Value.absent(),+ });+ RemoteAlbumEntityCompanion.insert({+ required String id,+ required String name,+ this.description = const Value.absent(),+ this.createdAt = const Value.absent(),+ this.updatedAt = const Value.absent(),+ required String ownerId,+ this.thumbnailAssetId = const Value.absent(),+ this.isActivityEnabled = const Value.absent(),+ required int order,+ }) : id = Value(id),+ name = Value(name),+ ownerId = Value(ownerId),+ order = Value(order);+ static Insertable<RemoteAlbumEntityData> custom({+ Expression<String>? id,+ Expression<String>? name,+ Expression<String>? description,+ Expression<DateTime>? createdAt,+ Expression<DateTime>? updatedAt,+ Expression<String>? ownerId,+ Expression<String>? thumbnailAssetId,+ Expression<bool>? isActivityEnabled,+ Expression<int>? order,+ }) {+ return RawValuesInsertable({+ if (id != null) 'id': id,+ if (name != null) 'name': name,+ if (description != null) 'description': description,+ if (createdAt != null) 'created_at': createdAt,+ if (updatedAt != null) 'updated_at': updatedAt,+ if (ownerId != null) 'owner_id': ownerId,+ if (thumbnailAssetId != null) 'thumbnail_asset_id': thumbnailAssetId,+ if (isActivityEnabled != null) 'is_activity_enabled': isActivityEnabled,+ if (order != null) 'order': order,+ });+ }++ RemoteAlbumEntityCompanion copyWith(+ {Value<String>? id,+ Value<String>? name,+ Value<String>? description,+ Value<DateTime>? createdAt,+ Value<DateTime>? updatedAt,+ Value<String>? ownerId,+ Value<String?>? thumbnailAssetId,+ Value<bool>? isActivityEnabled,+ Value<int>? order}) {+ return RemoteAlbumEntityCompanion(+ id: id ?? this.id,+ name: name ?? this.name,+ description: description ?? this.description,+ createdAt: createdAt ?? this.createdAt,+ updatedAt: updatedAt ?? this.updatedAt,+ ownerId: ownerId ?? this.ownerId,+ thumbnailAssetId: thumbnailAssetId ?? this.thumbnailAssetId,+ isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled,+ order: order ?? this.order,+ );+ }++ @override+ Map<String, Expression> toColumns(bool nullToAbsent) {+ final map = <String, Expression>{};+ if (id.present) {+ map['id'] = Variable<String>(id.value);+ }+ if (name.present) {+ map['name'] = Variable<String>(name.value);+ }+ if (description.present) {+ map['description'] = Variable<String>(description.value);+ }+ if (createdAt.present) {+ map['created_at'] = Variable<DateTime>(createdAt.value);+ }+ if (updatedAt.present) {+ map['updated_at'] = Variable<DateTime>(updatedAt.value);+ }+ if (ownerId.present) {+ map['owner_id'] = Variable<String>(ownerId.value);+ }+ if (thumbnailAssetId.present) {+ map['thumbnail_asset_id'] = Variable<String>(thumbnailAssetId.value);+ }+ if (isActivityEnabled.present) {+ map['is_activity_enabled'] = Variable<bool>(isActivityEnabled.value);+ }+ if (order.present) {+ map['order'] = Variable<int>(order.value);+ }+ return map;+ }++ @override+ String toString() {+ return (StringBuffer('RemoteAlbumEntityCompanion(')+ ..write('id: $id, ')+ ..write('name: $name, ')+ ..write('description: $description, ')+ ..write('createdAt: $createdAt, ')+ ..write('updatedAt: $updatedAt, ')+ ..write('ownerId: $ownerId, ')+ ..write('thumbnailAssetId: $thumbnailAssetId, ')+ ..write('isActivityEnabled: $isActivityEnabled, ')+ ..write('order: $order')+ ..write(')'))+ .toString();+ }+}++class RemoteAlbumAssetEntity extends Table+ with TableInfo<RemoteAlbumAssetEntity, RemoteAlbumAssetEntityData> {+ @override+ final GeneratedDatabase attachedDatabase;+ final String? _alias;+ RemoteAlbumAssetEntity(this.attachedDatabase, [this._alias]);+ late final GeneratedColumn<String> assetId = GeneratedColumn<String>(+ 'asset_id', aliasedName, false,+ type: DriftSqlType.string,+ requiredDuringInsert: true,+ defaultConstraints: GeneratedColumn.constraintIsAlways(+ 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE'));+ late final GeneratedColumn<String> albumId = GeneratedColumn<String>(+ 'album_id', aliasedName, false,+ type: DriftSqlType.string,+ requiredDuringInsert: true,+ defaultConstraints: GeneratedColumn.constraintIsAlways(+ 'REFERENCES remote_album_entity (id) ON DELETE CASCADE'));+ @override+ List<GeneratedColumn> get $columns => [assetId, albumId];+ @override+ String get aliasedName => _alias ?? actualTableName;+ @override+ String get actualTableName => $name;+ static const String $name = 'remote_album_asset_entity';+ @override+ Set<GeneratedColumn> get $primaryKey => {assetId, albumId};+ @override+ RemoteAlbumAssetEntityData map(Map<String, dynamic> data,+ {String? tablePrefix}) {+ final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';+ return RemoteAlbumAssetEntityData(+ assetId: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}asset_id'])!,+ albumId: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}album_id'])!,+ );+ }++ @override+ RemoteAlbumAssetEntity createAlias(String alias) {+ return RemoteAlbumAssetEntity(attachedDatabase, alias);+ }++ @override+ bool get withoutRowId => true;+ @override+ bool get isStrict => true;+}++class RemoteAlbumAssetEntityData extends DataClass+ implements Insertable<RemoteAlbumAssetEntityData> {+ final String assetId;+ final String albumId;+ const RemoteAlbumAssetEntityData(+ {required this.assetId, required this.albumId});+ @override+ Map<String, Expression> toColumns(bool nullToAbsent) {+ final map = <String, Expression>{};+ map['asset_id'] = Variable<String>(assetId);+ map['album_id'] = Variable<String>(albumId);+ return map;+ }++ factory RemoteAlbumAssetEntityData.fromJson(Map<String, dynamic> json,+ {ValueSerializer? serializer}) {+ serializer ??= driftRuntimeOptions.defaultSerializer;+ return RemoteAlbumAssetEntityData(+ assetId: serializer.fromJson<String>(json['assetId']),+ albumId: serializer.fromJson<String>(json['albumId']),+ );+ }+ @override+ Map<String, dynamic> toJson({ValueSerializer? serializer}) {+ serializer ??= driftRuntimeOptions.defaultSerializer;+ return <String, dynamic>{+ 'assetId': serializer.toJson<String>(assetId),+ 'albumId': serializer.toJson<String>(albumId),+ };+ }++ RemoteAlbumAssetEntityData copyWith({String? assetId, String? albumId}) =>+ RemoteAlbumAssetEntityData(+ assetId: assetId ?? this.assetId,+ albumId: albumId ?? this.albumId,+ );+ RemoteAlbumAssetEntityData copyWithCompanion(+ RemoteAlbumAssetEntityCompanion data) {+ return RemoteAlbumAssetEntityData(+ assetId: data.assetId.present ? data.assetId.value : this.assetId,+ albumId: data.albumId.present ? data.albumId.value : this.albumId,+ );+ }++ @override+ String toString() {+ return (StringBuffer('RemoteAlbumAssetEntityData(')+ ..write('assetId: $assetId, ')+ ..write('albumId: $albumId')+ ..write(')'))+ .toString();+ }++ @override+ int get hashCode => Object.hash(assetId, albumId);+ @override+ bool operator ==(Object other) =>+ identical(this, other) ||+ (other is RemoteAlbumAssetEntityData &&+ other.assetId == this.assetId &&+ other.albumId == this.albumId);+}++class RemoteAlbumAssetEntityCompanion+ extends UpdateCompanion<RemoteAlbumAssetEntityData> {+ final Value<String> assetId;+ final Value<String> albumId;+ const RemoteAlbumAssetEntityCompanion({+ this.assetId = const Value.absent(),+ this.albumId = const Value.absent(),+ });+ RemoteAlbumAssetEntityCompanion.insert({+ required String assetId,+ required String albumId,+ }) : assetId = Value(assetId),+ albumId = Value(albumId);+ static Insertable<RemoteAlbumAssetEntityData> custom({+ Expression<String>? assetId,+ Expression<String>? albumId,+ }) {+ return RawValuesInsertable({+ if (assetId != null) 'asset_id': assetId,+ if (albumId != null) 'album_id': albumId,+ });+ }++ RemoteAlbumAssetEntityCompanion copyWith(+ {Value<String>? assetId, Value<String>? albumId}) {+ return RemoteAlbumAssetEntityCompanion(+ assetId: assetId ?? this.assetId,+ albumId: albumId ?? this.albumId,+ );+ }++ @override+ Map<String, Expression> toColumns(bool nullToAbsent) {+ final map = <String, Expression>{};+ if (assetId.present) {+ map['asset_id'] = Variable<String>(assetId.value);+ }+ if (albumId.present) {+ map['album_id'] = Variable<String>(albumId.value);+ }+ return map;+ }++ @override+ String toString() {+ return (StringBuffer('RemoteAlbumAssetEntityCompanion(')+ ..write('assetId: $assetId, ')+ ..write('albumId: $albumId')+ ..write(')'))+ .toString();+ }+}++class RemoteAlbumUserEntity extends Table+ with TableInfo<RemoteAlbumUserEntity, RemoteAlbumUserEntityData> {+ @override+ final GeneratedDatabase attachedDatabase;+ final String? _alias;+ RemoteAlbumUserEntity(this.attachedDatabase, [this._alias]);+ late final GeneratedColumn<String> albumId = GeneratedColumn<String>(+ 'album_id', aliasedName, false,+ type: DriftSqlType.string,+ requiredDuringInsert: true,+ defaultConstraints: GeneratedColumn.constraintIsAlways(+ 'REFERENCES remote_album_entity (id) ON DELETE CASCADE'));+ late final GeneratedColumn<String> userId = GeneratedColumn<String>(+ 'user_id', aliasedName, false,+ type: DriftSqlType.string,+ requiredDuringInsert: true,+ defaultConstraints: GeneratedColumn.constraintIsAlways(+ 'REFERENCES user_entity (id) ON DELETE CASCADE'));+ late final GeneratedColumn<int> role = GeneratedColumn<int>(+ 'role', aliasedName, false,+ type: DriftSqlType.int, requiredDuringInsert: true);+ @override+ List<GeneratedColumn> get $columns => [albumId, userId, role];+ @override+ String get aliasedName => _alias ?? actualTableName;+ @override+ String get actualTableName => $name;+ static const String $name = 'remote_album_user_entity';+ @override+ Set<GeneratedColumn> get $primaryKey => {albumId, userId};+ @override+ RemoteAlbumUserEntityData map(Map<String, dynamic> data,+ {String? tablePrefix}) {+ final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';+ return RemoteAlbumUserEntityData(+ albumId: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}album_id'])!,+ userId: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}user_id'])!,+ role: attachedDatabase.typeMapping+ .read(DriftSqlType.int, data['${effectivePrefix}role'])!,+ );+ }++ @override+ RemoteAlbumUserEntity createAlias(String alias) {+ return RemoteAlbumUserEntity(attachedDatabase, alias);+ }++ @override+ bool get withoutRowId => true;+ @override+ bool get isStrict => true;+}++class RemoteAlbumUserEntityData extends DataClass+ implements Insertable<RemoteAlbumUserEntityData> {+ final String albumId;+ final String userId;+ final int role;+ const RemoteAlbumUserEntityData(+ {required this.albumId, required this.userId, required this.role});+ @override+ Map<String, Expression> toColumns(bool nullToAbsent) {+ final map = <String, Expression>{};+ map['album_id'] = Variable<String>(albumId);+ map['user_id'] = Variable<String>(userId);+ map['role'] = Variable<int>(role);+ return map;+ }++ factory RemoteAlbumUserEntityData.fromJson(Map<String, dynamic> json,+ {ValueSerializer? serializer}) {+ serializer ??= driftRuntimeOptions.defaultSerializer;+ return RemoteAlbumUserEntityData(+ albumId: serializer.fromJson<String>(json['albumId']),+ userId: serializer.fromJson<String>(json['userId']),+ role: serializer.fromJson<int>(json['role']),+ );+ }+ @override+ Map<String, dynamic> toJson({ValueSerializer? serializer}) {+ serializer ??= driftRuntimeOptions.defaultSerializer;+ return <String, dynamic>{+ 'albumId': serializer.toJson<String>(albumId),+ 'userId': serializer.toJson<String>(userId),+ 'role': serializer.toJson<int>(role),+ };+ }++ RemoteAlbumUserEntityData copyWith(+ {String? albumId, String? userId, int? role}) =>+ RemoteAlbumUserEntityData(+ albumId: albumId ?? this.albumId,+ userId: userId ?? this.userId,+ role: role ?? this.role,+ );+ RemoteAlbumUserEntityData copyWithCompanion(+ RemoteAlbumUserEntityCompanion data) {+ return RemoteAlbumUserEntityData(+ albumId: data.albumId.present ? data.albumId.value : this.albumId,+ userId: data.userId.present ? data.userId.value : this.userId,+ role: data.role.present ? data.role.value : this.role,+ );+ }++ @override+ String toString() {+ return (StringBuffer('RemoteAlbumUserEntityData(')+ ..write('albumId: $albumId, ')+ ..write('userId: $userId, ')+ ..write('role: $role')+ ..write(')'))+ .toString();+ }++ @override+ int get hashCode => Object.hash(albumId, userId, role);+ @override+ bool operator ==(Object other) =>+ identical(this, other) ||+ (other is RemoteAlbumUserEntityData &&+ other.albumId == this.albumId &&+ other.userId == this.userId &&+ other.role == this.role);+}++class RemoteAlbumUserEntityCompanion+ extends UpdateCompanion<RemoteAlbumUserEntityData> {+ final Value<String> albumId;+ final Value<String> userId;+ final Value<int> role;+ const RemoteAlbumUserEntityCompanion({+ this.albumId = const Value.absent(),+ this.userId = const Value.absent(),+ this.role = const Value.absent(),+ });+ RemoteAlbumUserEntityCompanion.insert({+ required String albumId,+ required String userId,+ required int role,+ }) : albumId = Value(albumId),+ userId = Value(userId),+ role = Value(role);+ static Insertable<RemoteAlbumUserEntityData> custom({+ Expression<String>? albumId,+ Expression<String>? userId,+ Expression<int>? role,+ }) {+ return RawValuesInsertable({+ if (albumId != null) 'album_id': albumId,+ if (userId != null) 'user_id': userId,+ if (role != null) 'role': role,+ });+ }++ RemoteAlbumUserEntityCompanion copyWith(+ {Value<String>? albumId, Value<String>? userId, Value<int>? role}) {+ return RemoteAlbumUserEntityCompanion(+ albumId: albumId ?? this.albumId,+ userId: userId ?? this.userId,+ role: role ?? this.role,+ );+ }++ @override+ Map<String, Expression> toColumns(bool nullToAbsent) {+ final map = <String, Expression>{};+ if (albumId.present) {+ map['album_id'] = Variable<String>(albumId.value);+ }+ if (userId.present) {+ map['user_id'] = Variable<String>(userId.value);+ }+ if (role.present) {+ map['role'] = Variable<int>(role.value);+ }+ return map;+ }++ @override+ String toString() {+ return (StringBuffer('RemoteAlbumUserEntityCompanion(')+ ..write('albumId: $albumId, ')+ ..write('userId: $userId, ')+ ..write('role: $role')+ ..write(')'))+ .toString();+ }+}++class MemoryEntity extends Table+ with TableInfo<MemoryEntity, MemoryEntityData> {+ @override+ final GeneratedDatabase attachedDatabase;+ final String? _alias;+ MemoryEntity(this.attachedDatabase, [this._alias]);+ late final GeneratedColumn<String> id = GeneratedColumn<String>(+ 'id', aliasedName, false,+ type: DriftSqlType.string, requiredDuringInsert: true);+ late final GeneratedColumn<DateTime> createdAt = GeneratedColumn<DateTime>(+ 'created_at', aliasedName, false,+ type: DriftSqlType.dateTime,+ requiredDuringInsert: false,+ defaultValue: const CustomExpression('CURRENT_TIMESTAMP'));+ late final GeneratedColumn<DateTime> updatedAt = GeneratedColumn<DateTime>(+ 'updated_at', aliasedName, false,+ type: DriftSqlType.dateTime,+ requiredDuringInsert: false,+ defaultValue: const CustomExpression('CURRENT_TIMESTAMP'));+ late final GeneratedColumn<DateTime> deletedAt = GeneratedColumn<DateTime>(+ 'deleted_at', aliasedName, true,+ type: DriftSqlType.dateTime, requiredDuringInsert: false);+ late final GeneratedColumn<String> ownerId = GeneratedColumn<String>(+ 'owner_id', aliasedName, false,+ type: DriftSqlType.string,+ requiredDuringInsert: true,+ defaultConstraints: GeneratedColumn.constraintIsAlways(+ 'REFERENCES user_entity (id) ON DELETE CASCADE'));+ late final GeneratedColumn<int> type = GeneratedColumn<int>(+ 'type', aliasedName, false,+ type: DriftSqlType.int, requiredDuringInsert: true);+ late final GeneratedColumn<String> data = GeneratedColumn<String>(+ 'data', aliasedName, false,+ type: DriftSqlType.string, requiredDuringInsert: true);+ late final GeneratedColumn<bool> isSaved = GeneratedColumn<bool>(+ 'is_saved', aliasedName, false,+ type: DriftSqlType.bool,+ requiredDuringInsert: false,+ defaultConstraints:+ GeneratedColumn.constraintIsAlways('CHECK ("is_saved" IN (0, 1))'),+ defaultValue: const CustomExpression('0'));+ late final GeneratedColumn<DateTime> memoryAt = GeneratedColumn<DateTime>(+ 'memory_at', aliasedName, false,+ type: DriftSqlType.dateTime, requiredDuringInsert: true);+ late final GeneratedColumn<DateTime> seenAt = GeneratedColumn<DateTime>(+ 'seen_at', aliasedName, true,+ type: DriftSqlType.dateTime, requiredDuringInsert: false);+ late final GeneratedColumn<DateTime> showAt = GeneratedColumn<DateTime>(+ 'show_at', aliasedName, true,+ type: DriftSqlType.dateTime, requiredDuringInsert: false);+ late final GeneratedColumn<DateTime> hideAt = GeneratedColumn<DateTime>(+ 'hide_at', aliasedName, true,+ type: DriftSqlType.dateTime, requiredDuringInsert: false);+ @override+ List<GeneratedColumn> get $columns => [+ id,+ createdAt,+ updatedAt,+ deletedAt,+ ownerId,+ type,+ data,+ isSaved,+ memoryAt,+ seenAt,+ showAt,+ hideAt+ ];+ @override+ String get aliasedName => _alias ?? actualTableName;+ @override+ String get actualTableName => $name;+ static const String $name = 'memory_entity';+ @override+ Set<GeneratedColumn> get $primaryKey => {id};+ @override+ MemoryEntityData map(Map<String, dynamic> data, {String? tablePrefix}) {+ final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';+ return MemoryEntityData(+ id: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}id'])!,+ createdAt: attachedDatabase.typeMapping+ .read(DriftSqlType.dateTime, data['${effectivePrefix}created_at'])!,+ updatedAt: attachedDatabase.typeMapping+ .read(DriftSqlType.dateTime, data['${effectivePrefix}updated_at'])!,+ deletedAt: attachedDatabase.typeMapping+ .read(DriftSqlType.dateTime, data['${effectivePrefix}deleted_at']),+ ownerId: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}owner_id'])!,+ type: attachedDatabase.typeMapping+ .read(DriftSqlType.int, data['${effectivePrefix}type'])!,+ data: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}data'])!,+ isSaved: attachedDatabase.typeMapping+ .read(DriftSqlType.bool, data['${effectivePrefix}is_saved'])!,+ memoryAt: attachedDatabase.typeMapping+ .read(DriftSqlType.dateTime, data['${effectivePrefix}memory_at'])!,+ seenAt: attachedDatabase.typeMapping+ .read(DriftSqlType.dateTime, data['${effectivePrefix}seen_at']),+ showAt: attachedDatabase.typeMapping+ .read(DriftSqlType.dateTime, data['${effectivePrefix}show_at']),+ hideAt: attachedDatabase.typeMapping+ .read(DriftSqlType.dateTime, data['${effectivePrefix}hide_at']),+ );+ }++ @override+ MemoryEntity createAlias(String alias) {+ return MemoryEntity(attachedDatabase, alias);+ }++ @override+ bool get withoutRowId => true;+ @override+ bool get isStrict => true;+}++class MemoryEntityData extends DataClass+ implements Insertable<MemoryEntityData> {+ final String id;+ final DateTime createdAt;+ final DateTime updatedAt;+ final DateTime? deletedAt;+ final String ownerId;+ final int type;+ final String data;+ final bool isSaved;+ final DateTime memoryAt;+ final DateTime? seenAt;+ final DateTime? showAt;+ final DateTime? hideAt;+ const MemoryEntityData(+ {required this.id,+ required this.createdAt,+ required this.updatedAt,+ this.deletedAt,+ required this.ownerId,+ required this.type,+ required this.data,+ required this.isSaved,+ required this.memoryAt,+ this.seenAt,+ this.showAt,+ this.hideAt});+ @override+ Map<String, Expression> toColumns(bool nullToAbsent) {+ final map = <String, Expression>{};+ map['id'] = Variable<String>(id);+ map['created_at'] = Variable<DateTime>(createdAt);+ map['updated_at'] = Variable<DateTime>(updatedAt);+ if (!nullToAbsent || deletedAt != null) {+ map['deleted_at'] = Variable<DateTime>(deletedAt);+ }+ map['owner_id'] = Variable<String>(ownerId);+ map['type'] = Variable<int>(type);+ map['data'] = Variable<String>(data);+ map['is_saved'] = Variable<bool>(isSaved);+ map['memory_at'] = Variable<DateTime>(memoryAt);+ if (!nullToAbsent || seenAt != null) {+ map['seen_at'] = Variable<DateTime>(seenAt);+ }+ if (!nullToAbsent || showAt != null) {+ map['show_at'] = Variable<DateTime>(showAt);+ }+ if (!nullToAbsent || hideAt != null) {+ map['hide_at'] = Variable<DateTime>(hideAt);+ }+ return map;+ }++ factory MemoryEntityData.fromJson(Map<String, dynamic> json,+ {ValueSerializer? serializer}) {+ serializer ??= driftRuntimeOptions.defaultSerializer;+ return MemoryEntityData(+ id: serializer.fromJson<String>(json['id']),+ createdAt: serializer.fromJson<DateTime>(json['createdAt']),+ updatedAt: serializer.fromJson<DateTime>(json['updatedAt']),+ deletedAt: serializer.fromJson<DateTime?>(json['deletedAt']),+ ownerId: serializer.fromJson<String>(json['ownerId']),+ type: serializer.fromJson<int>(json['type']),+ data: serializer.fromJson<String>(json['data']),+ isSaved: serializer.fromJson<bool>(json['isSaved']),+ memoryAt: serializer.fromJson<DateTime>(json['memoryAt']),+ seenAt: serializer.fromJson<DateTime?>(json['seenAt']),+ showAt: serializer.fromJson<DateTime?>(json['showAt']),+ hideAt: serializer.fromJson<DateTime?>(json['hideAt']),+ );+ }+ @override+ Map<String, dynamic> toJson({ValueSerializer? serializer}) {+ serializer ??= driftRuntimeOptions.defaultSerializer;+ return <String, dynamic>{+ 'id': serializer.toJson<String>(id),+ 'createdAt': serializer.toJson<DateTime>(createdAt),+ 'updatedAt': serializer.toJson<DateTime>(updatedAt),+ 'deletedAt': serializer.toJson<DateTime?>(deletedAt),+ 'ownerId': serializer.toJson<String>(ownerId),+ 'type': serializer.toJson<int>(type),+ 'data': serializer.toJson<String>(data),+ 'isSaved': serializer.toJson<bool>(isSaved),+ 'memoryAt': serializer.toJson<DateTime>(memoryAt),+ 'seenAt': serializer.toJson<DateTime?>(seenAt),+ 'showAt': serializer.toJson<DateTime?>(showAt),+ 'hideAt': serializer.toJson<DateTime?>(hideAt),+ };+ }++ MemoryEntityData copyWith(+ {String? id,+ DateTime? createdAt,+ DateTime? updatedAt,+ Value<DateTime?> deletedAt = const Value.absent(),+ String? ownerId,+ int? type,+ String? data,+ bool? isSaved,+ DateTime? memoryAt,+ Value<DateTime?> seenAt = const Value.absent(),+ Value<DateTime?> showAt = const Value.absent(),+ Value<DateTime?> hideAt = const Value.absent()}) =>+ MemoryEntityData(+ id: id ?? this.id,+ createdAt: createdAt ?? this.createdAt,+ updatedAt: updatedAt ?? this.updatedAt,+ deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt,+ ownerId: ownerId ?? this.ownerId,+ type: type ?? this.type,+ data: data ?? this.data,+ isSaved: isSaved ?? this.isSaved,+ memoryAt: memoryAt ?? this.memoryAt,+ seenAt: seenAt.present ? seenAt.value : this.seenAt,+ showAt: showAt.present ? showAt.value : this.showAt,+ hideAt: hideAt.present ? hideAt.value : this.hideAt,+ );+ MemoryEntityData copyWithCompanion(MemoryEntityCompanion data) {+ return MemoryEntityData(+ id: data.id.present ? data.id.value : this.id,+ createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt,+ updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt,+ deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt,+ ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId,+ type: data.type.present ? data.type.value : this.type,+ data: data.data.present ? data.data.value : this.data,+ isSaved: data.isSaved.present ? data.isSaved.value : this.isSaved,+ memoryAt: data.memoryAt.present ? data.memoryAt.value : this.memoryAt,+ seenAt: data.seenAt.present ? data.seenAt.value : this.seenAt,+ showAt: data.showAt.present ? data.showAt.value : this.showAt,+ hideAt: data.hideAt.present ? data.hideAt.value : this.hideAt,+ );+ }++ @override+ String toString() {+ return (StringBuffer('MemoryEntityData(')+ ..write('id: $id, ')+ ..write('createdAt: $createdAt, ')+ ..write('updatedAt: $updatedAt, ')+ ..write('deletedAt: $deletedAt, ')+ ..write('ownerId: $ownerId, ')+ ..write('type: $type, ')+ ..write('data: $data, ')+ ..write('isSaved: $isSaved, ')+ ..write('memoryAt: $memoryAt, ')+ ..write('seenAt: $seenAt, ')+ ..write('showAt: $showAt, ')+ ..write('hideAt: $hideAt')+ ..write(')'))+ .toString();+ }++ @override+ int get hashCode => Object.hash(id, createdAt, updatedAt, deletedAt, ownerId,+ type, data, isSaved, memoryAt, seenAt, showAt, hideAt);+ @override+ bool operator ==(Object other) =>+ identical(this, other) ||+ (other is MemoryEntityData &&+ other.id == this.id &&+ other.createdAt == this.createdAt &&+ other.updatedAt == this.updatedAt &&+ other.deletedAt == this.deletedAt &&+ other.ownerId == this.ownerId &&+ other.type == this.type &&+ other.data == this.data &&+ other.isSaved == this.isSaved &&+ other.memoryAt == this.memoryAt &&+ other.seenAt == this.seenAt &&+ other.showAt == this.showAt &&+ other.hideAt == this.hideAt);+}++class MemoryEntityCompanion extends UpdateCompanion<MemoryEntityData> {+ final Value<String> id;+ final Value<DateTime> createdAt;+ final Value<DateTime> updatedAt;+ final Value<DateTime?> deletedAt;+ final Value<String> ownerId;+ final Value<int> type;+ final Value<String> data;+ final Value<bool> isSaved;+ final Value<DateTime> memoryAt;+ final Value<DateTime?> seenAt;+ final Value<DateTime?> showAt;+ final Value<DateTime?> hideAt;+ const MemoryEntityCompanion({+ this.id = const Value.absent(),+ this.createdAt = const Value.absent(),+ this.updatedAt = const Value.absent(),+ this.deletedAt = const Value.absent(),+ this.ownerId = const Value.absent(),+ this.type = const Value.absent(),+ this.data = const Value.absent(),+ this.isSaved = const Value.absent(),+ this.memoryAt = const Value.absent(),+ this.seenAt = const Value.absent(),+ this.showAt = const Value.absent(),+ this.hideAt = const Value.absent(),+ });+ MemoryEntityCompanion.insert({+ required String id,+ this.createdAt = const Value.absent(),+ this.updatedAt = const Value.absent(),+ this.deletedAt = const Value.absent(),+ required String ownerId,+ required int type,+ required String data,+ this.isSaved = const Value.absent(),+ required DateTime memoryAt,+ this.seenAt = const Value.absent(),+ this.showAt = const Value.absent(),+ this.hideAt = const Value.absent(),+ }) : id = Value(id),+ ownerId = Value(ownerId),+ type = Value(type),+ data = Value(data),+ memoryAt = Value(memoryAt);+ static Insertable<MemoryEntityData> custom({+ Expression<String>? id,+ Expression<DateTime>? createdAt,+ Expression<DateTime>? updatedAt,+ Expression<DateTime>? deletedAt,+ Expression<String>? ownerId,+ Expression<int>? type,+ Expression<String>? data,+ Expression<bool>? isSaved,+ Expression<DateTime>? memoryAt,+ Expression<DateTime>? seenAt,+ Expression<DateTime>? showAt,+ Expression<DateTime>? hideAt,+ }) {+ return RawValuesInsertable({+ if (id != null) 'id': id,+ if (createdAt != null) 'created_at': createdAt,+ if (updatedAt != null) 'updated_at': updatedAt,+ if (deletedAt != null) 'deleted_at': deletedAt,+ if (ownerId != null) 'owner_id': ownerId,+ if (type != null) 'type': type,+ if (data != null) 'data': data,+ if (isSaved != null) 'is_saved': isSaved,+ if (memoryAt != null) 'memory_at': memoryAt,+ if (seenAt != null) 'seen_at': seenAt,+ if (showAt != null) 'show_at': showAt,+ if (hideAt != null) 'hide_at': hideAt,+ });+ }++ MemoryEntityCompanion copyWith(+ {Value<String>? id,+ Value<DateTime>? createdAt,+ Value<DateTime>? updatedAt,+ Value<DateTime?>? deletedAt,+ Value<String>? ownerId,+ Value<int>? type,+ Value<String>? data,+ Value<bool>? isSaved,+ Value<DateTime>? memoryAt,+ Value<DateTime?>? seenAt,+ Value<DateTime?>? showAt,+ Value<DateTime?>? hideAt}) {+ return MemoryEntityCompanion(+ id: id ?? this.id,+ createdAt: createdAt ?? this.createdAt,+ updatedAt: updatedAt ?? this.updatedAt,+ deletedAt: deletedAt ?? this.deletedAt,+ ownerId: ownerId ?? this.ownerId,+ type: type ?? this.type,+ data: data ?? this.data,+ isSaved: isSaved ?? this.isSaved,+ memoryAt: memoryAt ?? this.memoryAt,+ seenAt: seenAt ?? this.seenAt,+ showAt: showAt ?? this.showAt,+ hideAt: hideAt ?? this.hideAt,+ );+ }++ @override+ Map<String, Expression> toColumns(bool nullToAbsent) {+ final map = <String, Expression>{};+ if (id.present) {+ map['id'] = Variable<String>(id.value);+ }+ if (createdAt.present) {+ map['created_at'] = Variable<DateTime>(createdAt.value);+ }+ if (updatedAt.present) {+ map['updated_at'] = Variable<DateTime>(updatedAt.value);+ }+ if (deletedAt.present) {+ map['deleted_at'] = Variable<DateTime>(deletedAt.value);+ }+ if (ownerId.present) {+ map['owner_id'] = Variable<String>(ownerId.value);+ }+ if (type.present) {+ map['type'] = Variable<int>(type.value);+ }+ if (data.present) {+ map['data'] = Variable<String>(data.value);+ }+ if (isSaved.present) {+ map['is_saved'] = Variable<bool>(isSaved.value);+ }+ if (memoryAt.present) {+ map['memory_at'] = Variable<DateTime>(memoryAt.value);+ }+ if (seenAt.present) {+ map['seen_at'] = Variable<DateTime>(seenAt.value);+ }+ if (showAt.present) {+ map['show_at'] = Variable<DateTime>(showAt.value);+ }+ if (hideAt.present) {+ map['hide_at'] = Variable<DateTime>(hideAt.value);+ }+ return map;+ }++ @override+ String toString() {+ return (StringBuffer('MemoryEntityCompanion(')+ ..write('id: $id, ')+ ..write('createdAt: $createdAt, ')+ ..write('updatedAt: $updatedAt, ')+ ..write('deletedAt: $deletedAt, ')+ ..write('ownerId: $ownerId, ')+ ..write('type: $type, ')+ ..write('data: $data, ')+ ..write('isSaved: $isSaved, ')+ ..write('memoryAt: $memoryAt, ')+ ..write('seenAt: $seenAt, ')+ ..write('showAt: $showAt, ')+ ..write('hideAt: $hideAt')+ ..write(')'))+ .toString();+ }+}++class MemoryAssetEntity extends Table+ with TableInfo<MemoryAssetEntity, MemoryAssetEntityData> {+ @override+ final GeneratedDatabase attachedDatabase;+ final String? _alias;+ MemoryAssetEntity(this.attachedDatabase, [this._alias]);+ late final GeneratedColumn<String> assetId = GeneratedColumn<String>(+ 'asset_id', aliasedName, false,+ type: DriftSqlType.string,+ requiredDuringInsert: true,+ defaultConstraints: GeneratedColumn.constraintIsAlways(+ 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE'));+ late final GeneratedColumn<String> memoryId = GeneratedColumn<String>(+ 'memory_id', aliasedName, false,+ type: DriftSqlType.string,+ requiredDuringInsert: true,+ defaultConstraints: GeneratedColumn.constraintIsAlways(+ 'REFERENCES memory_entity (id) ON DELETE CASCADE'));+ @override+ List<GeneratedColumn> get $columns => [assetId, memoryId];+ @override+ String get aliasedName => _alias ?? actualTableName;+ @override+ String get actualTableName => $name;+ static const String $name = 'memory_asset_entity';+ @override+ Set<GeneratedColumn> get $primaryKey => {assetId, memoryId};+ @override+ MemoryAssetEntityData map(Map<String, dynamic> data, {String? tablePrefix}) {+ final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';+ return MemoryAssetEntityData(+ assetId: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}asset_id'])!,+ memoryId: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}memory_id'])!,+ );+ }++ @override+ MemoryAssetEntity createAlias(String alias) {+ return MemoryAssetEntity(attachedDatabase, alias);+ }++ @override+ bool get withoutRowId => true;+ @override+ bool get isStrict => true;+}++class MemoryAssetEntityData extends DataClass+ implements Insertable<MemoryAssetEntityData> {+ final String assetId;+ final String memoryId;+ const MemoryAssetEntityData({required this.assetId, required this.memoryId});+ @override+ Map<String, Expression> toColumns(bool nullToAbsent) {+ final map = <String, Expression>{};+ map['asset_id'] = Variable<String>(assetId);+ map['memory_id'] = Variable<String>(memoryId);+ return map;+ }++ factory MemoryAssetEntityData.fromJson(Map<String, dynamic> json,+ {ValueSerializer? serializer}) {+ serializer ??= driftRuntimeOptions.defaultSerializer;+ return MemoryAssetEntityData(+ assetId: serializer.fromJson<String>(json['assetId']),+ memoryId: serializer.fromJson<String>(json['memoryId']),+ );+ }+ @override+ Map<String, dynamic> toJson({ValueSerializer? serializer}) {+ serializer ??= driftRuntimeOptions.defaultSerializer;+ return <String, dynamic>{+ 'assetId': serializer.toJson<String>(assetId),+ 'memoryId': serializer.toJson<String>(memoryId),+ };+ }++ MemoryAssetEntityData copyWith({String? assetId, String? memoryId}) =>+ MemoryAssetEntityData(+ assetId: assetId ?? this.assetId,+ memoryId: memoryId ?? this.memoryId,+ );+ MemoryAssetEntityData copyWithCompanion(MemoryAssetEntityCompanion data) {+ return MemoryAssetEntityData(+ assetId: data.assetId.present ? data.assetId.value : this.assetId,+ memoryId: data.memoryId.present ? data.memoryId.value : this.memoryId,+ );+ }++ @override+ String toString() {+ return (StringBuffer('MemoryAssetEntityData(')+ ..write('assetId: $assetId, ')+ ..write('memoryId: $memoryId')+ ..write(')'))+ .toString();+ }++ @override+ int get hashCode => Object.hash(assetId, memoryId);+ @override+ bool operator ==(Object other) =>+ identical(this, other) ||+ (other is MemoryAssetEntityData &&+ other.assetId == this.assetId &&+ other.memoryId == this.memoryId);+}++class MemoryAssetEntityCompanion+ extends UpdateCompanion<MemoryAssetEntityData> {+ final Value<String> assetId;+ final Value<String> memoryId;+ const MemoryAssetEntityCompanion({+ this.assetId = const Value.absent(),+ this.memoryId = const Value.absent(),+ });+ MemoryAssetEntityCompanion.insert({+ required String assetId,+ required String memoryId,+ }) : assetId = Value(assetId),+ memoryId = Value(memoryId);+ static Insertable<MemoryAssetEntityData> custom({+ Expression<String>? assetId,+ Expression<String>? memoryId,+ }) {+ return RawValuesInsertable({+ if (assetId != null) 'asset_id': assetId,+ if (memoryId != null) 'memory_id': memoryId,+ });+ }++ MemoryAssetEntityCompanion copyWith(+ {Value<String>? assetId, Value<String>? memoryId}) {+ return MemoryAssetEntityCompanion(+ assetId: assetId ?? this.assetId,+ memoryId: memoryId ?? this.memoryId,+ );+ }++ @override+ Map<String, Expression> toColumns(bool nullToAbsent) {+ final map = <String, Expression>{};+ if (assetId.present) {+ map['asset_id'] = Variable<String>(assetId.value);+ }+ if (memoryId.present) {+ map['memory_id'] = Variable<String>(memoryId.value);+ }+ return map;+ }++ @override+ String toString() {+ return (StringBuffer('MemoryAssetEntityCompanion(')+ ..write('assetId: $assetId, ')+ ..write('memoryId: $memoryId')+ ..write(')'))+ .toString();+ }+}++class StackEntity extends Table with TableInfo<StackEntity, StackEntityData> {+ @override+ final GeneratedDatabase attachedDatabase;+ final String? _alias;+ StackEntity(this.attachedDatabase, [this._alias]);+ late final GeneratedColumn<String> id = GeneratedColumn<String>(+ 'id', aliasedName, false,+ type: DriftSqlType.string, requiredDuringInsert: true);+ late final GeneratedColumn<DateTime> createdAt = GeneratedColumn<DateTime>(+ 'created_at', aliasedName, false,+ type: DriftSqlType.dateTime,+ requiredDuringInsert: false,+ defaultValue: const CustomExpression('CURRENT_TIMESTAMP'));+ late final GeneratedColumn<DateTime> updatedAt = GeneratedColumn<DateTime>(+ 'updated_at', aliasedName, false,+ type: DriftSqlType.dateTime,+ requiredDuringInsert: false,+ defaultValue: const CustomExpression('CURRENT_TIMESTAMP'));+ late final GeneratedColumn<String> ownerId = GeneratedColumn<String>(+ 'owner_id', aliasedName, false,+ type: DriftSqlType.string,+ requiredDuringInsert: true,+ defaultConstraints: GeneratedColumn.constraintIsAlways(+ 'REFERENCES user_entity (id) ON DELETE CASCADE'));+ late final GeneratedColumn<String> primaryAssetId = GeneratedColumn<String>(+ 'primary_asset_id', aliasedName, false,+ type: DriftSqlType.string,+ requiredDuringInsert: true,+ defaultConstraints: GeneratedColumn.constraintIsAlways(+ 'REFERENCES remote_asset_entity (id)'));+ @override+ List<GeneratedColumn> get $columns =>+ [id, createdAt, updatedAt, ownerId, primaryAssetId];+ @override+ String get aliasedName => _alias ?? actualTableName;+ @override+ String get actualTableName => $name;+ static const String $name = 'stack_entity';+ @override+ Set<GeneratedColumn> get $primaryKey => {id};+ @override+ StackEntityData map(Map<String, dynamic> data, {String? tablePrefix}) {+ final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';+ return StackEntityData(+ id: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}id'])!,+ createdAt: attachedDatabase.typeMapping+ .read(DriftSqlType.dateTime, data['${effectivePrefix}created_at'])!,+ updatedAt: attachedDatabase.typeMapping+ .read(DriftSqlType.dateTime, data['${effectivePrefix}updated_at'])!,+ ownerId: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}owner_id'])!,+ primaryAssetId: attachedDatabase.typeMapping.read(+ DriftSqlType.string, data['${effectivePrefix}primary_asset_id'])!,+ );+ }++ @override+ StackEntity createAlias(String alias) {+ return StackEntity(attachedDatabase, alias);+ }++ @override+ bool get withoutRowId => true;+ @override+ bool get isStrict => true;+}++class StackEntityData extends DataClass implements Insertable<StackEntityData> {+ final String id;+ final DateTime createdAt;+ final DateTime updatedAt;+ final String ownerId;+ final String primaryAssetId;+ const StackEntityData(+ {required this.id,+ required this.createdAt,+ required this.updatedAt,+ required this.ownerId,+ required this.primaryAssetId});+ @override+ Map<String, Expression> toColumns(bool nullToAbsent) {+ final map = <String, Expression>{};+ map['id'] = Variable<String>(id);+ map['created_at'] = Variable<DateTime>(createdAt);+ map['updated_at'] = Variable<DateTime>(updatedAt);+ map['owner_id'] = Variable<String>(ownerId);+ map['primary_asset_id'] = Variable<String>(primaryAssetId);+ return map;+ }++ factory StackEntityData.fromJson(Map<String, dynamic> json,+ {ValueSerializer? serializer}) {+ serializer ??= driftRuntimeOptions.defaultSerializer;+ return StackEntityData(+ id: serializer.fromJson<String>(json['id']),+ createdAt: serializer.fromJson<DateTime>(json['createdAt']),+ updatedAt: serializer.fromJson<DateTime>(json['updatedAt']),+ ownerId: serializer.fromJson<String>(json['ownerId']),+ primaryAssetId: serializer.fromJson<String>(json['primaryAssetId']),+ );+ }+ @override+ Map<String, dynamic> toJson({ValueSerializer? serializer}) {+ serializer ??= driftRuntimeOptions.defaultSerializer;+ return <String, dynamic>{+ 'id': serializer.toJson<String>(id),+ 'createdAt': serializer.toJson<DateTime>(createdAt),+ 'updatedAt': serializer.toJson<DateTime>(updatedAt),+ 'ownerId': serializer.toJson<String>(ownerId),+ 'primaryAssetId': serializer.toJson<String>(primaryAssetId),+ };+ }++ StackEntityData copyWith(+ {String? id,+ DateTime? createdAt,+ DateTime? updatedAt,+ String? ownerId,+ String? primaryAssetId}) =>+ StackEntityData(+ id: id ?? this.id,+ createdAt: createdAt ?? this.createdAt,+ updatedAt: updatedAt ?? this.updatedAt,+ ownerId: ownerId ?? this.ownerId,+ primaryAssetId: primaryAssetId ?? this.primaryAssetId,+ );+ StackEntityData copyWithCompanion(StackEntityCompanion data) {+ return StackEntityData(+ id: data.id.present ? data.id.value : this.id,+ createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt,+ updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt,+ ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId,+ primaryAssetId: data.primaryAssetId.present+ ? data.primaryAssetId.value+ : this.primaryAssetId,+ );+ }++ @override+ String toString() {+ return (StringBuffer('StackEntityData(')+ ..write('id: $id, ')+ ..write('createdAt: $createdAt, ')+ ..write('updatedAt: $updatedAt, ')+ ..write('ownerId: $ownerId, ')+ ..write('primaryAssetId: $primaryAssetId')+ ..write(')'))+ .toString();+ }++ @override+ int get hashCode =>+ Object.hash(id, createdAt, updatedAt, ownerId, primaryAssetId);+ @override+ bool operator ==(Object other) =>+ identical(this, other) ||+ (other is StackEntityData &&+ other.id == this.id &&+ other.createdAt == this.createdAt &&+ other.updatedAt == this.updatedAt &&+ other.ownerId == this.ownerId &&+ other.primaryAssetId == this.primaryAssetId);+}++class StackEntityCompanion extends UpdateCompanion<StackEntityData> {+ final Value<String> id;+ final Value<DateTime> createdAt;+ final Value<DateTime> updatedAt;+ final Value<String> ownerId;+ final Value<String> primaryAssetId;+ const StackEntityCompanion({+ this.id = const Value.absent(),+ this.createdAt = const Value.absent(),+ this.updatedAt = const Value.absent(),+ this.ownerId = const Value.absent(),+ this.primaryAssetId = const Value.absent(),+ });+ StackEntityCompanion.insert({+ required String id,+ this.createdAt = const Value.absent(),+ this.updatedAt = const Value.absent(),+ required String ownerId,+ required String primaryAssetId,+ }) : id = Value(id),+ ownerId = Value(ownerId),+ primaryAssetId = Value(primaryAssetId);+ static Insertable<StackEntityData> custom({+ Expression<String>? id,+ Expression<DateTime>? createdAt,+ Expression<DateTime>? updatedAt,+ Expression<String>? ownerId,+ Expression<String>? primaryAssetId,+ }) {+ return RawValuesInsertable({+ if (id != null) 'id': id,+ if (createdAt != null) 'created_at': createdAt,+ if (updatedAt != null) 'updated_at': updatedAt,+ if (ownerId != null) 'owner_id': ownerId,+ if (primaryAssetId != null) 'primary_asset_id': primaryAssetId,+ });+ }++ StackEntityCompanion copyWith(+ {Value<String>? id,+ Value<DateTime>? createdAt,+ Value<DateTime>? updatedAt,+ Value<String>? ownerId,+ Value<String>? primaryAssetId}) {+ return StackEntityCompanion(+ id: id ?? this.id,+ createdAt: createdAt ?? this.createdAt,+ updatedAt: updatedAt ?? this.updatedAt,+ ownerId: ownerId ?? this.ownerId,+ primaryAssetId: primaryAssetId ?? this.primaryAssetId,+ );+ }++ @override+ Map<String, Expression> toColumns(bool nullToAbsent) {+ final map = <String, Expression>{};+ if (id.present) {+ map['id'] = Variable<String>(id.value);+ }+ if (createdAt.present) {+ map['created_at'] = Variable<DateTime>(createdAt.value);+ }+ if (updatedAt.present) {+ map['updated_at'] = Variable<DateTime>(updatedAt.value);+ }+ if (ownerId.present) {+ map['owner_id'] = Variable<String>(ownerId.value);+ }+ if (primaryAssetId.present) {+ map['primary_asset_id'] = Variable<String>(primaryAssetId.value);+ }+ return map;+ }++ @override+ String toString() {+ return (StringBuffer('StackEntityCompanion(')+ ..write('id: $id, ')+ ..write('createdAt: $createdAt, ')+ ..write('updatedAt: $updatedAt, ')+ ..write('ownerId: $ownerId, ')+ ..write('primaryAssetId: $primaryAssetId')+ ..write(')'))+ .toString();+ }+}++class DatabaseAtV1 extends GeneratedDatabase {+ DatabaseAtV1(QueryExecutor e) : super(e);+ late final UserEntity userEntity = UserEntity(this);+ late final RemoteAssetEntity remoteAssetEntity = RemoteAssetEntity(this);+ late final LocalAssetEntity localAssetEntity = LocalAssetEntity(this);+ late final Index idxLocalAssetChecksum = Index('idx_local_asset_checksum',+ 'CREATE INDEX idx_local_asset_checksum ON local_asset_entity (checksum)');+ late final Index uQRemoteAssetOwnerChecksum = Index(+ 'UQ_remote_asset_owner_checksum',+ 'CREATE UNIQUE INDEX UQ_remote_asset_owner_checksum ON remote_asset_entity (checksum, owner_id)');+ late final Index idxRemoteAssetChecksum = Index('idx_remote_asset_checksum',+ 'CREATE INDEX idx_remote_asset_checksum ON remote_asset_entity (checksum)');+ late final UserMetadataEntity userMetadataEntity = UserMetadataEntity(this);+ late final PartnerEntity partnerEntity = PartnerEntity(this);+ late final LocalAlbumEntity localAlbumEntity = LocalAlbumEntity(this);+ late final LocalAlbumAssetEntity localAlbumAssetEntity =+ LocalAlbumAssetEntity(this);+ late final RemoteExifEntity remoteExifEntity = RemoteExifEntity(this);+ late final RemoteAlbumEntity remoteAlbumEntity = RemoteAlbumEntity(this);+ late final RemoteAlbumAssetEntity remoteAlbumAssetEntity =+ RemoteAlbumAssetEntity(this);+ late final RemoteAlbumUserEntity remoteAlbumUserEntity =+ RemoteAlbumUserEntity(this);+ late final MemoryEntity memoryEntity = MemoryEntity(this);+ late final MemoryAssetEntity memoryAssetEntity = MemoryAssetEntity(this);+ late final StackEntity stackEntity = StackEntity(this);+ @override+ Iterable<TableInfo<Table, Object?>> get allTables =>+ allSchemaEntities.whereType<TableInfo<Table, Object?>>();+ @override+ List<DatabaseSchemaEntity> get allSchemaEntities => [+ userEntity,+ remoteAssetEntity,+ localAssetEntity,+ idxLocalAssetChecksum,+ uQRemoteAssetOwnerChecksum,+ idxRemoteAssetChecksum,+ userMetadataEntity,+ partnerEntity,+ localAlbumEntity,+ localAlbumAssetEntity,+ remoteExifEntity,+ remoteAlbumEntity,+ remoteAlbumAssetEntity,+ remoteAlbumUserEntity,+ memoryEntity,+ memoryAssetEntity,+ stackEntity+ ];+ @override+ int get schemaVersion => 1;+ @override+ DriftDatabaseOptions get options =>+ const DriftDatabaseOptions(storeDateTimeAsText: true);+}diff --git a/mobile/test/drift/main/generated/schema_v2.dart b/mobile/test/drift/main/generated/schema_v2.dartnew file mode 100644index 0000000000..bdba8db557--- /dev/null+++ b/mobile/test/drift/main/generated/schema_v2.dart@@ -0,0 +1,4672 @@+// dart format width=80+// GENERATED CODE, DO NOT EDIT BY HAND.+// ignore_for_file: type=lint+import 'package:drift/drift.dart';++class UserEntity extends Table with TableInfo<UserEntity, UserEntityData> {+ @override+ final GeneratedDatabase attachedDatabase;+ final String? _alias;+ UserEntity(this.attachedDatabase, [this._alias]);+ late final GeneratedColumn<String> id = GeneratedColumn<String>(+ 'id', aliasedName, false,+ type: DriftSqlType.string, requiredDuringInsert: true);+ late final GeneratedColumn<String> name = GeneratedColumn<String>(+ 'name', aliasedName, false,+ type: DriftSqlType.string, requiredDuringInsert: true);+ late final GeneratedColumn<bool> isAdmin = GeneratedColumn<bool>(+ 'is_admin', aliasedName, false,+ type: DriftSqlType.bool,+ requiredDuringInsert: false,+ defaultConstraints:+ GeneratedColumn.constraintIsAlways('CHECK ("is_admin" IN (0, 1))'),+ defaultValue: const CustomExpression('0'));+ late final GeneratedColumn<String> email = GeneratedColumn<String>(+ 'email', aliasedName, false,+ type: DriftSqlType.string, requiredDuringInsert: true);+ late final GeneratedColumn<String> profileImagePath = GeneratedColumn<String>(+ 'profile_image_path', aliasedName, true,+ type: DriftSqlType.string, requiredDuringInsert: false);+ late final GeneratedColumn<DateTime> updatedAt = GeneratedColumn<DateTime>(+ 'updated_at', aliasedName, false,+ type: DriftSqlType.dateTime,+ requiredDuringInsert: false,+ defaultValue: const CustomExpression('CURRENT_TIMESTAMP'));+ late final GeneratedColumn<int> quotaSizeInBytes = GeneratedColumn<int>(+ 'quota_size_in_bytes', aliasedName, true,+ type: DriftSqlType.int, requiredDuringInsert: false);+ late final GeneratedColumn<int> quotaUsageInBytes = GeneratedColumn<int>(+ 'quota_usage_in_bytes', aliasedName, false,+ type: DriftSqlType.int,+ requiredDuringInsert: false,+ defaultValue: const CustomExpression('0'));+ @override+ List<GeneratedColumn> get $columns => [+ id,+ name,+ isAdmin,+ email,+ profileImagePath,+ updatedAt,+ quotaSizeInBytes,+ quotaUsageInBytes+ ];+ @override+ String get aliasedName => _alias ?? actualTableName;+ @override+ String get actualTableName => $name;+ static const String $name = 'user_entity';+ @override+ Set<GeneratedColumn> get $primaryKey => {id};+ @override+ UserEntityData map(Map<String, dynamic> data, {String? tablePrefix}) {+ final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';+ return UserEntityData(+ id: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}id'])!,+ name: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}name'])!,+ isAdmin: attachedDatabase.typeMapping+ .read(DriftSqlType.bool, data['${effectivePrefix}is_admin'])!,+ email: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}email'])!,+ profileImagePath: attachedDatabase.typeMapping.read(+ DriftSqlType.string, data['${effectivePrefix}profile_image_path']),+ updatedAt: attachedDatabase.typeMapping+ .read(DriftSqlType.dateTime, data['${effectivePrefix}updated_at'])!,+ quotaSizeInBytes: attachedDatabase.typeMapping.read(+ DriftSqlType.int, data['${effectivePrefix}quota_size_in_bytes']),+ quotaUsageInBytes: attachedDatabase.typeMapping.read(+ DriftSqlType.int, data['${effectivePrefix}quota_usage_in_bytes'])!,+ );+ }++ @override+ UserEntity createAlias(String alias) {+ return UserEntity(attachedDatabase, alias);+ }++ @override+ bool get withoutRowId => true;+ @override+ bool get isStrict => true;+}++class UserEntityData extends DataClass implements Insertable<UserEntityData> {+ final String id;+ final String name;+ final bool isAdmin;+ final String email;+ final String? profileImagePath;+ final DateTime updatedAt;+ final int? quotaSizeInBytes;+ final int quotaUsageInBytes;+ const UserEntityData(+ {required this.id,+ required this.name,+ required this.isAdmin,+ required this.email,+ this.profileImagePath,+ required this.updatedAt,+ this.quotaSizeInBytes,+ required this.quotaUsageInBytes});+ @override+ Map<String, Expression> toColumns(bool nullToAbsent) {+ final map = <String, Expression>{};+ map['id'] = Variable<String>(id);+ map['name'] = Variable<String>(name);+ map['is_admin'] = Variable<bool>(isAdmin);+ map['email'] = Variable<String>(email);+ if (!nullToAbsent || profileImagePath != null) {+ map['profile_image_path'] = Variable<String>(profileImagePath);+ }+ map['updated_at'] = Variable<DateTime>(updatedAt);+ if (!nullToAbsent || quotaSizeInBytes != null) {+ map['quota_size_in_bytes'] = Variable<int>(quotaSizeInBytes);+ }+ map['quota_usage_in_bytes'] = Variable<int>(quotaUsageInBytes);+ return map;+ }++ factory UserEntityData.fromJson(Map<String, dynamic> json,+ {ValueSerializer? serializer}) {+ serializer ??= driftRuntimeOptions.defaultSerializer;+ return UserEntityData(+ id: serializer.fromJson<String>(json['id']),+ name: serializer.fromJson<String>(json['name']),+ isAdmin: serializer.fromJson<bool>(json['isAdmin']),+ email: serializer.fromJson<String>(json['email']),+ profileImagePath: serializer.fromJson<String?>(json['profileImagePath']),+ updatedAt: serializer.fromJson<DateTime>(json['updatedAt']),+ quotaSizeInBytes: serializer.fromJson<int?>(json['quotaSizeInBytes']),+ quotaUsageInBytes: serializer.fromJson<int>(json['quotaUsageInBytes']),+ );+ }+ @override+ Map<String, dynamic> toJson({ValueSerializer? serializer}) {+ serializer ??= driftRuntimeOptions.defaultSerializer;+ return <String, dynamic>{+ 'id': serializer.toJson<String>(id),+ 'name': serializer.toJson<String>(name),+ 'isAdmin': serializer.toJson<bool>(isAdmin),+ 'email': serializer.toJson<String>(email),+ 'profileImagePath': serializer.toJson<String?>(profileImagePath),+ 'updatedAt': serializer.toJson<DateTime>(updatedAt),+ 'quotaSizeInBytes': serializer.toJson<int?>(quotaSizeInBytes),+ 'quotaUsageInBytes': serializer.toJson<int>(quotaUsageInBytes),+ };+ }++ UserEntityData copyWith(+ {String? id,+ String? name,+ bool? isAdmin,+ String? email,+ Value<String?> profileImagePath = const Value.absent(),+ DateTime? updatedAt,+ Value<int?> quotaSizeInBytes = const Value.absent(),+ int? quotaUsageInBytes}) =>+ UserEntityData(+ id: id ?? this.id,+ name: name ?? this.name,+ isAdmin: isAdmin ?? this.isAdmin,+ email: email ?? this.email,+ profileImagePath: profileImagePath.present+ ? profileImagePath.value+ : this.profileImagePath,+ updatedAt: updatedAt ?? this.updatedAt,+ quotaSizeInBytes: quotaSizeInBytes.present+ ? quotaSizeInBytes.value+ : this.quotaSizeInBytes,+ quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes,+ );+ UserEntityData copyWithCompanion(UserEntityCompanion data) {+ return UserEntityData(+ id: data.id.present ? data.id.value : this.id,+ name: data.name.present ? data.name.value : this.name,+ isAdmin: data.isAdmin.present ? data.isAdmin.value : this.isAdmin,+ email: data.email.present ? data.email.value : this.email,+ profileImagePath: data.profileImagePath.present+ ? data.profileImagePath.value+ : this.profileImagePath,+ updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt,+ quotaSizeInBytes: data.quotaSizeInBytes.present+ ? data.quotaSizeInBytes.value+ : this.quotaSizeInBytes,+ quotaUsageInBytes: data.quotaUsageInBytes.present+ ? data.quotaUsageInBytes.value+ : this.quotaUsageInBytes,+ );+ }++ @override+ String toString() {+ return (StringBuffer('UserEntityData(')+ ..write('id: $id, ')+ ..write('name: $name, ')+ ..write('isAdmin: $isAdmin, ')+ ..write('email: $email, ')+ ..write('profileImagePath: $profileImagePath, ')+ ..write('updatedAt: $updatedAt, ')+ ..write('quotaSizeInBytes: $quotaSizeInBytes, ')+ ..write('quotaUsageInBytes: $quotaUsageInBytes')+ ..write(')'))+ .toString();+ }++ @override+ int get hashCode => Object.hash(id, name, isAdmin, email, profileImagePath,+ updatedAt, quotaSizeInBytes, quotaUsageInBytes);+ @override+ bool operator ==(Object other) =>+ identical(this, other) ||+ (other is UserEntityData &&+ other.id == this.id &&+ other.name == this.name &&+ other.isAdmin == this.isAdmin &&+ other.email == this.email &&+ other.profileImagePath == this.profileImagePath &&+ other.updatedAt == this.updatedAt &&+ other.quotaSizeInBytes == this.quotaSizeInBytes &&+ other.quotaUsageInBytes == this.quotaUsageInBytes);+}++class UserEntityCompanion extends UpdateCompanion<UserEntityData> {+ final Value<String> id;+ final Value<String> name;+ final Value<bool> isAdmin;+ final Value<String> email;+ final Value<String?> profileImagePath;+ final Value<DateTime> updatedAt;+ final Value<int?> quotaSizeInBytes;+ final Value<int> quotaUsageInBytes;+ const UserEntityCompanion({+ this.id = const Value.absent(),+ this.name = const Value.absent(),+ this.isAdmin = const Value.absent(),+ this.email = const Value.absent(),+ this.profileImagePath = const Value.absent(),+ this.updatedAt = const Value.absent(),+ this.quotaSizeInBytes = const Value.absent(),+ this.quotaUsageInBytes = const Value.absent(),+ });+ UserEntityCompanion.insert({+ required String id,+ required String name,+ this.isAdmin = const Value.absent(),+ required String email,+ this.profileImagePath = const Value.absent(),+ this.updatedAt = const Value.absent(),+ this.quotaSizeInBytes = const Value.absent(),+ this.quotaUsageInBytes = const Value.absent(),+ }) : id = Value(id),+ name = Value(name),+ email = Value(email);+ static Insertable<UserEntityData> custom({+ Expression<String>? id,+ Expression<String>? name,+ Expression<bool>? isAdmin,+ Expression<String>? email,+ Expression<String>? profileImagePath,+ Expression<DateTime>? updatedAt,+ Expression<int>? quotaSizeInBytes,+ Expression<int>? quotaUsageInBytes,+ }) {+ return RawValuesInsertable({+ if (id != null) 'id': id,+ if (name != null) 'name': name,+ if (isAdmin != null) 'is_admin': isAdmin,+ if (email != null) 'email': email,+ if (profileImagePath != null) 'profile_image_path': profileImagePath,+ if (updatedAt != null) 'updated_at': updatedAt,+ if (quotaSizeInBytes != null) 'quota_size_in_bytes': quotaSizeInBytes,+ if (quotaUsageInBytes != null) 'quota_usage_in_bytes': quotaUsageInBytes,+ });+ }++ UserEntityCompanion copyWith(+ {Value<String>? id,+ Value<String>? name,+ Value<bool>? isAdmin,+ Value<String>? email,+ Value<String?>? profileImagePath,+ Value<DateTime>? updatedAt,+ Value<int?>? quotaSizeInBytes,+ Value<int>? quotaUsageInBytes}) {+ return UserEntityCompanion(+ id: id ?? this.id,+ name: name ?? this.name,+ isAdmin: isAdmin ?? this.isAdmin,+ email: email ?? this.email,+ profileImagePath: profileImagePath ?? this.profileImagePath,+ updatedAt: updatedAt ?? this.updatedAt,+ quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes,+ quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes,+ );+ }++ @override+ Map<String, Expression> toColumns(bool nullToAbsent) {+ final map = <String, Expression>{};+ if (id.present) {+ map['id'] = Variable<String>(id.value);+ }+ if (name.present) {+ map['name'] = Variable<String>(name.value);+ }+ if (isAdmin.present) {+ map['is_admin'] = Variable<bool>(isAdmin.value);+ }+ if (email.present) {+ map['email'] = Variable<String>(email.value);+ }+ if (profileImagePath.present) {+ map['profile_image_path'] = Variable<String>(profileImagePath.value);+ }+ if (updatedAt.present) {+ map['updated_at'] = Variable<DateTime>(updatedAt.value);+ }+ if (quotaSizeInBytes.present) {+ map['quota_size_in_bytes'] = Variable<int>(quotaSizeInBytes.value);+ }+ if (quotaUsageInBytes.present) {+ map['quota_usage_in_bytes'] = Variable<int>(quotaUsageInBytes.value);+ }+ return map;+ }++ @override+ String toString() {+ return (StringBuffer('UserEntityCompanion(')+ ..write('id: $id, ')+ ..write('name: $name, ')+ ..write('isAdmin: $isAdmin, ')+ ..write('email: $email, ')+ ..write('profileImagePath: $profileImagePath, ')+ ..write('updatedAt: $updatedAt, ')+ ..write('quotaSizeInBytes: $quotaSizeInBytes, ')+ ..write('quotaUsageInBytes: $quotaUsageInBytes')+ ..write(')'))+ .toString();+ }+}++class RemoteAssetEntity extends Table+ with TableInfo<RemoteAssetEntity, RemoteAssetEntityData> {+ @override+ final GeneratedDatabase attachedDatabase;+ final String? _alias;+ RemoteAssetEntity(this.attachedDatabase, [this._alias]);+ late final GeneratedColumn<String> name = GeneratedColumn<String>(+ 'name', aliasedName, false,+ type: DriftSqlType.string, requiredDuringInsert: true);+ late final GeneratedColumn<int> type = GeneratedColumn<int>(+ 'type', aliasedName, false,+ type: DriftSqlType.int, requiredDuringInsert: true);+ late final GeneratedColumn<DateTime> createdAt = GeneratedColumn<DateTime>(+ 'created_at', aliasedName, false,+ type: DriftSqlType.dateTime,+ requiredDuringInsert: false,+ defaultValue: const CustomExpression('CURRENT_TIMESTAMP'));+ late final GeneratedColumn<DateTime> updatedAt = GeneratedColumn<DateTime>(+ 'updated_at', aliasedName, false,+ type: DriftSqlType.dateTime,+ requiredDuringInsert: false,+ defaultValue: const CustomExpression('CURRENT_TIMESTAMP'));+ late final GeneratedColumn<int> width = GeneratedColumn<int>(+ 'width', aliasedName, true,+ type: DriftSqlType.int, requiredDuringInsert: false);+ late final GeneratedColumn<int> height = GeneratedColumn<int>(+ 'height', aliasedName, true,+ type: DriftSqlType.int, requiredDuringInsert: false);+ late final GeneratedColumn<int> durationInSeconds = GeneratedColumn<int>(+ 'duration_in_seconds', aliasedName, true,+ type: DriftSqlType.int, requiredDuringInsert: false);+ late final GeneratedColumn<String> id = GeneratedColumn<String>(+ 'id', aliasedName, false,+ type: DriftSqlType.string, requiredDuringInsert: true);+ late final GeneratedColumn<String> checksum = GeneratedColumn<String>(+ 'checksum', aliasedName, false,+ type: DriftSqlType.string, requiredDuringInsert: true);+ late final GeneratedColumn<bool> isFavorite = GeneratedColumn<bool>(+ 'is_favorite', aliasedName, false,+ type: DriftSqlType.bool,+ requiredDuringInsert: false,+ defaultConstraints:+ GeneratedColumn.constraintIsAlways('CHECK ("is_favorite" IN (0, 1))'),+ defaultValue: const CustomExpression('0'));+ late final GeneratedColumn<String> ownerId = GeneratedColumn<String>(+ 'owner_id', aliasedName, false,+ type: DriftSqlType.string,+ requiredDuringInsert: true,+ defaultConstraints: GeneratedColumn.constraintIsAlways(+ 'REFERENCES user_entity (id) ON DELETE CASCADE'));+ late final GeneratedColumn<DateTime> localDateTime =+ GeneratedColumn<DateTime>('local_date_time', aliasedName, true,+ type: DriftSqlType.dateTime, requiredDuringInsert: false);+ late final GeneratedColumn<String> thumbHash = GeneratedColumn<String>(+ 'thumb_hash', aliasedName, true,+ type: DriftSqlType.string, requiredDuringInsert: false);+ late final GeneratedColumn<DateTime> deletedAt = GeneratedColumn<DateTime>(+ 'deleted_at', aliasedName, true,+ type: DriftSqlType.dateTime, requiredDuringInsert: false);+ late final GeneratedColumn<String> livePhotoVideoId = GeneratedColumn<String>(+ 'live_photo_video_id', aliasedName, true,+ type: DriftSqlType.string, requiredDuringInsert: false);+ late final GeneratedColumn<int> visibility = GeneratedColumn<int>(+ 'visibility', aliasedName, false,+ type: DriftSqlType.int, requiredDuringInsert: true);+ @override+ List<GeneratedColumn> get $columns => [+ name,+ type,+ createdAt,+ updatedAt,+ width,+ height,+ durationInSeconds,+ id,+ checksum,+ isFavorite,+ ownerId,+ localDateTime,+ thumbHash,+ deletedAt,+ livePhotoVideoId,+ visibility+ ];+ @override+ String get aliasedName => _alias ?? actualTableName;+ @override+ String get actualTableName => $name;+ static const String $name = 'remote_asset_entity';+ @override+ Set<GeneratedColumn> get $primaryKey => {id};+ @override+ RemoteAssetEntityData map(Map<String, dynamic> data, {String? tablePrefix}) {+ final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';+ return RemoteAssetEntityData(+ name: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}name'])!,+ type: attachedDatabase.typeMapping+ .read(DriftSqlType.int, data['${effectivePrefix}type'])!,+ createdAt: attachedDatabase.typeMapping+ .read(DriftSqlType.dateTime, data['${effectivePrefix}created_at'])!,+ updatedAt: attachedDatabase.typeMapping+ .read(DriftSqlType.dateTime, data['${effectivePrefix}updated_at'])!,+ width: attachedDatabase.typeMapping+ .read(DriftSqlType.int, data['${effectivePrefix}width']),+ height: attachedDatabase.typeMapping+ .read(DriftSqlType.int, data['${effectivePrefix}height']),+ durationInSeconds: attachedDatabase.typeMapping.read(+ DriftSqlType.int, data['${effectivePrefix}duration_in_seconds']),+ id: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}id'])!,+ checksum: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}checksum'])!,+ isFavorite: attachedDatabase.typeMapping+ .read(DriftSqlType.bool, data['${effectivePrefix}is_favorite'])!,+ ownerId: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}owner_id'])!,+ localDateTime: attachedDatabase.typeMapping.read(+ DriftSqlType.dateTime, data['${effectivePrefix}local_date_time']),+ thumbHash: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}thumb_hash']),+ deletedAt: attachedDatabase.typeMapping+ .read(DriftSqlType.dateTime, data['${effectivePrefix}deleted_at']),+ livePhotoVideoId: attachedDatabase.typeMapping.read(+ DriftSqlType.string, data['${effectivePrefix}live_photo_video_id']),+ visibility: attachedDatabase.typeMapping+ .read(DriftSqlType.int, data['${effectivePrefix}visibility'])!,+ );+ }++ @override+ RemoteAssetEntity createAlias(String alias) {+ return RemoteAssetEntity(attachedDatabase, alias);+ }++ @override+ bool get withoutRowId => true;+ @override+ bool get isStrict => true;+}++class RemoteAssetEntityData extends DataClass+ implements Insertable<RemoteAssetEntityData> {+ final String name;+ final int type;+ final DateTime createdAt;+ final DateTime updatedAt;+ final int? width;+ final int? height;+ final int? durationInSeconds;+ final String id;+ final String checksum;+ final bool isFavorite;+ final String ownerId;+ final DateTime? localDateTime;+ final String? thumbHash;+ final DateTime? deletedAt;+ final String? livePhotoVideoId;+ final int visibility;+ const RemoteAssetEntityData(+ {required this.name,+ required this.type,+ required this.createdAt,+ required this.updatedAt,+ this.width,+ this.height,+ this.durationInSeconds,+ required this.id,+ required this.checksum,+ required this.isFavorite,+ required this.ownerId,+ this.localDateTime,+ this.thumbHash,+ this.deletedAt,+ this.livePhotoVideoId,+ required this.visibility});+ @override+ Map<String, Expression> toColumns(bool nullToAbsent) {+ final map = <String, Expression>{};+ map['name'] = Variable<String>(name);+ map['type'] = Variable<int>(type);+ map['created_at'] = Variable<DateTime>(createdAt);+ map['updated_at'] = Variable<DateTime>(updatedAt);+ if (!nullToAbsent || width != null) {+ map['width'] = Variable<int>(width);+ }+ if (!nullToAbsent || height != null) {+ map['height'] = Variable<int>(height);+ }+ if (!nullToAbsent || durationInSeconds != null) {+ map['duration_in_seconds'] = Variable<int>(durationInSeconds);+ }+ map['id'] = Variable<String>(id);+ map['checksum'] = Variable<String>(checksum);+ map['is_favorite'] = Variable<bool>(isFavorite);+ map['owner_id'] = Variable<String>(ownerId);+ if (!nullToAbsent || localDateTime != null) {+ map['local_date_time'] = Variable<DateTime>(localDateTime);+ }+ if (!nullToAbsent || thumbHash != null) {+ map['thumb_hash'] = Variable<String>(thumbHash);+ }+ if (!nullToAbsent || deletedAt != null) {+ map['deleted_at'] = Variable<DateTime>(deletedAt);+ }+ if (!nullToAbsent || livePhotoVideoId != null) {+ map['live_photo_video_id'] = Variable<String>(livePhotoVideoId);+ }+ map['visibility'] = Variable<int>(visibility);+ return map;+ }++ factory RemoteAssetEntityData.fromJson(Map<String, dynamic> json,+ {ValueSerializer? serializer}) {+ serializer ??= driftRuntimeOptions.defaultSerializer;+ return RemoteAssetEntityData(+ name: serializer.fromJson<String>(json['name']),+ type: serializer.fromJson<int>(json['type']),+ createdAt: serializer.fromJson<DateTime>(json['createdAt']),+ updatedAt: serializer.fromJson<DateTime>(json['updatedAt']),+ width: serializer.fromJson<int?>(json['width']),+ height: serializer.fromJson<int?>(json['height']),+ durationInSeconds: serializer.fromJson<int?>(json['durationInSeconds']),+ id: serializer.fromJson<String>(json['id']),+ checksum: serializer.fromJson<String>(json['checksum']),+ isFavorite: serializer.fromJson<bool>(json['isFavorite']),+ ownerId: serializer.fromJson<String>(json['ownerId']),+ localDateTime: serializer.fromJson<DateTime?>(json['localDateTime']),+ thumbHash: serializer.fromJson<String?>(json['thumbHash']),+ deletedAt: serializer.fromJson<DateTime?>(json['deletedAt']),+ livePhotoVideoId: serializer.fromJson<String?>(json['livePhotoVideoId']),+ visibility: serializer.fromJson<int>(json['visibility']),+ );+ }+ @override+ Map<String, dynamic> toJson({ValueSerializer? serializer}) {+ serializer ??= driftRuntimeOptions.defaultSerializer;+ return <String, dynamic>{+ 'name': serializer.toJson<String>(name),+ 'type': serializer.toJson<int>(type),+ 'createdAt': serializer.toJson<DateTime>(createdAt),+ 'updatedAt': serializer.toJson<DateTime>(updatedAt),+ 'width': serializer.toJson<int?>(width),+ 'height': serializer.toJson<int?>(height),+ 'durationInSeconds': serializer.toJson<int?>(durationInSeconds),+ 'id': serializer.toJson<String>(id),+ 'checksum': serializer.toJson<String>(checksum),+ 'isFavorite': serializer.toJson<bool>(isFavorite),+ 'ownerId': serializer.toJson<String>(ownerId),+ 'localDateTime': serializer.toJson<DateTime?>(localDateTime),+ 'thumbHash': serializer.toJson<String?>(thumbHash),+ 'deletedAt': serializer.toJson<DateTime?>(deletedAt),+ 'livePhotoVideoId': serializer.toJson<String?>(livePhotoVideoId),+ 'visibility': serializer.toJson<int>(visibility),+ };+ }++ RemoteAssetEntityData copyWith(+ {String? name,+ int? type,+ DateTime? createdAt,+ DateTime? updatedAt,+ Value<int?> width = const Value.absent(),+ Value<int?> height = const Value.absent(),+ Value<int?> durationInSeconds = const Value.absent(),+ String? id,+ String? checksum,+ bool? isFavorite,+ String? ownerId,+ Value<DateTime?> localDateTime = const Value.absent(),+ Value<String?> thumbHash = const Value.absent(),+ Value<DateTime?> deletedAt = const Value.absent(),+ Value<String?> livePhotoVideoId = const Value.absent(),+ int? visibility}) =>+ RemoteAssetEntityData(+ name: name ?? this.name,+ type: type ?? this.type,+ createdAt: createdAt ?? this.createdAt,+ updatedAt: updatedAt ?? this.updatedAt,+ width: width.present ? width.value : this.width,+ height: height.present ? height.value : this.height,+ durationInSeconds: durationInSeconds.present+ ? durationInSeconds.value+ : this.durationInSeconds,+ id: id ?? this.id,+ checksum: checksum ?? this.checksum,+ isFavorite: isFavorite ?? this.isFavorite,+ ownerId: ownerId ?? this.ownerId,+ localDateTime:+ localDateTime.present ? localDateTime.value : this.localDateTime,+ thumbHash: thumbHash.present ? thumbHash.value : this.thumbHash,+ deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt,+ livePhotoVideoId: livePhotoVideoId.present+ ? livePhotoVideoId.value+ : this.livePhotoVideoId,+ visibility: visibility ?? this.visibility,+ );+ RemoteAssetEntityData copyWithCompanion(RemoteAssetEntityCompanion data) {+ return RemoteAssetEntityData(+ name: data.name.present ? data.name.value : this.name,+ type: data.type.present ? data.type.value : this.type,+ createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt,+ updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt,+ width: data.width.present ? data.width.value : this.width,+ height: data.height.present ? data.height.value : this.height,+ durationInSeconds: data.durationInSeconds.present+ ? data.durationInSeconds.value+ : this.durationInSeconds,+ id: data.id.present ? data.id.value : this.id,+ checksum: data.checksum.present ? data.checksum.value : this.checksum,+ isFavorite:+ data.isFavorite.present ? data.isFavorite.value : this.isFavorite,+ ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId,+ localDateTime: data.localDateTime.present+ ? data.localDateTime.value+ : this.localDateTime,+ thumbHash: data.thumbHash.present ? data.thumbHash.value : this.thumbHash,+ deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt,+ livePhotoVideoId: data.livePhotoVideoId.present+ ? data.livePhotoVideoId.value+ : this.livePhotoVideoId,+ visibility:+ data.visibility.present ? data.visibility.value : this.visibility,+ );+ }++ @override+ String toString() {+ return (StringBuffer('RemoteAssetEntityData(')+ ..write('name: $name, ')+ ..write('type: $type, ')+ ..write('createdAt: $createdAt, ')+ ..write('updatedAt: $updatedAt, ')+ ..write('width: $width, ')+ ..write('height: $height, ')+ ..write('durationInSeconds: $durationInSeconds, ')+ ..write('id: $id, ')+ ..write('checksum: $checksum, ')+ ..write('isFavorite: $isFavorite, ')+ ..write('ownerId: $ownerId, ')+ ..write('localDateTime: $localDateTime, ')+ ..write('thumbHash: $thumbHash, ')+ ..write('deletedAt: $deletedAt, ')+ ..write('livePhotoVideoId: $livePhotoVideoId, ')+ ..write('visibility: $visibility')+ ..write(')'))+ .toString();+ }++ @override+ int get hashCode => Object.hash(+ name,+ type,+ createdAt,+ updatedAt,+ width,+ height,+ durationInSeconds,+ id,+ checksum,+ isFavorite,+ ownerId,+ localDateTime,+ thumbHash,+ deletedAt,+ livePhotoVideoId,+ visibility);+ @override+ bool operator ==(Object other) =>+ identical(this, other) ||+ (other is RemoteAssetEntityData &&+ other.name == this.name &&+ other.type == this.type &&+ other.createdAt == this.createdAt &&+ other.updatedAt == this.updatedAt &&+ other.width == this.width &&+ other.height == this.height &&+ other.durationInSeconds == this.durationInSeconds &&+ other.id == this.id &&+ other.checksum == this.checksum &&+ other.isFavorite == this.isFavorite &&+ other.ownerId == this.ownerId &&+ other.localDateTime == this.localDateTime &&+ other.thumbHash == this.thumbHash &&+ other.deletedAt == this.deletedAt &&+ other.livePhotoVideoId == this.livePhotoVideoId &&+ other.visibility == this.visibility);+}++class RemoteAssetEntityCompanion+ extends UpdateCompanion<RemoteAssetEntityData> {+ final Value<String> name;+ final Value<int> type;+ final Value<DateTime> createdAt;+ final Value<DateTime> updatedAt;+ final Value<int?> width;+ final Value<int?> height;+ final Value<int?> durationInSeconds;+ final Value<String> id;+ final Value<String> checksum;+ final Value<bool> isFavorite;+ final Value<String> ownerId;+ final Value<DateTime?> localDateTime;+ final Value<String?> thumbHash;+ final Value<DateTime?> deletedAt;+ final Value<String?> livePhotoVideoId;+ final Value<int> visibility;+ const RemoteAssetEntityCompanion({+ this.name = const Value.absent(),+ this.type = const Value.absent(),+ this.createdAt = const Value.absent(),+ this.updatedAt = const Value.absent(),+ this.width = const Value.absent(),+ this.height = const Value.absent(),+ this.durationInSeconds = const Value.absent(),+ this.id = const Value.absent(),+ this.checksum = const Value.absent(),+ this.isFavorite = const Value.absent(),+ this.ownerId = const Value.absent(),+ this.localDateTime = const Value.absent(),+ this.thumbHash = const Value.absent(),+ this.deletedAt = const Value.absent(),+ this.livePhotoVideoId = const Value.absent(),+ this.visibility = const Value.absent(),+ });+ RemoteAssetEntityCompanion.insert({+ required String name,+ required int type,+ this.createdAt = const Value.absent(),+ this.updatedAt = const Value.absent(),+ this.width = const Value.absent(),+ this.height = const Value.absent(),+ this.durationInSeconds = const Value.absent(),+ required String id,+ required String checksum,+ this.isFavorite = const Value.absent(),+ required String ownerId,+ this.localDateTime = const Value.absent(),+ this.thumbHash = const Value.absent(),+ this.deletedAt = const Value.absent(),+ this.livePhotoVideoId = const Value.absent(),+ required int visibility,+ }) : name = Value(name),+ type = Value(type),+ id = Value(id),+ checksum = Value(checksum),+ ownerId = Value(ownerId),+ visibility = Value(visibility);+ static Insertable<RemoteAssetEntityData> custom({+ Expression<String>? name,+ Expression<int>? type,+ Expression<DateTime>? createdAt,+ Expression<DateTime>? updatedAt,+ Expression<int>? width,+ Expression<int>? height,+ Expression<int>? durationInSeconds,+ Expression<String>? id,+ Expression<String>? checksum,+ Expression<bool>? isFavorite,+ Expression<String>? ownerId,+ Expression<DateTime>? localDateTime,+ Expression<String>? thumbHash,+ Expression<DateTime>? deletedAt,+ Expression<String>? livePhotoVideoId,+ Expression<int>? visibility,+ }) {+ return RawValuesInsertable({+ if (name != null) 'name': name,+ if (type != null) 'type': type,+ if (createdAt != null) 'created_at': createdAt,+ if (updatedAt != null) 'updated_at': updatedAt,+ if (width != null) 'width': width,+ if (height != null) 'height': height,+ if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds,+ if (id != null) 'id': id,+ if (checksum != null) 'checksum': checksum,+ if (isFavorite != null) 'is_favorite': isFavorite,+ if (ownerId != null) 'owner_id': ownerId,+ if (localDateTime != null) 'local_date_time': localDateTime,+ if (thumbHash != null) 'thumb_hash': thumbHash,+ if (deletedAt != null) 'deleted_at': deletedAt,+ if (livePhotoVideoId != null) 'live_photo_video_id': livePhotoVideoId,+ if (visibility != null) 'visibility': visibility,+ });+ }++ RemoteAssetEntityCompanion copyWith(+ {Value<String>? name,+ Value<int>? type,+ Value<DateTime>? createdAt,+ Value<DateTime>? updatedAt,+ Value<int?>? width,+ Value<int?>? height,+ Value<int?>? durationInSeconds,+ Value<String>? id,+ Value<String>? checksum,+ Value<bool>? isFavorite,+ Value<String>? ownerId,+ Value<DateTime?>? localDateTime,+ Value<String?>? thumbHash,+ Value<DateTime?>? deletedAt,+ Value<String?>? livePhotoVideoId,+ Value<int>? visibility}) {+ return RemoteAssetEntityCompanion(+ name: name ?? this.name,+ type: type ?? this.type,+ createdAt: createdAt ?? this.createdAt,+ updatedAt: updatedAt ?? this.updatedAt,+ width: width ?? this.width,+ height: height ?? this.height,+ durationInSeconds: durationInSeconds ?? this.durationInSeconds,+ id: id ?? this.id,+ checksum: checksum ?? this.checksum,+ isFavorite: isFavorite ?? this.isFavorite,+ ownerId: ownerId ?? this.ownerId,+ localDateTime: localDateTime ?? this.localDateTime,+ thumbHash: thumbHash ?? this.thumbHash,+ deletedAt: deletedAt ?? this.deletedAt,+ livePhotoVideoId: livePhotoVideoId ?? this.livePhotoVideoId,+ visibility: visibility ?? this.visibility,+ );+ }++ @override+ Map<String, Expression> toColumns(bool nullToAbsent) {+ final map = <String, Expression>{};+ if (name.present) {+ map['name'] = Variable<String>(name.value);+ }+ if (type.present) {+ map['type'] = Variable<int>(type.value);+ }+ if (createdAt.present) {+ map['created_at'] = Variable<DateTime>(createdAt.value);+ }+ if (updatedAt.present) {+ map['updated_at'] = Variable<DateTime>(updatedAt.value);+ }+ if (width.present) {+ map['width'] = Variable<int>(width.value);+ }+ if (height.present) {+ map['height'] = Variable<int>(height.value);+ }+ if (durationInSeconds.present) {+ map['duration_in_seconds'] = Variable<int>(durationInSeconds.value);+ }+ if (id.present) {+ map['id'] = Variable<String>(id.value);+ }+ if (checksum.present) {+ map['checksum'] = Variable<String>(checksum.value);+ }+ if (isFavorite.present) {+ map['is_favorite'] = Variable<bool>(isFavorite.value);+ }+ if (ownerId.present) {+ map['owner_id'] = Variable<String>(ownerId.value);+ }+ if (localDateTime.present) {+ map['local_date_time'] = Variable<DateTime>(localDateTime.value);+ }+ if (thumbHash.present) {+ map['thumb_hash'] = Variable<String>(thumbHash.value);+ }+ if (deletedAt.present) {+ map['deleted_at'] = Variable<DateTime>(deletedAt.value);+ }+ if (livePhotoVideoId.present) {+ map['live_photo_video_id'] = Variable<String>(livePhotoVideoId.value);+ }+ if (visibility.present) {+ map['visibility'] = Variable<int>(visibility.value);+ }+ return map;+ }++ @override+ String toString() {+ return (StringBuffer('RemoteAssetEntityCompanion(')+ ..write('name: $name, ')+ ..write('type: $type, ')+ ..write('createdAt: $createdAt, ')+ ..write('updatedAt: $updatedAt, ')+ ..write('width: $width, ')+ ..write('height: $height, ')+ ..write('durationInSeconds: $durationInSeconds, ')+ ..write('id: $id, ')+ ..write('checksum: $checksum, ')+ ..write('isFavorite: $isFavorite, ')+ ..write('ownerId: $ownerId, ')+ ..write('localDateTime: $localDateTime, ')+ ..write('thumbHash: $thumbHash, ')+ ..write('deletedAt: $deletedAt, ')+ ..write('livePhotoVideoId: $livePhotoVideoId, ')+ ..write('visibility: $visibility')+ ..write(')'))+ .toString();+ }+}++class LocalAssetEntity extends Table+ with TableInfo<LocalAssetEntity, LocalAssetEntityData> {+ @override+ final GeneratedDatabase attachedDatabase;+ final String? _alias;+ LocalAssetEntity(this.attachedDatabase, [this._alias]);+ late final GeneratedColumn<String> name = GeneratedColumn<String>(+ 'name', aliasedName, false,+ type: DriftSqlType.string, requiredDuringInsert: true);+ late final GeneratedColumn<int> type = GeneratedColumn<int>(+ 'type', aliasedName, false,+ type: DriftSqlType.int, requiredDuringInsert: true);+ late final GeneratedColumn<DateTime> createdAt = GeneratedColumn<DateTime>(+ 'created_at', aliasedName, false,+ type: DriftSqlType.dateTime,+ requiredDuringInsert: false,+ defaultValue: const CustomExpression('CURRENT_TIMESTAMP'));+ late final GeneratedColumn<DateTime> updatedAt = GeneratedColumn<DateTime>(+ 'updated_at', aliasedName, false,+ type: DriftSqlType.dateTime,+ requiredDuringInsert: false,+ defaultValue: const CustomExpression('CURRENT_TIMESTAMP'));+ late final GeneratedColumn<int> width = GeneratedColumn<int>(+ 'width', aliasedName, true,+ type: DriftSqlType.int, requiredDuringInsert: false);+ late final GeneratedColumn<int> height = GeneratedColumn<int>(+ 'height', aliasedName, true,+ type: DriftSqlType.int, requiredDuringInsert: false);+ late final GeneratedColumn<int> durationInSeconds = GeneratedColumn<int>(+ 'duration_in_seconds', aliasedName, true,+ type: DriftSqlType.int, requiredDuringInsert: false);+ late final GeneratedColumn<String> id = GeneratedColumn<String>(+ 'id', aliasedName, false,+ type: DriftSqlType.string, requiredDuringInsert: true);+ late final GeneratedColumn<String> checksum = GeneratedColumn<String>(+ 'checksum', aliasedName, true,+ type: DriftSqlType.string, requiredDuringInsert: false);+ late final GeneratedColumn<bool> isFavorite = GeneratedColumn<bool>(+ 'is_favorite', aliasedName, false,+ type: DriftSqlType.bool,+ requiredDuringInsert: false,+ defaultConstraints:+ GeneratedColumn.constraintIsAlways('CHECK ("is_favorite" IN (0, 1))'),+ defaultValue: const CustomExpression('0'));+ late final GeneratedColumn<int> orientation = GeneratedColumn<int>(+ 'orientation', aliasedName, false,+ type: DriftSqlType.int,+ requiredDuringInsert: false,+ defaultValue: const CustomExpression('0'));+ @override+ List<GeneratedColumn> get $columns => [+ name,+ type,+ createdAt,+ updatedAt,+ width,+ height,+ durationInSeconds,+ id,+ checksum,+ isFavorite,+ orientation+ ];+ @override+ String get aliasedName => _alias ?? actualTableName;+ @override+ String get actualTableName => $name;+ static const String $name = 'local_asset_entity';+ @override+ Set<GeneratedColumn> get $primaryKey => {id};+ @override+ LocalAssetEntityData map(Map<String, dynamic> data, {String? tablePrefix}) {+ final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';+ return LocalAssetEntityData(+ name: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}name'])!,+ type: attachedDatabase.typeMapping+ .read(DriftSqlType.int, data['${effectivePrefix}type'])!,+ createdAt: attachedDatabase.typeMapping+ .read(DriftSqlType.dateTime, data['${effectivePrefix}created_at'])!,+ updatedAt: attachedDatabase.typeMapping+ .read(DriftSqlType.dateTime, data['${effectivePrefix}updated_at'])!,+ width: attachedDatabase.typeMapping+ .read(DriftSqlType.int, data['${effectivePrefix}width']),+ height: attachedDatabase.typeMapping+ .read(DriftSqlType.int, data['${effectivePrefix}height']),+ durationInSeconds: attachedDatabase.typeMapping.read(+ DriftSqlType.int, data['${effectivePrefix}duration_in_seconds']),+ id: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}id'])!,+ checksum: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}checksum']),+ isFavorite: attachedDatabase.typeMapping+ .read(DriftSqlType.bool, data['${effectivePrefix}is_favorite'])!,+ orientation: attachedDatabase.typeMapping+ .read(DriftSqlType.int, data['${effectivePrefix}orientation'])!,+ );+ }++ @override+ LocalAssetEntity createAlias(String alias) {+ return LocalAssetEntity(attachedDatabase, alias);+ }++ @override+ bool get withoutRowId => true;+ @override+ bool get isStrict => true;+}++class LocalAssetEntityData extends DataClass+ implements Insertable<LocalAssetEntityData> {+ final String name;+ final int type;+ final DateTime createdAt;+ final DateTime updatedAt;+ final int? width;+ final int? height;+ final int? durationInSeconds;+ final String id;+ final String? checksum;+ final bool isFavorite;+ final int orientation;+ const LocalAssetEntityData(+ {required this.name,+ required this.type,+ required this.createdAt,+ required this.updatedAt,+ this.width,+ this.height,+ this.durationInSeconds,+ required this.id,+ this.checksum,+ required this.isFavorite,+ required this.orientation});+ @override+ Map<String, Expression> toColumns(bool nullToAbsent) {+ final map = <String, Expression>{};+ map['name'] = Variable<String>(name);+ map['type'] = Variable<int>(type);+ map['created_at'] = Variable<DateTime>(createdAt);+ map['updated_at'] = Variable<DateTime>(updatedAt);+ if (!nullToAbsent || width != null) {+ map['width'] = Variable<int>(width);+ }+ if (!nullToAbsent || height != null) {+ map['height'] = Variable<int>(height);+ }+ if (!nullToAbsent || durationInSeconds != null) {+ map['duration_in_seconds'] = Variable<int>(durationInSeconds);+ }+ map['id'] = Variable<String>(id);+ if (!nullToAbsent || checksum != null) {+ map['checksum'] = Variable<String>(checksum);+ }+ map['is_favorite'] = Variable<bool>(isFavorite);+ map['orientation'] = Variable<int>(orientation);+ return map;+ }++ factory LocalAssetEntityData.fromJson(Map<String, dynamic> json,+ {ValueSerializer? serializer}) {+ serializer ??= driftRuntimeOptions.defaultSerializer;+ return LocalAssetEntityData(+ name: serializer.fromJson<String>(json['name']),+ type: serializer.fromJson<int>(json['type']),+ createdAt: serializer.fromJson<DateTime>(json['createdAt']),+ updatedAt: serializer.fromJson<DateTime>(json['updatedAt']),+ width: serializer.fromJson<int?>(json['width']),+ height: serializer.fromJson<int?>(json['height']),+ durationInSeconds: serializer.fromJson<int?>(json['durationInSeconds']),+ id: serializer.fromJson<String>(json['id']),+ checksum: serializer.fromJson<String?>(json['checksum']),+ isFavorite: serializer.fromJson<bool>(json['isFavorite']),+ orientation: serializer.fromJson<int>(json['orientation']),+ );+ }+ @override+ Map<String, dynamic> toJson({ValueSerializer? serializer}) {+ serializer ??= driftRuntimeOptions.defaultSerializer;+ return <String, dynamic>{+ 'name': serializer.toJson<String>(name),+ 'type': serializer.toJson<int>(type),+ 'createdAt': serializer.toJson<DateTime>(createdAt),+ 'updatedAt': serializer.toJson<DateTime>(updatedAt),+ 'width': serializer.toJson<int?>(width),+ 'height': serializer.toJson<int?>(height),+ 'durationInSeconds': serializer.toJson<int?>(durationInSeconds),+ 'id': serializer.toJson<String>(id),+ 'checksum': serializer.toJson<String?>(checksum),+ 'isFavorite': serializer.toJson<bool>(isFavorite),+ 'orientation': serializer.toJson<int>(orientation),+ };+ }++ LocalAssetEntityData copyWith(+ {String? name,+ int? type,+ DateTime? createdAt,+ DateTime? updatedAt,+ Value<int?> width = const Value.absent(),+ Value<int?> height = const Value.absent(),+ Value<int?> durationInSeconds = const Value.absent(),+ String? id,+ Value<String?> checksum = const Value.absent(),+ bool? isFavorite,+ int? orientation}) =>+ LocalAssetEntityData(+ name: name ?? this.name,+ type: type ?? this.type,+ createdAt: createdAt ?? this.createdAt,+ updatedAt: updatedAt ?? this.updatedAt,+ width: width.present ? width.value : this.width,+ height: height.present ? height.value : this.height,+ durationInSeconds: durationInSeconds.present+ ? durationInSeconds.value+ : this.durationInSeconds,+ id: id ?? this.id,+ checksum: checksum.present ? checksum.value : this.checksum,+ isFavorite: isFavorite ?? this.isFavorite,+ orientation: orientation ?? this.orientation,+ );+ LocalAssetEntityData copyWithCompanion(LocalAssetEntityCompanion data) {+ return LocalAssetEntityData(+ name: data.name.present ? data.name.value : this.name,+ type: data.type.present ? data.type.value : this.type,+ createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt,+ updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt,+ width: data.width.present ? data.width.value : this.width,+ height: data.height.present ? data.height.value : this.height,+ durationInSeconds: data.durationInSeconds.present+ ? data.durationInSeconds.value+ : this.durationInSeconds,+ id: data.id.present ? data.id.value : this.id,+ checksum: data.checksum.present ? data.checksum.value : this.checksum,+ isFavorite:+ data.isFavorite.present ? data.isFavorite.value : this.isFavorite,+ orientation:+ data.orientation.present ? data.orientation.value : this.orientation,+ );+ }++ @override+ String toString() {+ return (StringBuffer('LocalAssetEntityData(')+ ..write('name: $name, ')+ ..write('type: $type, ')+ ..write('createdAt: $createdAt, ')+ ..write('updatedAt: $updatedAt, ')+ ..write('width: $width, ')+ ..write('height: $height, ')+ ..write('durationInSeconds: $durationInSeconds, ')+ ..write('id: $id, ')+ ..write('checksum: $checksum, ')+ ..write('isFavorite: $isFavorite, ')+ ..write('orientation: $orientation')+ ..write(')'))+ .toString();+ }++ @override+ int get hashCode => Object.hash(name, type, createdAt, updatedAt, width,+ height, durationInSeconds, id, checksum, isFavorite, orientation);+ @override+ bool operator ==(Object other) =>+ identical(this, other) ||+ (other is LocalAssetEntityData &&+ other.name == this.name &&+ other.type == this.type &&+ other.createdAt == this.createdAt &&+ other.updatedAt == this.updatedAt &&+ other.width == this.width &&+ other.height == this.height &&+ other.durationInSeconds == this.durationInSeconds &&+ other.id == this.id &&+ other.checksum == this.checksum &&+ other.isFavorite == this.isFavorite &&+ other.orientation == this.orientation);+}++class LocalAssetEntityCompanion extends UpdateCompanion<LocalAssetEntityData> {+ final Value<String> name;+ final Value<int> type;+ final Value<DateTime> createdAt;+ final Value<DateTime> updatedAt;+ final Value<int?> width;+ final Value<int?> height;+ final Value<int?> durationInSeconds;+ final Value<String> id;+ final Value<String?> checksum;+ final Value<bool> isFavorite;+ final Value<int> orientation;+ const LocalAssetEntityCompanion({+ this.name = const Value.absent(),+ this.type = const Value.absent(),+ this.createdAt = const Value.absent(),+ this.updatedAt = const Value.absent(),+ this.width = const Value.absent(),+ this.height = const Value.absent(),+ this.durationInSeconds = const Value.absent(),+ this.id = const Value.absent(),+ this.checksum = const Value.absent(),+ this.isFavorite = const Value.absent(),+ this.orientation = const Value.absent(),+ });+ LocalAssetEntityCompanion.insert({+ required String name,+ required int type,+ this.createdAt = const Value.absent(),+ this.updatedAt = const Value.absent(),+ this.width = const Value.absent(),+ this.height = const Value.absent(),+ this.durationInSeconds = const Value.absent(),+ required String id,+ this.checksum = const Value.absent(),+ this.isFavorite = const Value.absent(),+ this.orientation = const Value.absent(),+ }) : name = Value(name),+ type = Value(type),+ id = Value(id);+ static Insertable<LocalAssetEntityData> custom({+ Expression<String>? name,+ Expression<int>? type,+ Expression<DateTime>? createdAt,+ Expression<DateTime>? updatedAt,+ Expression<int>? width,+ Expression<int>? height,+ Expression<int>? durationInSeconds,+ Expression<String>? id,+ Expression<String>? checksum,+ Expression<bool>? isFavorite,+ Expression<int>? orientation,+ }) {+ return RawValuesInsertable({+ if (name != null) 'name': name,+ if (type != null) 'type': type,+ if (createdAt != null) 'created_at': createdAt,+ if (updatedAt != null) 'updated_at': updatedAt,+ if (width != null) 'width': width,+ if (height != null) 'height': height,+ if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds,+ if (id != null) 'id': id,+ if (checksum != null) 'checksum': checksum,+ if (isFavorite != null) 'is_favorite': isFavorite,+ if (orientation != null) 'orientation': orientation,+ });+ }++ LocalAssetEntityCompanion copyWith(+ {Value<String>? name,+ Value<int>? type,+ Value<DateTime>? createdAt,+ Value<DateTime>? updatedAt,+ Value<int?>? width,+ Value<int?>? height,+ Value<int?>? durationInSeconds,+ Value<String>? id,+ Value<String?>? checksum,+ Value<bool>? isFavorite,+ Value<int>? orientation}) {+ return LocalAssetEntityCompanion(+ name: name ?? this.name,+ type: type ?? this.type,+ createdAt: createdAt ?? this.createdAt,+ updatedAt: updatedAt ?? this.updatedAt,+ width: width ?? this.width,+ height: height ?? this.height,+ durationInSeconds: durationInSeconds ?? this.durationInSeconds,+ id: id ?? this.id,+ checksum: checksum ?? this.checksum,+ isFavorite: isFavorite ?? this.isFavorite,+ orientation: orientation ?? this.orientation,+ );+ }++ @override+ Map<String, Expression> toColumns(bool nullToAbsent) {+ final map = <String, Expression>{};+ if (name.present) {+ map['name'] = Variable<String>(name.value);+ }+ if (type.present) {+ map['type'] = Variable<int>(type.value);+ }+ if (createdAt.present) {+ map['created_at'] = Variable<DateTime>(createdAt.value);+ }+ if (updatedAt.present) {+ map['updated_at'] = Variable<DateTime>(updatedAt.value);+ }+ if (width.present) {+ map['width'] = Variable<int>(width.value);+ }+ if (height.present) {+ map['height'] = Variable<int>(height.value);+ }+ if (durationInSeconds.present) {+ map['duration_in_seconds'] = Variable<int>(durationInSeconds.value);+ }+ if (id.present) {+ map['id'] = Variable<String>(id.value);+ }+ if (checksum.present) {+ map['checksum'] = Variable<String>(checksum.value);+ }+ if (isFavorite.present) {+ map['is_favorite'] = Variable<bool>(isFavorite.value);+ }+ if (orientation.present) {+ map['orientation'] = Variable<int>(orientation.value);+ }+ return map;+ }++ @override+ String toString() {+ return (StringBuffer('LocalAssetEntityCompanion(')+ ..write('name: $name, ')+ ..write('type: $type, ')+ ..write('createdAt: $createdAt, ')+ ..write('updatedAt: $updatedAt, ')+ ..write('width: $width, ')+ ..write('height: $height, ')+ ..write('durationInSeconds: $durationInSeconds, ')+ ..write('id: $id, ')+ ..write('checksum: $checksum, ')+ ..write('isFavorite: $isFavorite, ')+ ..write('orientation: $orientation')+ ..write(')'))+ .toString();+ }+}++class UserMetadataEntity extends Table+ with TableInfo<UserMetadataEntity, UserMetadataEntityData> {+ @override+ final GeneratedDatabase attachedDatabase;+ final String? _alias;+ UserMetadataEntity(this.attachedDatabase, [this._alias]);+ late final GeneratedColumn<String> userId = GeneratedColumn<String>(+ 'user_id', aliasedName, false,+ type: DriftSqlType.string,+ requiredDuringInsert: true,+ defaultConstraints: GeneratedColumn.constraintIsAlways(+ 'REFERENCES user_entity (id) ON DELETE CASCADE'));+ late final GeneratedColumn<int> key = GeneratedColumn<int>(+ 'key', aliasedName, false,+ type: DriftSqlType.int, requiredDuringInsert: true);+ late final GeneratedColumn<Uint8List> value = GeneratedColumn<Uint8List>(+ 'value', aliasedName, false,+ type: DriftSqlType.blob, requiredDuringInsert: true);+ @override+ List<GeneratedColumn> get $columns => [userId, key, value];+ @override+ String get aliasedName => _alias ?? actualTableName;+ @override+ String get actualTableName => $name;+ static const String $name = 'user_metadata_entity';+ @override+ Set<GeneratedColumn> get $primaryKey => {userId, key};+ @override+ UserMetadataEntityData map(Map<String, dynamic> data, {String? tablePrefix}) {+ final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';+ return UserMetadataEntityData(+ userId: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}user_id'])!,+ key: attachedDatabase.typeMapping+ .read(DriftSqlType.int, data['${effectivePrefix}key'])!,+ value: attachedDatabase.typeMapping+ .read(DriftSqlType.blob, data['${effectivePrefix}value'])!,+ );+ }++ @override+ UserMetadataEntity createAlias(String alias) {+ return UserMetadataEntity(attachedDatabase, alias);+ }++ @override+ bool get withoutRowId => true;+ @override+ bool get isStrict => true;+}++class UserMetadataEntityData extends DataClass+ implements Insertable<UserMetadataEntityData> {+ final String userId;+ final int key;+ final Uint8List value;+ const UserMetadataEntityData(+ {required this.userId, required this.key, required this.value});+ @override+ Map<String, Expression> toColumns(bool nullToAbsent) {+ final map = <String, Expression>{};+ map['user_id'] = Variable<String>(userId);+ map['key'] = Variable<int>(key);+ map['value'] = Variable<Uint8List>(value);+ return map;+ }++ factory UserMetadataEntityData.fromJson(Map<String, dynamic> json,+ {ValueSerializer? serializer}) {+ serializer ??= driftRuntimeOptions.defaultSerializer;+ return UserMetadataEntityData(+ userId: serializer.fromJson<String>(json['userId']),+ key: serializer.fromJson<int>(json['key']),+ value: serializer.fromJson<Uint8List>(json['value']),+ );+ }+ @override+ Map<String, dynamic> toJson({ValueSerializer? serializer}) {+ serializer ??= driftRuntimeOptions.defaultSerializer;+ return <String, dynamic>{+ 'userId': serializer.toJson<String>(userId),+ 'key': serializer.toJson<int>(key),+ 'value': serializer.toJson<Uint8List>(value),+ };+ }++ UserMetadataEntityData copyWith(+ {String? userId, int? key, Uint8List? value}) =>+ UserMetadataEntityData(+ userId: userId ?? this.userId,+ key: key ?? this.key,+ value: value ?? this.value,+ );+ UserMetadataEntityData copyWithCompanion(UserMetadataEntityCompanion data) {+ return UserMetadataEntityData(+ userId: data.userId.present ? data.userId.value : this.userId,+ key: data.key.present ? data.key.value : this.key,+ value: data.value.present ? data.value.value : this.value,+ );+ }++ @override+ String toString() {+ return (StringBuffer('UserMetadataEntityData(')+ ..write('userId: $userId, ')+ ..write('key: $key, ')+ ..write('value: $value')+ ..write(')'))+ .toString();+ }++ @override+ int get hashCode => Object.hash(userId, key, $driftBlobEquality.hash(value));+ @override+ bool operator ==(Object other) =>+ identical(this, other) ||+ (other is UserMetadataEntityData &&+ other.userId == this.userId &&+ other.key == this.key &&+ $driftBlobEquality.equals(other.value, this.value));+}++class UserMetadataEntityCompanion+ extends UpdateCompanion<UserMetadataEntityData> {+ final Value<String> userId;+ final Value<int> key;+ final Value<Uint8List> value;+ const UserMetadataEntityCompanion({+ this.userId = const Value.absent(),+ this.key = const Value.absent(),+ this.value = const Value.absent(),+ });+ UserMetadataEntityCompanion.insert({+ required String userId,+ required int key,+ required Uint8List value,+ }) : userId = Value(userId),+ key = Value(key),+ value = Value(value);+ static Insertable<UserMetadataEntityData> custom({+ Expression<String>? userId,+ Expression<int>? key,+ Expression<Uint8List>? value,+ }) {+ return RawValuesInsertable({+ if (userId != null) 'user_id': userId,+ if (key != null) 'key': key,+ if (value != null) 'value': value,+ });+ }++ UserMetadataEntityCompanion copyWith(+ {Value<String>? userId, Value<int>? key, Value<Uint8List>? value}) {+ return UserMetadataEntityCompanion(+ userId: userId ?? this.userId,+ key: key ?? this.key,+ value: value ?? this.value,+ );+ }++ @override+ Map<String, Expression> toColumns(bool nullToAbsent) {+ final map = <String, Expression>{};+ if (userId.present) {+ map['user_id'] = Variable<String>(userId.value);+ }+ if (key.present) {+ map['key'] = Variable<int>(key.value);+ }+ if (value.present) {+ map['value'] = Variable<Uint8List>(value.value);+ }+ return map;+ }++ @override+ String toString() {+ return (StringBuffer('UserMetadataEntityCompanion(')+ ..write('userId: $userId, ')+ ..write('key: $key, ')+ ..write('value: $value')+ ..write(')'))+ .toString();+ }+}++class PartnerEntity extends Table+ with TableInfo<PartnerEntity, PartnerEntityData> {+ @override+ final GeneratedDatabase attachedDatabase;+ final String? _alias;+ PartnerEntity(this.attachedDatabase, [this._alias]);+ late final GeneratedColumn<String> sharedById = GeneratedColumn<String>(+ 'shared_by_id', aliasedName, false,+ type: DriftSqlType.string,+ requiredDuringInsert: true,+ defaultConstraints: GeneratedColumn.constraintIsAlways(+ 'REFERENCES user_entity (id) ON DELETE CASCADE'));+ late final GeneratedColumn<String> sharedWithId = GeneratedColumn<String>(+ 'shared_with_id', aliasedName, false,+ type: DriftSqlType.string,+ requiredDuringInsert: true,+ defaultConstraints: GeneratedColumn.constraintIsAlways(+ 'REFERENCES user_entity (id) ON DELETE CASCADE'));+ late final GeneratedColumn<bool> inTimeline = GeneratedColumn<bool>(+ 'in_timeline', aliasedName, false,+ type: DriftSqlType.bool,+ requiredDuringInsert: false,+ defaultConstraints:+ GeneratedColumn.constraintIsAlways('CHECK ("in_timeline" IN (0, 1))'),+ defaultValue: const CustomExpression('0'));+ @override+ List<GeneratedColumn> get $columns => [sharedById, sharedWithId, inTimeline];+ @override+ String get aliasedName => _alias ?? actualTableName;+ @override+ String get actualTableName => $name;+ static const String $name = 'partner_entity';+ @override+ Set<GeneratedColumn> get $primaryKey => {sharedById, sharedWithId};+ @override+ PartnerEntityData map(Map<String, dynamic> data, {String? tablePrefix}) {+ final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';+ return PartnerEntityData(+ sharedById: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}shared_by_id'])!,+ sharedWithId: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}shared_with_id'])!,+ inTimeline: attachedDatabase.typeMapping+ .read(DriftSqlType.bool, data['${effectivePrefix}in_timeline'])!,+ );+ }++ @override+ PartnerEntity createAlias(String alias) {+ return PartnerEntity(attachedDatabase, alias);+ }++ @override+ bool get withoutRowId => true;+ @override+ bool get isStrict => true;+}++class PartnerEntityData extends DataClass+ implements Insertable<PartnerEntityData> {+ final String sharedById;+ final String sharedWithId;+ final bool inTimeline;+ const PartnerEntityData(+ {required this.sharedById,+ required this.sharedWithId,+ required this.inTimeline});+ @override+ Map<String, Expression> toColumns(bool nullToAbsent) {+ final map = <String, Expression>{};+ map['shared_by_id'] = Variable<String>(sharedById);+ map['shared_with_id'] = Variable<String>(sharedWithId);+ map['in_timeline'] = Variable<bool>(inTimeline);+ return map;+ }++ factory PartnerEntityData.fromJson(Map<String, dynamic> json,+ {ValueSerializer? serializer}) {+ serializer ??= driftRuntimeOptions.defaultSerializer;+ return PartnerEntityData(+ sharedById: serializer.fromJson<String>(json['sharedById']),+ sharedWithId: serializer.fromJson<String>(json['sharedWithId']),+ inTimeline: serializer.fromJson<bool>(json['inTimeline']),+ );+ }+ @override+ Map<String, dynamic> toJson({ValueSerializer? serializer}) {+ serializer ??= driftRuntimeOptions.defaultSerializer;+ return <String, dynamic>{+ 'sharedById': serializer.toJson<String>(sharedById),+ 'sharedWithId': serializer.toJson<String>(sharedWithId),+ 'inTimeline': serializer.toJson<bool>(inTimeline),+ };+ }++ PartnerEntityData copyWith(+ {String? sharedById, String? sharedWithId, bool? inTimeline}) =>+ PartnerEntityData(+ sharedById: sharedById ?? this.sharedById,+ sharedWithId: sharedWithId ?? this.sharedWithId,+ inTimeline: inTimeline ?? this.inTimeline,+ );+ PartnerEntityData copyWithCompanion(PartnerEntityCompanion data) {+ return PartnerEntityData(+ sharedById:+ data.sharedById.present ? data.sharedById.value : this.sharedById,+ sharedWithId: data.sharedWithId.present+ ? data.sharedWithId.value+ : this.sharedWithId,+ inTimeline:+ data.inTimeline.present ? data.inTimeline.value : this.inTimeline,+ );+ }++ @override+ String toString() {+ return (StringBuffer('PartnerEntityData(')+ ..write('sharedById: $sharedById, ')+ ..write('sharedWithId: $sharedWithId, ')+ ..write('inTimeline: $inTimeline')+ ..write(')'))+ .toString();+ }++ @override+ int get hashCode => Object.hash(sharedById, sharedWithId, inTimeline);+ @override+ bool operator ==(Object other) =>+ identical(this, other) ||+ (other is PartnerEntityData &&+ other.sharedById == this.sharedById &&+ other.sharedWithId == this.sharedWithId &&+ other.inTimeline == this.inTimeline);+}++class PartnerEntityCompanion extends UpdateCompanion<PartnerEntityData> {+ final Value<String> sharedById;+ final Value<String> sharedWithId;+ final Value<bool> inTimeline;+ const PartnerEntityCompanion({+ this.sharedById = const Value.absent(),+ this.sharedWithId = const Value.absent(),+ this.inTimeline = const Value.absent(),+ });+ PartnerEntityCompanion.insert({+ required String sharedById,+ required String sharedWithId,+ this.inTimeline = const Value.absent(),+ }) : sharedById = Value(sharedById),+ sharedWithId = Value(sharedWithId);+ static Insertable<PartnerEntityData> custom({+ Expression<String>? sharedById,+ Expression<String>? sharedWithId,+ Expression<bool>? inTimeline,+ }) {+ return RawValuesInsertable({+ if (sharedById != null) 'shared_by_id': sharedById,+ if (sharedWithId != null) 'shared_with_id': sharedWithId,+ if (inTimeline != null) 'in_timeline': inTimeline,+ });+ }++ PartnerEntityCompanion copyWith(+ {Value<String>? sharedById,+ Value<String>? sharedWithId,+ Value<bool>? inTimeline}) {+ return PartnerEntityCompanion(+ sharedById: sharedById ?? this.sharedById,+ sharedWithId: sharedWithId ?? this.sharedWithId,+ inTimeline: inTimeline ?? this.inTimeline,+ );+ }++ @override+ Map<String, Expression> toColumns(bool nullToAbsent) {+ final map = <String, Expression>{};+ if (sharedById.present) {+ map['shared_by_id'] = Variable<String>(sharedById.value);+ }+ if (sharedWithId.present) {+ map['shared_with_id'] = Variable<String>(sharedWithId.value);+ }+ if (inTimeline.present) {+ map['in_timeline'] = Variable<bool>(inTimeline.value);+ }+ return map;+ }++ @override+ String toString() {+ return (StringBuffer('PartnerEntityCompanion(')+ ..write('sharedById: $sharedById, ')+ ..write('sharedWithId: $sharedWithId, ')+ ..write('inTimeline: $inTimeline')+ ..write(')'))+ .toString();+ }+}++class LocalAlbumEntity extends Table+ with TableInfo<LocalAlbumEntity, LocalAlbumEntityData> {+ @override+ final GeneratedDatabase attachedDatabase;+ final String? _alias;+ LocalAlbumEntity(this.attachedDatabase, [this._alias]);+ late final GeneratedColumn<String> id = GeneratedColumn<String>(+ 'id', aliasedName, false,+ type: DriftSqlType.string, requiredDuringInsert: true);+ late final GeneratedColumn<String> name = GeneratedColumn<String>(+ 'name', aliasedName, false,+ type: DriftSqlType.string, requiredDuringInsert: true);+ late final GeneratedColumn<DateTime> updatedAt = GeneratedColumn<DateTime>(+ 'updated_at', aliasedName, false,+ type: DriftSqlType.dateTime,+ requiredDuringInsert: false,+ defaultValue: const CustomExpression('CURRENT_TIMESTAMP'));+ late final GeneratedColumn<int> backupSelection = GeneratedColumn<int>(+ 'backup_selection', aliasedName, false,+ type: DriftSqlType.int, requiredDuringInsert: true);+ late final GeneratedColumn<bool> isIosSharedAlbum = GeneratedColumn<bool>(+ 'is_ios_shared_album', aliasedName, false,+ type: DriftSqlType.bool,+ requiredDuringInsert: false,+ defaultConstraints: GeneratedColumn.constraintIsAlways(+ 'CHECK ("is_ios_shared_album" IN (0, 1))'),+ defaultValue: const CustomExpression('0'));+ late final GeneratedColumn<bool> marker_ = GeneratedColumn<bool>(+ 'marker', aliasedName, true,+ type: DriftSqlType.bool,+ requiredDuringInsert: false,+ defaultConstraints:+ GeneratedColumn.constraintIsAlways('CHECK ("marker" IN (0, 1))'));+ @override+ List<GeneratedColumn> get $columns =>+ [id, name, updatedAt, backupSelection, isIosSharedAlbum, marker_];+ @override+ String get aliasedName => _alias ?? actualTableName;+ @override+ String get actualTableName => $name;+ static const String $name = 'local_album_entity';+ @override+ Set<GeneratedColumn> get $primaryKey => {id};+ @override+ LocalAlbumEntityData map(Map<String, dynamic> data, {String? tablePrefix}) {+ final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';+ return LocalAlbumEntityData(+ id: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}id'])!,+ name: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}name'])!,+ updatedAt: attachedDatabase.typeMapping+ .read(DriftSqlType.dateTime, data['${effectivePrefix}updated_at'])!,+ backupSelection: attachedDatabase.typeMapping+ .read(DriftSqlType.int, data['${effectivePrefix}backup_selection'])!,+ isIosSharedAlbum: attachedDatabase.typeMapping.read(+ DriftSqlType.bool, data['${effectivePrefix}is_ios_shared_album'])!,+ marker_: attachedDatabase.typeMapping+ .read(DriftSqlType.bool, data['${effectivePrefix}marker']),+ );+ }++ @override+ LocalAlbumEntity createAlias(String alias) {+ return LocalAlbumEntity(attachedDatabase, alias);+ }++ @override+ bool get withoutRowId => true;+ @override+ bool get isStrict => true;+}++class LocalAlbumEntityData extends DataClass+ implements Insertable<LocalAlbumEntityData> {+ final String id;+ final String name;+ final DateTime updatedAt;+ final int backupSelection;+ final bool isIosSharedAlbum;+ final bool? marker_;+ const LocalAlbumEntityData(+ {required this.id,+ required this.name,+ required this.updatedAt,+ required this.backupSelection,+ required this.isIosSharedAlbum,+ this.marker_});+ @override+ Map<String, Expression> toColumns(bool nullToAbsent) {+ final map = <String, Expression>{};+ map['id'] = Variable<String>(id);+ map['name'] = Variable<String>(name);+ map['updated_at'] = Variable<DateTime>(updatedAt);+ map['backup_selection'] = Variable<int>(backupSelection);+ map['is_ios_shared_album'] = Variable<bool>(isIosSharedAlbum);+ if (!nullToAbsent || marker_ != null) {+ map['marker'] = Variable<bool>(marker_);+ }+ return map;+ }++ factory LocalAlbumEntityData.fromJson(Map<String, dynamic> json,+ {ValueSerializer? serializer}) {+ serializer ??= driftRuntimeOptions.defaultSerializer;+ return LocalAlbumEntityData(+ id: serializer.fromJson<String>(json['id']),+ name: serializer.fromJson<String>(json['name']),+ updatedAt: serializer.fromJson<DateTime>(json['updatedAt']),+ backupSelection: serializer.fromJson<int>(json['backupSelection']),+ isIosSharedAlbum: serializer.fromJson<bool>(json['isIosSharedAlbum']),+ marker_: serializer.fromJson<bool?>(json['marker_']),+ );+ }+ @override+ Map<String, dynamic> toJson({ValueSerializer? serializer}) {+ serializer ??= driftRuntimeOptions.defaultSerializer;+ return <String, dynamic>{+ 'id': serializer.toJson<String>(id),+ 'name': serializer.toJson<String>(name),+ 'updatedAt': serializer.toJson<DateTime>(updatedAt),+ 'backupSelection': serializer.toJson<int>(backupSelection),+ 'isIosSharedAlbum': serializer.toJson<bool>(isIosSharedAlbum),+ 'marker_': serializer.toJson<bool?>(marker_),+ };+ }++ LocalAlbumEntityData copyWith(+ {String? id,+ String? name,+ DateTime? updatedAt,+ int? backupSelection,+ bool? isIosSharedAlbum,+ Value<bool?> marker_ = const Value.absent()}) =>+ LocalAlbumEntityData(+ id: id ?? this.id,+ name: name ?? this.name,+ updatedAt: updatedAt ?? this.updatedAt,+ backupSelection: backupSelection ?? this.backupSelection,+ isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum,+ marker_: marker_.present ? marker_.value : this.marker_,+ );+ LocalAlbumEntityData copyWithCompanion(LocalAlbumEntityCompanion data) {+ return LocalAlbumEntityData(+ id: data.id.present ? data.id.value : this.id,+ name: data.name.present ? data.name.value : this.name,+ updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt,+ backupSelection: data.backupSelection.present+ ? data.backupSelection.value+ : this.backupSelection,+ isIosSharedAlbum: data.isIosSharedAlbum.present+ ? data.isIosSharedAlbum.value+ : this.isIosSharedAlbum,+ marker_: data.marker_.present ? data.marker_.value : this.marker_,+ );+ }++ @override+ String toString() {+ return (StringBuffer('LocalAlbumEntityData(')+ ..write('id: $id, ')+ ..write('name: $name, ')+ ..write('updatedAt: $updatedAt, ')+ ..write('backupSelection: $backupSelection, ')+ ..write('isIosSharedAlbum: $isIosSharedAlbum, ')+ ..write('marker_: $marker_')+ ..write(')'))+ .toString();+ }++ @override+ int get hashCode => Object.hash(+ id, name, updatedAt, backupSelection, isIosSharedAlbum, marker_);+ @override+ bool operator ==(Object other) =>+ identical(this, other) ||+ (other is LocalAlbumEntityData &&+ other.id == this.id &&+ other.name == this.name &&+ other.updatedAt == this.updatedAt &&+ other.backupSelection == this.backupSelection &&+ other.isIosSharedAlbum == this.isIosSharedAlbum &&+ other.marker_ == this.marker_);+}++class LocalAlbumEntityCompanion extends UpdateCompanion<LocalAlbumEntityData> {+ final Value<String> id;+ final Value<String> name;+ final Value<DateTime> updatedAt;+ final Value<int> backupSelection;+ final Value<bool> isIosSharedAlbum;+ final Value<bool?> marker_;+ const LocalAlbumEntityCompanion({+ this.id = const Value.absent(),+ this.name = const Value.absent(),+ this.updatedAt = const Value.absent(),+ this.backupSelection = const Value.absent(),+ this.isIosSharedAlbum = const Value.absent(),+ this.marker_ = const Value.absent(),+ });+ LocalAlbumEntityCompanion.insert({+ required String id,+ required String name,+ this.updatedAt = const Value.absent(),+ required int backupSelection,+ this.isIosSharedAlbum = const Value.absent(),+ this.marker_ = const Value.absent(),+ }) : id = Value(id),+ name = Value(name),+ backupSelection = Value(backupSelection);+ static Insertable<LocalAlbumEntityData> custom({+ Expression<String>? id,+ Expression<String>? name,+ Expression<DateTime>? updatedAt,+ Expression<int>? backupSelection,+ Expression<bool>? isIosSharedAlbum,+ Expression<bool>? marker_,+ }) {+ return RawValuesInsertable({+ if (id != null) 'id': id,+ if (name != null) 'name': name,+ if (updatedAt != null) 'updated_at': updatedAt,+ if (backupSelection != null) 'backup_selection': backupSelection,+ if (isIosSharedAlbum != null) 'is_ios_shared_album': isIosSharedAlbum,+ if (marker_ != null) 'marker': marker_,+ });+ }++ LocalAlbumEntityCompanion copyWith(+ {Value<String>? id,+ Value<String>? name,+ Value<DateTime>? updatedAt,+ Value<int>? backupSelection,+ Value<bool>? isIosSharedAlbum,+ Value<bool?>? marker_}) {+ return LocalAlbumEntityCompanion(+ id: id ?? this.id,+ name: name ?? this.name,+ updatedAt: updatedAt ?? this.updatedAt,+ backupSelection: backupSelection ?? this.backupSelection,+ isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum,+ marker_: marker_ ?? this.marker_,+ );+ }++ @override+ Map<String, Expression> toColumns(bool nullToAbsent) {+ final map = <String, Expression>{};+ if (id.present) {+ map['id'] = Variable<String>(id.value);+ }+ if (name.present) {+ map['name'] = Variable<String>(name.value);+ }+ if (updatedAt.present) {+ map['updated_at'] = Variable<DateTime>(updatedAt.value);+ }+ if (backupSelection.present) {+ map['backup_selection'] = Variable<int>(backupSelection.value);+ }+ if (isIosSharedAlbum.present) {+ map['is_ios_shared_album'] = Variable<bool>(isIosSharedAlbum.value);+ }+ if (marker_.present) {+ map['marker'] = Variable<bool>(marker_.value);+ }+ return map;+ }++ @override+ String toString() {+ return (StringBuffer('LocalAlbumEntityCompanion(')+ ..write('id: $id, ')+ ..write('name: $name, ')+ ..write('updatedAt: $updatedAt, ')+ ..write('backupSelection: $backupSelection, ')+ ..write('isIosSharedAlbum: $isIosSharedAlbum, ')+ ..write('marker_: $marker_')+ ..write(')'))+ .toString();+ }+}++class LocalAlbumAssetEntity extends Table+ with TableInfo<LocalAlbumAssetEntity, LocalAlbumAssetEntityData> {+ @override+ final GeneratedDatabase attachedDatabase;+ final String? _alias;+ LocalAlbumAssetEntity(this.attachedDatabase, [this._alias]);+ late final GeneratedColumn<String> assetId = GeneratedColumn<String>(+ 'asset_id', aliasedName, false,+ type: DriftSqlType.string,+ requiredDuringInsert: true,+ defaultConstraints: GeneratedColumn.constraintIsAlways(+ 'REFERENCES local_asset_entity (id) ON DELETE CASCADE'));+ late final GeneratedColumn<String> albumId = GeneratedColumn<String>(+ 'album_id', aliasedName, false,+ type: DriftSqlType.string,+ requiredDuringInsert: true,+ defaultConstraints: GeneratedColumn.constraintIsAlways(+ 'REFERENCES local_album_entity (id) ON DELETE CASCADE'));+ @override+ List<GeneratedColumn> get $columns => [assetId, albumId];+ @override+ String get aliasedName => _alias ?? actualTableName;+ @override+ String get actualTableName => $name;+ static const String $name = 'local_album_asset_entity';+ @override+ Set<GeneratedColumn> get $primaryKey => {assetId, albumId};+ @override+ LocalAlbumAssetEntityData map(Map<String, dynamic> data,+ {String? tablePrefix}) {+ final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';+ return LocalAlbumAssetEntityData(+ assetId: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}asset_id'])!,+ albumId: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}album_id'])!,+ );+ }++ @override+ LocalAlbumAssetEntity createAlias(String alias) {+ return LocalAlbumAssetEntity(attachedDatabase, alias);+ }++ @override+ bool get withoutRowId => true;+ @override+ bool get isStrict => true;+}++class LocalAlbumAssetEntityData extends DataClass+ implements Insertable<LocalAlbumAssetEntityData> {+ final String assetId;+ final String albumId;+ const LocalAlbumAssetEntityData(+ {required this.assetId, required this.albumId});+ @override+ Map<String, Expression> toColumns(bool nullToAbsent) {+ final map = <String, Expression>{};+ map['asset_id'] = Variable<String>(assetId);+ map['album_id'] = Variable<String>(albumId);+ return map;+ }++ factory LocalAlbumAssetEntityData.fromJson(Map<String, dynamic> json,+ {ValueSerializer? serializer}) {+ serializer ??= driftRuntimeOptions.defaultSerializer;+ return LocalAlbumAssetEntityData(+ assetId: serializer.fromJson<String>(json['assetId']),+ albumId: serializer.fromJson<String>(json['albumId']),+ );+ }+ @override+ Map<String, dynamic> toJson({ValueSerializer? serializer}) {+ serializer ??= driftRuntimeOptions.defaultSerializer;+ return <String, dynamic>{+ 'assetId': serializer.toJson<String>(assetId),+ 'albumId': serializer.toJson<String>(albumId),+ };+ }++ LocalAlbumAssetEntityData copyWith({String? assetId, String? albumId}) =>+ LocalAlbumAssetEntityData(+ assetId: assetId ?? this.assetId,+ albumId: albumId ?? this.albumId,+ );+ LocalAlbumAssetEntityData copyWithCompanion(+ LocalAlbumAssetEntityCompanion data) {+ return LocalAlbumAssetEntityData(+ assetId: data.assetId.present ? data.assetId.value : this.assetId,+ albumId: data.albumId.present ? data.albumId.value : this.albumId,+ );+ }++ @override+ String toString() {+ return (StringBuffer('LocalAlbumAssetEntityData(')+ ..write('assetId: $assetId, ')+ ..write('albumId: $albumId')+ ..write(')'))+ .toString();+ }++ @override+ int get hashCode => Object.hash(assetId, albumId);+ @override+ bool operator ==(Object other) =>+ identical(this, other) ||+ (other is LocalAlbumAssetEntityData &&+ other.assetId == this.assetId &&+ other.albumId == this.albumId);+}++class LocalAlbumAssetEntityCompanion+ extends UpdateCompanion<LocalAlbumAssetEntityData> {+ final Value<String> assetId;+ final Value<String> albumId;+ const LocalAlbumAssetEntityCompanion({+ this.assetId = const Value.absent(),+ this.albumId = const Value.absent(),+ });+ LocalAlbumAssetEntityCompanion.insert({+ required String assetId,+ required String albumId,+ }) : assetId = Value(assetId),+ albumId = Value(albumId);+ static Insertable<LocalAlbumAssetEntityData> custom({+ Expression<String>? assetId,+ Expression<String>? albumId,+ }) {+ return RawValuesInsertable({+ if (assetId != null) 'asset_id': assetId,+ if (albumId != null) 'album_id': albumId,+ });+ }++ LocalAlbumAssetEntityCompanion copyWith(+ {Value<String>? assetId, Value<String>? albumId}) {+ return LocalAlbumAssetEntityCompanion(+ assetId: assetId ?? this.assetId,+ albumId: albumId ?? this.albumId,+ );+ }++ @override+ Map<String, Expression> toColumns(bool nullToAbsent) {+ final map = <String, Expression>{};+ if (assetId.present) {+ map['asset_id'] = Variable<String>(assetId.value);+ }+ if (albumId.present) {+ map['album_id'] = Variable<String>(albumId.value);+ }+ return map;+ }++ @override+ String toString() {+ return (StringBuffer('LocalAlbumAssetEntityCompanion(')+ ..write('assetId: $assetId, ')+ ..write('albumId: $albumId')+ ..write(')'))+ .toString();+ }+}++class RemoteExifEntity extends Table+ with TableInfo<RemoteExifEntity, RemoteExifEntityData> {+ @override+ final GeneratedDatabase attachedDatabase;+ final String? _alias;+ RemoteExifEntity(this.attachedDatabase, [this._alias]);+ late final GeneratedColumn<String> assetId = GeneratedColumn<String>(+ 'asset_id', aliasedName, false,+ type: DriftSqlType.string,+ requiredDuringInsert: true,+ defaultConstraints: GeneratedColumn.constraintIsAlways(+ 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE'));+ late final GeneratedColumn<String> city = GeneratedColumn<String>(+ 'city', aliasedName, true,+ type: DriftSqlType.string, requiredDuringInsert: false);+ late final GeneratedColumn<String> state = GeneratedColumn<String>(+ 'state', aliasedName, true,+ type: DriftSqlType.string, requiredDuringInsert: false);+ late final GeneratedColumn<String> country = GeneratedColumn<String>(+ 'country', aliasedName, true,+ type: DriftSqlType.string, requiredDuringInsert: false);+ late final GeneratedColumn<DateTime> dateTimeOriginal =+ GeneratedColumn<DateTime>('date_time_original', aliasedName, true,+ type: DriftSqlType.dateTime, requiredDuringInsert: false);+ late final GeneratedColumn<String> description = GeneratedColumn<String>(+ 'description', aliasedName, true,+ type: DriftSqlType.string, requiredDuringInsert: false);+ late final GeneratedColumn<int> height = GeneratedColumn<int>(+ 'height', aliasedName, true,+ type: DriftSqlType.int, requiredDuringInsert: false);+ late final GeneratedColumn<int> width = GeneratedColumn<int>(+ 'width', aliasedName, true,+ type: DriftSqlType.int, requiredDuringInsert: false);+ late final GeneratedColumn<String> exposureTime = GeneratedColumn<String>(+ 'exposure_time', aliasedName, true,+ type: DriftSqlType.string, requiredDuringInsert: false);+ late final GeneratedColumn<double> fNumber = GeneratedColumn<double>(+ 'f_number', aliasedName, true,+ type: DriftSqlType.double, requiredDuringInsert: false);+ late final GeneratedColumn<int> fileSize = GeneratedColumn<int>(+ 'file_size', aliasedName, true,+ type: DriftSqlType.int, requiredDuringInsert: false);+ late final GeneratedColumn<double> focalLength = GeneratedColumn<double>(+ 'focal_length', aliasedName, true,+ type: DriftSqlType.double, requiredDuringInsert: false);+ late final GeneratedColumn<double> latitude = GeneratedColumn<double>(+ 'latitude', aliasedName, true,+ type: DriftSqlType.double, requiredDuringInsert: false);+ late final GeneratedColumn<double> longitude = GeneratedColumn<double>(+ 'longitude', aliasedName, true,+ type: DriftSqlType.double, requiredDuringInsert: false);+ late final GeneratedColumn<int> iso = GeneratedColumn<int>(+ 'iso', aliasedName, true,+ type: DriftSqlType.int, requiredDuringInsert: false);+ late final GeneratedColumn<String> make = GeneratedColumn<String>(+ 'make', aliasedName, true,+ type: DriftSqlType.string, requiredDuringInsert: false);+ late final GeneratedColumn<String> model = GeneratedColumn<String>(+ 'model', aliasedName, true,+ type: DriftSqlType.string, requiredDuringInsert: false);+ late final GeneratedColumn<String> lens = GeneratedColumn<String>(+ 'lens', aliasedName, true,+ type: DriftSqlType.string, requiredDuringInsert: false);+ late final GeneratedColumn<String> orientation = GeneratedColumn<String>(+ 'orientation', aliasedName, true,+ type: DriftSqlType.string, requiredDuringInsert: false);+ late final GeneratedColumn<String> timeZone = GeneratedColumn<String>(+ 'time_zone', aliasedName, true,+ type: DriftSqlType.string, requiredDuringInsert: false);+ late final GeneratedColumn<int> rating = GeneratedColumn<int>(+ 'rating', aliasedName, true,+ type: DriftSqlType.int, requiredDuringInsert: false);+ late final GeneratedColumn<String> projectionType = GeneratedColumn<String>(+ 'projection_type', aliasedName, true,+ type: DriftSqlType.string, requiredDuringInsert: false);+ @override+ List<GeneratedColumn> get $columns => [+ assetId,+ city,+ state,+ country,+ dateTimeOriginal,+ description,+ height,+ width,+ exposureTime,+ fNumber,+ fileSize,+ focalLength,+ latitude,+ longitude,+ iso,+ make,+ model,+ lens,+ orientation,+ timeZone,+ rating,+ projectionType+ ];+ @override+ String get aliasedName => _alias ?? actualTableName;+ @override+ String get actualTableName => $name;+ static const String $name = 'remote_exif_entity';+ @override+ Set<GeneratedColumn> get $primaryKey => {assetId};+ @override+ RemoteExifEntityData map(Map<String, dynamic> data, {String? tablePrefix}) {+ final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';+ return RemoteExifEntityData(+ assetId: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}asset_id'])!,+ city: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}city']),+ state: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}state']),+ country: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}country']),+ dateTimeOriginal: attachedDatabase.typeMapping.read(+ DriftSqlType.dateTime, data['${effectivePrefix}date_time_original']),+ description: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}description']),+ height: attachedDatabase.typeMapping+ .read(DriftSqlType.int, data['${effectivePrefix}height']),+ width: attachedDatabase.typeMapping+ .read(DriftSqlType.int, data['${effectivePrefix}width']),+ exposureTime: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}exposure_time']),+ fNumber: attachedDatabase.typeMapping+ .read(DriftSqlType.double, data['${effectivePrefix}f_number']),+ fileSize: attachedDatabase.typeMapping+ .read(DriftSqlType.int, data['${effectivePrefix}file_size']),+ focalLength: attachedDatabase.typeMapping+ .read(DriftSqlType.double, data['${effectivePrefix}focal_length']),+ latitude: attachedDatabase.typeMapping+ .read(DriftSqlType.double, data['${effectivePrefix}latitude']),+ longitude: attachedDatabase.typeMapping+ .read(DriftSqlType.double, data['${effectivePrefix}longitude']),+ iso: attachedDatabase.typeMapping+ .read(DriftSqlType.int, data['${effectivePrefix}iso']),+ make: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}make']),+ model: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}model']),+ lens: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}lens']),+ orientation: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}orientation']),+ timeZone: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}time_zone']),+ rating: attachedDatabase.typeMapping+ .read(DriftSqlType.int, data['${effectivePrefix}rating']),+ projectionType: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}projection_type']),+ );+ }++ @override+ RemoteExifEntity createAlias(String alias) {+ return RemoteExifEntity(attachedDatabase, alias);+ }++ @override+ bool get withoutRowId => true;+ @override+ bool get isStrict => true;+}++class RemoteExifEntityData extends DataClass+ implements Insertable<RemoteExifEntityData> {+ final String assetId;+ final String? city;+ final String? state;+ final String? country;+ final DateTime? dateTimeOriginal;+ final String? description;+ final int? height;+ final int? width;+ final String? exposureTime;+ final double? fNumber;+ final int? fileSize;+ final double? focalLength;+ final double? latitude;+ final double? longitude;+ final int? iso;+ final String? make;+ final String? model;+ final String? lens;+ final String? orientation;+ final String? timeZone;+ final int? rating;+ final String? projectionType;+ const RemoteExifEntityData(+ {required this.assetId,+ this.city,+ this.state,+ this.country,+ this.dateTimeOriginal,+ this.description,+ this.height,+ this.width,+ this.exposureTime,+ this.fNumber,+ this.fileSize,+ this.focalLength,+ this.latitude,+ this.longitude,+ this.iso,+ this.make,+ this.model,+ this.lens,+ this.orientation,+ this.timeZone,+ this.rating,+ this.projectionType});+ @override+ Map<String, Expression> toColumns(bool nullToAbsent) {+ final map = <String, Expression>{};+ map['asset_id'] = Variable<String>(assetId);+ if (!nullToAbsent || city != null) {+ map['city'] = Variable<String>(city);+ }+ if (!nullToAbsent || state != null) {+ map['state'] = Variable<String>(state);+ }+ if (!nullToAbsent || country != null) {+ map['country'] = Variable<String>(country);+ }+ if (!nullToAbsent || dateTimeOriginal != null) {+ map['date_time_original'] = Variable<DateTime>(dateTimeOriginal);+ }+ if (!nullToAbsent || description != null) {+ map['description'] = Variable<String>(description);+ }+ if (!nullToAbsent || height != null) {+ map['height'] = Variable<int>(height);+ }+ if (!nullToAbsent || width != null) {+ map['width'] = Variable<int>(width);+ }+ if (!nullToAbsent || exposureTime != null) {+ map['exposure_time'] = Variable<String>(exposureTime);+ }+ if (!nullToAbsent || fNumber != null) {+ map['f_number'] = Variable<double>(fNumber);+ }+ if (!nullToAbsent || fileSize != null) {+ map['file_size'] = Variable<int>(fileSize);+ }+ if (!nullToAbsent || focalLength != null) {+ map['focal_length'] = Variable<double>(focalLength);+ }+ if (!nullToAbsent || latitude != null) {+ map['latitude'] = Variable<double>(latitude);+ }+ if (!nullToAbsent || longitude != null) {+ map['longitude'] = Variable<double>(longitude);+ }+ if (!nullToAbsent || iso != null) {+ map['iso'] = Variable<int>(iso);+ }+ if (!nullToAbsent || make != null) {+ map['make'] = Variable<String>(make);+ }+ if (!nullToAbsent || model != null) {+ map['model'] = Variable<String>(model);+ }+ if (!nullToAbsent || lens != null) {+ map['lens'] = Variable<String>(lens);+ }+ if (!nullToAbsent || orientation != null) {+ map['orientation'] = Variable<String>(orientation);+ }+ if (!nullToAbsent || timeZone != null) {+ map['time_zone'] = Variable<String>(timeZone);+ }+ if (!nullToAbsent || rating != null) {+ map['rating'] = Variable<int>(rating);+ }+ if (!nullToAbsent || projectionType != null) {+ map['projection_type'] = Variable<String>(projectionType);+ }+ return map;+ }++ factory RemoteExifEntityData.fromJson(Map<String, dynamic> json,+ {ValueSerializer? serializer}) {+ serializer ??= driftRuntimeOptions.defaultSerializer;+ return RemoteExifEntityData(+ assetId: serializer.fromJson<String>(json['assetId']),+ city: serializer.fromJson<String?>(json['city']),+ state: serializer.fromJson<String?>(json['state']),+ country: serializer.fromJson<String?>(json['country']),+ dateTimeOriginal:+ serializer.fromJson<DateTime?>(json['dateTimeOriginal']),+ description: serializer.fromJson<String?>(json['description']),+ height: serializer.fromJson<int?>(json['height']),+ width: serializer.fromJson<int?>(json['width']),+ exposureTime: serializer.fromJson<String?>(json['exposureTime']),+ fNumber: serializer.fromJson<double?>(json['fNumber']),+ fileSize: serializer.fromJson<int?>(json['fileSize']),+ focalLength: serializer.fromJson<double?>(json['focalLength']),+ latitude: serializer.fromJson<double?>(json['latitude']),+ longitude: serializer.fromJson<double?>(json['longitude']),+ iso: serializer.fromJson<int?>(json['iso']),+ make: serializer.fromJson<String?>(json['make']),+ model: serializer.fromJson<String?>(json['model']),+ lens: serializer.fromJson<String?>(json['lens']),+ orientation: serializer.fromJson<String?>(json['orientation']),+ timeZone: serializer.fromJson<String?>(json['timeZone']),+ rating: serializer.fromJson<int?>(json['rating']),+ projectionType: serializer.fromJson<String?>(json['projectionType']),+ );+ }+ @override+ Map<String, dynamic> toJson({ValueSerializer? serializer}) {+ serializer ??= driftRuntimeOptions.defaultSerializer;+ return <String, dynamic>{+ 'assetId': serializer.toJson<String>(assetId),+ 'city': serializer.toJson<String?>(city),+ 'state': serializer.toJson<String?>(state),+ 'country': serializer.toJson<String?>(country),+ 'dateTimeOriginal': serializer.toJson<DateTime?>(dateTimeOriginal),+ 'description': serializer.toJson<String?>(description),+ 'height': serializer.toJson<int?>(height),+ 'width': serializer.toJson<int?>(width),+ 'exposureTime': serializer.toJson<String?>(exposureTime),+ 'fNumber': serializer.toJson<double?>(fNumber),+ 'fileSize': serializer.toJson<int?>(fileSize),+ 'focalLength': serializer.toJson<double?>(focalLength),+ 'latitude': serializer.toJson<double?>(latitude),+ 'longitude': serializer.toJson<double?>(longitude),+ 'iso': serializer.toJson<int?>(iso),+ 'make': serializer.toJson<String?>(make),+ 'model': serializer.toJson<String?>(model),+ 'lens': serializer.toJson<String?>(lens),+ 'orientation': serializer.toJson<String?>(orientation),+ 'timeZone': serializer.toJson<String?>(timeZone),+ 'rating': serializer.toJson<int?>(rating),+ 'projectionType': serializer.toJson<String?>(projectionType),+ };+ }++ RemoteExifEntityData copyWith(+ {String? assetId,+ Value<String?> city = const Value.absent(),+ Value<String?> state = const Value.absent(),+ Value<String?> country = const Value.absent(),+ Value<DateTime?> dateTimeOriginal = const Value.absent(),+ Value<String?> description = const Value.absent(),+ Value<int?> height = const Value.absent(),+ Value<int?> width = const Value.absent(),+ Value<String?> exposureTime = const Value.absent(),+ Value<double?> fNumber = const Value.absent(),+ Value<int?> fileSize = const Value.absent(),+ Value<double?> focalLength = const Value.absent(),+ Value<double?> latitude = const Value.absent(),+ Value<double?> longitude = const Value.absent(),+ Value<int?> iso = const Value.absent(),+ Value<String?> make = const Value.absent(),+ Value<String?> model = const Value.absent(),+ Value<String?> lens = const Value.absent(),+ Value<String?> orientation = const Value.absent(),+ Value<String?> timeZone = const Value.absent(),+ Value<int?> rating = const Value.absent(),+ Value<String?> projectionType = const Value.absent()}) =>+ RemoteExifEntityData(+ assetId: assetId ?? this.assetId,+ city: city.present ? city.value : this.city,+ state: state.present ? state.value : this.state,+ country: country.present ? country.value : this.country,+ dateTimeOriginal: dateTimeOriginal.present+ ? dateTimeOriginal.value+ : this.dateTimeOriginal,+ description: description.present ? description.value : this.description,+ height: height.present ? height.value : this.height,+ width: width.present ? width.value : this.width,+ exposureTime:+ exposureTime.present ? exposureTime.value : this.exposureTime,+ fNumber: fNumber.present ? fNumber.value : this.fNumber,+ fileSize: fileSize.present ? fileSize.value : this.fileSize,+ focalLength: focalLength.present ? focalLength.value : this.focalLength,+ latitude: latitude.present ? latitude.value : this.latitude,+ longitude: longitude.present ? longitude.value : this.longitude,+ iso: iso.present ? iso.value : this.iso,+ make: make.present ? make.value : this.make,+ model: model.present ? model.value : this.model,+ lens: lens.present ? lens.value : this.lens,+ orientation: orientation.present ? orientation.value : this.orientation,+ timeZone: timeZone.present ? timeZone.value : this.timeZone,+ rating: rating.present ? rating.value : this.rating,+ projectionType:+ projectionType.present ? projectionType.value : this.projectionType,+ );+ RemoteExifEntityData copyWithCompanion(RemoteExifEntityCompanion data) {+ return RemoteExifEntityData(+ assetId: data.assetId.present ? data.assetId.value : this.assetId,+ city: data.city.present ? data.city.value : this.city,+ state: data.state.present ? data.state.value : this.state,+ country: data.country.present ? data.country.value : this.country,+ dateTimeOriginal: data.dateTimeOriginal.present+ ? data.dateTimeOriginal.value+ : this.dateTimeOriginal,+ description:+ data.description.present ? data.description.value : this.description,+ height: data.height.present ? data.height.value : this.height,+ width: data.width.present ? data.width.value : this.width,+ exposureTime: data.exposureTime.present+ ? data.exposureTime.value+ : this.exposureTime,+ fNumber: data.fNumber.present ? data.fNumber.value : this.fNumber,+ fileSize: data.fileSize.present ? data.fileSize.value : this.fileSize,+ focalLength:+ data.focalLength.present ? data.focalLength.value : this.focalLength,+ latitude: data.latitude.present ? data.latitude.value : this.latitude,+ longitude: data.longitude.present ? data.longitude.value : this.longitude,+ iso: data.iso.present ? data.iso.value : this.iso,+ make: data.make.present ? data.make.value : this.make,+ model: data.model.present ? data.model.value : this.model,+ lens: data.lens.present ? data.lens.value : this.lens,+ orientation:+ data.orientation.present ? data.orientation.value : this.orientation,+ timeZone: data.timeZone.present ? data.timeZone.value : this.timeZone,+ rating: data.rating.present ? data.rating.value : this.rating,+ projectionType: data.projectionType.present+ ? data.projectionType.value+ : this.projectionType,+ );+ }++ @override+ String toString() {+ return (StringBuffer('RemoteExifEntityData(')+ ..write('assetId: $assetId, ')+ ..write('city: $city, ')+ ..write('state: $state, ')+ ..write('country: $country, ')+ ..write('dateTimeOriginal: $dateTimeOriginal, ')+ ..write('description: $description, ')+ ..write('height: $height, ')+ ..write('width: $width, ')+ ..write('exposureTime: $exposureTime, ')+ ..write('fNumber: $fNumber, ')+ ..write('fileSize: $fileSize, ')+ ..write('focalLength: $focalLength, ')+ ..write('latitude: $latitude, ')+ ..write('longitude: $longitude, ')+ ..write('iso: $iso, ')+ ..write('make: $make, ')+ ..write('model: $model, ')+ ..write('lens: $lens, ')+ ..write('orientation: $orientation, ')+ ..write('timeZone: $timeZone, ')+ ..write('rating: $rating, ')+ ..write('projectionType: $projectionType')+ ..write(')'))+ .toString();+ }++ @override+ int get hashCode => Object.hashAll([+ assetId,+ city,+ state,+ country,+ dateTimeOriginal,+ description,+ height,+ width,+ exposureTime,+ fNumber,+ fileSize,+ focalLength,+ latitude,+ longitude,+ iso,+ make,+ model,+ lens,+ orientation,+ timeZone,+ rating,+ projectionType+ ]);+ @override+ bool operator ==(Object other) =>+ identical(this, other) ||+ (other is RemoteExifEntityData &&+ other.assetId == this.assetId &&+ other.city == this.city &&+ other.state == this.state &&+ other.country == this.country &&+ other.dateTimeOriginal == this.dateTimeOriginal &&+ other.description == this.description &&+ other.height == this.height &&+ other.width == this.width &&+ other.exposureTime == this.exposureTime &&+ other.fNumber == this.fNumber &&+ other.fileSize == this.fileSize &&+ other.focalLength == this.focalLength &&+ other.latitude == this.latitude &&+ other.longitude == this.longitude &&+ other.iso == this.iso &&+ other.make == this.make &&+ other.model == this.model &&+ other.lens == this.lens &&+ other.orientation == this.orientation &&+ other.timeZone == this.timeZone &&+ other.rating == this.rating &&+ other.projectionType == this.projectionType);+}++class RemoteExifEntityCompanion extends UpdateCompanion<RemoteExifEntityData> {+ final Value<String> assetId;+ final Value<String?> city;+ final Value<String?> state;+ final Value<String?> country;+ final Value<DateTime?> dateTimeOriginal;+ final Value<String?> description;+ final Value<int?> height;+ final Value<int?> width;+ final Value<String?> exposureTime;+ final Value<double?> fNumber;+ final Value<int?> fileSize;+ final Value<double?> focalLength;+ final Value<double?> latitude;+ final Value<double?> longitude;+ final Value<int?> iso;+ final Value<String?> make;+ final Value<String?> model;+ final Value<String?> lens;+ final Value<String?> orientation;+ final Value<String?> timeZone;+ final Value<int?> rating;+ final Value<String?> projectionType;+ const RemoteExifEntityCompanion({+ this.assetId = const Value.absent(),+ this.city = const Value.absent(),+ this.state = const Value.absent(),+ this.country = const Value.absent(),+ this.dateTimeOriginal = const Value.absent(),+ this.description = const Value.absent(),+ this.height = const Value.absent(),+ this.width = const Value.absent(),+ this.exposureTime = const Value.absent(),+ this.fNumber = const Value.absent(),+ this.fileSize = const Value.absent(),+ this.focalLength = const Value.absent(),+ this.latitude = const Value.absent(),+ this.longitude = const Value.absent(),+ this.iso = const Value.absent(),+ this.make = const Value.absent(),+ this.model = const Value.absent(),+ this.lens = const Value.absent(),+ this.orientation = const Value.absent(),+ this.timeZone = const Value.absent(),+ this.rating = const Value.absent(),+ this.projectionType = const Value.absent(),+ });+ RemoteExifEntityCompanion.insert({+ required String assetId,+ this.city = const Value.absent(),+ this.state = const Value.absent(),+ this.country = const Value.absent(),+ this.dateTimeOriginal = const Value.absent(),+ this.description = const Value.absent(),+ this.height = const Value.absent(),+ this.width = const Value.absent(),+ this.exposureTime = const Value.absent(),+ this.fNumber = const Value.absent(),+ this.fileSize = const Value.absent(),+ this.focalLength = const Value.absent(),+ this.latitude = const Value.absent(),+ this.longitude = const Value.absent(),+ this.iso = const Value.absent(),+ this.make = const Value.absent(),+ this.model = const Value.absent(),+ this.lens = const Value.absent(),+ this.orientation = const Value.absent(),+ this.timeZone = const Value.absent(),+ this.rating = const Value.absent(),+ this.projectionType = const Value.absent(),+ }) : assetId = Value(assetId);+ static Insertable<RemoteExifEntityData> custom({+ Expression<String>? assetId,+ Expression<String>? city,+ Expression<String>? state,+ Expression<String>? country,+ Expression<DateTime>? dateTimeOriginal,+ Expression<String>? description,+ Expression<int>? height,+ Expression<int>? width,+ Expression<String>? exposureTime,+ Expression<double>? fNumber,+ Expression<int>? fileSize,+ Expression<double>? focalLength,+ Expression<double>? latitude,+ Expression<double>? longitude,+ Expression<int>? iso,+ Expression<String>? make,+ Expression<String>? model,+ Expression<String>? lens,+ Expression<String>? orientation,+ Expression<String>? timeZone,+ Expression<int>? rating,+ Expression<String>? projectionType,+ }) {+ return RawValuesInsertable({+ if (assetId != null) 'asset_id': assetId,+ if (city != null) 'city': city,+ if (state != null) 'state': state,+ if (country != null) 'country': country,+ if (dateTimeOriginal != null) 'date_time_original': dateTimeOriginal,+ if (description != null) 'description': description,+ if (height != null) 'height': height,+ if (width != null) 'width': width,+ if (exposureTime != null) 'exposure_time': exposureTime,+ if (fNumber != null) 'f_number': fNumber,+ if (fileSize != null) 'file_size': fileSize,+ if (focalLength != null) 'focal_length': focalLength,+ if (latitude != null) 'latitude': latitude,+ if (longitude != null) 'longitude': longitude,+ if (iso != null) 'iso': iso,+ if (make != null) 'make': make,+ if (model != null) 'model': model,+ if (lens != null) 'lens': lens,+ if (orientation != null) 'orientation': orientation,+ if (timeZone != null) 'time_zone': timeZone,+ if (rating != null) 'rating': rating,+ if (projectionType != null) 'projection_type': projectionType,+ });+ }++ RemoteExifEntityCompanion copyWith(+ {Value<String>? assetId,+ Value<String?>? city,+ Value<String?>? state,+ Value<String?>? country,+ Value<DateTime?>? dateTimeOriginal,+ Value<String?>? description,+ Value<int?>? height,+ Value<int?>? width,+ Value<String?>? exposureTime,+ Value<double?>? fNumber,+ Value<int?>? fileSize,+ Value<double?>? focalLength,+ Value<double?>? latitude,+ Value<double?>? longitude,+ Value<int?>? iso,+ Value<String?>? make,+ Value<String?>? model,+ Value<String?>? lens,+ Value<String?>? orientation,+ Value<String?>? timeZone,+ Value<int?>? rating,+ Value<String?>? projectionType}) {+ return RemoteExifEntityCompanion(+ assetId: assetId ?? this.assetId,+ city: city ?? this.city,+ state: state ?? this.state,+ country: country ?? this.country,+ dateTimeOriginal: dateTimeOriginal ?? this.dateTimeOriginal,+ description: description ?? this.description,+ height: height ?? this.height,+ width: width ?? this.width,+ exposureTime: exposureTime ?? this.exposureTime,+ fNumber: fNumber ?? this.fNumber,+ fileSize: fileSize ?? this.fileSize,+ focalLength: focalLength ?? this.focalLength,+ latitude: latitude ?? this.latitude,+ longitude: longitude ?? this.longitude,+ iso: iso ?? this.iso,+ make: make ?? this.make,+ model: model ?? this.model,+ lens: lens ?? this.lens,+ orientation: orientation ?? this.orientation,+ timeZone: timeZone ?? this.timeZone,+ rating: rating ?? this.rating,+ projectionType: projectionType ?? this.projectionType,+ );+ }++ @override+ Map<String, Expression> toColumns(bool nullToAbsent) {+ final map = <String, Expression>{};+ if (assetId.present) {+ map['asset_id'] = Variable<String>(assetId.value);+ }+ if (city.present) {+ map['city'] = Variable<String>(city.value);+ }+ if (state.present) {+ map['state'] = Variable<String>(state.value);+ }+ if (country.present) {+ map['country'] = Variable<String>(country.value);+ }+ if (dateTimeOriginal.present) {+ map['date_time_original'] = Variable<DateTime>(dateTimeOriginal.value);+ }+ if (description.present) {+ map['description'] = Variable<String>(description.value);+ }+ if (height.present) {+ map['height'] = Variable<int>(height.value);+ }+ if (width.present) {+ map['width'] = Variable<int>(width.value);+ }+ if (exposureTime.present) {+ map['exposure_time'] = Variable<String>(exposureTime.value);+ }+ if (fNumber.present) {+ map['f_number'] = Variable<double>(fNumber.value);+ }+ if (fileSize.present) {+ map['file_size'] = Variable<int>(fileSize.value);+ }+ if (focalLength.present) {+ map['focal_length'] = Variable<double>(focalLength.value);+ }+ if (latitude.present) {+ map['latitude'] = Variable<double>(latitude.value);+ }+ if (longitude.present) {+ map['longitude'] = Variable<double>(longitude.value);+ }+ if (iso.present) {+ map['iso'] = Variable<int>(iso.value);+ }+ if (make.present) {+ map['make'] = Variable<String>(make.value);+ }+ if (model.present) {+ map['model'] = Variable<String>(model.value);+ }+ if (lens.present) {+ map['lens'] = Variable<String>(lens.value);+ }+ if (orientation.present) {+ map['orientation'] = Variable<String>(orientation.value);+ }+ if (timeZone.present) {+ map['time_zone'] = Variable<String>(timeZone.value);+ }+ if (rating.present) {+ map['rating'] = Variable<int>(rating.value);+ }+ if (projectionType.present) {+ map['projection_type'] = Variable<String>(projectionType.value);+ }+ return map;+ }++ @override+ String toString() {+ return (StringBuffer('RemoteExifEntityCompanion(')+ ..write('assetId: $assetId, ')+ ..write('city: $city, ')+ ..write('state: $state, ')+ ..write('country: $country, ')+ ..write('dateTimeOriginal: $dateTimeOriginal, ')+ ..write('description: $description, ')+ ..write('height: $height, ')+ ..write('width: $width, ')+ ..write('exposureTime: $exposureTime, ')+ ..write('fNumber: $fNumber, ')+ ..write('fileSize: $fileSize, ')+ ..write('focalLength: $focalLength, ')+ ..write('latitude: $latitude, ')+ ..write('longitude: $longitude, ')+ ..write('iso: $iso, ')+ ..write('make: $make, ')+ ..write('model: $model, ')+ ..write('lens: $lens, ')+ ..write('orientation: $orientation, ')+ ..write('timeZone: $timeZone, ')+ ..write('rating: $rating, ')+ ..write('projectionType: $projectionType')+ ..write(')'))+ .toString();+ }+}++class RemoteAlbumEntity extends Table+ with TableInfo<RemoteAlbumEntity, RemoteAlbumEntityData> {+ @override+ final GeneratedDatabase attachedDatabase;+ final String? _alias;+ RemoteAlbumEntity(this.attachedDatabase, [this._alias]);+ late final GeneratedColumn<String> id = GeneratedColumn<String>(+ 'id', aliasedName, false,+ type: DriftSqlType.string, requiredDuringInsert: true);+ late final GeneratedColumn<String> name = GeneratedColumn<String>(+ 'name', aliasedName, false,+ type: DriftSqlType.string, requiredDuringInsert: true);+ late final GeneratedColumn<String> description = GeneratedColumn<String>(+ 'description', aliasedName, false,+ type: DriftSqlType.string,+ requiredDuringInsert: false,+ defaultValue: const CustomExpression('\'\''));+ late final GeneratedColumn<DateTime> createdAt = GeneratedColumn<DateTime>(+ 'created_at', aliasedName, false,+ type: DriftSqlType.dateTime,+ requiredDuringInsert: false,+ defaultValue: const CustomExpression('CURRENT_TIMESTAMP'));+ late final GeneratedColumn<DateTime> updatedAt = GeneratedColumn<DateTime>(+ 'updated_at', aliasedName, false,+ type: DriftSqlType.dateTime,+ requiredDuringInsert: false,+ defaultValue: const CustomExpression('CURRENT_TIMESTAMP'));+ late final GeneratedColumn<String> ownerId = GeneratedColumn<String>(+ 'owner_id', aliasedName, false,+ type: DriftSqlType.string,+ requiredDuringInsert: true,+ defaultConstraints: GeneratedColumn.constraintIsAlways(+ 'REFERENCES user_entity (id) ON DELETE CASCADE'));+ late final GeneratedColumn<String> thumbnailAssetId = GeneratedColumn<String>(+ 'thumbnail_asset_id', aliasedName, true,+ type: DriftSqlType.string,+ requiredDuringInsert: false,+ defaultConstraints: GeneratedColumn.constraintIsAlways(+ 'REFERENCES remote_asset_entity (id) ON DELETE SET NULL'));+ late final GeneratedColumn<bool> isActivityEnabled = GeneratedColumn<bool>(+ 'is_activity_enabled', aliasedName, false,+ type: DriftSqlType.bool,+ requiredDuringInsert: false,+ defaultConstraints: GeneratedColumn.constraintIsAlways(+ 'CHECK ("is_activity_enabled" IN (0, 1))'),+ defaultValue: const CustomExpression('1'));+ late final GeneratedColumn<int> order = GeneratedColumn<int>(+ 'order', aliasedName, false,+ type: DriftSqlType.int, requiredDuringInsert: true);+ @override+ List<GeneratedColumn> get $columns => [+ id,+ name,+ description,+ createdAt,+ updatedAt,+ ownerId,+ thumbnailAssetId,+ isActivityEnabled,+ order+ ];+ @override+ String get aliasedName => _alias ?? actualTableName;+ @override+ String get actualTableName => $name;+ static const String $name = 'remote_album_entity';+ @override+ Set<GeneratedColumn> get $primaryKey => {id};+ @override+ RemoteAlbumEntityData map(Map<String, dynamic> data, {String? tablePrefix}) {+ final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';+ return RemoteAlbumEntityData(+ id: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}id'])!,+ name: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}name'])!,+ description: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}description'])!,+ createdAt: attachedDatabase.typeMapping+ .read(DriftSqlType.dateTime, data['${effectivePrefix}created_at'])!,+ updatedAt: attachedDatabase.typeMapping+ .read(DriftSqlType.dateTime, data['${effectivePrefix}updated_at'])!,+ ownerId: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}owner_id'])!,+ thumbnailAssetId: attachedDatabase.typeMapping.read(+ DriftSqlType.string, data['${effectivePrefix}thumbnail_asset_id']),+ isActivityEnabled: attachedDatabase.typeMapping.read(+ DriftSqlType.bool, data['${effectivePrefix}is_activity_enabled'])!,+ order: attachedDatabase.typeMapping+ .read(DriftSqlType.int, data['${effectivePrefix}order'])!,+ );+ }++ @override+ RemoteAlbumEntity createAlias(String alias) {+ return RemoteAlbumEntity(attachedDatabase, alias);+ }++ @override+ bool get withoutRowId => true;+ @override+ bool get isStrict => true;+}++class RemoteAlbumEntityData extends DataClass+ implements Insertable<RemoteAlbumEntityData> {+ final String id;+ final String name;+ final String description;+ final DateTime createdAt;+ final DateTime updatedAt;+ final String ownerId;+ final String? thumbnailAssetId;+ final bool isActivityEnabled;+ final int order;+ const RemoteAlbumEntityData(+ {required this.id,+ required this.name,+ required this.description,+ required this.createdAt,+ required this.updatedAt,+ required this.ownerId,+ this.thumbnailAssetId,+ required this.isActivityEnabled,+ required this.order});+ @override+ Map<String, Expression> toColumns(bool nullToAbsent) {+ final map = <String, Expression>{};+ map['id'] = Variable<String>(id);+ map['name'] = Variable<String>(name);+ map['description'] = Variable<String>(description);+ map['created_at'] = Variable<DateTime>(createdAt);+ map['updated_at'] = Variable<DateTime>(updatedAt);+ map['owner_id'] = Variable<String>(ownerId);+ if (!nullToAbsent || thumbnailAssetId != null) {+ map['thumbnail_asset_id'] = Variable<String>(thumbnailAssetId);+ }+ map['is_activity_enabled'] = Variable<bool>(isActivityEnabled);+ map['order'] = Variable<int>(order);+ return map;+ }++ factory RemoteAlbumEntityData.fromJson(Map<String, dynamic> json,+ {ValueSerializer? serializer}) {+ serializer ??= driftRuntimeOptions.defaultSerializer;+ return RemoteAlbumEntityData(+ id: serializer.fromJson<String>(json['id']),+ name: serializer.fromJson<String>(json['name']),+ description: serializer.fromJson<String>(json['description']),+ createdAt: serializer.fromJson<DateTime>(json['createdAt']),+ updatedAt: serializer.fromJson<DateTime>(json['updatedAt']),+ ownerId: serializer.fromJson<String>(json['ownerId']),+ thumbnailAssetId: serializer.fromJson<String?>(json['thumbnailAssetId']),+ isActivityEnabled: serializer.fromJson<bool>(json['isActivityEnabled']),+ order: serializer.fromJson<int>(json['order']),+ );+ }+ @override+ Map<String, dynamic> toJson({ValueSerializer? serializer}) {+ serializer ??= driftRuntimeOptions.defaultSerializer;+ return <String, dynamic>{+ 'id': serializer.toJson<String>(id),+ 'name': serializer.toJson<String>(name),+ 'description': serializer.toJson<String>(description),+ 'createdAt': serializer.toJson<DateTime>(createdAt),+ 'updatedAt': serializer.toJson<DateTime>(updatedAt),+ 'ownerId': serializer.toJson<String>(ownerId),+ 'thumbnailAssetId': serializer.toJson<String?>(thumbnailAssetId),+ 'isActivityEnabled': serializer.toJson<bool>(isActivityEnabled),+ 'order': serializer.toJson<int>(order),+ };+ }++ RemoteAlbumEntityData copyWith(+ {String? id,+ String? name,+ String? description,+ DateTime? createdAt,+ DateTime? updatedAt,+ String? ownerId,+ Value<String?> thumbnailAssetId = const Value.absent(),+ bool? isActivityEnabled,+ int? order}) =>+ RemoteAlbumEntityData(+ id: id ?? this.id,+ name: name ?? this.name,+ description: description ?? this.description,+ createdAt: createdAt ?? this.createdAt,+ updatedAt: updatedAt ?? this.updatedAt,+ ownerId: ownerId ?? this.ownerId,+ thumbnailAssetId: thumbnailAssetId.present+ ? thumbnailAssetId.value+ : this.thumbnailAssetId,+ isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled,+ order: order ?? this.order,+ );+ RemoteAlbumEntityData copyWithCompanion(RemoteAlbumEntityCompanion data) {+ return RemoteAlbumEntityData(+ id: data.id.present ? data.id.value : this.id,+ name: data.name.present ? data.name.value : this.name,+ description:+ data.description.present ? data.description.value : this.description,+ createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt,+ updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt,+ ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId,+ thumbnailAssetId: data.thumbnailAssetId.present+ ? data.thumbnailAssetId.value+ : this.thumbnailAssetId,+ isActivityEnabled: data.isActivityEnabled.present+ ? data.isActivityEnabled.value+ : this.isActivityEnabled,+ order: data.order.present ? data.order.value : this.order,+ );+ }++ @override+ String toString() {+ return (StringBuffer('RemoteAlbumEntityData(')+ ..write('id: $id, ')+ ..write('name: $name, ')+ ..write('description: $description, ')+ ..write('createdAt: $createdAt, ')+ ..write('updatedAt: $updatedAt, ')+ ..write('ownerId: $ownerId, ')+ ..write('thumbnailAssetId: $thumbnailAssetId, ')+ ..write('isActivityEnabled: $isActivityEnabled, ')+ ..write('order: $order')+ ..write(')'))+ .toString();+ }++ @override+ int get hashCode => Object.hash(id, name, description, createdAt, updatedAt,+ ownerId, thumbnailAssetId, isActivityEnabled, order);+ @override+ bool operator ==(Object other) =>+ identical(this, other) ||+ (other is RemoteAlbumEntityData &&+ other.id == this.id &&+ other.name == this.name &&+ other.description == this.description &&+ other.createdAt == this.createdAt &&+ other.updatedAt == this.updatedAt &&+ other.ownerId == this.ownerId &&+ other.thumbnailAssetId == this.thumbnailAssetId &&+ other.isActivityEnabled == this.isActivityEnabled &&+ other.order == this.order);+}++class RemoteAlbumEntityCompanion+ extends UpdateCompanion<RemoteAlbumEntityData> {+ final Value<String> id;+ final Value<String> name;+ final Value<String> description;+ final Value<DateTime> createdAt;+ final Value<DateTime> updatedAt;+ final Value<String> ownerId;+ final Value<String?> thumbnailAssetId;+ final Value<bool> isActivityEnabled;+ final Value<int> order;+ const RemoteAlbumEntityCompanion({+ this.id = const Value.absent(),+ this.name = const Value.absent(),+ this.description = const Value.absent(),+ this.createdAt = const Value.absent(),+ this.updatedAt = const Value.absent(),+ this.ownerId = const Value.absent(),+ this.thumbnailAssetId = const Value.absent(),+ this.isActivityEnabled = const Value.absent(),+ this.order = const Value.absent(),+ });+ RemoteAlbumEntityCompanion.insert({+ required String id,+ required String name,+ this.description = const Value.absent(),+ this.createdAt = const Value.absent(),+ this.updatedAt = const Value.absent(),+ required String ownerId,+ this.thumbnailAssetId = const Value.absent(),+ this.isActivityEnabled = const Value.absent(),+ required int order,+ }) : id = Value(id),+ name = Value(name),+ ownerId = Value(ownerId),+ order = Value(order);+ static Insertable<RemoteAlbumEntityData> custom({+ Expression<String>? id,+ Expression<String>? name,+ Expression<String>? description,+ Expression<DateTime>? createdAt,+ Expression<DateTime>? updatedAt,+ Expression<String>? ownerId,+ Expression<String>? thumbnailAssetId,+ Expression<bool>? isActivityEnabled,+ Expression<int>? order,+ }) {+ return RawValuesInsertable({+ if (id != null) 'id': id,+ if (name != null) 'name': name,+ if (description != null) 'description': description,+ if (createdAt != null) 'created_at': createdAt,+ if (updatedAt != null) 'updated_at': updatedAt,+ if (ownerId != null) 'owner_id': ownerId,+ if (thumbnailAssetId != null) 'thumbnail_asset_id': thumbnailAssetId,+ if (isActivityEnabled != null) 'is_activity_enabled': isActivityEnabled,+ if (order != null) 'order': order,+ });+ }++ RemoteAlbumEntityCompanion copyWith(+ {Value<String>? id,+ Value<String>? name,+ Value<String>? description,+ Value<DateTime>? createdAt,+ Value<DateTime>? updatedAt,+ Value<String>? ownerId,+ Value<String?>? thumbnailAssetId,+ Value<bool>? isActivityEnabled,+ Value<int>? order}) {+ return RemoteAlbumEntityCompanion(+ id: id ?? this.id,+ name: name ?? this.name,+ description: description ?? this.description,+ createdAt: createdAt ?? this.createdAt,+ updatedAt: updatedAt ?? this.updatedAt,+ ownerId: ownerId ?? this.ownerId,+ thumbnailAssetId: thumbnailAssetId ?? this.thumbnailAssetId,+ isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled,+ order: order ?? this.order,+ );+ }++ @override+ Map<String, Expression> toColumns(bool nullToAbsent) {+ final map = <String, Expression>{};+ if (id.present) {+ map['id'] = Variable<String>(id.value);+ }+ if (name.present) {+ map['name'] = Variable<String>(name.value);+ }+ if (description.present) {+ map['description'] = Variable<String>(description.value);+ }+ if (createdAt.present) {+ map['created_at'] = Variable<DateTime>(createdAt.value);+ }+ if (updatedAt.present) {+ map['updated_at'] = Variable<DateTime>(updatedAt.value);+ }+ if (ownerId.present) {+ map['owner_id'] = Variable<String>(ownerId.value);+ }+ if (thumbnailAssetId.present) {+ map['thumbnail_asset_id'] = Variable<String>(thumbnailAssetId.value);+ }+ if (isActivityEnabled.present) {+ map['is_activity_enabled'] = Variable<bool>(isActivityEnabled.value);+ }+ if (order.present) {+ map['order'] = Variable<int>(order.value);+ }+ return map;+ }++ @override+ String toString() {+ return (StringBuffer('RemoteAlbumEntityCompanion(')+ ..write('id: $id, ')+ ..write('name: $name, ')+ ..write('description: $description, ')+ ..write('createdAt: $createdAt, ')+ ..write('updatedAt: $updatedAt, ')+ ..write('ownerId: $ownerId, ')+ ..write('thumbnailAssetId: $thumbnailAssetId, ')+ ..write('isActivityEnabled: $isActivityEnabled, ')+ ..write('order: $order')+ ..write(')'))+ .toString();+ }+}++class RemoteAlbumAssetEntity extends Table+ with TableInfo<RemoteAlbumAssetEntity, RemoteAlbumAssetEntityData> {+ @override+ final GeneratedDatabase attachedDatabase;+ final String? _alias;+ RemoteAlbumAssetEntity(this.attachedDatabase, [this._alias]);+ late final GeneratedColumn<String> assetId = GeneratedColumn<String>(+ 'asset_id', aliasedName, false,+ type: DriftSqlType.string,+ requiredDuringInsert: true,+ defaultConstraints: GeneratedColumn.constraintIsAlways(+ 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE'));+ late final GeneratedColumn<String> albumId = GeneratedColumn<String>(+ 'album_id', aliasedName, false,+ type: DriftSqlType.string,+ requiredDuringInsert: true,+ defaultConstraints: GeneratedColumn.constraintIsAlways(+ 'REFERENCES remote_album_entity (id) ON DELETE CASCADE'));+ @override+ List<GeneratedColumn> get $columns => [assetId, albumId];+ @override+ String get aliasedName => _alias ?? actualTableName;+ @override+ String get actualTableName => $name;+ static const String $name = 'remote_album_asset_entity';+ @override+ Set<GeneratedColumn> get $primaryKey => {assetId, albumId};+ @override+ RemoteAlbumAssetEntityData map(Map<String, dynamic> data,+ {String? tablePrefix}) {+ final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';+ return RemoteAlbumAssetEntityData(+ assetId: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}asset_id'])!,+ albumId: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}album_id'])!,+ );+ }++ @override+ RemoteAlbumAssetEntity createAlias(String alias) {+ return RemoteAlbumAssetEntity(attachedDatabase, alias);+ }++ @override+ bool get withoutRowId => true;+ @override+ bool get isStrict => true;+}++class RemoteAlbumAssetEntityData extends DataClass+ implements Insertable<RemoteAlbumAssetEntityData> {+ final String assetId;+ final String albumId;+ const RemoteAlbumAssetEntityData(+ {required this.assetId, required this.albumId});+ @override+ Map<String, Expression> toColumns(bool nullToAbsent) {+ final map = <String, Expression>{};+ map['asset_id'] = Variable<String>(assetId);+ map['album_id'] = Variable<String>(albumId);+ return map;+ }++ factory RemoteAlbumAssetEntityData.fromJson(Map<String, dynamic> json,+ {ValueSerializer? serializer}) {+ serializer ??= driftRuntimeOptions.defaultSerializer;+ return RemoteAlbumAssetEntityData(+ assetId: serializer.fromJson<String>(json['assetId']),+ albumId: serializer.fromJson<String>(json['albumId']),+ );+ }+ @override+ Map<String, dynamic> toJson({ValueSerializer? serializer}) {+ serializer ??= driftRuntimeOptions.defaultSerializer;+ return <String, dynamic>{+ 'assetId': serializer.toJson<String>(assetId),+ 'albumId': serializer.toJson<String>(albumId),+ };+ }++ RemoteAlbumAssetEntityData copyWith({String? assetId, String? albumId}) =>+ RemoteAlbumAssetEntityData(+ assetId: assetId ?? this.assetId,+ albumId: albumId ?? this.albumId,+ );+ RemoteAlbumAssetEntityData copyWithCompanion(+ RemoteAlbumAssetEntityCompanion data) {+ return RemoteAlbumAssetEntityData(+ assetId: data.assetId.present ? data.assetId.value : this.assetId,+ albumId: data.albumId.present ? data.albumId.value : this.albumId,+ );+ }++ @override+ String toString() {+ return (StringBuffer('RemoteAlbumAssetEntityData(')+ ..write('assetId: $assetId, ')+ ..write('albumId: $albumId')+ ..write(')'))+ .toString();+ }++ @override+ int get hashCode => Object.hash(assetId, albumId);+ @override+ bool operator ==(Object other) =>+ identical(this, other) ||+ (other is RemoteAlbumAssetEntityData &&+ other.assetId == this.assetId &&+ other.albumId == this.albumId);+}++class RemoteAlbumAssetEntityCompanion+ extends UpdateCompanion<RemoteAlbumAssetEntityData> {+ final Value<String> assetId;+ final Value<String> albumId;+ const RemoteAlbumAssetEntityCompanion({+ this.assetId = const Value.absent(),+ this.albumId = const Value.absent(),+ });+ RemoteAlbumAssetEntityCompanion.insert({+ required String assetId,+ required String albumId,+ }) : assetId = Value(assetId),+ albumId = Value(albumId);+ static Insertable<RemoteAlbumAssetEntityData> custom({+ Expression<String>? assetId,+ Expression<String>? albumId,+ }) {+ return RawValuesInsertable({+ if (assetId != null) 'asset_id': assetId,+ if (albumId != null) 'album_id': albumId,+ });+ }++ RemoteAlbumAssetEntityCompanion copyWith(+ {Value<String>? assetId, Value<String>? albumId}) {+ return RemoteAlbumAssetEntityCompanion(+ assetId: assetId ?? this.assetId,+ albumId: albumId ?? this.albumId,+ );+ }++ @override+ Map<String, Expression> toColumns(bool nullToAbsent) {+ final map = <String, Expression>{};+ if (assetId.present) {+ map['asset_id'] = Variable<String>(assetId.value);+ }+ if (albumId.present) {+ map['album_id'] = Variable<String>(albumId.value);+ }+ return map;+ }++ @override+ String toString() {+ return (StringBuffer('RemoteAlbumAssetEntityCompanion(')+ ..write('assetId: $assetId, ')+ ..write('albumId: $albumId')+ ..write(')'))+ .toString();+ }+}++class RemoteAlbumUserEntity extends Table+ with TableInfo<RemoteAlbumUserEntity, RemoteAlbumUserEntityData> {+ @override+ final GeneratedDatabase attachedDatabase;+ final String? _alias;+ RemoteAlbumUserEntity(this.attachedDatabase, [this._alias]);+ late final GeneratedColumn<String> albumId = GeneratedColumn<String>(+ 'album_id', aliasedName, false,+ type: DriftSqlType.string,+ requiredDuringInsert: true,+ defaultConstraints: GeneratedColumn.constraintIsAlways(+ 'REFERENCES remote_album_entity (id) ON DELETE CASCADE'));+ late final GeneratedColumn<String> userId = GeneratedColumn<String>(+ 'user_id', aliasedName, false,+ type: DriftSqlType.string,+ requiredDuringInsert: true,+ defaultConstraints: GeneratedColumn.constraintIsAlways(+ 'REFERENCES user_entity (id) ON DELETE CASCADE'));+ late final GeneratedColumn<int> role = GeneratedColumn<int>(+ 'role', aliasedName, false,+ type: DriftSqlType.int, requiredDuringInsert: true);+ @override+ List<GeneratedColumn> get $columns => [albumId, userId, role];+ @override+ String get aliasedName => _alias ?? actualTableName;+ @override+ String get actualTableName => $name;+ static const String $name = 'remote_album_user_entity';+ @override+ Set<GeneratedColumn> get $primaryKey => {albumId, userId};+ @override+ RemoteAlbumUserEntityData map(Map<String, dynamic> data,+ {String? tablePrefix}) {+ final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';+ return RemoteAlbumUserEntityData(+ albumId: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}album_id'])!,+ userId: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}user_id'])!,+ role: attachedDatabase.typeMapping+ .read(DriftSqlType.int, data['${effectivePrefix}role'])!,+ );+ }++ @override+ RemoteAlbumUserEntity createAlias(String alias) {+ return RemoteAlbumUserEntity(attachedDatabase, alias);+ }++ @override+ bool get withoutRowId => true;+ @override+ bool get isStrict => true;+}++class RemoteAlbumUserEntityData extends DataClass+ implements Insertable<RemoteAlbumUserEntityData> {+ final String albumId;+ final String userId;+ final int role;+ const RemoteAlbumUserEntityData(+ {required this.albumId, required this.userId, required this.role});+ @override+ Map<String, Expression> toColumns(bool nullToAbsent) {+ final map = <String, Expression>{};+ map['album_id'] = Variable<String>(albumId);+ map['user_id'] = Variable<String>(userId);+ map['role'] = Variable<int>(role);+ return map;+ }++ factory RemoteAlbumUserEntityData.fromJson(Map<String, dynamic> json,+ {ValueSerializer? serializer}) {+ serializer ??= driftRuntimeOptions.defaultSerializer;+ return RemoteAlbumUserEntityData(+ albumId: serializer.fromJson<String>(json['albumId']),+ userId: serializer.fromJson<String>(json['userId']),+ role: serializer.fromJson<int>(json['role']),+ );+ }+ @override+ Map<String, dynamic> toJson({ValueSerializer? serializer}) {+ serializer ??= driftRuntimeOptions.defaultSerializer;+ return <String, dynamic>{+ 'albumId': serializer.toJson<String>(albumId),+ 'userId': serializer.toJson<String>(userId),+ 'role': serializer.toJson<int>(role),+ };+ }++ RemoteAlbumUserEntityData copyWith(+ {String? albumId, String? userId, int? role}) =>+ RemoteAlbumUserEntityData(+ albumId: albumId ?? this.albumId,+ userId: userId ?? this.userId,+ role: role ?? this.role,+ );+ RemoteAlbumUserEntityData copyWithCompanion(+ RemoteAlbumUserEntityCompanion data) {+ return RemoteAlbumUserEntityData(+ albumId: data.albumId.present ? data.albumId.value : this.albumId,+ userId: data.userId.present ? data.userId.value : this.userId,+ role: data.role.present ? data.role.value : this.role,+ );+ }++ @override+ String toString() {+ return (StringBuffer('RemoteAlbumUserEntityData(')+ ..write('albumId: $albumId, ')+ ..write('userId: $userId, ')+ ..write('role: $role')+ ..write(')'))+ .toString();+ }++ @override+ int get hashCode => Object.hash(albumId, userId, role);+ @override+ bool operator ==(Object other) =>+ identical(this, other) ||+ (other is RemoteAlbumUserEntityData &&+ other.albumId == this.albumId &&+ other.userId == this.userId &&+ other.role == this.role);+}++class RemoteAlbumUserEntityCompanion+ extends UpdateCompanion<RemoteAlbumUserEntityData> {+ final Value<String> albumId;+ final Value<String> userId;+ final Value<int> role;+ const RemoteAlbumUserEntityCompanion({+ this.albumId = const Value.absent(),+ this.userId = const Value.absent(),+ this.role = const Value.absent(),+ });+ RemoteAlbumUserEntityCompanion.insert({+ required String albumId,+ required String userId,+ required int role,+ }) : albumId = Value(albumId),+ userId = Value(userId),+ role = Value(role);+ static Insertable<RemoteAlbumUserEntityData> custom({+ Expression<String>? albumId,+ Expression<String>? userId,+ Expression<int>? role,+ }) {+ return RawValuesInsertable({+ if (albumId != null) 'album_id': albumId,+ if (userId != null) 'user_id': userId,+ if (role != null) 'role': role,+ });+ }++ RemoteAlbumUserEntityCompanion copyWith(+ {Value<String>? albumId, Value<String>? userId, Value<int>? role}) {+ return RemoteAlbumUserEntityCompanion(+ albumId: albumId ?? this.albumId,+ userId: userId ?? this.userId,+ role: role ?? this.role,+ );+ }++ @override+ Map<String, Expression> toColumns(bool nullToAbsent) {+ final map = <String, Expression>{};+ if (albumId.present) {+ map['album_id'] = Variable<String>(albumId.value);+ }+ if (userId.present) {+ map['user_id'] = Variable<String>(userId.value);+ }+ if (role.present) {+ map['role'] = Variable<int>(role.value);+ }+ return map;+ }++ @override+ String toString() {+ return (StringBuffer('RemoteAlbumUserEntityCompanion(')+ ..write('albumId: $albumId, ')+ ..write('userId: $userId, ')+ ..write('role: $role')+ ..write(')'))+ .toString();+ }+}++class MemoryEntity extends Table+ with TableInfo<MemoryEntity, MemoryEntityData> {+ @override+ final GeneratedDatabase attachedDatabase;+ final String? _alias;+ MemoryEntity(this.attachedDatabase, [this._alias]);+ late final GeneratedColumn<String> id = GeneratedColumn<String>(+ 'id', aliasedName, false,+ type: DriftSqlType.string, requiredDuringInsert: true);+ late final GeneratedColumn<DateTime> createdAt = GeneratedColumn<DateTime>(+ 'created_at', aliasedName, false,+ type: DriftSqlType.dateTime,+ requiredDuringInsert: false,+ defaultValue: const CustomExpression('CURRENT_TIMESTAMP'));+ late final GeneratedColumn<DateTime> updatedAt = GeneratedColumn<DateTime>(+ 'updated_at', aliasedName, false,+ type: DriftSqlType.dateTime,+ requiredDuringInsert: false,+ defaultValue: const CustomExpression('CURRENT_TIMESTAMP'));+ late final GeneratedColumn<DateTime> deletedAt = GeneratedColumn<DateTime>(+ 'deleted_at', aliasedName, true,+ type: DriftSqlType.dateTime, requiredDuringInsert: false);+ late final GeneratedColumn<String> ownerId = GeneratedColumn<String>(+ 'owner_id', aliasedName, false,+ type: DriftSqlType.string,+ requiredDuringInsert: true,+ defaultConstraints: GeneratedColumn.constraintIsAlways(+ 'REFERENCES user_entity (id) ON DELETE CASCADE'));+ late final GeneratedColumn<int> type = GeneratedColumn<int>(+ 'type', aliasedName, false,+ type: DriftSqlType.int, requiredDuringInsert: true);+ late final GeneratedColumn<String> data = GeneratedColumn<String>(+ 'data', aliasedName, false,+ type: DriftSqlType.string, requiredDuringInsert: true);+ late final GeneratedColumn<bool> isSaved = GeneratedColumn<bool>(+ 'is_saved', aliasedName, false,+ type: DriftSqlType.bool,+ requiredDuringInsert: false,+ defaultConstraints:+ GeneratedColumn.constraintIsAlways('CHECK ("is_saved" IN (0, 1))'),+ defaultValue: const CustomExpression('0'));+ late final GeneratedColumn<DateTime> memoryAt = GeneratedColumn<DateTime>(+ 'memory_at', aliasedName, false,+ type: DriftSqlType.dateTime, requiredDuringInsert: true);+ late final GeneratedColumn<DateTime> seenAt = GeneratedColumn<DateTime>(+ 'seen_at', aliasedName, true,+ type: DriftSqlType.dateTime, requiredDuringInsert: false);+ late final GeneratedColumn<DateTime> showAt = GeneratedColumn<DateTime>(+ 'show_at', aliasedName, true,+ type: DriftSqlType.dateTime, requiredDuringInsert: false);+ late final GeneratedColumn<DateTime> hideAt = GeneratedColumn<DateTime>(+ 'hide_at', aliasedName, true,+ type: DriftSqlType.dateTime, requiredDuringInsert: false);+ @override+ List<GeneratedColumn> get $columns => [+ id,+ createdAt,+ updatedAt,+ deletedAt,+ ownerId,+ type,+ data,+ isSaved,+ memoryAt,+ seenAt,+ showAt,+ hideAt+ ];+ @override+ String get aliasedName => _alias ?? actualTableName;+ @override+ String get actualTableName => $name;+ static const String $name = 'memory_entity';+ @override+ Set<GeneratedColumn> get $primaryKey => {id};+ @override+ MemoryEntityData map(Map<String, dynamic> data, {String? tablePrefix}) {+ final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';+ return MemoryEntityData(+ id: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}id'])!,+ createdAt: attachedDatabase.typeMapping+ .read(DriftSqlType.dateTime, data['${effectivePrefix}created_at'])!,+ updatedAt: attachedDatabase.typeMapping+ .read(DriftSqlType.dateTime, data['${effectivePrefix}updated_at'])!,+ deletedAt: attachedDatabase.typeMapping+ .read(DriftSqlType.dateTime, data['${effectivePrefix}deleted_at']),+ ownerId: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}owner_id'])!,+ type: attachedDatabase.typeMapping+ .read(DriftSqlType.int, data['${effectivePrefix}type'])!,+ data: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}data'])!,+ isSaved: attachedDatabase.typeMapping+ .read(DriftSqlType.bool, data['${effectivePrefix}is_saved'])!,+ memoryAt: attachedDatabase.typeMapping+ .read(DriftSqlType.dateTime, data['${effectivePrefix}memory_at'])!,+ seenAt: attachedDatabase.typeMapping+ .read(DriftSqlType.dateTime, data['${effectivePrefix}seen_at']),+ showAt: attachedDatabase.typeMapping+ .read(DriftSqlType.dateTime, data['${effectivePrefix}show_at']),+ hideAt: attachedDatabase.typeMapping+ .read(DriftSqlType.dateTime, data['${effectivePrefix}hide_at']),+ );+ }++ @override+ MemoryEntity createAlias(String alias) {+ return MemoryEntity(attachedDatabase, alias);+ }++ @override+ bool get withoutRowId => true;+ @override+ bool get isStrict => true;+}++class MemoryEntityData extends DataClass+ implements Insertable<MemoryEntityData> {+ final String id;+ final DateTime createdAt;+ final DateTime updatedAt;+ final DateTime? deletedAt;+ final String ownerId;+ final int type;+ final String data;+ final bool isSaved;+ final DateTime memoryAt;+ final DateTime? seenAt;+ final DateTime? showAt;+ final DateTime? hideAt;+ const MemoryEntityData(+ {required this.id,+ required this.createdAt,+ required this.updatedAt,+ this.deletedAt,+ required this.ownerId,+ required this.type,+ required this.data,+ required this.isSaved,+ required this.memoryAt,+ this.seenAt,+ this.showAt,+ this.hideAt});+ @override+ Map<String, Expression> toColumns(bool nullToAbsent) {+ final map = <String, Expression>{};+ map['id'] = Variable<String>(id);+ map['created_at'] = Variable<DateTime>(createdAt);+ map['updated_at'] = Variable<DateTime>(updatedAt);+ if (!nullToAbsent || deletedAt != null) {+ map['deleted_at'] = Variable<DateTime>(deletedAt);+ }+ map['owner_id'] = Variable<String>(ownerId);+ map['type'] = Variable<int>(type);+ map['data'] = Variable<String>(data);+ map['is_saved'] = Variable<bool>(isSaved);+ map['memory_at'] = Variable<DateTime>(memoryAt);+ if (!nullToAbsent || seenAt != null) {+ map['seen_at'] = Variable<DateTime>(seenAt);+ }+ if (!nullToAbsent || showAt != null) {+ map['show_at'] = Variable<DateTime>(showAt);+ }+ if (!nullToAbsent || hideAt != null) {+ map['hide_at'] = Variable<DateTime>(hideAt);+ }+ return map;+ }++ factory MemoryEntityData.fromJson(Map<String, dynamic> json,+ {ValueSerializer? serializer}) {+ serializer ??= driftRuntimeOptions.defaultSerializer;+ return MemoryEntityData(+ id: serializer.fromJson<String>(json['id']),+ createdAt: serializer.fromJson<DateTime>(json['createdAt']),+ updatedAt: serializer.fromJson<DateTime>(json['updatedAt']),+ deletedAt: serializer.fromJson<DateTime?>(json['deletedAt']),+ ownerId: serializer.fromJson<String>(json['ownerId']),+ type: serializer.fromJson<int>(json['type']),+ data: serializer.fromJson<String>(json['data']),+ isSaved: serializer.fromJson<bool>(json['isSaved']),+ memoryAt: serializer.fromJson<DateTime>(json['memoryAt']),+ seenAt: serializer.fromJson<DateTime?>(json['seenAt']),+ showAt: serializer.fromJson<DateTime?>(json['showAt']),+ hideAt: serializer.fromJson<DateTime?>(json['hideAt']),+ );+ }+ @override+ Map<String, dynamic> toJson({ValueSerializer? serializer}) {+ serializer ??= driftRuntimeOptions.defaultSerializer;+ return <String, dynamic>{+ 'id': serializer.toJson<String>(id),+ 'createdAt': serializer.toJson<DateTime>(createdAt),+ 'updatedAt': serializer.toJson<DateTime>(updatedAt),+ 'deletedAt': serializer.toJson<DateTime?>(deletedAt),+ 'ownerId': serializer.toJson<String>(ownerId),+ 'type': serializer.toJson<int>(type),+ 'data': serializer.toJson<String>(data),+ 'isSaved': serializer.toJson<bool>(isSaved),+ 'memoryAt': serializer.toJson<DateTime>(memoryAt),+ 'seenAt': serializer.toJson<DateTime?>(seenAt),+ 'showAt': serializer.toJson<DateTime?>(showAt),+ 'hideAt': serializer.toJson<DateTime?>(hideAt),+ };+ }++ MemoryEntityData copyWith(+ {String? id,+ DateTime? createdAt,+ DateTime? updatedAt,+ Value<DateTime?> deletedAt = const Value.absent(),+ String? ownerId,+ int? type,+ String? data,+ bool? isSaved,+ DateTime? memoryAt,+ Value<DateTime?> seenAt = const Value.absent(),+ Value<DateTime?> showAt = const Value.absent(),+ Value<DateTime?> hideAt = const Value.absent()}) =>+ MemoryEntityData(+ id: id ?? this.id,+ createdAt: createdAt ?? this.createdAt,+ updatedAt: updatedAt ?? this.updatedAt,+ deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt,+ ownerId: ownerId ?? this.ownerId,+ type: type ?? this.type,+ data: data ?? this.data,+ isSaved: isSaved ?? this.isSaved,+ memoryAt: memoryAt ?? this.memoryAt,+ seenAt: seenAt.present ? seenAt.value : this.seenAt,+ showAt: showAt.present ? showAt.value : this.showAt,+ hideAt: hideAt.present ? hideAt.value : this.hideAt,+ );+ MemoryEntityData copyWithCompanion(MemoryEntityCompanion data) {+ return MemoryEntityData(+ id: data.id.present ? data.id.value : this.id,+ createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt,+ updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt,+ deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt,+ ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId,+ type: data.type.present ? data.type.value : this.type,+ data: data.data.present ? data.data.value : this.data,+ isSaved: data.isSaved.present ? data.isSaved.value : this.isSaved,+ memoryAt: data.memoryAt.present ? data.memoryAt.value : this.memoryAt,+ seenAt: data.seenAt.present ? data.seenAt.value : this.seenAt,+ showAt: data.showAt.present ? data.showAt.value : this.showAt,+ hideAt: data.hideAt.present ? data.hideAt.value : this.hideAt,+ );+ }++ @override+ String toString() {+ return (StringBuffer('MemoryEntityData(')+ ..write('id: $id, ')+ ..write('createdAt: $createdAt, ')+ ..write('updatedAt: $updatedAt, ')+ ..write('deletedAt: $deletedAt, ')+ ..write('ownerId: $ownerId, ')+ ..write('type: $type, ')+ ..write('data: $data, ')+ ..write('isSaved: $isSaved, ')+ ..write('memoryAt: $memoryAt, ')+ ..write('seenAt: $seenAt, ')+ ..write('showAt: $showAt, ')+ ..write('hideAt: $hideAt')+ ..write(')'))+ .toString();+ }++ @override+ int get hashCode => Object.hash(id, createdAt, updatedAt, deletedAt, ownerId,+ type, data, isSaved, memoryAt, seenAt, showAt, hideAt);+ @override+ bool operator ==(Object other) =>+ identical(this, other) ||+ (other is MemoryEntityData &&+ other.id == this.id &&+ other.createdAt == this.createdAt &&+ other.updatedAt == this.updatedAt &&+ other.deletedAt == this.deletedAt &&+ other.ownerId == this.ownerId &&+ other.type == this.type &&+ other.data == this.data &&+ other.isSaved == this.isSaved &&+ other.memoryAt == this.memoryAt &&+ other.seenAt == this.seenAt &&+ other.showAt == this.showAt &&+ other.hideAt == this.hideAt);+}++class MemoryEntityCompanion extends UpdateCompanion<MemoryEntityData> {+ final Value<String> id;+ final Value<DateTime> createdAt;+ final Value<DateTime> updatedAt;+ final Value<DateTime?> deletedAt;+ final Value<String> ownerId;+ final Value<int> type;+ final Value<String> data;+ final Value<bool> isSaved;+ final Value<DateTime> memoryAt;+ final Value<DateTime?> seenAt;+ final Value<DateTime?> showAt;+ final Value<DateTime?> hideAt;+ const MemoryEntityCompanion({+ this.id = const Value.absent(),+ this.createdAt = const Value.absent(),+ this.updatedAt = const Value.absent(),+ this.deletedAt = const Value.absent(),+ this.ownerId = const Value.absent(),+ this.type = const Value.absent(),+ this.data = const Value.absent(),+ this.isSaved = const Value.absent(),+ this.memoryAt = const Value.absent(),+ this.seenAt = const Value.absent(),+ this.showAt = const Value.absent(),+ this.hideAt = const Value.absent(),+ });+ MemoryEntityCompanion.insert({+ required String id,+ this.createdAt = const Value.absent(),+ this.updatedAt = const Value.absent(),+ this.deletedAt = const Value.absent(),+ required String ownerId,+ required int type,+ required String data,+ this.isSaved = const Value.absent(),+ required DateTime memoryAt,+ this.seenAt = const Value.absent(),+ this.showAt = const Value.absent(),+ this.hideAt = const Value.absent(),+ }) : id = Value(id),+ ownerId = Value(ownerId),+ type = Value(type),+ data = Value(data),+ memoryAt = Value(memoryAt);+ static Insertable<MemoryEntityData> custom({+ Expression<String>? id,+ Expression<DateTime>? createdAt,+ Expression<DateTime>? updatedAt,+ Expression<DateTime>? deletedAt,+ Expression<String>? ownerId,+ Expression<int>? type,+ Expression<String>? data,+ Expression<bool>? isSaved,+ Expression<DateTime>? memoryAt,+ Expression<DateTime>? seenAt,+ Expression<DateTime>? showAt,+ Expression<DateTime>? hideAt,+ }) {+ return RawValuesInsertable({+ if (id != null) 'id': id,+ if (createdAt != null) 'created_at': createdAt,+ if (updatedAt != null) 'updated_at': updatedAt,+ if (deletedAt != null) 'deleted_at': deletedAt,+ if (ownerId != null) 'owner_id': ownerId,+ if (type != null) 'type': type,+ if (data != null) 'data': data,+ if (isSaved != null) 'is_saved': isSaved,+ if (memoryAt != null) 'memory_at': memoryAt,+ if (seenAt != null) 'seen_at': seenAt,+ if (showAt != null) 'show_at': showAt,+ if (hideAt != null) 'hide_at': hideAt,+ });+ }++ MemoryEntityCompanion copyWith(+ {Value<String>? id,+ Value<DateTime>? createdAt,+ Value<DateTime>? updatedAt,+ Value<DateTime?>? deletedAt,+ Value<String>? ownerId,+ Value<int>? type,+ Value<String>? data,+ Value<bool>? isSaved,+ Value<DateTime>? memoryAt,+ Value<DateTime?>? seenAt,+ Value<DateTime?>? showAt,+ Value<DateTime?>? hideAt}) {+ return MemoryEntityCompanion(+ id: id ?? this.id,+ createdAt: createdAt ?? this.createdAt,+ updatedAt: updatedAt ?? this.updatedAt,+ deletedAt: deletedAt ?? this.deletedAt,+ ownerId: ownerId ?? this.ownerId,+ type: type ?? this.type,+ data: data ?? this.data,+ isSaved: isSaved ?? this.isSaved,+ memoryAt: memoryAt ?? this.memoryAt,+ seenAt: seenAt ?? this.seenAt,+ showAt: showAt ?? this.showAt,+ hideAt: hideAt ?? this.hideAt,+ );+ }++ @override+ Map<String, Expression> toColumns(bool nullToAbsent) {+ final map = <String, Expression>{};+ if (id.present) {+ map['id'] = Variable<String>(id.value);+ }+ if (createdAt.present) {+ map['created_at'] = Variable<DateTime>(createdAt.value);+ }+ if (updatedAt.present) {+ map['updated_at'] = Variable<DateTime>(updatedAt.value);+ }+ if (deletedAt.present) {+ map['deleted_at'] = Variable<DateTime>(deletedAt.value);+ }+ if (ownerId.present) {+ map['owner_id'] = Variable<String>(ownerId.value);+ }+ if (type.present) {+ map['type'] = Variable<int>(type.value);+ }+ if (data.present) {+ map['data'] = Variable<String>(data.value);+ }+ if (isSaved.present) {+ map['is_saved'] = Variable<bool>(isSaved.value);+ }+ if (memoryAt.present) {+ map['memory_at'] = Variable<DateTime>(memoryAt.value);+ }+ if (seenAt.present) {+ map['seen_at'] = Variable<DateTime>(seenAt.value);+ }+ if (showAt.present) {+ map['show_at'] = Variable<DateTime>(showAt.value);+ }+ if (hideAt.present) {+ map['hide_at'] = Variable<DateTime>(hideAt.value);+ }+ return map;+ }++ @override+ String toString() {+ return (StringBuffer('MemoryEntityCompanion(')+ ..write('id: $id, ')+ ..write('createdAt: $createdAt, ')+ ..write('updatedAt: $updatedAt, ')+ ..write('deletedAt: $deletedAt, ')+ ..write('ownerId: $ownerId, ')+ ..write('type: $type, ')+ ..write('data: $data, ')+ ..write('isSaved: $isSaved, ')+ ..write('memoryAt: $memoryAt, ')+ ..write('seenAt: $seenAt, ')+ ..write('showAt: $showAt, ')+ ..write('hideAt: $hideAt')+ ..write(')'))+ .toString();+ }+}++class MemoryAssetEntity extends Table+ with TableInfo<MemoryAssetEntity, MemoryAssetEntityData> {+ @override+ final GeneratedDatabase attachedDatabase;+ final String? _alias;+ MemoryAssetEntity(this.attachedDatabase, [this._alias]);+ late final GeneratedColumn<String> assetId = GeneratedColumn<String>(+ 'asset_id', aliasedName, false,+ type: DriftSqlType.string,+ requiredDuringInsert: true,+ defaultConstraints: GeneratedColumn.constraintIsAlways(+ 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE'));+ late final GeneratedColumn<String> memoryId = GeneratedColumn<String>(+ 'memory_id', aliasedName, false,+ type: DriftSqlType.string,+ requiredDuringInsert: true,+ defaultConstraints: GeneratedColumn.constraintIsAlways(+ 'REFERENCES memory_entity (id) ON DELETE CASCADE'));+ @override+ List<GeneratedColumn> get $columns => [assetId, memoryId];+ @override+ String get aliasedName => _alias ?? actualTableName;+ @override+ String get actualTableName => $name;+ static const String $name = 'memory_asset_entity';+ @override+ Set<GeneratedColumn> get $primaryKey => {assetId, memoryId};+ @override+ MemoryAssetEntityData map(Map<String, dynamic> data, {String? tablePrefix}) {+ final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';+ return MemoryAssetEntityData(+ assetId: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}asset_id'])!,+ memoryId: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}memory_id'])!,+ );+ }++ @override+ MemoryAssetEntity createAlias(String alias) {+ return MemoryAssetEntity(attachedDatabase, alias);+ }++ @override+ bool get withoutRowId => true;+ @override+ bool get isStrict => true;+}++class MemoryAssetEntityData extends DataClass+ implements Insertable<MemoryAssetEntityData> {+ final String assetId;+ final String memoryId;+ const MemoryAssetEntityData({required this.assetId, required this.memoryId});+ @override+ Map<String, Expression> toColumns(bool nullToAbsent) {+ final map = <String, Expression>{};+ map['asset_id'] = Variable<String>(assetId);+ map['memory_id'] = Variable<String>(memoryId);+ return map;+ }++ factory MemoryAssetEntityData.fromJson(Map<String, dynamic> json,+ {ValueSerializer? serializer}) {+ serializer ??= driftRuntimeOptions.defaultSerializer;+ return MemoryAssetEntityData(+ assetId: serializer.fromJson<String>(json['assetId']),+ memoryId: serializer.fromJson<String>(json['memoryId']),+ );+ }+ @override+ Map<String, dynamic> toJson({ValueSerializer? serializer}) {+ serializer ??= driftRuntimeOptions.defaultSerializer;+ return <String, dynamic>{+ 'assetId': serializer.toJson<String>(assetId),+ 'memoryId': serializer.toJson<String>(memoryId),+ };+ }++ MemoryAssetEntityData copyWith({String? assetId, String? memoryId}) =>+ MemoryAssetEntityData(+ assetId: assetId ?? this.assetId,+ memoryId: memoryId ?? this.memoryId,+ );+ MemoryAssetEntityData copyWithCompanion(MemoryAssetEntityCompanion data) {+ return MemoryAssetEntityData(+ assetId: data.assetId.present ? data.assetId.value : this.assetId,+ memoryId: data.memoryId.present ? data.memoryId.value : this.memoryId,+ );+ }++ @override+ String toString() {+ return (StringBuffer('MemoryAssetEntityData(')+ ..write('assetId: $assetId, ')+ ..write('memoryId: $memoryId')+ ..write(')'))+ .toString();+ }++ @override+ int get hashCode => Object.hash(assetId, memoryId);+ @override+ bool operator ==(Object other) =>+ identical(this, other) ||+ (other is MemoryAssetEntityData &&+ other.assetId == this.assetId &&+ other.memoryId == this.memoryId);+}++class MemoryAssetEntityCompanion+ extends UpdateCompanion<MemoryAssetEntityData> {+ final Value<String> assetId;+ final Value<String> memoryId;+ const MemoryAssetEntityCompanion({+ this.assetId = const Value.absent(),+ this.memoryId = const Value.absent(),+ });+ MemoryAssetEntityCompanion.insert({+ required String assetId,+ required String memoryId,+ }) : assetId = Value(assetId),+ memoryId = Value(memoryId);+ static Insertable<MemoryAssetEntityData> custom({+ Expression<String>? assetId,+ Expression<String>? memoryId,+ }) {+ return RawValuesInsertable({+ if (assetId != null) 'asset_id': assetId,+ if (memoryId != null) 'memory_id': memoryId,+ });+ }++ MemoryAssetEntityCompanion copyWith(+ {Value<String>? assetId, Value<String>? memoryId}) {+ return MemoryAssetEntityCompanion(+ assetId: assetId ?? this.assetId,+ memoryId: memoryId ?? this.memoryId,+ );+ }++ @override+ Map<String, Expression> toColumns(bool nullToAbsent) {+ final map = <String, Expression>{};+ if (assetId.present) {+ map['asset_id'] = Variable<String>(assetId.value);+ }+ if (memoryId.present) {+ map['memory_id'] = Variable<String>(memoryId.value);+ }+ return map;+ }++ @override+ String toString() {+ return (StringBuffer('MemoryAssetEntityCompanion(')+ ..write('assetId: $assetId, ')+ ..write('memoryId: $memoryId')+ ..write(')'))+ .toString();+ }+}++class StackEntity extends Table with TableInfo<StackEntity, StackEntityData> {+ @override+ final GeneratedDatabase attachedDatabase;+ final String? _alias;+ StackEntity(this.attachedDatabase, [this._alias]);+ late final GeneratedColumn<String> id = GeneratedColumn<String>(+ 'id', aliasedName, false,+ type: DriftSqlType.string, requiredDuringInsert: true);+ late final GeneratedColumn<DateTime> createdAt = GeneratedColumn<DateTime>(+ 'created_at', aliasedName, false,+ type: DriftSqlType.dateTime,+ requiredDuringInsert: false,+ defaultValue: const CustomExpression('CURRENT_TIMESTAMP'));+ late final GeneratedColumn<DateTime> updatedAt = GeneratedColumn<DateTime>(+ 'updated_at', aliasedName, false,+ type: DriftSqlType.dateTime,+ requiredDuringInsert: false,+ defaultValue: const CustomExpression('CURRENT_TIMESTAMP'));+ late final GeneratedColumn<String> ownerId = GeneratedColumn<String>(+ 'owner_id', aliasedName, false,+ type: DriftSqlType.string,+ requiredDuringInsert: true,+ defaultConstraints: GeneratedColumn.constraintIsAlways(+ 'REFERENCES user_entity (id) ON DELETE CASCADE'));+ late final GeneratedColumn<String> primaryAssetId = GeneratedColumn<String>(+ 'primary_asset_id', aliasedName, false,+ type: DriftSqlType.string,+ requiredDuringInsert: true,+ defaultConstraints: GeneratedColumn.constraintIsAlways(+ 'REFERENCES remote_asset_entity (id)'));+ @override+ List<GeneratedColumn> get $columns =>+ [id, createdAt, updatedAt, ownerId, primaryAssetId];+ @override+ String get aliasedName => _alias ?? actualTableName;+ @override+ String get actualTableName => $name;+ static const String $name = 'stack_entity';+ @override+ Set<GeneratedColumn> get $primaryKey => {id};+ @override+ StackEntityData map(Map<String, dynamic> data, {String? tablePrefix}) {+ final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';+ return StackEntityData(+ id: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}id'])!,+ createdAt: attachedDatabase.typeMapping+ .read(DriftSqlType.dateTime, data['${effectivePrefix}created_at'])!,+ updatedAt: attachedDatabase.typeMapping+ .read(DriftSqlType.dateTime, data['${effectivePrefix}updated_at'])!,+ ownerId: attachedDatabase.typeMapping+ .read(DriftSqlType.string, data['${effectivePrefix}owner_id'])!,+ primaryAssetId: attachedDatabase.typeMapping.read(+ DriftSqlType.string, data['${effectivePrefix}primary_asset_id'])!,+ );+ }++ @override+ StackEntity createAlias(String alias) {+ return StackEntity(attachedDatabase, alias);+ }++ @override+ bool get withoutRowId => true;+ @override+ bool get isStrict => true;+}++class StackEntityData extends DataClass implements Insertable<StackEntityData> {+ final String id;+ final DateTime createdAt;+ final DateTime updatedAt;+ final String ownerId;+ final String primaryAssetId;+ const StackEntityData(+ {required this.id,+ required this.createdAt,+ required this.updatedAt,+ required this.ownerId,+ required this.primaryAssetId});+ @override+ Map<String, Expression> toColumns(bool nullToAbsent) {+ final map = <String, Expression>{};+ map['id'] = Variable<String>(id);+ map['created_at'] = Variable<DateTime>(createdAt);+ map['updated_at'] = Variable<DateTime>(updatedAt);+ map['owner_id'] = Variable<String>(ownerId);+ map['primary_asset_id'] = Variable<String>(primaryAssetId);+ return map;+ }++ factory StackEntityData.fromJson(Map<String, dynamic> json,+ {ValueSerializer? serializer}) {+ serializer ??= driftRuntimeOptions.defaultSerializer;+ return StackEntityData(+ id: serializer.fromJson<String>(json['id']),+ createdAt: serializer.fromJson<DateTime>(json['createdAt']),+ updatedAt: serializer.fromJson<DateTime>(json['updatedAt']),+ ownerId: serializer.fromJson<String>(json['ownerId']),+ primaryAssetId: serializer.fromJson<String>(json['primaryAssetId']),+ );+ }+ @override+ Map<String, dynamic> toJson({ValueSerializer? serializer}) {+ serializer ??= driftRuntimeOptions.defaultSerializer;+ return <String, dynamic>{+ 'id': serializer.toJson<String>(id),+ 'createdAt': serializer.toJson<DateTime>(createdAt),+ 'updatedAt': serializer.toJson<DateTime>(updatedAt),+ 'ownerId': serializer.toJson<String>(ownerId),+ 'primaryAssetId': serializer.toJson<String>(primaryAssetId),+ };+ }++ StackEntityData copyWith(+ {String? id,+ DateTime? createdAt,+ DateTime? updatedAt,+ String? ownerId,+ String? primaryAssetId}) =>+ StackEntityData(+ id: id ?? this.id,+ createdAt: createdAt ?? this.createdAt,+ updatedAt: updatedAt ?? this.updatedAt,+ ownerId: ownerId ?? this.ownerId,+ primaryAssetId: primaryAssetId ?? this.primaryAssetId,+ );+ StackEntityData copyWithCompanion(StackEntityCompanion data) {+ return StackEntityData(+ id: data.id.present ? data.id.value : this.id,+ createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt,+ updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt,+ ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId,+ primaryAssetId: data.primaryAssetId.present+ ? data.primaryAssetId.value+ : this.primaryAssetId,+ );+ }++ @override+ String toString() {+ return (StringBuffer('StackEntityData(')+ ..write('id: $id, ')+ ..write('createdAt: $createdAt, ')+ ..write('updatedAt: $updatedAt, ')+ ..write('ownerId: $ownerId, ')+ ..write('primaryAssetId: $primaryAssetId')+ ..write(')'))+ .toString();+ }++ @override+ int get hashCode =>+ Object.hash(id, createdAt, updatedAt, ownerId, primaryAssetId);+ @override+ bool operator ==(Object other) =>+ identical(this, other) ||+ (other is StackEntityData &&+ other.id == this.id &&+ other.createdAt == this.createdAt &&+ other.updatedAt == this.updatedAt &&+ other.ownerId == this.ownerId &&+ other.primaryAssetId == this.primaryAssetId);+}++class StackEntityCompanion extends UpdateCompanion<StackEntityData> {+ final Value<String> id;+ final Value<DateTime> createdAt;+ final Value<DateTime> updatedAt;+ final Value<String> ownerId;+ final Value<String> primaryAssetId;+ const StackEntityCompanion({+ this.id = const Value.absent(),+ this.createdAt = const Value.absent(),+ this.updatedAt = const Value.absent(),+ this.ownerId = const Value.absent(),+ this.primaryAssetId = const Value.absent(),+ });+ StackEntityCompanion.insert({+ required String id,+ this.createdAt = const Value.absent(),+ this.updatedAt = const Value.absent(),+ required String ownerId,+ required String primaryAssetId,+ }) : id = Value(id),+ ownerId = Value(ownerId),+ primaryAssetId = Value(primaryAssetId);+ static Insertable<StackEntityData> custom({+ Expression<String>? id,+ Expression<DateTime>? createdAt,+ Expression<DateTime>? updatedAt,+ Expression<String>? ownerId,+ Expression<String>? primaryAssetId,+ }) {+ return RawValuesInsertable({+ if (id != null) 'id': id,+ if (createdAt != null) 'created_at': createdAt,+ if (updatedAt != null) 'updated_at': updatedAt,+ if (ownerId != null) 'owner_id': ownerId,+ if (primaryAssetId != null) 'primary_asset_id': primaryAssetId,+ });+ }++ StackEntityCompanion copyWith(+ {Value<String>? id,+ Value<DateTime>? createdAt,+ Value<DateTime>? updatedAt,+ Value<String>? ownerId,+ Value<String>? primaryAssetId}) {+ return StackEntityCompanion(+ id: id ?? this.id,+ createdAt: createdAt ?? this.createdAt,+ updatedAt: updatedAt ?? this.updatedAt,+ ownerId: ownerId ?? this.ownerId,+ primaryAssetId: primaryAssetId ?? this.primaryAssetId,+ );+ }++ @override+ Map<String, Expression> toColumns(bool nullToAbsent) {+ final map = <String, Expression>{};+ if (id.present) {+ map['id'] = Variable<String>(id.value);+ }+ if (createdAt.present) {+ map['created_at'] = Variable<DateTime>(createdAt.value);+ }+ if (updatedAt.present) {+ map['updated_at'] = Variable<DateTime>(updatedAt.value);+ }+ if (ownerId.present) {+ map['owner_id'] = Variable<String>(ownerId.value);+ }+ if (primaryAssetId.present) {+ map['primary_asset_id'] = Variable<String>(primaryAssetId.value);+ }+ return map;+ }++ @override+ String toString() {+ return (StringBuffer('StackEntityCompanion(')+ ..write('id: $id, ')+ ..write('createdAt: $createdAt, ')+ ..write('updatedAt: $updatedAt, ')+ ..write('ownerId: $ownerId, ')+ ..write('primaryAssetId: $primaryAssetId')+ ..write(')'))+ .toString();+ }+}++class DatabaseAtV2 extends GeneratedDatabase {+ DatabaseAtV2(QueryExecutor e) : super(e);+ late final UserEntity userEntity = UserEntity(this);+ late final RemoteAssetEntity remoteAssetEntity = RemoteAssetEntity(this);+ late final LocalAssetEntity localAssetEntity = LocalAssetEntity(this);+ late final Index idxLocalAssetChecksum = Index('idx_local_asset_checksum',+ 'CREATE INDEX idx_local_asset_checksum ON local_asset_entity (checksum)');+ late final Index uQRemoteAssetOwnerChecksum = Index(+ 'UQ_remote_asset_owner_checksum',+ 'CREATE UNIQUE INDEX UQ_remote_asset_owner_checksum ON remote_asset_entity (checksum, owner_id)');+ late final Index idxRemoteAssetChecksum = Index('idx_remote_asset_checksum',+ 'CREATE INDEX idx_remote_asset_checksum ON remote_asset_entity (checksum)');+ late final UserMetadataEntity userMetadataEntity = UserMetadataEntity(this);+ late final PartnerEntity partnerEntity = PartnerEntity(this);+ late final LocalAlbumEntity localAlbumEntity = LocalAlbumEntity(this);+ late final LocalAlbumAssetEntity localAlbumAssetEntity =+ LocalAlbumAssetEntity(this);+ late final RemoteExifEntity remoteExifEntity = RemoteExifEntity(this);+ late final RemoteAlbumEntity remoteAlbumEntity = RemoteAlbumEntity(this);+ late final RemoteAlbumAssetEntity remoteAlbumAssetEntity =+ RemoteAlbumAssetEntity(this);+ late final RemoteAlbumUserEntity remoteAlbumUserEntity =+ RemoteAlbumUserEntity(this);+ late final MemoryEntity memoryEntity = MemoryEntity(this);+ late final MemoryAssetEntity memoryAssetEntity = MemoryAssetEntity(this);+ late final StackEntity stackEntity = StackEntity(this);+ @override+ Iterable<TableInfo<Table, Object?>> get allTables =>+ allSchemaEntities.whereType<TableInfo<Table, Object?>>();+ @override+ List<DatabaseSchemaEntity> get allSchemaEntities => [+ userEntity,+ remoteAssetEntity,+ localAssetEntity,+ idxLocalAssetChecksum,+ uQRemoteAssetOwnerChecksum,+ idxRemoteAssetChecksum,+ userMetadataEntity,+ partnerEntity,+ localAlbumEntity,+ localAlbumAssetEntity,+ remoteExifEntity,+ remoteAlbumEntity,+ remoteAlbumAssetEntity,+ remoteAlbumUserEntity,+ memoryEntity,+ memoryAssetEntity,+ stackEntity+ ];+ @override+ int get schemaVersion => 2;+ @override+ DriftDatabaseOptions get options =>+ const DriftDatabaseOptions(storeDateTimeAsText: true);+}diff --git a/mobile/test/drift/main/migration_test.dart b/mobile/test/drift/main/migration_test.dartnew file mode 100644index 0000000000..74467492ae--- /dev/null+++ b/mobile/test/drift/main/migration_test.dart@@ -0,0 +1,38 @@+// dart format width=80+// ignore_for_file: unused_local_variable, unused_import+import 'package:drift/drift.dart';+import 'package:drift_dev/api/migrations_native.dart';+import 'package:flutter_test/flutter_test.dart';+import 'package:immich_mobile/infrastructure/repositories/db.repository.dart';++import 'generated/schema.dart';+import 'generated/schema_v1.dart' as v1;+import 'generated/schema_v2.dart' as v2;++void main() {+ driftRuntimeOptions.dontWarnAboutMultipleDatabases = true;+ late SchemaVerifier verifier;++ setUpAll(() {+ verifier = SchemaVerifier(GeneratedHelper());+ });++ group('simple database migrations', () {+ // These simple tests verify all possible schema updates with a simple (no+ // data) migration. This is a quick way to ensure that written database+ // migrations properly alter the schema.+ const versions = GeneratedHelper.versions;+ for (final (i, fromVersion) in versions.indexed) {+ group('from $fromVersion', () {+ for (final toVersion in versions.skip(i + 1)) {+ test('to $toVersion', () async {+ final schema = await verifier.schemaAt(fromVersion);+ final db = Drift(schema.newConnection());+ await verifier.migrateAndValidate(db, toVersion);+ await db.close();+ });+ }+ });+ }+ });+}