-
Notifications
You must be signed in to change notification settings - Fork 3
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 audit and council district triggers to feature_school_beacons table #1427
Add audit and council district triggers to feature_school_beacons table #1427
Conversation
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 the migration up and down, and I was able to see the audit fields populate and update as expected in the feature, project component, and project levels. 🚢 🚀😎
@@ -178,7 +178,7 @@ export const getFeatureChangesFromComponentForm = ( | |||
} else if (newSchoolBeaconKnackId) { | |||
if ( | |||
previousSchoolBeacon && | |||
newSchoolBeaconKnackId !== previousSchoolBeacon.id |
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.
good catch! 🙏 this is making me question why we didn't go with Knack id for signals too, but I think that signal_id
has shown to be reliable for them.
…tin/atd-moped into 19111-feature-db-views
…tin/atd-moped into 19111-feature-db-views
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.
yep—it works great!
in order to test the updated_at
on the beacon feature, i had to edit the component and pick a different beacon. this caused the original beacon feature to become deleted, thus triggering the update trigger. i don't think there's any other way to edit a beacon feature besides that 🔍
i love seeing these trigger functions get attached to a new table—nice!! 🚢 🚢 🚢 🚢
Add feature_school_beacons to component feature database views
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 was able to get the ./hasura-cluster
replicate command working with Mike's help getting access to the Read Replica. Still having issues connecting my local Moped DB to TablePlus but I was able to execute the SQL commands and test the functionality as described using the Hasura Console Raw Table page in the browser. 👍
Associated issues
cityofaustin/atd-data-tech#19105
Testing
local because of db changes, use a copy of production
Steps to test:
set_updated_at()
, open the beacon you added in step one, and update the description. Look at the school beacons table, and you will see your beacon has an updated_at timestamp. Since there are so few beacons, I find it enough to just check the table:http://localhost:9695/console/events/data/activity_log_feature_school_beacons/logs
The entries on the activity tab are sourced from the moped proj components table.
Ship list