Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename family in db #2670

Merged
merged 11 commits into from
Nov 14, 2023
Merged

Rename family in db #2670

merged 11 commits into from
Nov 14, 2023

Conversation

seallard
Copy link
Contributor

@seallard seallard commented Nov 8, 2023

Description

This PR renames the actual database table names, foreign keys and constraints to use case instead of family. Pretty high risk PR since the schema changes are not contained in a transaction.

Let me know if you think it should be split into smaller PR:s isolating each schema change.

Fixed

  • Rename family to case in database schemas

How to test

  • Apply upgrade and downgrade in stage
  • Ensure views work
(cg-env) ➜  cg git:(rename-family-in-db) ✗ alembic --config ../alembic-stage.ini upgrade head          
INFO  [alembic.runtime.migration] Context impl MySQLImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
INFO  [alembic.runtime.migration] Running upgrade 70e641d723b3 -> b105b426af99, Rename family in db
(cg-env) ➜  cg git:(rename-family-in-db) ✗ alembic --config ../alembic-stage.ini downgrade 70e641d723b3
INFO  [alembic.runtime.migration] Context impl MySQLImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
INFO  [alembic.runtime.migration] Running downgrade b105b426af99 -> 70e641d723b3, Rename family in db

This version is a

  • PATCH - when you make backwards compatible bug fixes or documentation/instructions

@seallard seallard marked this pull request as ready for review November 9, 2023 15:37
@seallard seallard requested a review from a team as a code owner November 9, 2023 15:37
Copy link
Contributor

@ChrOertlin ChrOertlin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Nice one question about the order in the alembic script. Looks solid otherwise

@clingen-sthlm clingen-sthlm temporarily deployed to stage November 10, 2023 09:02 Inactive
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@clingen-sthlm clingen-sthlm temporarily deployed to stage November 14, 2023 08:18 Inactive
@seallard seallard merged commit eb9153c into master Nov 14, 2023
@seallard seallard deleted the rename-family-in-db branch November 14, 2023 08:22
@seallard
Copy link
Contributor Author

Deployed to vms and Hasta, stage and prod.

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.

3 participants