fix(eventstore): new column to test clock_timestamp()

This commit is contained in:
adlerhurst
2023-05-11 10:04:35 +02:00
parent 35a0977663
commit c6d29fc201
8 changed files with 34 additions and 3 deletions

View File

@@ -0,0 +1,19 @@
TRUNCATE wrong_events;
INSERT INTO wrong_events (
SELECT * FROM (
SELECT
instance_id
, event_sequence
, creation_date AS current_cd
, lead(creation_date) OVER (
PARTITION BY instance_id
ORDER BY event_sequence DESC
) AS next_cd
FROM
eventstore.events
) sub WHERE
current_cd < next_cd
ORDER BY
event_sequence DESC
);