-
Notifications
You must be signed in to change notification settings - Fork 4
fix: Rework initial settings storage on invitee v2 #1125
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
Merged
Merged
Changes from 14 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
611f0cd
tests: Detect fails to set project settings by invitee
b9d8052
fix: rework initial project settings storage
d178d1e
chore: Remove references to unix timestamp fix
d19c1f7
fix: Account for backup info in list projects and leave projects
d1a3b4c
fix: rework initial project settings storage
f3351b3
feat: Track sendStats in backupProjectInfo
7637a15
tests: Check that getProject returns a MapeoProject
f2aeea2
fix: Flush own project settings when re-indexing
b59066f
refactor
gmaclennan c126ad7
remove console.dir()
gmaclennan 903f217
fix type test
gmaclennan 7dc81f0
failing test: migrating project.leave state
gmaclennan dcbb031
fix: migrate left projects
gmaclennan e3eb742
Add comment about new test helper
gmaclennan 8b54332
remove unnecessary migrations
gmaclennan bc77d82
Merge branch 'main' into fix/no-unknown-forks-gregor
gmaclennan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
CREATE TABLE `backupProjectInfo` ( | ||
`projectId` text PRIMARY KEY NOT NULL, | ||
`projectName` text NOT NULL, | ||
`projectDescription` text, | ||
`sendStats` integer DEFAULT false NOT NULL | ||
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
DROP TABLE `backupProjectInfo`;--> statement-breakpoint | ||
ALTER TABLE projectKeys ADD `hasLeftProject` integer DEFAULT false NOT NULL; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,265 @@ | ||
{ | ||
"version": "5", | ||
"dialect": "sqlite", | ||
"id": "ac5d31dc-4925-4afd-944c-4dddd7dd21c5", | ||
"prevId": "3b7b9e2d-3a35-47e3-977e-b5dcbe2fd302", | ||
"tables": { | ||
"backupProjectInfo": { | ||
"name": "backupProjectInfo", | ||
"columns": { | ||
"projectId": { | ||
"name": "projectId", | ||
"type": "text", | ||
"primaryKey": true, | ||
"notNull": true, | ||
"autoincrement": false | ||
}, | ||
"projectName": { | ||
"name": "projectName", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": true, | ||
"autoincrement": false | ||
}, | ||
"projectDescription": { | ||
"name": "projectDescription", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": false, | ||
"autoincrement": false | ||
}, | ||
"sendStats": { | ||
"name": "sendStats", | ||
"type": "integer", | ||
"primaryKey": false, | ||
"notNull": true, | ||
"autoincrement": false, | ||
"default": false | ||
} | ||
}, | ||
"indexes": {}, | ||
"foreignKeys": {}, | ||
"compositePrimaryKeys": {}, | ||
"uniqueConstraints": {} | ||
}, | ||
"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 | ||
}, | ||
"projectDescription": { | ||
"name": "projectDescription", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": false, | ||
"autoincrement": false | ||
}, | ||
"projectColor": { | ||
"name": "projectColor", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": false, | ||
"autoincrement": false | ||
}, | ||
"sendStats": { | ||
"name": "sendStats", | ||
"type": "integer", | ||
"primaryKey": false, | ||
"notNull": true, | ||
"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": {}, | ||
"columns": {} | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.