Currently initial database creation and the running of migrations and seeds are all manual processes.
This PR automates database creation and the running of migrations and seeds.
Questions
[x] ~Should I update the db service "healthcheck" to check if the "ELCC" database is ready, rather than just checking if the sql server is ready?~ Yes.
Implementation
Create a database initialization pipeline that waits for the database to spin up, then runs the SQL to create the database.
Run migrations on api service start.
Run seeds on api service start.
Screenshots
Migrations and tables
Seeds in "centers" table
Testing Instructions
Run dev down -v to drop all services and databases for this project.
Run dev up --build to create the new database and run migrations and seeds.
Open your database manager and check that the appropriate tables exist and all migration have run.
Relates to https://github.com/icefoganalytics/elcc-data-management/issues/3
Context
Currently initial database creation and the running of migrations and seeds are all manual processes. This PR automates database creation and the running of migrations and seeds.
Questions
Implementation
Screenshots
Migrations and tables
Seeds in "centers" table
Testing Instructions
dev down -v
to drop all services and databases for this project.dev up --build
to create the new database and run migrations and seeds.