-
Notifications
You must be signed in to change notification settings - Fork 2
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
refactor: Drop redundant columns from teams
table
#3636
Conversation
🤖 Hasura Change Summary compared a subset of table metadata including permissions: Updated Tables (1)
Untracked Tables (1)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two adjustments please!
- Can you please squash migrations into a single
up.sql
&down.sql
?- You can drop many columns at once on the same table like
ALTER TABLE table DROP COLUMN col1, DROP COLUMN col2;
- You can drop many columns at once on the same table like
- Similar to comment on tidy: drop
submission_email
column fromteams
table and adjust seed-database/write script #3635, the order of commands in thedown
files are not currently valid - eg need to add a column before it can be commented on, altered etc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also take a look at the migration files at planx-new/hasura.planx.uk/migrations/1692010483148_add_team_boundary
- there's an orphaned boundary_bbox()
function that should also be tidied up here now we're handling this on the frontend.
One thing to consider here - just updating db columns won't update the types directly. We'll also need a corresponding change in planx-core
which removes these properties from the Team
type (if they're present), and then import this type into the wider codebase to pick up any cascading changes. There is a chance that all tests are passing because types and mocks are unaware of the changes made in this PR.
- slug | ||
- submission_email | ||
- updated_at | ||
computed_fields: | ||
- boundary_bbox |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the computed field boundary_bbox
is also redundant now right?
- table: | ||
name: teams_summary |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure where my previous comment went but this is still being incorrectly removed here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry! That was in the submission email PR, but this is the exact same issue. Removing columns and not repointing the View creation. My bad for missing this again
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DafyddLlyr for this one, if we merge my submission_email PR (#3640), I have already changed the references in the View creation, so this won't be an issue?
Could be a nice candidate to re-do this on a clean branch once #3640 is merged and reopen a new PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise, I would be repeating code across the migrations
What does this PR do?
I have dropped all columns in the
teams
table that have been moved to theteam_settings
table. I have updated the necessary scripts in seed-database/write.Ran GH regression tests and all passed