Skip to content

Commit

Permalink
Fix postgres sequence name to return proper contact_id
Browse files Browse the repository at this point in the history
  • Loading branch information
Disassembler0 committed Nov 2, 2015
1 parent c05786b commit 5bb3a4d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions SQL/postgres.initial.sql
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
--
-- Sequence "collected_contact_ids"
-- Name: collected_contact_ids; Type: SEQUENCE; Schema: public; Owner: postgres
-- Sequence "collected_contacts_seq"
-- Name: collected_contacts_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE collected_contact_ids
CREATE SEQUENCE collected_contacts_seq
START WITH 1
INCREMENT BY 1
NO MAXVALUE
Expand All @@ -16,7 +16,7 @@ CREATE SEQUENCE collected_contact_ids
--

CREATE TABLE collected_contacts (
contact_id integer DEFAULT nextval('collected_contact_ids'::text) PRIMARY KEY,
contact_id integer DEFAULT nextval('collected_contacts_seq'::text) PRIMARY KEY,
user_id integer NOT NULL
REFERENCES users (user_id) ON DELETE CASCADE ON UPDATE CASCADE,
changed timestamp with time zone DEFAULT now() NOT NULL,
Expand Down

0 comments on commit 5bb3a4d

Please sign in to comment.