mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-25 12:04:21 +01:00
Add support for schema changes and granular updates in the `DatabaseTape` and turso-sync-engine Now, schema changes made locally will be replicated to the remote too. Also, `UPDATE`s made locally will touch only changed columns (before we did `DELETE` + `INSERT` which can overwrite non-conflicting changes from another device to the same row). Note, that schema changes replication for now can be pretty dangerous, as we can't extract proper schema at some moment in time from turso_cdc and always use latest schema columns. This means that it's better to avoid `ALTER TABLE ...` to be executed locally, but basic DDL like `CREATE TABLE / CREATE INDEX / DROP TABLE / DROP INDEX` will work fine (as columns only appear/disappear for schema in this case). Closes #2540