From 55ed7db3c42b8576721e3c01fd6cf9e5b990cf8f Mon Sep 17 00:00:00 2001 From: leosw Date: Wed, 30 Jan 2019 19:02:09 +0100 Subject: [PATCH] Add sequences on new content tables ids --- _ressources/sql_skeleton.sql | 50 ++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/_ressources/sql_skeleton.sql b/_ressources/sql_skeleton.sql index 916e9f8..a8e0819 100644 --- a/_ressources/sql_skeleton.sql +++ b/_ressources/sql_skeleton.sql @@ -181,20 +181,6 @@ CREATE TABLE public.content_contributors ( ALTER TABLE public.content_contributors OWNER TO kabano; --- --- Name: content_locales; Type: TABLE; Schema: public; Owner: kabano --- - -CREATE TABLE public.content_locales ( - id integer NOT NULL, - content integer NOT NULL, - locale character varying(32) NOT NULL, - author integer NOT NULL -); - - -ALTER TABLE public.content_locales OWNER TO kabano; - -- -- Name: content_locales_sequence; Type: SEQUENCE; Schema: public; Owner: kabano -- @@ -210,21 +196,18 @@ CREATE SEQUENCE public.content_locales_sequence ALTER TABLE public.content_locales_sequence OWNER TO kabano; -- --- Name: content_versions; Type: TABLE; Schema: public; Owner: kabano +-- Name: content_locales; Type: TABLE; Schema: public; Owner: kabano -- -CREATE TABLE public.content_versions ( - id integer NOT NULL, - version integer DEFAULT 0 NOT NULL, - update_date timestamp without time zone NOT NULL, - is_archive boolean DEFAULT false NOT NULL, - name character varying(255), - content text, - locale integer NOT NULL +CREATE TABLE public.content_locales ( + id integer DEFAULT nextval('public.content_locales_sequence'::regclass) NOT NULL, + content integer NOT NULL, + locale character varying(32) NOT NULL, + author integer NOT NULL ); -ALTER TABLE public.content_versions OWNER TO kabano; +ALTER TABLE public.content_locales OWNER TO kabano; -- -- Name: content_versions_sequence; Type: SEQUENCE; Schema: public; Owner: kabano @@ -240,6 +223,23 @@ CREATE SEQUENCE public.content_versions_sequence ALTER TABLE public.content_versions_sequence OWNER TO kabano; +-- +-- Name: content_versions; Type: TABLE; Schema: public; Owner: kabano +-- + +CREATE TABLE public.content_versions ( + id integer DEFAULT nextval('public.content_versions_sequence'::regclass) NOT NULL, + version integer DEFAULT 0 NOT NULL, + update_date timestamp without time zone NOT NULL, + is_archive boolean DEFAULT false NOT NULL, + name character varying(255), + content text, + locale integer NOT NULL +); + + +ALTER TABLE public.content_versions OWNER TO kabano; + -- -- Name: contents_sequence; Type: SEQUENCE; Schema: public; Owner: kabano -- @@ -570,7 +570,7 @@ COPY public.spatial_ref_sys (srid, auth_name, auth_srid, srtext, proj4text) FROM COPY public.users (id, name, version, email, password, website, is_avatar_present, is_archive, rank, locale, timezone, visit_date, register_date) FROM stdin; 4 leosw2 0 leo@leo.fr b36982d19ecde5eabbd83f964c6fe560050fe4bd f f moderator fr_FR CEST 2018-11-04 07:12:11 2018-10-17 18:14:11 -1 leosw 1 leo@lstronic.com b36982d19ecde5eabbd83f964c6fe560050fe4bd https://lstronic.com t f administrator fr_FR CEST 2019-01-29 18:23:39 2018-09-03 21:27:13 +1 leosw 1 leo@lstronic.com b36982d19ecde5eabbd83f964c6fe560050fe4bd https://lstronic.com t f administrator fr_FR CEST 2019-01-30 17:50:06 2018-09-03 21:27:13 \.