minor changes

This commit is contained in:
2021-08-20 01:43:45 -05:00
parent e49f0c90ce
commit 9723f350f9
2 changed files with 9 additions and 9 deletions

View File

@@ -4,11 +4,11 @@ USE demo;
-- a single table is used for all events in the cqrs system -- a single table is used for all events in the cqrs system
CREATE TABLE events CREATE TABLE events
( (
aggregate_type VARCHAR(256) NOT NULL, aggregate_type VARCHAR(256) NOT NULL,
aggregate_id VARCHAR(256) NOT NULL, aggregate_id VARCHAR(256) NOT NULL,
sequence bigint CHECK (sequence >= 0) , sequence bigint CHECK (sequence >= 0) ,
payload TEXT , payload TEXT ,
metadata TEXT , metadata TEXT ,
timestamp timestamp DEFAULT (CURRENT_TIMESTAMP), timestamp timestamp DEFAULT (CURRENT_TIMESTAMP),
PRIMARY KEY (aggregate_type, aggregate_id, sequence) PRIMARY KEY (aggregate_type, aggregate_id, sequence)
); );

View File

@@ -4,11 +4,11 @@ USE demo;
-- a single table is used for all events in the cqrs system -- a single table is used for all events in the cqrs system
CREATE TABLE events CREATE TABLE events
( (
aggregate_type VARCHAR(256) NOT NULL, aggregate_type VARCHAR(256) NOT NULL,
aggregate_id VARCHAR(256) NOT NULL, aggregate_id VARCHAR(256) NOT NULL,
sequence bigint CHECK (sequence >= 0) NOT NULL, sequence bigint CHECK (sequence >= 0) NOT NULL,
payload TEXT NOT NULL, payload TEXT NOT NULL,
metadata TEXT NOT NULL, metadata TEXT NOT NULL,
timestamp timestamp DEFAULT (CURRENT_TIMESTAMP), timestamp timestamp DEFAULT (CURRENT_TIMESTAMP),
PRIMARY KEY (aggregate_type, aggregate_id, sequence) PRIMARY KEY (aggregate_type, aggregate_id, sequence)
); );