vlcn-io / js

Components to build apps in JavaScript atop cr-sqlite
MIT License
51 stars 6 forks source link

Automigrate -- auto-apply on the server #18

Open tantaman opened 10 months ago

tantaman commented 10 months ago

After updating a schema file, we require users to restart the server. Oof.

We should:

  1. watch schema files
  2. on schema file change, see if any open connections exist
  3. for each open connection, see if the db uses the changed schema
  4. for each db from (3), tear down the connection

The client will re-establish the connection and cause a migration to kick off.