@@ -286,11 +286,21 @@ CREATE TABLE public.users (
286286 is_active boolean DEFAULT false,
287287 manager_id integer,
288288 addresses_id integer NOT NULL,
289+ user_groups_id integer,
289290 created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
290291 test_date timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
291292 updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
292293);
293294
295+ --
296+ -- Name: user_groups; Type: TABLE; Schema: public; Owner: -
297+ --
298+
299+ CREATE TABLE public.user_groups (
300+ id integer NOT NULL,
301+ label character varying NOT NULL
302+ );
303+
294304
295305--
296306-- Name: users_have_roles; Type: TABLE; Schema: public; Owner: -
@@ -345,6 +355,25 @@ CREATE SEQUENCE public.users_id_seq
345355ALTER SEQUENCE public.users_id_seq OWNED BY public.users.id;
346356
347357
358+ --
359+ -- Name: user_groups_id_seq; Type: SEQUENCE; Schema: public; Owner: -
360+ --
361+
362+ CREATE SEQUENCE public.user_groups_id_seq
363+ AS integer
364+ START WITH 1
365+ INCREMENT BY 1
366+ NO MINVALUE
367+ NO MAXVALUE
368+ CACHE 1;
369+
370+ --
371+ -- Name: user_groups_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
372+ --
373+
374+ ALTER SEQUENCE public.user_groups_id_seq OWNED BY public.user_groups.id;
375+
376+
348377--
349378-- Name: addresses id; Type: DEFAULT; Schema: public; Owner: -
350379--
@@ -401,6 +430,13 @@ ALTER TABLE ONLY public.roles ALTER COLUMN id SET DEFAULT nextval('public.roles_
401430ALTER TABLE ONLY public.users ALTER COLUMN id SET DEFAULT nextval('public.users_id_seq'::regclass);
402431
403432
433+ --
434+ -- Name: users id; Type: DEFAULT; Schema: public; Owner: -
435+ --
436+
437+ ALTER TABLE ONLY public.user_groups ALTER COLUMN id SET DEFAULT nextval('public.user_groups_id_seq'::regclass);
438+
439+
404440--
405441-- Name: users_have_roles id; Type: DEFAULT; Schema: public; Owner: -
406442--
@@ -456,6 +492,13 @@ ALTER TABLE ONLY public.users
456492 ADD CONSTRAINT "PK_a3ffb1c0c8416b9fc6f907b7433" PRIMARY KEY (id);
457493
458494
495+ --
496+ -- Name: users PK_user_groups; Type: CONSTRAINT; Schema: public; Owner: -
497+ --
498+
499+ ALTER TABLE ONLY public.user_groups
500+ ADD CONSTRAINT "PK_user_groups" PRIMARY KEY (id);
501+
459502--
460503-- Name: pods PK_b00bbc2c7fb41627be2b169f0dd; Type: CONSTRAINT; Schema: public; Owner: -
461504--
@@ -518,6 +561,13 @@ ALTER TABLE ONLY public.users
518561 ADD CONSTRAINT "FK_2f8d527df0d3acb8aa51945a968" FOREIGN KEY (addresses_id) REFERENCES public.addresses(id);
519562
520563
564+ --
565+ -- Name: users FK_user_groups; Type: FK CONSTRAINT; Schema: public; Owner: -
566+ --
567+ ALTER TABLE ONLY public.users
568+ ADD CONSTRAINT "FK_user_groups" FOREIGN KEY (user_groups_id) REFERENCES public.user_groups(id);
569+
570+
521571--
522572-- Name: users_have_roles FK_6e768e03083247102b401b74b46; Type: FK CONSTRAINT; Schema: public; Owner: -
523573--
0 commit comments