Skip to content

Commit

Permalink
Update event_sourcing.sql - added transaction_id column to events t…
Browse files Browse the repository at this point in the history
…able
  • Loading branch information
idugalic authored Jan 30, 2025
1 parent b294876 commit 37c1e5a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/resources/sql/event_sourcing.sql
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ CREATE TABLE IF NOT EXISTS events
"created_at" TIMESTAMP WITH TIME ZONE DEFAULT NOW() NOT NULL,
-- ordering sequence/offset for all events in all deciders. AUTOPOPULATES—DO NOT INSERT
"offset" BIGSERIAL PRIMARY KEY,
-- Postgres transaction id
"transaction_id" XID8 DEFAULT pg_current_xact_id() NOT NULL,
FOREIGN KEY ("decider", "event") REFERENCES deciders ("decider", "event")
);

Expand Down

0 comments on commit 37c1e5a

Please sign in to comment.