Closed
Description
Currently, the SupabaseConnector just uses insert, this will fail if there are constraints on the remote database.
A Powersync PUT is supposed to be insert or replace (SQLite doesnt have ON CONFLICT). For this we need to update the Table or Schema to be able to specific the unique constraints for each table. Then on uploadData we can do something like this but adding the data from the schema:
table.upsert(data) {
onConflict = "timestamp,user_id"
ignoreDuplicates = false
}
Is there a way already to do this that I'm missing?
Metadata
Metadata
Assignees
Labels
No labels