Enhance tutorial management with user-specific features and improve error handling
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
DROP TABLE IF EXISTS public.tutorials;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS public.tutorials
|
||||
(
|
||||
description character varying(255) COLLATE pg_catalog."default",
|
||||
published boolean,
|
||||
title character varying(255) COLLATE pg_catalog."default",
|
||||
id bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY ( INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 9223372036854775807 CACHE 1 ),
|
||||
userid bigint,
|
||||
CONSTRAINT "tutorial_user_FK" FOREIGN KEY (userid)
|
||||
REFERENCES public.users (id) MATCH SIMPLE
|
||||
ON UPDATE NO ACTION
|
||||
ON DELETE NO ACTION
|
||||
NOT VALID
|
||||
)
|
||||
|
||||
TABLESPACE pg_default;
|
||||
|
||||
|
||||
-- Index: fki_tutorial_user_FK
|
||||
|
||||
-- DROP INDEX IF EXISTS public."fki_tutorial_user_FK";
|
||||
|
||||
CREATE INDEX IF NOT EXISTS "fki_tutorial_user_FK"
|
||||
ON public.tutorials USING btree
|
||||
(userid ASC NULLS LAST)
|
||||
TABLESPACE pg_default;
|
||||
Reference in New Issue
Block a user