2024-03-04 23:54:15 +00:00
|
|
|
create table art_submissions (
|
|
|
|
id integer primary key,
|
|
|
|
kind varchar(7) not null,
|
|
|
|
author_id integer not null,
|
|
|
|
submitter_id integer not null,
|
|
|
|
created_utc integer not null,
|
|
|
|
approved bool not null
|
|
|
|
);
|
|
|
|
|
|
|
|
CREATE SEQUENCE public.art_submissions_id_seq
|
|
|
|
AS integer
|
|
|
|
START WITH 1
|
|
|
|
INCREMENT BY 1
|
|
|
|
NO MINVALUE
|
|
|
|
NO MAXVALUE
|
|
|
|
CACHE 1;
|
|
|
|
|
|
|
|
ALTER SEQUENCE public.art_submissions_id_seq OWNED BY public.art_submissions.id;
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.art_submissions ALTER COLUMN id SET DEFAULT nextval('public.art_submissions_id_seq'::regclass);
|
|
|
|
|
|
|
|
rdrama:
|
2024-03-09 09:01:10 +00:00
|
|
|
SELECT pg_catalog.setval('public.art_submissions_id_seq', 1718, true);
|
2024-03-04 23:54:15 +00:00
|
|
|
|
|
|
|
wpd:
|
2024-03-06 22:20:37 +00:00
|
|
|
SELECT pg_catalog.setval('public.art_submissions_id_seq', 199, true);
|
2024-03-04 23:54:15 +00:00
|
|
|
|
|
|
|
alter table only art_submissions
|
|
|
|
add constraint art_submissions_author_fkey foreign key (author_id) references public.users(id);
|
|
|
|
|
|
|
|
alter table only art_submissions
|
|
|
|
add constraint art_submissions_submitter_fkey foreign key (submitter_id) references public.users(id);
|
|
|
|
|
|
|
|
|
|
|
|
delete from modactions where kind in ('approve_emoji', 'reject_emoji', 'approve_hat', 'reject_hat');
|