feat: Initialize project with MySQL database and API for managing projects and technologies

- Created SQL script to set up database tables for projects and technologies.
- Added Docker Compose configuration for application and MySQL service.
- Implemented API endpoints for CRUD operations on technologies.
- Defined data types for projects and technologies.
- Established routing for API endpoints.
This commit is contained in:
2026-02-10 09:45:25 +01:00
parent 4335fd5cae
commit 4b5069d179
16 changed files with 615 additions and 178 deletions
+49
View File
@@ -0,0 +1,49 @@
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);