Created
February 16, 2015 20:35
-
-
Save soltrinox/f38146c20c5523533bb6 to your computer and use it in GitHub Desktop.
CREATE SEQUENCE POSTGRES FOR EXISTING TABLE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE SEQUENCE "TYPES_typeid_seq" | |
START WITH 1 | |
INCREMENT BY 1 | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 1; | |
ALTER TABLE public."TYPES_typeid_seq" OWNER TO postgres; | |
ALTER SEQUENCE "TYPES_typeid_seq" OWNED BY "TYPES".typeid; | |
ALTER TABLE ONLY "TYPES" ALTER COLUMN typeid SET DEFAULT nextval('"TYPES_typeid_seq"'::regclass); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment