Skip to content

Improvements to the mock cloud database#312

Merged
mbrandonw merged 13 commits into
mainfrom
improved-mock-cloud-database
Dec 8, 2025
Merged

Improvements to the mock cloud database#312
mbrandonw merged 13 commits into
mainfrom
improved-mock-cloud-database

Conversation

@mbrandonw
Copy link
Copy Markdown
Member

There was a bit of behavior not yet captured by our mock cloud database that this PR plugs. If you save a record in the shared database that is not apart of a hierarchy that leads to a shared root record, iCloud throws a CKError.permissionFailure. We now replicate that behavior.

Comment thread Tests/SQLiteDataTests/CloudKitTests/MockCloudDatabaseTests.swift
stephencelis and others added 5 commits December 4, 2025 16:27
…322)

When the `id` column is defined as `INT NOT NULL PRIMARY KEY AUTOINCREMENT`
sqlite will throw an error:

> AUTOINCREMENT is only allowed on an INTEGER PRIMARY KEY
@mbrandonw mbrandonw merged commit 1670fbb into main Dec 8, 2025
5 checks passed
@mbrandonw mbrandonw deleted the improved-mock-cloud-database branch December 8, 2025 13:52
bok- pushed a commit to bok-/sqlite-data-with-traits that referenced this pull request Dec 15, 2025
* Private tables should always be saved in private db.

* snapshots

* Handle shared database more correctly.

* wip

* fix test

* add another test

* Update Tests/SQLiteDataTests/CloudKitTests/MockCloudDatabaseTests.swift

* Fix id column type in documentation example schema to prevent error (pointfreeco#322)

When the `id` column is defined as `INT NOT NULL PRIMARY KEY AUTOINCREMENT`
sqlite will throw an error:

> AUTOINCREMENT is only allowed on an INTEGER PRIMARY KEY

* fixes

* format

---------

Co-authored-by: Stephen Celis <stephen@stephencelis.com>
Co-authored-by: Robbie Clarken <last.gem5797@invariance.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants