mirror of
https://github.com/xfarrow/blink
synced 2025-06-27 09:03:02 +02:00
create job offer tag + some fixes
This commit is contained in:
25
backend/sql/9-create_job_offer_tag.sql
Normal file
25
backend/sql/9-create_job_offer_tag.sql
Normal file
@ -0,0 +1,25 @@
|
||||
-- Table: public.JobOfferTag
|
||||
-- This table allows to create a N-to-N map between Tag and JobOffer
|
||||
|
||||
-- DROP TABLE IF EXISTS public."JobOfferTag";
|
||||
|
||||
CREATE TABLE IF NOT EXISTS public."JobOfferTag"
|
||||
(
|
||||
id integer NOT NULL DEFAULT nextval('"JobOfferTag_id_seq"'::regclass),
|
||||
job_offer_id integer NOT NULL,
|
||||
tag_id integer NOT NULL,
|
||||
CONSTRAINT "JobOfferTag_pkey" PRIMARY KEY (id),
|
||||
CONSTRAINT "JobOfferFk" FOREIGN KEY (job_offer_id)
|
||||
REFERENCES public."JobOffer" (id) MATCH SIMPLE
|
||||
ON UPDATE CASCADE
|
||||
ON DELETE CASCADE,
|
||||
CONSTRAINT "TagFk" FOREIGN KEY (tag_id)
|
||||
REFERENCES public."Tag" (id) MATCH SIMPLE
|
||||
ON UPDATE CASCADE
|
||||
ON DELETE CASCADE
|
||||
)
|
||||
|
||||
TABLESPACE pg_default;
|
||||
|
||||
ALTER TABLE IF EXISTS public."JobOfferTag"
|
||||
OWNER to postgres;
|
Reference in New Issue
Block a user