Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

Implement database migrations #908

Open
albrow opened this issue Aug 14, 2020 · 0 comments
Open

Implement database migrations #908

albrow opened this issue Aug 14, 2020 · 0 comments
Labels
db Issues related to the db package tech debt A code quality issue is not urgent but could cause problems down the line if not addressed

Comments

@albrow
Copy link
Contributor

albrow commented Aug 14, 2020

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.

@albrow albrow added db Issues related to the db package tech debt A code quality issue is not urgent but could cause problems down the line if not addressed labels Aug 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
db Issues related to the db package tech debt A code quality issue is not urgent but could cause problems down the line if not addressed
Projects
None yet
Development

No branches or pull requests

1 participant