Skip to content

Instantly share code, notes, and snippets.

@sachnk
Last active September 25, 2020 18:02
Show Gist options
  • Save sachnk/9375811e37ed8051a7f5adada5e4e6e9 to your computer and use it in GitHub Desktop.
Save sachnk/9375811e37ed8051a7f5adada5e4e6e9 to your computer and use it in GitHub Desktop.
events.sql
-- postgres events table
CREATE TABLE myservice.events (
id bigserial NOT NULL,
created_at timestamptz NOT NULL DEFAULT now(),
schema_id int4 NOT NULL,
partition int4 DEFAULT 0,
data bytea NOT NULL,
CONSTRAINT events_pk PRIMARY KEY (id)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment