-
Notifications
You must be signed in to change notification settings - Fork 4
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
removes micromobility device flag #1284
Conversation
@tillyw yeah!!! a migration! 🚀 I wrote up some steps for what happens on merge here that I plan to put somewhere. I'm thinking that it could go in the |
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.
One small change needed, and this is good to go! Thanks for diving right into a migration. It was really helpful to have this to test out the steps in #1285. 🙏
@@ -0,0 +1 @@ | |||
alter table "public"."atd_txdot_crashes" add "column micromobility_device_flag" character varying(1) DEFAULT 'N'::character varying NOT NULL, |
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 tested running this down migration and ran into an error with some syntax in here. column
from add column
made its way into the column name, and there is a comma at the end of the statement instead of a semicolon. I tested it with those changes, and it works perfectly!
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.
thanks for catching those typos! i fixed them and confirmed the migration worked
atd-vzd/README.md
Outdated
@@ -35,7 +35,7 @@ We use a standard metabase container for business intelligence analytics as well | |||
|
|||
2. Once you changes have been made, copy the SQL statement that modified the table to our [migrations folder](/migrations) for version control. Example: | |||
```sql | |||
ALTER TABLE "public"."atd_txdot_crashes" ADD COLUMN "micromobility_device_flag" varchar(1) NOT NULL DEFAULT 'N'; |
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.
Wow - what are the odds that this exact column was used in this doc!
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 know!! thanks for updating the doc!
…ub.com/cityofaustin/atd-vz-data into 12012_remove_micromobility_device_flag
the readme is the perfect place! thank you for writing up those steps 🙏 |
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.
Works great! Tested the up and down migrations locally, and I see that the micromobility device flag is gone from the crash page. Mode normalization fully complete. ✅ 🎉🚢
Associated issues
fixes cityofaustin/atd-data-tech#12012
this is the last step in dropping the
micromobility_device_flag
column from vzd and representing it as a mode like all others. this was so straightforward thanks to @mddilley's amazing work setting up hasura migrations on vzd! this should also be really simple to test and integrate into the next release. the automated migrations are already paying off!Testing
URL to test:
local
Steps to test:
./vision-zero hasura-console
atd_txdot_crashes
table and note that themicromobility_device_flag
column no longer appearsShip list