Description
One remaining task mentioned in #793 that we have not implemented yet is database migrations. In short, database migrations are a way to change or modify the schema of our database so that it is compatible with corresponding changes in the rest of the code, ideally without losing data.
For SQL, we should look at https://github.com/golang-migrate/migrate, which is a tool that works with a variety of different database backends (most important for us is SQLite and Postgres). We should probably also use https://github.com/jteeuwen/go-bindata
to embed migration source files so that we can continue to ship Mesh as a single binary file.
Dexie.js has some rudimentary support for migrations built-in. Take a look at the onversionchange
and version methods.