diff --git a/cmd/setup/40.go b/cmd/setup/40.go index 39191a9b8d..ff1188776f 100644 --- a/cmd/setup/40.go +++ b/cmd/setup/40.go @@ -48,5 +48,5 @@ func (mig *InitPushFunc) Execute(ctx context.Context, _ eventstore.Event) (err e } func (mig *InitPushFunc) String() string { - return "40_init_push_func_v3" + return "40_init_push_func_v4" } diff --git a/cmd/setup/40/cockroach/40_init_push_func.sql b/cmd/setup/40/cockroach/40_init_push_func.sql index 802dc759c9..9a08b5d355 100644 --- a/cmd/setup/40/cockroach/40_init_push_func.sql +++ b/cmd/setup/40/cockroach/40_init_push_func.sql @@ -97,7 +97,7 @@ BEGIN , ("c").payload , ("c").creator , COALESCE(current_owner, ("c").owner) -- AS owner - , EXTRACT(EPOCH FROM NOW()) -- AS position + , cluster_logical_timestamp() -- AS position , ordinality::INT -- AS in_tx_order FROM UNNEST(commands) WITH ORDINALITY AS c