Skip to content

Instantly share code, notes, and snippets.

@kagemusha
Created June 19, 2018 17:08
Show Gist options
  • Save kagemusha/b97db366ccec0fe11995c77755319295 to your computer and use it in GitHub Desktop.
Save kagemusha/b97db366ccec0fe11995c77755319295 to your computer and use it in GitHub Desktop.
Create postgres table with auto-incrementing primary key
// id SERIAL primary key
CREATE TABLE public.user_events
(
id serial primary key,
campaign_id bigint NOT NULL,
user_uuid bigint NOT NULL,
reward integer NOT NULL
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment