vlcn-io / js

Components to build apps in JavaScript atop cr-sqlite

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Automigrate -- auto-apply on the server

tantaman opened this issue · comments

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.