$ cargo run
...
Builder (path="local.db", url="http://127.0.0.1:8080", auth_token="")... Done
Syncing... Replicated { frame_no: Some(0), frames_synced: 1 }
Connecting... Connection
Syncing... Replicated { frame_no: Some(0), frames_synced: 0 }
Create users table (if doesn't already exist)... Done
Insert users...
* Inserting user "Alice" "alice@example.com"
Syncing... Replicated { frame_no: Some(7), frames_synced: 0 }
* Inserting user "Bob" "bob@example.com"
Syncing... Replicated { frame_no: Some(10), frames_synced: 0 }
* Inserting user "Charlie" "charlie@example.com"
Syncing... Replicated { frame_no: Some(13), frames_synced: 0 }
Select all users...
```json
{"users": [
{"id": 1, "name": "Alice", "email": "alice@example.com"},
{"id": 2, "name": "Bob", "email": "bob@example.com"},
{"id": 3, "name": "Charlie", "email": "charlie@example.com"}
]}
```
Steps to reproduce:
Run the dev server
Create a rust client
Build and run it:
Check that it wrote to the remote db:
Check that it wrote to the local db:
Ctrl+C the dev servers started in steps 1 and 4.
Up arrow to restart the dev server and run
turso db -f remote.dbagain.Confirm data persisted in remote:
turso db shell http://127.0.0.1:8080 .dumpRerun the client:
cargo runFails and says the users table doesn't exist.
Check state of the local db:
DATA IS GONE!
It's in the remote... but how can the local db sync it???
rm local.db*and rerunningcargo rundoesn't work...Any ideas?