Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add setIsArchiveDevice() method #932

Merged
merged 9 commits into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions drizzle/client/0001_chubby_cargill.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
Manually generated migration because SQLITE and Drizzle do not support
altering a column to be nullable.
*/
ALTER TABLE `localDeviceInfo` RENAME TO `deviceSettings`;--> statement-breakpoint
DROP INDEX IF EXISTS `localDeviceInfo_deviceId_unique`;--> statement-breakpoint
ALTER TABLE deviceSettings ADD `isArchiveDevice` integer;--> statement-breakpoint
ALTER TABLE deviceSettings RENAME COLUMN `deviceInfo` TO `deviceInfoOld`;--> statement-breakpoint
ALTER TABLE deviceSettings ADD `deviceInfo` text;--> statement-breakpoint
UPDATE deviceSettings SET `deviceInfo` = `deviceInfoOld`;--> statement-breakpoint
ALTER TABLE deviceSettings DROP COLUMN `deviceInfoOld`;--> statement-breakpoint
CREATE UNIQUE INDEX `deviceSettings_deviceId_unique` ON `deviceSettings` (`deviceId`);
208 changes: 208 additions & 0 deletions drizzle/client/meta/0001_snapshot.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,208 @@
{
"version": "5",
"dialect": "sqlite",
"id": "a80440f2-1097-40a6-ab81-3295f0a8c5c1",
"prevId": "e75103ab-bbcb-4ca9-a0c4-2d9095b63add",
"tables": {
"deviceSettings": {
"name": "deviceSettings",
"columns": {
"deviceId": {
"name": "deviceId",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"deviceInfo": {
"name": "deviceInfo",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"isArchiveDevice": {
"name": "isArchiveDevice",
"type": "integer",
"primaryKey": false,
"notNull": false,
"autoincrement": false
}
},
"indexes": {
"deviceSettings_deviceId_unique": {
"name": "deviceSettings_deviceId_unique",
"columns": [
"deviceId"
],
"isUnique": true
}
},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
},
"projectSettings_backlink": {
"name": "projectSettings_backlink",
"columns": {
"versionId": {
"name": "versionId",
"type": "text",
"primaryKey": true,
"notNull": true,
"autoincrement": false
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
},
"projectKeys": {
"name": "projectKeys",
"columns": {
"projectId": {
"name": "projectId",
"type": "text",
"primaryKey": true,
"notNull": true,
"autoincrement": false
},
"projectPublicId": {
"name": "projectPublicId",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"projectInviteId": {
"name": "projectInviteId",
"type": "blob",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"keysCipher": {
"name": "keysCipher",
"type": "blob",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"projectInfo": {
"name": "projectInfo",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "'{}'"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
},
"projectSettings": {
"name": "projectSettings",
"columns": {
"docId": {
"name": "docId",
"type": "text",
"primaryKey": true,
"notNull": true,
"autoincrement": false
},
"versionId": {
"name": "versionId",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"originalVersionId": {
"name": "originalVersionId",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"schemaName": {
"name": "schemaName",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"createdAt": {
"name": "createdAt",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"updatedAt": {
"name": "updatedAt",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"links": {
"name": "links",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"deleted": {
"name": "deleted",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"defaultPresets": {
"name": "defaultPresets",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"configMetadata": {
"name": "configMetadata",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"forks": {
"name": "forks",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
}
},
"enums": {},
"_meta": {
"schemas": {},
"tables": {
"\"localDeviceInfo\"": "\"deviceSettings\""
},
"columns": {}
}
}
7 changes: 7 additions & 0 deletions drizzle/client/meta/_journal.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@
"when": 1726514276007,
"tag": "0000_bumpy_carnage",
"breakpoints": true
},
{
"idx": 1,
"version": "5",
"when": 1729605656745,
"tag": "0001_chubby_cargill",
"breakpoints": true
}
]
}
57 changes: 57 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@
"homepage": "https://github.com/digidem/comapeo-core#readme",
"devDependencies": {
"@bufbuild/buf": "^1.26.1",
"@comapeo/core2.0.1": "npm:@comapeo/[email protected]",
"@mapeo/default-config": "5.0.0",
"@mapeo/mock-data": "2.0.0",
"@sinonjs/fake-timers": "^10.0.2",
Expand Down
Loading
Loading