Files
portfolio/backend/create_table.sql
sylvaintr bfc1a360b6 Add 'backend/' from commit '4b5069d17945252abee2a826818098906af56334'
git-subtree-dir: backend
git-subtree-mainline: 9c93274511
git-subtree-split: 4b5069d179
2026-09-03 14:02:07 +02:00

50 lines
1.8 KiB
SQL

DROP TABLE IF EXISTS projet;
DROP TABLE IF EXISTS technologie;
DROP TABLE IF EXISTS projet_technologie;
create table
projet (
id int primary key auto_increment,
name varchar(255) not null,
shortdescriptionfr text not null,
longdescriptionfr text not null,
shortdescriptionen text not null,
longdescriptionen text not null,
linkGithub varchar(255),
linkWeb varchar(255),
datec date not null
);
create table
technologie (
id int primary key auto_increment,
name varchar(255) not null
);
create table
projet_technologie (
projet_id int,
technologie_id int,
primary key (projet_id, technologie_id),
foreign key (projet_id) references projet (id) on delete cascade,
foreign key (technologie_id) references technologie (id) on delete cascade
);
insert into projet (name, shortdescriptionfr, longdescriptionfr, shortdescriptionen, longdescriptionen, linkGithub, linkWeb, datec) values
('Mon Portefolio', 'Un site web pour présenter mes projets et compétences.', 'Ce site web a été développé pour présenter mes projets personnels et professionnels, ainsi que mes compétences en développement web. Il utilise Go pour le backend et React pour le frontend.', 'A website to showcase my projects and skills.', 'This website was developed to showcase my personal and professional projects, as well as my web development skills. It uses Go for the backend and React for the frontend.', 'https://github.com/sylvain/portfolio', 'https://sylvain-portfolio.com', '2023-01-15');
insert into technologie (name) values
('Go'),
('React'),
('JavaScript'),
('HTML'),
('CSS');
insert into projet_technologie (projet_id, technologie_id) values
(1, 1),
(1, 2),
(1, 3),
(1, 4),
(1, 5);