Skip to content

Apply and record schema migrations with a runner - #151

Open
Cvicnaire wants to merge 7 commits into
devfrom
150-apply-and-record-schema-migrations-with-a-runner
Open

Cvicnaire wants to merge 7 commits into
devfrom
150-apply-and-record-schema-migrations-with-a-runner

Conversation

@Cvicnaire

Copy link
Copy Markdown
Collaborator

Closes #150. Part 1 of #149.

Adds scripts/migrate.sh and a schema_migrations table, ten migrations for past schema changes that had none, and an API boot check that refuses a database that is behind.

This reaches production. After this merges, the API will not start against an existing database until scripts/migrate.sh --container <mysql container> has been run there. See mysql/migrations/README.md, "Code and schema move together".

Test plan

  • shell-tests job green: runner, history upgrade (14 commits converge), expected schema
  • testthat-integration green, with test-schema-migrations.R not skipped
  • Local stack migrated and its schema compared (rollout step 2)
  • montilab migrated before the API is recreated (rollout step 4)

🤖 Generated with Claude Code

Cvicnaire and others added 6 commits September 30, 2026 13:57
…nd record them

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… is compared with

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…nd the test that every historical schema converges

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…t the API on a database that is behind

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…therwise lose

A row whose assay_type held a current member beside snps was rewritten to
genetic_variants alone, and chemical_name was dropped whether or not it
held anything. Both now stop and say so, as every other migration does.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant