Replies: 1 comment 2 replies
-
Hey @rsarto, thank you for pointing this out. I'll have a fix PR for this shortly. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
There is a small issue on demos/supabase-todolist-optional-sync:
When offline, when inserting a new "todo", created_by is set to '00000000-0000-0000-0000-000000000000' on powersync.dart -> getUserId
But when switching to online on schema.dart -> switchToSyncedSchema there is an "INSERT INTO $todosTable SELECT * ".. which is sending '00000000-0000-0000-0000-000000000000' to supabase
which is a constraint validation on todos table
constraint todos_created_by_fkey foreign key (created_by) references auth.users (id) on delete set null,
can be fixed by:
await tx.execute( 'INSERT INTO $todosTable(id, list_id, created_at, completed_at, description, completed, created_by) SELECT id, list_id, created_at, completed_at, description, completed, ? FROM inactive_local_$todosTable', [userId]);
Beta Was this translation helpful? Give feedback.
All reactions