Closed roseeichelmann closed 1 month ago
Also -- i know how confusing and contradicting all the various id
and crash_id
and cris_crash_id
and atd_txdot_crashes_crash_id
's are. I think we are gonna talk about ways to name these columns so its less confusing in our next data model meeting. I floated to john the following idea - in the crashes
table, we have our internal id
pkey and a column called cris_crash_id
for the classic crash id we know and love. in other tables we have a column called crash_pk
that references the id
of the crashes table, and then a column cris_crash_id
that references the cris_crash_id
of crashes if necessary. just a thought :shrug:
Also, about the crash_pk
columns, i think that you are on to something. Seeing the crashPk
variable name in the code made it clearer to me that it was using the internal (non-CRIS) id. 💯
Associated issues
Closes https://github.com/cityofaustin/atd-data-tech/issues/18045
Testing
URL to test:
recommendations
table, find a recommendation. Copy theatd_txdot_crashes_crash_id
. In thecrashes
table use that to find theid
pkey for that crash, copy that. Now in the recommendations table edit the record and put theid
pkey for the crash in thecrash_id
column of the recommendation.Sorry these test instructions are weird, just wanted to get this PR aligned as much as possible with the new data model so that next we will just backfill the notes/recommendations with the correct
id
pkey in thecrash_id
column and then will be able to delete theatd_txdot_crashes_crash_id
we have here all together.Steps to test:
Ship list