rename cloud id
This commit is contained in:
@@ -137,7 +137,7 @@ class Drift extends $Drift implements IDatabaseRepository {
|
||||
},
|
||||
from10To11: (m, v11) async {
|
||||
// Add cloud_id to local and remote asset tables
|
||||
await m.addColumn(v11.localAssetEntity, v11.localAssetEntity.cloudId);
|
||||
await m.addColumn(v11.localAssetEntity, v11.localAssetEntity.iCloudId);
|
||||
await m.createIndex(v11.idxLocalAssetCloudId);
|
||||
await m.createTable(v11.remoteAssetCloudIdEntity);
|
||||
},
|
||||
|
||||
@@ -4691,13 +4691,13 @@ class Shape22 extends i0.VersionedTable {
|
||||
columnsByName['is_favorite']! as i1.GeneratedColumn<bool>;
|
||||
i1.GeneratedColumn<int> get orientation =>
|
||||
columnsByName['orientation']! as i1.GeneratedColumn<int>;
|
||||
i1.GeneratedColumn<String> get cloudId =>
|
||||
columnsByName['cloud_id']! as i1.GeneratedColumn<String>;
|
||||
i1.GeneratedColumn<String> get iCloudId =>
|
||||
columnsByName['i_cloud_id']! as i1.GeneratedColumn<String>;
|
||||
}
|
||||
|
||||
i1.GeneratedColumn<String> _column_95(String aliasedName) =>
|
||||
i1.GeneratedColumn<String>(
|
||||
'cloud_id',
|
||||
'i_cloud_id',
|
||||
aliasedName,
|
||||
true,
|
||||
type: i1.DriftSqlType.string,
|
||||
|
||||
@@ -243,7 +243,7 @@ class DriftLocalAlbumRepository extends DriftDatabaseRepository {
|
||||
|
||||
batch.update(
|
||||
_db.localAssetEntity,
|
||||
LocalAssetEntityCompanion(cloudId: Value(cloudId)),
|
||||
LocalAssetEntityCompanion(iCloudId: Value(cloudId)),
|
||||
where: (f) => f.id.equals(assetId),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ class DriftLocalAssetRepository extends DriftDatabaseRepository {
|
||||
_db.localAssetEntity.selectOnly().join([
|
||||
leftOuterJoin(
|
||||
_db.remoteAssetCloudIdEntity,
|
||||
_db.localAssetEntity.cloudId.equalsExp(_db.remoteAssetCloudIdEntity.cloudId),
|
||||
_db.localAssetEntity.iCloudId.equalsExp(_db.remoteAssetCloudIdEntity.cloudId),
|
||||
useColumns: false,
|
||||
),
|
||||
leftOuterJoin(
|
||||
|
||||
@@ -87,7 +87,7 @@ class DriftTimelineRepository extends DriftDatabaseRepository {
|
||||
isFavorite: row.isFavorite,
|
||||
durationInSeconds: row.durationInSeconds,
|
||||
orientation: row.orientation,
|
||||
cloudId: row.cloudId,
|
||||
cloudId: row.iCloudId,
|
||||
),
|
||||
)
|
||||
.get();
|
||||
|
||||
Reference in New Issue
Block a user