GH-81 - Change Postgres event publication schema to follow best practices.
* No uppercase table and column names [0] * Don't use varchar(n) by default [1] * Don't use timestamp(…) or timestamptz(…) [0] https://wiki.postgresql.org/wiki/Don%27t_Do_This#Don't_use_upper_case_table_or_column_names [1] https://wiki.postgresql.org/wiki/Don%27t_Do_This#Don't_use_varchar(n)_by_default [2] https://wiki.postgresql.org/wiki/Don%27t_Do_This#Don't_use_timestamp(0)_or_timestamptz(0)
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
CREATE TABLE IF NOT EXISTS EVENT_PUBLICATION
|
||||
CREATE TABLE IF NOT EXISTS event_publication
|
||||
(
|
||||
ID UUID NOT NULL,
|
||||
LISTENER_ID VARCHAR(512) NOT NULL,
|
||||
EVENT_TYPE VARCHAR(512) NOT NULL,
|
||||
SERIALIZED_EVENT VARCHAR(4000) NOT NULL,
|
||||
PUBLICATION_DATE TIMESTAMP(9) WITH TIME ZONE NOT NULL,
|
||||
COMPLETION_DATE TIMESTAMP(9) WITH TIME ZONE,
|
||||
PRIMARY KEY (ID)
|
||||
id UUID NOT NULL,
|
||||
listener_id TEXT NOT NULL,
|
||||
event_type TEXT NOT NULL,
|
||||
serialized_event TEXT NOT NULL,
|
||||
publication_date TIMESTAMP WITH TIME ZONE NOT NULL,
|
||||
completion_date TIMESTAMP WITH TIME ZONE,
|
||||
PRIMARY KEY (id)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user