diff --git a/db/init.sql b/db/init.sql index 60ba331..604081e 100644 --- a/db/init.sql +++ b/db/init.sql @@ -8,7 +8,6 @@ CREATE TABLE events event_version text NOT NULL, payload json NOT NULL, metadata json NOT NULL, - timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, CONSTRAINT events_pk PRIMARY KEY (aggregate_type, aggregate_id, sequence) ); @@ -20,7 +19,6 @@ CREATE TABLE snapshots last_sequence bigint CHECK (last_sequence >= 0) NOT NULL, current_snapshot bigint CHECK (current_snapshot >= 0) NOT NULL, payload json NOT NULL, - timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, CONSTRAINT snapshots_pk PRIMARY KEY (aggregate_type, aggregate_id) ); @@ -34,7 +32,7 @@ CREATE TABLE test_view CONSTRAINT test_view_pk PRIMARY KEY (view_id) ); -INSERT INTO events (aggregate_type, aggregate_id, sequence, event_type, event_version, payload, metadata, timestamp) +INSERT INTO events (aggregate_type, aggregate_id, sequence, event_type, event_version, payload, metadata) VALUES ('Customer', 'previous_event_in_need_of_upcast', 1, 'NameAdded', '1.0', '{ "NameAdded": {} -}', '{}', DEFAULT); +}', '{}');