-
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
Merged
chiaberry
merged 14 commits into
18533-school-zone-beacons
from
19105-school-beacon-triggers
Sep 26, 2024
Merged
Changes from 3 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
e151cf3
add triggers for school beacons table
chiaberry f3ba40d
add activity log REST api data trigger
chiaberry 09dd0d1
fix bug where i was checking the wrong id
chiaberry ffe6848
Merge branch '18533-school-zone-beacons' into 19105-school-beacon-tri…
chiaberry b8782b0
add beacons to unified features view
chiaberry 25a5762
use correct project geography view
chiaberry 28a251b
🤖 Export view for 19111-feature-db-views
9eb0501
add school zone beacons to the component arcgis online view
chiaberry 48f6f68
Merge branch '19111-feature-db-views' of https://github.com/cityofaus…
chiaberry 6fd3417
🤖 Export view for 19111-feature-db-views
a371339
we dont need the beacon ides
chiaberry ae72e29
Merge branch '19111-feature-db-views' of https://github.com/cityofaus…
chiaberry c682b44
🤖 Export view for 19111-feature-db-views
d8aaf6c
Merge pull request #1431 from cityofaustin/19111-feature-db-views
chiaberry File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
moped-database/migrations/1726852807615_school_beacon_triggers/down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
DROP TRIGGER IF EXISTS update_feature_school_beacons_council_district ON feature_school_beacons; | ||
|
||
DROP TRIGGER IF EXISTS feature_school_beacons_parent_audit_log_trigger ON feature_school_beacons; | ||
|
||
DROP TRIGGER IF EXISTS set_feature_school_beacons_updated_at ON feature_school_beacons; |
20 changes: 20 additions & 0 deletions
20
moped-database/migrations/1726852807615_school_beacon_triggers/up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
CREATE TRIGGER update_feature_school_beacons_council_district BEFORE INSERT OR UPDATE ON | ||
feature_school_beacons FOR EACH ROW EXECUTE FUNCTION update_council_district(); | ||
COMMENT ON TRIGGER update_feature_school_beacons_council_district ON feature_school_beacons IS | ||
'Trigger to insert record in feature_council_district table connecting feature_id with corresponding council district id'; | ||
|
||
|
||
-- Trigger for feature_school_beacons table | ||
CREATE TRIGGER feature_school_beacons_parent_audit_log_trigger | ||
AFTER INSERT OR UPDATE ON feature_school_beacons | ||
FOR EACH ROW | ||
EXECUTE FUNCTION update_audit_fields_with_dynamic_parent_table_name("moped_proj_components", "project_component_id", "component_id"); | ||
COMMENT ON TRIGGER feature_school_beacons_parent_audit_log_trigger ON feature_school_beacons IS 'Trigger to update parent project and component audit fields'; | ||
|
||
|
||
CREATE TRIGGER set_feature_school_beacons_updated_at | ||
BEFORE INSERT OR UPDATE ON feature_school_beacons | ||
FOR EACH ROW | ||
EXECUTE FUNCTION public.set_updated_at(); | ||
|
||
COMMENT ON TRIGGER set_feature_school_beacons_updated_at ON public.feature_school_beacons IS 'Trigger to set updated_at timestamp for each insert or update on feature_school_beacons'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.