Skip to content

Instantly share code, notes, and snippets.

@ledongthuc
Last active January 8, 2016 08:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ledongthuc/438114239e01b6c0d8ef to your computer and use it in GitHub Desktop.
Save ledongthuc/438114239e01b6c0d8ef to your computer and use it in GitHub Desktop.
CREATE TABLE users (
id integer NOT NULL,
name character varying(1000) DEFAULT ''::character varying NOT NULL,
age integer DEFAULT 0 NOT NULL,
password character varying(1000) DEFAULT ''::character varying NOT NULL,
email character varying(1000) DEFAULT ''::character varying NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL
);
CREATE SEQUENCE users_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE users_id_seq OWNED BY users.id;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment