database schemas and migrations - Greenstand/Greenstand-Overview GitHub Wiki
- Every API repository should target an isolated database schema supporting the services it provides.
- The nodejs tool db-migrate should be used to manage database migrations
- Migrations should be stored in a directory named 'migrations' in the root folder of the project
- Migrations should be managed using scopes in the following way
- The default scope should contain all data storage tables, views, indices, constraints, etc
- A scope named 'privileges' should be created to contain just GRANT and REVOKE commands guarding access to database tables
- Read more about scopes here: https://db-migrate.readthedocs.io/en/latest/Getting%20Started/commands/