Skip to content

Instantly share code, notes, and snippets.

@alastaircoote
Last active September 15, 2016 16:11
Show Gist options
  • Save alastaircoote/fd7e461e862435eab6711ade9ee599cd to your computer and use it in GitHub Desktop.
Save alastaircoote/fd7e461e862435eab6711ade9ee599cd to your computer and use it in GitHub Desktop.
Schema for Postgres logging table
CREATE TABLE "log_entries" (
"id" serial PRIMARY KEY,
"name" varchar NOT NULL,
"pid" int8 NOT NULL,
"hostname" varchar NOT NULL,
"time" timestamp NOT NULL,
"level" integer NOT NULL,
"msg" varchar NOT NULL,
"v" integer NOT NULL,
"req_id" varchar,
"data" jsonb
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment