From 182fbb69e8a9c7c62f92dca89d40320ce88fcad2 Mon Sep 17 00:00:00 2001 From: Yohan Boujon Date: Sun, 12 Nov 2023 17:08:20 +0100 Subject: [PATCH] Backend: Updated Data Base structure. --- backend/db/education.sql | 16 ++++++++++++++++ backend/db/experience.sql | 16 ++++++++++++++++ backend/db/project.sql | 16 ++++++++++++++++ backend/db/skills.sql | 13 +++++++++++++ 4 files changed, 61 insertions(+) create mode 100644 backend/db/education.sql create mode 100644 backend/db/experience.sql create mode 100644 backend/db/project.sql create mode 100644 backend/db/skills.sql diff --git a/backend/db/education.sql b/backend/db/education.sql new file mode 100644 index 0000000..186953f --- /dev/null +++ b/backend/db/education.sql @@ -0,0 +1,16 @@ +-- public.education definition + +-- Drop table + +-- DROP TABLE public.education; + +CREATE TABLE public.education ( + id serial4 NOT NULL, + start_year time NULL, + end_year time NULL, + school text NULL, + speciality text NULL, + school_location text NULL, + school_options text NULL, + CONSTRAINT education_pkey PRIMARY KEY (id) +); \ No newline at end of file diff --git a/backend/db/experience.sql b/backend/db/experience.sql new file mode 100644 index 0000000..b10e9e8 --- /dev/null +++ b/backend/db/experience.sql @@ -0,0 +1,16 @@ +-- public.experience definition + +-- Drop table + +-- DROP TABLE public.experience; + +CREATE TABLE public.experience ( + id serial4 NOT NULL, + job_position text NULL, + job_description text NULL, + enterprise text NULL, + enterprise_location text NULL, + start_year date NULL, + end_year date NULL, + CONSTRAINT experience_pkey PRIMARY KEY (id) +); \ No newline at end of file diff --git a/backend/db/project.sql b/backend/db/project.sql new file mode 100644 index 0000000..19fe8d4 --- /dev/null +++ b/backend/db/project.sql @@ -0,0 +1,16 @@ +-- public.project definition + +-- Drop table + +-- DROP TABLE public.project; + +CREATE TABLE public.project ( + id serial4 NOT NULL, + date_done date NULL, + title text NULL, + description text NULL, + github_link text NULL, + id_skills serial4 NOT NULL, + CONSTRAINT project_pkey PRIMARY KEY (id), + CONSTRAINT project_fk FOREIGN KEY (id_skills) REFERENCES public.skills(id) +); \ No newline at end of file diff --git a/backend/db/skills.sql b/backend/db/skills.sql new file mode 100644 index 0000000..e82819f --- /dev/null +++ b/backend/db/skills.sql @@ -0,0 +1,13 @@ +-- public.skills definition + +-- Drop table + +-- DROP TABLE public.skills; + +CREATE TABLE public.skills ( + id serial4 NOT NULL, + programming_lang text NULL, + software text NULL, + languages text NULL, + CONSTRAINT skills_pkey PRIMARY KEY (id) +); \ No newline at end of file