0x-mesh icon indicating copy to clipboard operation
0x-mesh copied to clipboard

Implement database migrations

Open albrow opened this issue 5 years ago • 0 comments

One remaining task mentioned in https://github.com/0xProject/0x-mesh/pull/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.

albrow avatar Aug 14 '20 21:08 albrow