-
Notifications
You must be signed in to change notification settings - Fork 0
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 temporal tables and rework insert statements #391
Merged
Merged
Conversation
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
0abe397
to
7a04c0f
Compare
ef454d9
to
44e46e1
Compare
d766465
to
68c32c4
Compare
2f9850f
to
6acd9e7
Compare
6acd9e7
to
6432939
Compare
caa90c9
to
daacabf
Compare
4bf8212
to
c63c4f7
Compare
b932706
to
e2bb445
Compare
4738e62
to
d94bd08
Compare
jimmypalelil
approved these changes
Mar 6, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
#308
upsert_timestamp_columns
util function to streamline adding metadata columns iecreated_at, created_by, updated_at, updated_by
columns to a tablesetup_temporal_table
util function which adds a_history
version of the table and updated_if_changed trigger function on a table_code
tables only haveupdate_timestamp
in the FTA database, noupdated_userid
or created metadata so I've kept it the same. I'm split on if adding history tracking to these tables is useful, I've added history tables to them for now.Tested with
flyway clean
disabled for the RST migrations. No new records are added on a redeploy to a steady database, and if we make some changes to the FTA data then that was updated, with history being tracked in the history table.