2023-10-12 12:23:18 +02:00
|
|
|
-- Table: public.OrganizationPost
|
|
|
|
|
|
|
|
-- DROP TABLE IF EXISTS public."OrganizationPost";
|
|
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS public."OrganizationPost"
|
|
|
|
(
|
2023-10-12 21:00:51 +02:00
|
|
|
id SERIAL PRIMARY KEY,
|
2023-10-12 12:23:18 +02:00
|
|
|
organization_id integer NOT NULL,
|
2024-02-18 12:03:57 +01:00
|
|
|
content text NOT NULL,
|
2023-10-18 09:23:52 +02:00
|
|
|
created_at timestamp without time zone DEFAULT now(),
|
|
|
|
original_author integer NOT NULL,
|
|
|
|
CONSTRAINT "AuthorIdFK" FOREIGN KEY (original_author)
|
|
|
|
REFERENCES public."Person" (id) MATCH SIMPLE
|
|
|
|
ON UPDATE NO ACTION
|
2024-02-16 21:28:10 +01:00
|
|
|
ON DELETE CASCADE
|
2023-10-18 09:23:52 +02:00
|
|
|
NOT VALID,
|
2023-10-12 12:23:18 +02:00
|
|
|
CONSTRAINT "OrganizationIdFk" FOREIGN KEY (organization_id)
|
|
|
|
REFERENCES public."Organization" (id) MATCH SIMPLE
|
|
|
|
ON UPDATE CASCADE
|
|
|
|
ON DELETE CASCADE
|
|
|
|
NOT VALID
|
|
|
|
)
|
|
|
|
|
|
|
|
TABLESPACE pg_default;
|
|
|
|
|
|
|
|
ALTER TABLE IF EXISTS public."OrganizationPost"
|
|
|
|
OWNER to postgres;
|