From 5bb3a4d7ff785c05fb82bb7256e23b9beedc61a2 Mon Sep 17 00:00:00 2001 From: Disassembler0 Date: Mon, 2 Nov 2015 19:24:43 +0100 Subject: [PATCH] Fix postgres sequence name to return proper contact_id --- SQL/postgres.initial.sql | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/SQL/postgres.initial.sql b/SQL/postgres.initial.sql index 4e9e8ea..6af7832 100644 --- a/SQL/postgres.initial.sql +++ b/SQL/postgres.initial.sql @@ -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 @@ -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,