From 682aaa3cddbe2ea424426e967eb0a141398a7306 Mon Sep 17 00:00:00 2001 From: Sketch <75850871+SketchMaster2001@users.noreply.github.com> Date: Fri, 15 Dec 2023 08:18:36 -0500 Subject: [PATCH] Set a range for profile ID's --- schema.sql | 119 +---------------------------------------------------- 1 file changed, 2 insertions(+), 117 deletions(-) diff --git a/schema.sql b/schema.sql index ebea0c4..9fed0cd 100644 --- a/schema.sql +++ b/schema.sql @@ -20,79 +20,6 @@ SET default_tablespace = ''; SET default_table_access_method = heap; --- --- Name: logins; Type: TABLE; Schema: public; Owner: wiilink --- - -CREATE TABLE public.logins ( - id integer NOT NULL, - auth_token character varying NOT NULL, - user_id bigint NOT NULL, - gsbrcd character varying, - challenge character varying -); - - -ALTER TABLE public.logins OWNER TO wiilink; - --- --- Name: logins_id_seq; Type: SEQUENCE; Schema: public; Owner: wiilink --- - -CREATE SEQUENCE public.logins_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE public.logins_id_seq OWNER TO wiilink; - --- --- Name: logins_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: wiilink --- - -ALTER SEQUENCE public.logins_id_seq OWNED BY public.logins.id; - - --- --- Name: sessions; Type: TABLE; Schema: public; Owner: wiilink --- - -CREATE TABLE public.sessions ( - id integer NOT NULL, - session_key character varying NOT NULL, - profile_id integer NOT NULL, - login_ticket character varying NOT NULL -); - - -ALTER TABLE public.sessions OWNER TO wiilink; - --- --- Name: sessions_id_seq; Type: SEQUENCE; Schema: public; Owner: wiilink --- - -CREATE SEQUENCE public.sessions_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE public.sessions_id_seq OWNER TO wiilink; - --- --- Name: sessions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: wiilink --- - -ALTER SEQUENCE public.sessions_id_seq OWNED BY public.sessions.id; - - -- -- Name: users; Type: TABLE; Schema: public; Owner: wiilink -- @@ -133,59 +60,17 @@ ALTER TABLE public.users_profile_id_seq OWNER TO wiilink; ALTER SEQUENCE public.users_profile_id_seq OWNED BY public.users.profile_id; - --- --- Name: logins id; Type: DEFAULT; Schema: public; Owner: wiilink --- - -ALTER TABLE ONLY public.logins ALTER COLUMN id SET DEFAULT nextval('public.logins_id_seq'::regclass); - - --- --- Name: sessions id; Type: DEFAULT; Schema: public; Owner: wiilink --- - -ALTER TABLE ONLY public.sessions ALTER COLUMN id SET DEFAULT nextval('public.sessions_id_seq'::regclass); - - -- -- Name: users profile_id; Type: DEFAULT; Schema: public; Owner: wiilink -- ALTER TABLE ONLY public.users ALTER COLUMN profile_id SET DEFAULT nextval('public.users_profile_id_seq'::regclass); - -- --- Name: logins logins_auth_token_key; Type: CONSTRAINT; Schema: public; Owner: wiilink +-- Set the profile_id start point to 1'000'000'000 -- -ALTER TABLE ONLY public.logins - ADD CONSTRAINT logins_auth_token_key UNIQUE (auth_token); - - --- --- Name: logins logins_pkey; Type: CONSTRAINT; Schema: public; Owner: wiilink --- - -ALTER TABLE ONLY public.logins - ADD CONSTRAINT logins_pkey PRIMARY KEY (id); - - --- --- Name: logins logins_user_id_key; Type: CONSTRAINT; Schema: public; Owner: wiilink --- - -ALTER TABLE ONLY public.logins - ADD CONSTRAINT logins_user_id_key UNIQUE (user_id, gsbrcd); - - --- --- Name: sessions sessions_pkey; Type: CONSTRAINT; Schema: public; Owner: wiilink --- - -ALTER TABLE ONLY public.sessions - ADD CONSTRAINT sessions_pkey PRIMARY KEY (id); - +ALTER SEQUENCE users_profile_id_seq RESTART WITH 1000000000; -- -- Name: users users_pkey; Type: CONSTRAINT; Schema: public; Owner: wiilink