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
add on_map and funded columns to Pd::Workshop #14660
Conversation
@aoby, @ashercodeorg thoughts on this plan of attack? |
class AddPdWorkshopOnMapAndFunded < ActiveRecord::Migration[5.0] | ||
def change | ||
add_column :pd_workshops, :on_map, :boolean | ||
add_column :pd_workshops, :funded, :boolean |
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.
should these be required (null: false
)?
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.
They will be updated to be so in step 2, as only at that point will we have data for all of em
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.
It isn't obvious (at least to me) what these columns mean, even after reading the Trello card and your (otherwise nice) PR summary. Mind adding a brief explanation of these fields in this file? Thanks!
Plan of attack SGTM |
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.
LGTM (as does the plan of attack). Depending on how many rows are touched, I'd recommend doing the data changes in a migration (if not many) or a one-off script (if lots).
class AddPdWorkshopOnMapAndFunded < ActiveRecord::Migration[5.0] | ||
def change | ||
add_column :pd_workshops, :on_map, :boolean | ||
add_column :pd_workshops, :funded, :boolean |
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.
It isn't obvious (at least to me) what these columns mean, even after reading the Trello card and your (otherwise nice) PR summary. Mind adding a brief explanation of these fields in this file? Thanks!
RE: column explanations, you can now add column comments, which are stored in the DB. |
There are ~1500 rows in the workshops table, which to my mind falls into the "not many" category. Edit: actually, there are ~1800 rows, but that still seems like few enough. |
0024ce8
to
3148b84
Compare
As the first step in the eventual restructuring of the
workshop_type
tuple to a pair of bools, captured in this trello card.Based on this mapping:
Next steps (each in their own PR) will be:
controllermodel to populate these fields for new workshops based on the value ofworkshop_type
, and release a data migration to back-populate already-created workshopsworkshop_type
dropdown with a pair of radio buttons