You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need to remove the Automigrate line in each init file. Automigrate is the thing we are trying to remove since it does not support DB migrations. (15 m)
Migrations get run with make dev (1h)
Migrations get run with docker compose commands (3h)
Update the main README.md with a new section on how migrations work (link to Migrations.md)
Move GitHub init tables into its own migrations folder
Do this for all plugins (Move all table creation for plugin tables to the respective plugin/migration folder)
Loop through all plugin folders. Run migrations from all plugin folders
Things left to do
Get the tests passing in CI (make sure the db is updated and migrated in ci. Run the model tests in CI as a new workflow stage in GitHub actions)
Try to hook up domain layer migrations with custom db and remove the schema migrations table create in the makefile. Maybe create the schema migrations table with db.automigrate?
As a user, I want to run the application from scratch and not have to run anything but docker-compose up. I should see the DB created and all tables present with no data.
As a user that already has collected data into my database locally, and has run 2 out of 3 migration scripts, I want to run docker-compose up and see the 3rd migration be run. I also do not want to lose any data.
Developer Workflow
Notes from @kevin-kline:
Please read individual issues for more details on QA process and conclusion. This will provide context for changes I pushed to the branch.
As a plugin developer, I need to see enough docs on how to add migrations to my plugin
As a plugin developer when I create migrations in my plugin, I want those migrations run with docker-compose
As a developer that wants to run model tests, each time the tests are run, there is a fresh db with no data in it to prevent unwanted test case failures
The text was updated successfully, but these errors were encountered:
Try to hook up domain layer migrations with custom db and remove the schema migrations table create in the makefile. Maybe create the schema migrations table with db.automigrate?
Do not hard code the Test for the test env. Can we just set the DB_NAME. No IF(env.TEST == true)
if config.V.Get("TEST") == "true" {
connectionString = "merico:merico@tcp(localhost:3306)/lake_test"
}
Instead
In the makefile:
Create a new .env.test and ask configure to load this file instead
HANDLE ERRORS IN THE migrations files .go (db/init.go)
Previous ticket
https://github.com/merico-dev/lake/issues/806
Related tickets
#994
What works now
make models-test
models/test
has tests for many modelsmodels/factory
has methods to generate modelsmake dev
(1h)docker compose
commands (3h)Things left to do
DB_URL=xxx make test
make models-test
working againQA workflow: @kevin-kline
User Workflow
Notes from @kevin-kline :
I cannot test the full User workflow because there is an issue building Docker images with my M1 machine: https://docs.docker.com/desktop/mac/apple-silicon/#known-issues
docker-compose up
. I should see the DB created and all tables present with no data.Developer Workflow
Notes from @kevin-kline:
Please read individual issues for more details on QA process and conclusion. This will provide context for changes I pushed to the branch.
The text was updated successfully, but these errors were encountered: