Mailspring/scripts
Karim Hamidou e55c36a79a [cloud-api] Add support for database migrations
Summary:
This diff adds support for database migration to our cloud API. It's partially inspired by Halla's local-sync migration diff (D3809). You can run a migration by calling "node-babel scripts/migrate-db up|down" or by calling "npm script upgrade-db|downgrade-db".

Note that for simplicity reasons we assume that we're only writing migrations for our MySQL database – people developing locally may have to blow up there dbs whenever there's a schema change, though in practice `ALTER TABLE ADD COLUMN`statements work the same on both dbs.

Test Plan: Tested locally. Will run the metadata migration on staging.

Reviewers: evan, spang, halla

Reviewed By: halla

Differential Revision: https://phab.nylas.com/D3840
2017-02-06 13:38:59 -08:00
..
build-n1-cloud.js [cloud-*] Fix n1-cloud build 2017-01-28 02:00:16 -08:00
migrate-db.es6 [cloud-api] Add support for database migrations 2017-02-06 13:38:59 -08:00
run-redis.sh run-redis.sh must be run under bash 2017-02-06 13:13:22 -08:00