Skip to content

Commit

Permalink
Merge pull request #1602 from ardriveapp/master
Browse files Browse the repository at this point in the history
Update dev with migration hotfix
  • Loading branch information
kunstmusik authored Feb 1, 2024
2 parents 0e999ae + 52cbc90 commit c827feb
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 26 deletions.
6 changes: 3 additions & 3 deletions lib/models/daos/drive_dao/drive_dao.dart
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class DriveDao extends DatabaseAccessor<Database> with _$DriveDaoMixin {
driveId: driveId,
name: name,
path: rootPath,
isHidden: false,
isHidden: const Value(false),
),
);
});
Expand Down Expand Up @@ -392,7 +392,7 @@ class DriveDao extends DatabaseAccessor<Database> with _$DriveDaoMixin {
parentFolderId: Value(parentFolderId),
name: folderName,
path: path,
isHidden: false,
isHidden: const Value(false),
);
await into(folderEntries).insert(folderEntriesCompanion);

Expand Down Expand Up @@ -459,7 +459,7 @@ class DriveDao extends DatabaseAccessor<Database> with _$DriveDaoMixin {
lastModifiedDate: entity.lastModifiedDate ?? DateTime.now(),
dataContentType: Value(entity.dataContentType),
pinnedDataOwnerAddress: Value(entity.pinnedDataOwnerAddress),
isHidden: entity.isHidden ?? false,
isHidden: Value(entity.isHidden ?? false),
);

