Skip to content

Commit

Permalink
re add user_competence
Browse files Browse the repository at this point in the history
  • Loading branch information
cassiopeelaurie committed Jan 25, 2024
1 parent 630b653 commit 6a83472
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions backend/database/database.sql
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ CREATE TABLE user (
-- address,
-- password
-- )
DROP TABLE IF EXISTS competence;
-- DROP TABLE IF EXISTS competence;

-- DELETE TABLE competence;

Expand Down Expand Up @@ -115,14 +115,9 @@ VALUES (

DROP TABLE IF EXISTS user_competence;
-- Créer la table "user_competence"
CREATE TABLE
user_competence (
user_id INT,
competence_id INT,
PRIMARY KEY (user_id, competence_id),
FOREIGN KEY (user_id) REFERENCES user(id),
FOREIGN KEY (competence_id) REFERENCES competence(id)
);
CREATE TABLE user_competence (
user_id INT, html BOOLEAN, css BOOLEAN, javascript BOOLEAN, angular BOOLEAN, react BOOLEAN, php BOOLEAN, symphony BOOLEAN, git BOOLEAN, github BOOLEAN, trello BOOLEAN, PRIMARY KEY (user_id), FOREIGN KEY (user_id) REFERENCES user (id)
);

CREATE TABLE upload (
id int(11) PRIMARY KEY NOT NULL AUTO_INCREMENT, url varchar(255) NOT NULL, unique (url), created_at timestamp default CURRENT_TIMESTAMP
Expand Down

0 comments on commit 6a83472

Please sign in to comment.