-
Notifications
You must be signed in to change notification settings - Fork 320
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
populate default values in lineage_events.created_at column
Signed-off-by: Prachi Mishra <[email protected]>
- Loading branch information
1 parent
69ef361
commit 4897ff1
Showing
2 changed files
with
9 additions
and
4 deletions.
There are no files selected for viewing
4 changes: 0 additions & 4 deletions
4
api/src/main/resources/marquez/db/migration/V52__lineage_events_created_at_indexed.sql
This file was deleted.
Oops, something went wrong.
9 changes: 9 additions & 0 deletions
9
api/src/main/resources/marquez/db/migration/V54__lineage_events_created_at_indexed.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,9 @@ | ||
ALTER TABLE lineage_events ADD created_at TIMESTAMP; | ||
|
||
create index lineage_events_created_at_index on lineage_events (created_at desc); | ||
|
||
UPDATE lineage_events | ||
SET created_at = (event_time AT TIME ZONE 'UTC')::timestamp; | ||
|
||
ALTER TABLE lineage_events ALTER COLUMN created_at SET DEFAULT (now() AT TIME ZONE 'UTC'); | ||
|