mirror of
https://github.com/WiiLink24/wfc-server.git
synced 2026-07-18 16:51:25 -05:00
Set a range for profile ID's
This commit is contained in:
parent
fc224859e0
commit
682aaa3cdd
119
schema.sql
119
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
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user