return into(fileEntries).insert(
Expand Down
4 changes: 2 additions & 2 deletions lib/models/file_revision.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ extension FileRevisionsCompanionExtensions on FileRevisionsCompanion {
customGQLTags: customGQLTags,
customJsonMetadata: customJsonMetadata,
pinnedDataOwnerAddress: pinnedDataOwnerAddress,
isHidden: isHidden.value,
isHidden: isHidden,
);

/// Returns a list of [NetworkTransactionsCompanion] representing the metadata and data transactions
Expand Down Expand Up @@ -58,7 +58,7 @@ extension FileEntityExtensions on FileEntity {
customGQLTags: Value(customGqlTagsAsString),
customJsonMetadata: Value(customJsonMetadataAsString),
pinnedDataOwnerAddress: Value(pinnedDataOwnerAddress),
isHidden: isHidden ?? false,
isHidden: Value(isHidden ?? false),
);

FileRevision toRevision({
Expand Down
4 changes: 2 additions & 2 deletions lib/models/folder_revision.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ extension FolderRevisionCompanionExtensions on FolderRevisionsCompanion {
lastUpdated: dateCreated,
customGQLTags: customGQLTags,
customJsonMetadata: customJsonMetadata,
isHidden: isHidden.value,
isHidden: isHidden,
);

/// Returns a [NetworkTransactionsCompanion] representing the metadata transaction
Expand All @@ -47,7 +47,7 @@ extension FolderEntityExtensions on FolderEntity {
action: performedAction,
customGQLTags: Value(customGqlTagsAsString),
customJsonMetadata: Value(customJsonMetadataAsString),
isHidden: isHidden ?? false,
isHidden: Value(isHidden ?? false),
);

/// Returns the action performed on the folder that lead to the new revision.
Expand Down
2 changes: 1 addition & 1 deletion lib/models/tables/file_entries.drift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ CREATE TABLE file_entries (
customJsonMetadata TEXT,
customGQLTags TEXT,

isHidden BOOLEAN NOT NULL,
isHidden BOOLEAN NOT NULL DEFAULT FALSE,

dateCreated DATETIME NOT NULL DEFAULT (strftime('%s','now')),
lastUpdated DATETIME NOT NULL DEFAULT (strftime('%s','now')),
Expand Down
2 changes: 1 addition & 1 deletion lib/models/tables/file_revisions.drift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ CREATE TABLE file_revisions (

pinnedDataOwnerAddress TEXT,

isHidden BOOLEAN NOT NULL,
isHidden BOOLEAN NOT NULL DEFAULT FALSE,

PRIMARY KEY (fileId, driveId, dateCreated),
FOREIGN KEY (metadataTxId) REFERENCES network_transactions(id),
Expand Down
2 changes: 1 addition & 1 deletion lib/models/tables/folder_entries.drift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ CREATE TABLE folder_entries (
customJsonMetadata TEXT,
customGQLTags TEXT,

isHidden BOOLEAN NOT NULL,
isHidden BOOLEAN NOT NULL DEFAULT FALSE,

PRIMARY KEY (id, driveId)
) As FolderEntry;
2 changes: 1 addition & 1 deletion lib/models/tables/folder_revisions.drift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ CREATE TABLE folder_revisions (
customJsonMetadata TEXT,
customGQLTags TEXT,

isHidden BOOLEAN NOT NULL,
isHidden BOOLEAN NOT NULL DEFAULT FALSE,

PRIMARY KEY (folderId, driveId, dateCreated),
FOREIGN KEY (metadataTxId) REFERENCES network_transactions(id)
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Secure, permanent storage

publish_to: 'none'

version: 2.33.0
version: 2.33.1

environment:
sdk: '>=3.0.2 <4.0.0'
Expand Down
14 changes: 7 additions & 7 deletions test/blocs/fs_entry_move_bloc_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -69,23 +69,23 @@ void main() {
driveId: driveId,
name: 'fake-drive-name',
path: '',
isHidden: false,
isHidden: const Value(false),
),
FolderEntriesCompanion.insert(
id: nestedFolderId,
driveId: driveId,
parentFolderId: Value(rootFolderId),
name: nestedFolderId,
path: '/$nestedFolderId',
isHidden: false,
isHidden: const Value(false),
),
FolderEntriesCompanion.insert(
id: conflictTestFolderId,
driveId: driveId,
parentFolderId: Value(rootFolderId),
name: conflictTestFolderId,
path: '/$conflictTestFolderId',
isHidden: false,
isHidden: const Value(false),
),
]);
// Insert fake files
Expand All @@ -107,7 +107,7 @@ void main() {
dateCreated: Value(defaultDate),
lastModifiedDate: defaultDate,
dataContentType: const Value(''),
isHidden: false,
isHidden: const Value(false),
);
},
),
Expand All @@ -126,7 +126,7 @@ void main() {
dateCreated: Value(defaultDate),
lastModifiedDate: defaultDate,
dataContentType: const Value(''),
isHidden: false,
isHidden: const Value(false),
);
},
),
Expand All @@ -152,7 +152,7 @@ void main() {
dateCreated: Value(defaultDate),
lastModifiedDate: defaultDate,
dataContentType: const Value(''),
isHidden: false,
isHidden: const Value(false),
);
},
),
Expand All @@ -172,7 +172,7 @@ void main() {
dateCreated: Value(defaultDate),
lastModifiedDate: defaultDate,
dataContentType: const Value(''),
isHidden: false,
isHidden: const Value(false),
);
},
),
Expand Down
14 changes: 7 additions & 7 deletions test/test_utils/utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@ Future<void> addTestFilesToDb(
driveId: driveId,
name: 'fake-drive-name',
path: '',
isHidden: false,
isHidden: const Value(false),
),
FolderEntriesCompanion.insert(
id: nestedFolderId,
driveId: driveId,
parentFolderId: Value(rootFolderId),
name: nestedFolderId,
path: '/$nestedFolderId',
isHidden: false,
isHidden: const Value(false),
),
...List.generate(
emptyNestedFolderCount,
Expand All @@ -86,7 +86,7 @@ Future<void> addTestFilesToDb(
parentFolderId: Value(rootFolderId),
name: folderId,
path: '/$folderId',
isHidden: false,
isHidden: const Value(false),
);
},
)..shuffle(Random(0)),
Expand All @@ -111,7 +111,7 @@ Future<void> addTestFilesToDb(
dateCreated: Value(defaultDate),
lastModifiedDate: defaultDate,
dataContentType: const Value(''),
isHidden: false,
isHidden: const Value(false),
);
},
)..shuffle(Random(0)),
Expand All @@ -130,7 +130,7 @@ Future<void> addTestFilesToDb(
dateCreated: Value(defaultDate),
lastModifiedDate: defaultDate,
dataContentType: const Value(''),
isHidden: false,
isHidden: const Value(false),
);
},
)..shuffle(Random(0)),
Expand All @@ -156,7 +156,7 @@ Future<void> addTestFilesToDb(
dateCreated: Value(defaultDate),
lastModifiedDate: defaultDate,
dataContentType: const Value(''),
isHidden: false,
isHidden: const Value(false),
);
},
)..shuffle(Random(0)),
Expand All @@ -176,7 +176,7 @@ Future<void> addTestFilesToDb(
dateCreated: Value(defaultDate),
lastModifiedDate: defaultDate,
dataContentType: const Value(''),
isHidden: false,
isHidden: const Value(false),
);
},
)..shuffle(Random(0)),
Expand Down

0 comments on commit c827feb

Please sign in to comment.