Skip to content

Commit 37c1e5a

Browse files
authored
Update event_sourcing.sql - added transaction_id column to events table
1 parent b294876 commit 37c1e5a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/resources/sql/event_sourcing.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ CREATE TABLE IF NOT EXISTS events
3636
"created_at" TIMESTAMP WITH TIME ZONE DEFAULT NOW() NOT NULL,
3737
-- ordering sequence/offset for all events in all deciders. AUTOPOPULATES—DO NOT INSERT
3838
"offset" BIGSERIAL PRIMARY KEY,
39+
-- Postgres transaction id
40+
"transaction_id" XID8 DEFAULT pg_current_xact_id() NOT NULL,
3941
FOREIGN KEY ("decider", "event") REFERENCES deciders ("decider", "event")
4042
);
4143

0 commit comments

Comments
 (0)