Sync does not handle existing database correctly
Opened this issue · 4 comments
Steps to reproduce:
- Create a local
hello.db - Import the database with https://turso.tech/blog/migrating-and-importing-sqlite-to-turso-just-got-easier
- Sync the database
Expected results:
- Sync fails to overwrite an existing database with no metadata
Current results:
- Sync succeeds.
Should the expected/current result points be swapped?
I've noticed that after import, sync does not work at all.
Yes looks like any sync after importing a database is not working. Repro is the same, writes to either local or remote will fail to push/pull on first sync.
Yes, This is a massive problem, this will surely cause production data to be coruptted.
I lose some crusial lab data because i thought the sync is not throwing error so i have a backup, turns out it's not.
If the exsing DB state doesn't match the cloud state, at least it should throw somethign, not pass silently. (altest in rust libsql client)
In case of remote replication make sure to delete .* (wal files etc).