Skip to content

Instantly share code, notes, and snippets.

@sangar82
Last active August 29, 2015 13:57
Show Gist options
  • Save sangar82/9598502 to your computer and use it in GitHub Desktop.
Save sangar82/9598502 to your computer and use it in GitHub Desktop.
Create sequence postgresql
DROP SEQUENCE chat_id_seq
CREATE SEQUENCE chat_id_seq;
DROP TABLE "chat";
CREATE TABLE "chat" (
"id" int4 NOT NULL DEFAULT nextval('chat_id_seq'),
"text" text,
"installation_object_id" varchar(256),
"created_at" date,
"updated_at" date,
"account_name" text,
"device_id" varchar(256)
)
WITHOUT OIDS;
ALTER TABLE "chat" OWNER TO "postgres";
ALTER TABLE "chat" ADD CONSTRAINT "chat_pkey" PRIMARY KEY ("id");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment