Skip to content

Commit 53b5cf7

Browse files
adding NULLS LAST in desc index on lineage_events.created_at
Signed-off-by: Prachi Mishra <prachi.mishra@astronomer.io>
1 parent f053ecf commit 53b5cf7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
-- new column will be created with 'null' filled for existing rows
22
ALTER TABLE lineage_events ADD created_at TIMESTAMP WITH TIME ZONE;
33

4-
create index lineage_events_created_at_index on lineage_events (created_at desc);
4+
create index lineage_events_created_at_index on lineage_events (created_at desc NULLS LAST);
55

66
-- The new default set to UTC now() will only apply in subsequent INSERT or UPDATE commands; it does not cause rows already in the table to change.
77
ALTER TABLE lineage_events ALTER COLUMN created_at SET DEFAULT (now() AT TIME ZONE 'UTC')::timestamptz;

0 commit comments

Comments
 (0)