|
|
|
|
@@ -8904,6 +8904,591 @@ i1.GeneratedColumn<bool> _column_102(String aliasedName) =>
|
|
|
|
|
),
|
|
|
|
|
defaultValue: const CustomExpression('1'),
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
final class Schema21 extends i0.VersionedSchema {
|
|
|
|
|
Schema21({required super.database}) : super(version: 21);
|
|
|
|
|
@override
|
|
|
|
|
late final List<i1.DatabaseSchemaEntity> entities = [
|
|
|
|
|
userEntity,
|
|
|
|
|
remoteAssetEntity,
|
|
|
|
|
stackEntity,
|
|
|
|
|
localAssetEntity,
|
|
|
|
|
remoteAlbumEntity,
|
|
|
|
|
localAlbumEntity,
|
|
|
|
|
localAlbumAssetEntity,
|
|
|
|
|
idxLocalAlbumAssetAlbumAsset,
|
|
|
|
|
idxRemoteAlbumOwnerId,
|
|
|
|
|
idxLocalAssetChecksum,
|
|
|
|
|
idxLocalAssetCloudId,
|
|
|
|
|
idxStackPrimaryAssetId,
|
|
|
|
|
idxRemoteAssetOwnerChecksum,
|
|
|
|
|
uQRemoteAssetsOwnerChecksum,
|
|
|
|
|
uQRemoteAssetsOwnerLibraryChecksum,
|
|
|
|
|
idxRemoteAssetChecksum,
|
|
|
|
|
idxRemoteAssetStackId,
|
|
|
|
|
idxRemoteAssetLocalDateTimeDay,
|
|
|
|
|
idxRemoteAssetLocalDateTimeMonth,
|
|
|
|
|
authUserEntity,
|
|
|
|
|
userMetadataEntity,
|
|
|
|
|
partnerEntity,
|
|
|
|
|
remoteExifEntity,
|
|
|
|
|
remoteAlbumAssetEntity,
|
|
|
|
|
remoteAlbumUserEntity,
|
|
|
|
|
remoteAssetCloudIdEntity,
|
|
|
|
|
memoryEntity,
|
|
|
|
|
memoryAssetEntity,
|
|
|
|
|
personEntity,
|
|
|
|
|
assetFaceEntity,
|
|
|
|
|
storeEntity,
|
|
|
|
|
trashedLocalAssetEntity,
|
|
|
|
|
idxPartnerSharedWithId,
|
|
|
|
|
idxLatLng,
|
|
|
|
|
idxRemoteAlbumAssetAlbumAsset,
|
|
|
|
|
idxRemoteAssetCloudId,
|
|
|
|
|
idxPersonOwnerId,
|
|
|
|
|
idxAssetFacePersonId,
|
|
|
|
|
idxAssetFaceAssetId,
|
|
|
|
|
idxTrashedLocalAssetChecksum,
|
|
|
|
|
idxTrashedLocalAssetAlbum,
|
|
|
|
|
];
|
|
|
|
|
late final Shape20 userEntity = Shape20(
|
|
|
|
|
source: i0.VersionedTable(
|
|
|
|
|
entityName: 'user_entity',
|
|
|
|
|
withoutRowId: true,
|
|
|
|
|
isStrict: true,
|
|
|
|
|
tableConstraints: ['PRIMARY KEY(id)'],
|
|
|
|
|
columns: [
|
|
|
|
|
_column_0,
|
|
|
|
|
_column_1,
|
|
|
|
|
_column_3,
|
|
|
|
|
_column_84,
|
|
|
|
|
_column_85,
|
|
|
|
|
_column_91,
|
|
|
|
|
],
|
|
|
|
|
attachedDatabase: database,
|
|
|
|
|
),
|
|
|
|
|
alias: null,
|
|
|
|
|
);
|
|
|
|
|
late final Shape28 remoteAssetEntity = Shape28(
|
|
|
|
|
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,
|
|
|
|
|
_column_21,
|
|
|
|
|
_column_86,
|
|
|
|
|
_column_101,
|
|
|
|
|
],
|
|
|
|
|
attachedDatabase: database,
|
|
|
|
|
),
|
|
|
|
|
alias: null,
|
|
|
|
|
);
|
|
|
|
|
late final Shape3 stackEntity = Shape3(
|
|
|
|
|
source: i0.VersionedTable(
|
|
|
|
|
entityName: 'stack_entity',
|
|
|
|
|
withoutRowId: true,
|
|
|
|
|
isStrict: true,
|
|
|
|
|
tableConstraints: ['PRIMARY KEY(id)'],
|
|
|
|
|
columns: [_column_0, _column_9, _column_5, _column_15, _column_75],
|
|
|
|
|
attachedDatabase: database,
|
|
|
|
|
),
|
|
|
|
|
alias: null,
|
|
|
|
|
);
|
|
|
|
|
late final Shape30 localAssetEntity = Shape30(
|
|
|
|
|
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_22,
|
|
|
|
|
_column_14,
|
|
|
|
|
_column_23,
|
|
|
|
|
_column_98,
|
|
|
|
|
_column_96,
|
|
|
|
|
_column_46,
|
|
|
|
|
_column_47,
|
|
|
|
|
_column_103,
|
|
|
|
|
],
|
|
|
|
|
attachedDatabase: database,
|
|
|
|
|
),
|
|
|
|
|
alias: null,
|
|
|
|
|
);
|
|
|
|
|
late final Shape9 remoteAlbumEntity = Shape9(
|
|
|
|
|
source: i0.VersionedTable(
|
|
|
|
|
entityName: 'remote_album_entity',
|
|
|
|
|
withoutRowId: true,
|
|
|
|
|
isStrict: true,
|
|
|
|
|
tableConstraints: ['PRIMARY KEY(id)'],
|
|
|
|
|
columns: [
|
|
|
|
|
_column_0,
|
|
|
|
|
_column_1,
|
|
|
|
|
_column_56,
|
|
|
|
|
_column_9,
|
|
|
|
|
_column_5,
|
|
|
|
|
_column_15,
|
|
|
|
|
_column_57,
|
|
|
|
|
_column_58,
|
|
|
|
|
_column_59,
|
|
|
|
|
],
|
|
|
|
|
attachedDatabase: database,
|
|
|
|
|
),
|
|
|
|
|
alias: null,
|
|
|
|
|
);
|
|
|
|
|
late final Shape19 localAlbumEntity = Shape19(
|
|
|
|
|
source: i0.VersionedTable(
|
|
|
|
|
entityName: 'local_album_entity',
|
|
|
|
|
withoutRowId: true,
|
|
|
|
|
isStrict: true,
|
|
|
|
|
tableConstraints: ['PRIMARY KEY(id)'],
|
|
|
|
|
columns: [
|
|
|
|
|
_column_0,
|
|
|
|
|
_column_1,
|
|
|
|
|
_column_5,
|
|
|
|
|
_column_31,
|
|
|
|
|
_column_32,
|
|
|
|
|
_column_90,
|
|
|
|
|
_column_33,
|
|
|
|
|
],
|
|
|
|
|
attachedDatabase: database,
|
|
|
|
|
),
|
|
|
|
|
alias: null,
|
|
|
|
|
);
|
|
|
|
|
late final Shape22 localAlbumAssetEntity = Shape22(
|
|
|
|
|
source: i0.VersionedTable(
|
|
|
|
|
entityName: 'local_album_asset_entity',
|
|
|
|
|
withoutRowId: true,
|
|
|
|
|
isStrict: true,
|
|
|
|
|
tableConstraints: ['PRIMARY KEY(asset_id, album_id)'],
|
|
|
|
|
columns: [_column_34, _column_35, _column_33],
|
|
|
|
|
attachedDatabase: database,
|
|
|
|
|
),
|
|
|
|
|
alias: null,
|
|
|
|
|
);
|
|
|
|
|
final i1.Index idxLocalAlbumAssetAlbumAsset = i1.Index(
|
|
|
|
|
'idx_local_album_asset_album_asset',
|
|
|
|
|
'CREATE INDEX IF NOT EXISTS idx_local_album_asset_album_asset ON local_album_asset_entity (album_id, asset_id)',
|
|
|
|
|
);
|
|
|
|
|
final i1.Index idxRemoteAlbumOwnerId = i1.Index(
|
|
|
|
|
'idx_remote_album_owner_id',
|
|
|
|
|
'CREATE INDEX IF NOT EXISTS idx_remote_album_owner_id ON remote_album_entity (owner_id)',
|
|
|
|
|
);
|
|
|
|
|
final i1.Index idxLocalAssetChecksum = i1.Index(
|
|
|
|
|
'idx_local_asset_checksum',
|
|
|
|
|
'CREATE INDEX IF NOT EXISTS idx_local_asset_checksum ON local_asset_entity (checksum)',
|
|
|
|
|
);
|
|
|
|
|
final i1.Index idxLocalAssetCloudId = i1.Index(
|
|
|
|
|
'idx_local_asset_cloud_id',
|
|
|
|
|
'CREATE INDEX IF NOT EXISTS idx_local_asset_cloud_id ON local_asset_entity (i_cloud_id)',
|
|
|
|
|
);
|
|
|
|
|
final i1.Index idxStackPrimaryAssetId = i1.Index(
|
|
|
|
|
'idx_stack_primary_asset_id',
|
|
|
|
|
'CREATE INDEX IF NOT EXISTS idx_stack_primary_asset_id ON stack_entity (primary_asset_id)',
|
|
|
|
|
);
|
|
|
|
|
final i1.Index idxRemoteAssetOwnerChecksum = i1.Index(
|
|
|
|
|
'idx_remote_asset_owner_checksum',
|
|
|
|
|
'CREATE INDEX IF NOT EXISTS idx_remote_asset_owner_checksum ON remote_asset_entity (owner_id, checksum)',
|
|
|
|
|
);
|
|
|
|
|
final i1.Index uQRemoteAssetsOwnerChecksum = i1.Index(
|
|
|
|
|
'UQ_remote_assets_owner_checksum',
|
|
|
|
|
'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_checksum ON remote_asset_entity (owner_id, checksum) WHERE(library_id IS NULL)',
|
|
|
|
|
);
|
|
|
|
|
final i1.Index uQRemoteAssetsOwnerLibraryChecksum = i1.Index(
|
|
|
|
|
'UQ_remote_assets_owner_library_checksum',
|
|
|
|
|
'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_library_checksum ON remote_asset_entity (owner_id, library_id, checksum) WHERE(library_id IS NOT NULL)',
|
|
|
|
|
);
|
|
|
|
|
final i1.Index idxRemoteAssetChecksum = i1.Index(
|
|
|
|
|
'idx_remote_asset_checksum',
|
|
|
|
|
'CREATE INDEX IF NOT EXISTS idx_remote_asset_checksum ON remote_asset_entity (checksum)',
|
|
|
|
|
);
|
|
|
|
|
final i1.Index idxRemoteAssetStackId = i1.Index(
|
|
|
|
|
'idx_remote_asset_stack_id',
|
|
|
|
|
'CREATE INDEX IF NOT EXISTS idx_remote_asset_stack_id ON remote_asset_entity (stack_id)',
|
|
|
|
|
);
|
|
|
|
|
final i1.Index idxRemoteAssetLocalDateTimeDay = i1.Index(
|
|
|
|
|
'idx_remote_asset_local_date_time_day',
|
|
|
|
|
'CREATE INDEX IF NOT EXISTS idx_remote_asset_local_date_time_day ON remote_asset_entity (STRFTIME(\'%Y-%m-%d\', local_date_time))',
|
|
|
|
|
);
|
|
|
|
|
final i1.Index idxRemoteAssetLocalDateTimeMonth = i1.Index(
|
|
|
|
|
'idx_remote_asset_local_date_time_month',
|
|
|
|
|
'CREATE INDEX IF NOT EXISTS idx_remote_asset_local_date_time_month ON remote_asset_entity (STRFTIME(\'%Y-%m\', local_date_time))',
|
|
|
|
|
);
|
|
|
|
|
late final Shape21 authUserEntity = Shape21(
|
|
|
|
|
source: i0.VersionedTable(
|
|
|
|
|
entityName: 'auth_user_entity',
|
|
|
|
|
withoutRowId: true,
|
|
|
|
|
isStrict: true,
|
|
|
|
|
tableConstraints: ['PRIMARY KEY(id)'],
|
|
|
|
|
columns: [
|
|
|
|
|
_column_0,
|
|
|
|
|
_column_1,
|
|
|
|
|
_column_3,
|
|
|
|
|
_column_2,
|
|
|
|
|
_column_84,
|
|
|
|
|
_column_85,
|
|
|
|
|
_column_92,
|
|
|
|
|
_column_93,
|
|
|
|
|
_column_7,
|
|
|
|
|
_column_94,
|
|
|
|
|
],
|
|
|
|
|
attachedDatabase: database,
|
|
|
|
|
),
|
|
|
|
|
alias: null,
|
|
|
|
|
);
|
|
|
|
|
late final Shape4 userMetadataEntity = Shape4(
|
|
|
|
|
source: i0.VersionedTable(
|
|
|
|
|
entityName: 'user_metadata_entity',
|
|
|
|
|
withoutRowId: true,
|
|
|
|
|
isStrict: true,
|
|
|
|
|
tableConstraints: ['PRIMARY KEY(user_id, "key")'],
|
|
|
|
|
columns: [_column_25, _column_26, _column_27],
|
|
|
|
|
attachedDatabase: database,
|
|
|
|
|
),
|
|
|
|
|
alias: null,
|
|
|
|
|
);
|
|
|
|
|
late final Shape5 partnerEntity = Shape5(
|
|
|
|
|
source: i0.VersionedTable(
|
|
|
|
|
entityName: 'partner_entity',
|
|
|
|
|
withoutRowId: true,
|
|
|
|
|
isStrict: true,
|
|
|
|
|
tableConstraints: ['PRIMARY KEY(shared_by_id, shared_with_id)'],
|
|
|
|
|
columns: [_column_28, _column_29, _column_30],
|
|
|
|
|
attachedDatabase: database,
|
|
|
|
|
),
|
|
|
|
|
alias: null,
|
|
|
|
|
);
|
|
|
|
|
late final Shape8 remoteExifEntity = Shape8(
|
|
|
|
|
source: i0.VersionedTable(
|
|
|
|
|
entityName: 'remote_exif_entity',
|
|
|
|
|
withoutRowId: true,
|
|
|
|
|
isStrict: true,
|
|
|
|
|
tableConstraints: ['PRIMARY KEY(asset_id)'],
|
|
|
|
|
columns: [
|
|
|
|
|
_column_36,
|
|
|
|
|
_column_37,
|
|
|
|
|
_column_38,
|
|
|
|
|
_column_39,
|
|
|
|
|
_column_40,
|
|
|
|
|
_column_41,
|
|
|
|
|
_column_11,
|
|
|
|
|
_column_10,
|
|
|
|
|
_column_42,
|
|
|
|
|
_column_43,
|
|
|
|
|
_column_44,
|
|
|
|
|
_column_45,
|
|
|
|
|
_column_46,
|
|
|
|
|
_column_47,
|
|
|
|
|
_column_48,
|
|
|
|
|
_column_49,
|
|
|
|
|
_column_50,
|
|
|
|
|
_column_51,
|
|
|
|
|
_column_52,
|
|
|
|
|
_column_53,
|
|
|
|
|
_column_54,
|
|
|
|
|
_column_55,
|
|
|
|
|
],
|
|
|
|
|
attachedDatabase: database,
|
|
|
|
|
),
|
|
|
|
|
alias: null,
|
|
|
|
|
);
|
|
|
|
|
late final Shape7 remoteAlbumAssetEntity = Shape7(
|
|
|
|
|
source: i0.VersionedTable(
|
|
|
|
|
entityName: 'remote_album_asset_entity',
|
|
|
|
|
withoutRowId: true,
|
|
|
|
|
isStrict: true,
|
|
|
|
|
tableConstraints: ['PRIMARY KEY(asset_id, album_id)'],
|
|
|
|
|
columns: [_column_36, _column_60],
|
|
|
|
|
attachedDatabase: database,
|
|
|
|
|
),
|
|
|
|
|
alias: null,
|
|
|
|
|
);
|
|
|
|
|
late final Shape10 remoteAlbumUserEntity = Shape10(
|
|
|
|
|
source: i0.VersionedTable(
|
|
|
|
|
entityName: 'remote_album_user_entity',
|
|
|
|
|
withoutRowId: true,
|
|
|
|
|
isStrict: true,
|
|
|
|
|
tableConstraints: ['PRIMARY KEY(album_id, user_id)'],
|
|
|
|
|
columns: [_column_60, _column_25, _column_61],
|
|
|
|
|
attachedDatabase: database,
|
|
|
|
|
),
|
|
|
|
|
alias: null,
|
|
|
|
|
);
|
|
|
|
|
late final Shape27 remoteAssetCloudIdEntity = Shape27(
|
|
|
|
|
source: i0.VersionedTable(
|
|
|
|
|
entityName: 'remote_asset_cloud_id_entity',
|
|
|
|
|
withoutRowId: true,
|
|
|
|
|
isStrict: true,
|
|
|
|
|
tableConstraints: ['PRIMARY KEY(asset_id)'],
|
|
|
|
|
columns: [
|
|
|
|
|
_column_36,
|
|
|
|
|
_column_99,
|
|
|
|
|
_column_100,
|
|
|
|
|
_column_96,
|
|
|
|
|
_column_46,
|
|
|
|
|
_column_47,
|
|
|
|
|
],
|
|
|
|
|
attachedDatabase: database,
|
|
|
|
|
),
|
|
|
|
|
alias: null,
|
|
|
|
|
);
|
|
|
|
|
late final Shape11 memoryEntity = Shape11(
|
|
|
|
|
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_62,
|
|
|
|
|
_column_63,
|
|
|
|
|
_column_64,
|
|
|
|
|
_column_65,
|
|
|
|
|
_column_66,
|
|
|
|
|
_column_67,
|
|
|
|
|
],
|
|
|
|
|
attachedDatabase: database,
|
|
|
|
|
),
|
|
|
|
|
alias: null,
|
|
|
|
|
);
|
|
|
|
|
late final Shape12 memoryAssetEntity = Shape12(
|
|
|
|
|
source: i0.VersionedTable(
|
|
|
|
|
entityName: 'memory_asset_entity',
|
|
|
|
|
withoutRowId: true,
|
|
|
|
|
isStrict: true,
|
|
|
|
|
tableConstraints: ['PRIMARY KEY(asset_id, memory_id)'],
|
|
|
|
|
columns: [_column_36, _column_68],
|
|
|
|
|
attachedDatabase: database,
|
|
|
|
|
),
|
|
|
|
|
alias: null,
|
|
|
|
|
);
|
|
|
|
|
late final Shape14 personEntity = Shape14(
|
|
|
|
|
source: i0.VersionedTable(
|
|
|
|
|
entityName: 'person_entity',
|
|
|
|
|
withoutRowId: true,
|
|
|
|
|
isStrict: true,
|
|
|
|
|
tableConstraints: ['PRIMARY KEY(id)'],
|
|
|
|
|
columns: [
|
|
|
|
|
_column_0,
|
|
|
|
|
_column_9,
|
|
|
|
|
_column_5,
|
|
|
|
|
_column_15,
|
|
|
|
|
_column_1,
|
|
|
|
|
_column_69,
|
|
|
|
|
_column_71,
|
|
|
|
|
_column_72,
|
|
|
|
|
_column_73,
|
|
|
|
|
_column_74,
|
|
|
|
|
],
|
|
|
|
|
attachedDatabase: database,
|
|
|
|
|
),
|
|
|
|
|
alias: null,
|
|
|
|
|
);
|
|
|
|
|
late final Shape29 assetFaceEntity = Shape29(
|
|
|
|
|
source: i0.VersionedTable(
|
|
|
|
|
entityName: 'asset_face_entity',
|
|
|
|
|
withoutRowId: true,
|
|
|
|
|
isStrict: true,
|
|
|
|
|
tableConstraints: ['PRIMARY KEY(id)'],
|
|
|
|
|
columns: [
|
|
|
|
|
_column_0,
|
|
|
|
|
_column_36,
|
|
|
|
|
_column_76,
|
|
|
|
|
_column_77,
|
|
|
|
|
_column_78,
|
|
|
|
|
_column_79,
|
|
|
|
|
_column_80,
|
|
|
|
|
_column_81,
|
|
|
|
|
_column_82,
|
|
|
|
|
_column_83,
|
|
|
|
|
_column_102,
|
|
|
|
|
_column_18,
|
|
|
|
|
],
|
|
|
|
|
attachedDatabase: database,
|
|
|
|
|
),
|
|
|
|
|
alias: null,
|
|
|
|
|
);
|
|
|
|
|
late final Shape18 storeEntity = Shape18(
|
|
|
|
|
source: i0.VersionedTable(
|
|
|
|
|
entityName: 'store_entity',
|
|
|
|
|
withoutRowId: true,
|
|
|
|
|
isStrict: true,
|
|
|
|
|
tableConstraints: ['PRIMARY KEY(id)'],
|
|
|
|
|
columns: [_column_87, _column_88, _column_89],
|
|
|
|
|
attachedDatabase: database,
|
|
|
|
|
),
|
|
|
|
|
alias: null,
|
|
|
|
|
);
|
|
|
|
|
late final Shape31 trashedLocalAssetEntity = Shape31(
|
|
|
|
|
source: i0.VersionedTable(
|
|
|
|
|
entityName: 'trashed_local_asset_entity',
|
|
|
|
|
withoutRowId: true,
|
|
|
|
|
isStrict: true,
|
|
|
|
|
tableConstraints: ['PRIMARY KEY(id, album_id)'],
|
|
|
|
|
columns: [
|
|
|
|
|
_column_1,
|
|
|
|
|
_column_8,
|
|
|
|
|
_column_9,
|
|
|
|
|
_column_5,
|
|
|
|
|
_column_10,
|
|
|
|
|
_column_11,
|
|
|
|
|
_column_12,
|
|
|
|
|
_column_0,
|
|
|
|
|
_column_95,
|
|
|
|
|
_column_22,
|
|
|
|
|
_column_14,
|
|
|
|
|
_column_23,
|
|
|
|
|
_column_97,
|
|
|
|
|
_column_103,
|
|
|
|
|
],
|
|
|
|
|
attachedDatabase: database,
|
|
|
|
|
),
|
|
|
|
|
alias: null,
|
|
|
|
|
);
|
|
|
|
|
final i1.Index idxPartnerSharedWithId = i1.Index(
|
|
|
|
|
'idx_partner_shared_with_id',
|
|
|
|
|
'CREATE INDEX IF NOT EXISTS idx_partner_shared_with_id ON partner_entity (shared_with_id)',
|
|
|
|
|
);
|
|
|
|
|
final i1.Index idxLatLng = i1.Index(
|
|
|
|
|
'idx_lat_lng',
|
|
|
|
|
'CREATE INDEX IF NOT EXISTS idx_lat_lng ON remote_exif_entity (latitude, longitude)',
|
|
|
|
|
);
|
|
|
|
|
final i1.Index idxRemoteAlbumAssetAlbumAsset = i1.Index(
|
|
|
|
|
'idx_remote_album_asset_album_asset',
|
|
|
|
|
'CREATE INDEX IF NOT EXISTS idx_remote_album_asset_album_asset ON remote_album_asset_entity (album_id, asset_id)',
|
|
|
|
|
);
|
|
|
|
|
final i1.Index idxRemoteAssetCloudId = i1.Index(
|
|
|
|
|
'idx_remote_asset_cloud_id',
|
|
|
|
|
'CREATE INDEX IF NOT EXISTS idx_remote_asset_cloud_id ON remote_asset_cloud_id_entity (cloud_id)',
|
|
|
|
|
);
|
|
|
|
|
final i1.Index idxPersonOwnerId = i1.Index(
|
|
|
|
|
'idx_person_owner_id',
|
|
|
|
|
'CREATE INDEX IF NOT EXISTS idx_person_owner_id ON person_entity (owner_id)',
|
|
|
|
|
);
|
|
|
|
|
final i1.Index idxAssetFacePersonId = i1.Index(
|
|
|
|
|
'idx_asset_face_person_id',
|
|
|
|
|
'CREATE INDEX IF NOT EXISTS idx_asset_face_person_id ON asset_face_entity (person_id)',
|
|
|
|
|
);
|
|
|
|
|
final i1.Index idxAssetFaceAssetId = i1.Index(
|
|
|
|
|
'idx_asset_face_asset_id',
|
|
|
|
|
'CREATE INDEX IF NOT EXISTS idx_asset_face_asset_id ON asset_face_entity (asset_id)',
|
|
|
|
|
);
|
|
|
|
|
final i1.Index idxTrashedLocalAssetChecksum = i1.Index(
|
|
|
|
|
'idx_trashed_local_asset_checksum',
|
|
|
|
|
'CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_checksum ON trashed_local_asset_entity (checksum)',
|
|
|
|
|
);
|
|
|
|
|
final i1.Index idxTrashedLocalAssetAlbum = i1.Index(
|
|
|
|
|
'idx_trashed_local_asset_album',
|
|
|
|
|
'CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_album ON trashed_local_asset_entity (album_id)',
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class Shape30 extends i0.VersionedTable {
|
|
|
|
|
Shape30({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> get iCloudId =>
|
|
|
|
|
columnsByName['i_cloud_id']! as i1.GeneratedColumn<String>;
|
|
|
|
|
i1.GeneratedColumn<DateTime> get adjustmentTime =>
|
|
|
|
|
columnsByName['adjustment_time']! as i1.GeneratedColumn<DateTime>;
|
|
|
|
|
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 playbackStyle =>
|
|
|
|
|
columnsByName['playback_style']! as i1.GeneratedColumn<int>;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
i1.GeneratedColumn<int> _column_103(String aliasedName) =>
|
|
|
|
|
i1.GeneratedColumn<int>(
|
|
|
|
|
'playback_style',
|
|
|
|
|
aliasedName,
|
|
|
|
|
false,
|
|
|
|
|
type: i1.DriftSqlType.int,
|
|
|
|
|
defaultValue: const CustomExpression('0'),
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
class Shape31 extends i0.VersionedTable {
|
|
|
|
|
Shape31({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 albumId =>
|
|
|
|
|
columnsByName['album_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<int> get source =>
|
|
|
|
|
columnsByName['source']! as i1.GeneratedColumn<int>;
|
|
|
|
|
i1.GeneratedColumn<int> get playbackStyle =>
|
|
|
|
|
columnsByName['playback_style']! as i1.GeneratedColumn<int>;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
i0.MigrationStepWithVersion migrationSteps({
|
|
|
|
|
required Future<void> Function(i1.Migrator m, Schema2 schema) from1To2,
|
|
|
|
|
required Future<void> Function(i1.Migrator m, Schema3 schema) from2To3,
|
|
|
|
|
@@ -8924,6 +9509,7 @@ i0.MigrationStepWithVersion migrationSteps({
|
|
|
|
|
required Future<void> Function(i1.Migrator m, Schema18 schema) from17To18,
|
|
|
|
|
required Future<void> Function(i1.Migrator m, Schema19 schema) from18To19,
|
|
|
|
|
required Future<void> Function(i1.Migrator m, Schema20 schema) from19To20,
|
|
|
|
|
required Future<void> Function(i1.Migrator m, Schema21 schema) from20To21,
|
|
|
|
|
}) {
|
|
|
|
|
return (currentVersion, database) async {
|
|
|
|
|
switch (currentVersion) {
|
|
|
|
|
@@ -9022,6 +9608,11 @@ i0.MigrationStepWithVersion migrationSteps({
|
|
|
|
|
final migrator = i1.Migrator(database, schema);
|
|
|
|
|
await from19To20(migrator, schema);
|
|
|
|
|
return 20;
|
|
|
|
|
case 20:
|
|
|
|
|
final schema = Schema21(database: database);
|
|
|
|
|
final migrator = i1.Migrator(database, schema);
|
|
|
|
|
await from20To21(migrator, schema);
|
|
|
|
|
return 21;
|
|
|
|
|
default:
|
|
|
|
|
throw ArgumentError.value('Unknown migration from $currentVersion');
|
|
|
|
|
}
|
|
|
|
|
@@ -9048,6 +9639,7 @@ i1.OnUpgrade stepByStep({
|
|
|
|
|
required Future<void> Function(i1.Migrator m, Schema18 schema) from17To18,
|
|
|
|
|
required Future<void> Function(i1.Migrator m, Schema19 schema) from18To19,
|
|
|
|
|
required Future<void> Function(i1.Migrator m, Schema20 schema) from19To20,
|
|
|
|
|
required Future<void> Function(i1.Migrator m, Schema21 schema) from20To21,
|
|
|
|
|
}) => i0.VersionedSchema.stepByStepHelper(
|
|
|
|
|
step: migrationSteps(
|
|
|
|
|
from1To2: from1To2,
|
|
|
|
|
@@ -9069,5 +9661,6 @@ i1.OnUpgrade stepByStep({
|
|
|
|
|
from17To18: from17To18,
|
|
|
|
|
from18To19: from18To19,
|
|
|
|
|
from19To20: from19To20,
|
|
|
|
|
from20To21: from20To21,
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
|