From 4acfb92431c24af56774fa8a0b9bfa43f1497053 Mon Sep 17 00:00:00 2001
From: viastolfi
Date: Fri, 25 Nov 2022 10:20:22 +0100
Subject: [PATCH 001/105] =?UTF-8?q?cr=C3=A9ation=20du=20premier=20fichier?=
=?UTF-8?q?=20de=20php=20et=20test=20de=20la=20branche?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Sources/API/index.php | 3 +++
1 file changed, 3 insertions(+)
create mode 100644 Sources/API/index.php
diff --git a/Sources/API/index.php b/Sources/API/index.php
new file mode 100644
index 0000000..3beee78
--- /dev/null
+++ b/Sources/API/index.php
@@ -0,0 +1,3 @@
+
\ No newline at end of file
--
2.36.3
From bdaeffb047d4e5bffa99a07eef2f1c6864919374 Mon Sep 17 00:00:00 2001
From: Vincent ASTOLFI
Date: Fri, 25 Nov 2022 10:29:36 +0100
Subject: [PATCH 002/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.drone.yml | 46 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 46 insertions(+)
diff --git a/.drone.yml b/.drone.yml
index 72aa85d..779e03b 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -51,4 +51,50 @@ steps:
COMMAND: create
PRIVATE: true
POSTGRES_PASSWORD: oui
+
+ - name: deploy-container-mysql
+ image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest
+ environment:
+ IMAGENAME: mariadb:latest
+ CONTAINERNAME: mariadb
+ COMMAND: create
+ OVERWRITE: true
+ CODEFIRST_CLIENTDRONE_ENV_MARIADB_ROOT_PASSWORD:
+ from_secret: db_root_password
+ CODEFIRST_CLIENTDRONE_ENV_MARIADB_DATABASE:
+ from_secret: db_database
+ CODEFIRST_CLIENTDRONE_ENV_MARIADB_USER:
+ from_secret: db_user
+ CODEFIRST_CLIENTDRONE_ENV_MARIADB_PASSWORD:
+ from_secret: db_password
+
+ - name: web-API
+ image: plugins/docker
+ settings:
+ dockerfile: ./Dockerfile
+ context: ./
+ registry: hub.codefirst.iut.uca.fr
+ repo: hub.codefirst.iut.uca.fr/hugo.livet/consEco
+ username:
+ from_secret: secret-registry-username
+ password:
+ from_secret: secret-registry-password
+
+ - name: deploy-web-container
+ image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest
+ environment:
+ IMAGENAME: hub.codefirst.iut.uca.fr/hugo.livet/consEco:latest
+ CONTAINERNAME: consEco
+ COMMAND: create
+ OVERWRITE: true
+ CODEFIRST_CLIENTDRONE_ENV_MARIADB_ROOT_PASSWORD:
+ from_secret: db_root_password
+ CODEFIRST_CLIENTDRONE_ENV_MARIADB_DATABASE:
+ from_secret: db_database
+ CODEFIRST_CLIENTDRONE_ENV_MARIADB_USER:
+ from_secret: db_user
+ CODEFIRST_CLIENTDRONE_ENV_MARIADB_PASSWORD:
+ from_secret: db_password
+
+ depends_on: [ web-todo, deploy-container-mysql ]
\ No newline at end of file
--
2.36.3
From 2014ad61457f2a0fbc0cd9a5a24a3dbd5adc4b72 Mon Sep 17 00:00:00 2001
From: Vincent ASTOLFI
Date: Fri, 25 Nov 2022 10:33:23 +0100
Subject: [PATCH 003/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.drone.yml | 86 +++++++++++++++++++++++++++---------------------------
1 file changed, 43 insertions(+), 43 deletions(-)
diff --git a/.drone.yml b/.drone.yml
index 779e03b..8e3bbc9 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -52,49 +52,49 @@ steps:
PRIVATE: true
POSTGRES_PASSWORD: oui
- - name: deploy-container-mysql
- image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest
- environment:
- IMAGENAME: mariadb:latest
- CONTAINERNAME: mariadb
- COMMAND: create
- OVERWRITE: true
- CODEFIRST_CLIENTDRONE_ENV_MARIADB_ROOT_PASSWORD:
- from_secret: db_root_password
- CODEFIRST_CLIENTDRONE_ENV_MARIADB_DATABASE:
- from_secret: db_database
- CODEFIRST_CLIENTDRONE_ENV_MARIADB_USER:
- from_secret: db_user
- CODEFIRST_CLIENTDRONE_ENV_MARIADB_PASSWORD:
- from_secret: db_password
+ - name: deploy-container-mysql
+ image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest
+ environment:
+ IMAGENAME: mariadb:latest
+ CONTAINERNAME: mariadb
+ COMMAND: create
+ OVERWRITE: true
+ CODEFIRST_CLIENTDRONE_ENV_MARIADB_ROOT_PASSWORD:
+ from_secret: db_root_password
+ CODEFIRST_CLIENTDRONE_ENV_MARIADB_DATABASE:
+ from_secret: db_database
+ CODEFIRST_CLIENTDRONE_ENV_MARIADB_USER:
+ from_secret: db_user
+ CODEFIRST_CLIENTDRONE_ENV_MARIADB_PASSWORD:
+ from_secret: db_password
- - name: web-API
- image: plugins/docker
- settings:
- dockerfile: ./Dockerfile
- context: ./
- registry: hub.codefirst.iut.uca.fr
- repo: hub.codefirst.iut.uca.fr/hugo.livet/consEco
- username:
- from_secret: secret-registry-username
- password:
- from_secret: secret-registry-password
+ - name: web-API
+ image: plugins/docker
+ settings:
+ dockerfile: ./Dockerfile
+ context: ./
+ registry: hub.codefirst.iut.uca.fr
+ repo: hub.codefirst.iut.uca.fr/hugo.livet/consEco
+ username:
+ from_secret: secret-registry-username
+ password:
+ from_secret: secret-registry-password
- - name: deploy-web-container
- image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest
- environment:
- IMAGENAME: hub.codefirst.iut.uca.fr/hugo.livet/consEco:latest
- CONTAINERNAME: consEco
- COMMAND: create
- OVERWRITE: true
- CODEFIRST_CLIENTDRONE_ENV_MARIADB_ROOT_PASSWORD:
- from_secret: db_root_password
- CODEFIRST_CLIENTDRONE_ENV_MARIADB_DATABASE:
- from_secret: db_database
- CODEFIRST_CLIENTDRONE_ENV_MARIADB_USER:
- from_secret: db_user
- CODEFIRST_CLIENTDRONE_ENV_MARIADB_PASSWORD:
- from_secret: db_password
-
- depends_on: [ web-todo, deploy-container-mysql ]
+ - name: deploy-web-container
+ image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest
+ environment:
+ IMAGENAME: hub.codefirst.iut.uca.fr/hugo.livet/consEco:latest
+ CONTAINERNAME: consEco
+ COMMAND: create
+ OVERWRITE: true
+ CODEFIRST_CLIENTDRONE_ENV_MARIADB_ROOT_PASSWORD:
+ from_secret: db_root_password
+ CODEFIRST_CLIENTDRONE_ENV_MARIADB_DATABASE:
+ from_secret: db_database
+ CODEFIRST_CLIENTDRONE_ENV_MARIADB_USER:
+ from_secret: db_user
+ CODEFIRST_CLIENTDRONE_ENV_MARIADB_PASSWORD:
+ from_secret: db_password
+
+ depends_on: [ web-todo, deploy-container-mysql ]
\ No newline at end of file
--
2.36.3
From 2d0a40806fc731a3c6880227eda7962bfc51c929 Mon Sep 17 00:00:00 2001
From: Vincent ASTOLFI
Date: Fri, 25 Nov 2022 10:34:20 +0100
Subject: [PATCH 004/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.drone.yml | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/.drone.yml b/.drone.yml
index 8e3bbc9..9782770 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -15,6 +15,7 @@ steps:
- dotnet restore CI_MAUI.sln
- dotnet build CI_MAUI.sln -c Release --no-restore
- dotnet publish CI_MAUI.sln -c Release --no-restore -o CI_PROJECT_DIR/build/release
+
- name: tests
image: mcr.microsoft.com/dotnet/sdk:6.0
commands:
@@ -22,6 +23,7 @@ steps:
- dotnet restore CI_MAUI.sln
- dotnet test CI_MAUI.sln --no-restore
depends_on: [build]
+
- name: code-analysis
image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dronesonarplugin-dotnet6
commands:
@@ -42,15 +44,6 @@ steps:
sonar_token:
from_secret: SECRET_SONAR_LOGIN
depends_on: [tests]
- # database container deployment
- - name: deploy-container-mysql
- image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest
- environment:
- IMAGENAME: postgres
- CONTAINERNAME: mysql
- COMMAND: create
- PRIVATE: true
- POSTGRES_PASSWORD: oui
- name: deploy-container-mysql
image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest
--
2.36.3
From f631fc9159b6d009d77be9e5bd8d49a7119532b3 Mon Sep 17 00:00:00 2001
From: Vincent ASTOLFI
Date: Fri, 25 Nov 2022 10:34:39 +0100
Subject: [PATCH 005/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.drone.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.drone.yml b/.drone.yml
index 9782770..bebe4ec 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -89,5 +89,5 @@ steps:
CODEFIRST_CLIENTDRONE_ENV_MARIADB_PASSWORD:
from_secret: db_password
- depends_on: [ web-todo, deploy-container-mysql ]
+ depends_on: [ web-API, deploy-container-mysql ]
\ No newline at end of file
--
2.36.3
From 6b1c0ea5b8bb15944d2f5c0293a3d773152e46de Mon Sep 17 00:00:00 2001
From: Vincent ASTOLFI
Date: Fri, 25 Nov 2022 10:36:46 +0100
Subject: [PATCH 006/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'Dockerfile?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Dockerfile | 23 +++--------------------
1 file changed, 3 insertions(+), 20 deletions(-)
diff --git a/Dockerfile b/Dockerfile
index a9118b4..36b29b7 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,20 +1,3 @@
-FROM aosapps/drone-sonar-plugin AS base
-FROM mcr.microsoft.com/dotnet/sdk:6.0-alpine
-
-COPY --from=base /bin/drone-sonar /bin/
-WORKDIR /bin
-
-RUN apk update && apk add openjdk11-jre nodejs && rm -rf /tmp/* /var/cache/apk/*
-
-RUN dotnet tool install --global dotnet-sonarscanner
-RUN dotnet tool install --global dotnet-reportgenerator-globaltool
-
-ENV JAVA_HOME /usr/lib/jvm/default-jvm/
-ENV PATH ${PATH}:${JAVA_HOME}/bin
-ENV PATH $PATH:/root/.dotnet/tools
-
-ENTRYPOINT /bin/drone-sonar
-
-RUN dotnet sonarscanner begin /k:"ConsEco" /d:sonar.host.url="https://codefirst.iut.uca.fr/sonar" /d:sonar.login="sqp_ffc02968e133d03daeb917e8c2e6f243a80d087a"
-RUN dotnet build
-RUN dotnet sonarscanner end /d:sonar.login="sqp_ffc02968e133d03daeb917e8c2e6f243a80d087a"
\ No newline at end of file
+FROM php:8.1-apache
+RUN docker-php-ext-install mysqli pdo pdo_mysql && docker-php-ext-enable pdo_mysql
+COPY ./ /var/www/html/
\ No newline at end of file
--
2.36.3
From e12ab62220497b078f3be7a9f9f685bd8ee3fb73 Mon Sep 17 00:00:00 2001
From: Vincent ASTOLFI
Date: Fri, 25 Nov 2022 10:39:08 +0100
Subject: [PATCH 007/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.drone.yml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/.drone.yml b/.drone.yml
index bebe4ec..0959b14 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -67,7 +67,7 @@ steps:
dockerfile: ./Dockerfile
context: ./
registry: hub.codefirst.iut.uca.fr
- repo: hub.codefirst.iut.uca.fr/hugo.livet/consEco
+ repo: hub.codefirst.iut.uca.fr/hugo.livet/conseco
username:
from_secret: secret-registry-username
password:
@@ -76,8 +76,8 @@ steps:
- name: deploy-web-container
image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest
environment:
- IMAGENAME: hub.codefirst.iut.uca.fr/hugo.livet/consEco:latest
- CONTAINERNAME: consEco
+ IMAGENAME: hub.codefirst.iut.uca.fr/hugo.livet/conseco:latest
+ CONTAINERNAME: conseco
COMMAND: create
OVERWRITE: true
CODEFIRST_CLIENTDRONE_ENV_MARIADB_ROOT_PASSWORD:
--
2.36.3
From f0cbf3f7594c1c5f3923370b2e48997f6e6825d7 Mon Sep 17 00:00:00 2001
From: Hugo LIVET
Date: Fri, 25 Nov 2022 11:00:41 +0100
Subject: [PATCH 008/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.drone.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.drone.yml b/.drone.yml
index 0959b14..e891141 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -51,7 +51,7 @@ steps:
IMAGENAME: mariadb:latest
CONTAINERNAME: mariadb
COMMAND: create
- OVERWRITE: true
+ #OVERWRITE: true
CODEFIRST_CLIENTDRONE_ENV_MARIADB_ROOT_PASSWORD:
from_secret: db_root_password
CODEFIRST_CLIENTDRONE_ENV_MARIADB_DATABASE:
--
2.36.3
From 792e42f27b3803deccb46bc1ee39ef0570e3e2f3 Mon Sep 17 00:00:00 2001
From: Vincent ASTOLFI
Date: Fri, 25 Nov 2022 11:02:30 +0100
Subject: [PATCH 009/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'Dockerfile?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Dockerfile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Dockerfile b/Dockerfile
index 36b29b7..02d098e 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,3 +1,3 @@
FROM php:8.1-apache
RUN docker-php-ext-install mysqli pdo pdo_mysql && docker-php-ext-enable pdo_mysql
-COPY ./ /var/www/html/
\ No newline at end of file
+COPY ./Sources/API /var/www/html/
\ No newline at end of file
--
2.36.3
From 19f6b56233f8ded74f41800de7f0a16aac85a1c4 Mon Sep 17 00:00:00 2001
From: viastolfi
Date: Fri, 25 Nov 2022 11:16:19 +0100
Subject: [PATCH 010/105] =?UTF-8?q?ajout=20des=20fichiers=20n=C3=A9cessair?=
=?UTF-8?q?e?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Sources/API/config/Autoload.php | 32 ++++++++++++++++++++++++++++++++
Sources/API/config/Config.php | 9 +++++++++
Sources/API/controler/.gitkeep | 0
3 files changed, 41 insertions(+)
create mode 100644 Sources/API/config/Autoload.php
create mode 100644 Sources/API/config/Config.php
create mode 100644 Sources/API/controler/.gitkeep
diff --git a/Sources/API/config/Autoload.php b/Sources/API/config/Autoload.php
new file mode 100644
index 0000000..e7ca079
--- /dev/null
+++ b/Sources/API/config/Autoload.php
@@ -0,0 +1,32 @@
+$file
";
+ if(file_exists($file)){
+ include $file;
+ }
+ }
+ }
+}
+
+?>
\ No newline at end of file
diff --git a/Sources/API/config/Config.php b/Sources/API/config/Config.php
new file mode 100644
index 0000000..ea5064a
--- /dev/null
+++ b/Sources/API/config/Config.php
@@ -0,0 +1,9 @@
+
\ No newline at end of file
diff --git a/Sources/API/controler/.gitkeep b/Sources/API/controler/.gitkeep
new file mode 100644
index 0000000..e69de29
--
2.36.3
From 8d9e015778efd0d667295b455d6edf8cbf322890 Mon Sep 17 00:00:00 2001
From: Vincent ASTOLFI
Date: Fri, 25 Nov 2022 11:18:12 +0100
Subject: [PATCH 011/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.drone.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.drone.yml b/.drone.yml
index e891141..cd99729 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -67,7 +67,7 @@ steps:
dockerfile: ./Dockerfile
context: ./
registry: hub.codefirst.iut.uca.fr
- repo: hub.codefirst.iut.uca.fr/hugo.livet/conseco
+ repo: hub.codefirst.iut.uca.fr/consecoteam/conseco
username:
from_secret: secret-registry-username
password:
@@ -76,7 +76,7 @@ steps:
- name: deploy-web-container
image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest
environment:
- IMAGENAME: hub.codefirst.iut.uca.fr/hugo.livet/conseco:latest
+ IMAGENAME: hub.codefirst.iut.uca.fr/consecoteam/conseco:latest
CONTAINERNAME: conseco
COMMAND: create
OVERWRITE: true
--
2.36.3
From 9f0ca4ba9fe7be38d176879166bad69f4a004924 Mon Sep 17 00:00:00 2001
From: viastolfi
Date: Fri, 25 Nov 2022 11:20:44 +0100
Subject: [PATCH 012/105] changement de l'index.php
---
Sources/API/index.php | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/Sources/API/index.php b/Sources/API/index.php
index 3beee78..f663296 100644
--- a/Sources/API/index.php
+++ b/Sources/API/index.php
@@ -1,3 +1,10 @@
\ No newline at end of file
--
2.36.3
From 352920f5e135b5f57869016c5f0228b8f9be7fa8 Mon Sep 17 00:00:00 2001
From: viastolfi
Date: Fri, 25 Nov 2022 11:37:47 +0100
Subject: [PATCH 013/105] premier test de route
---
Sources/API/config/Config.php | 2 +-
Sources/API/{controler => controller}/.gitkeep | 0
Sources/API/controller/Controller.php | 10 ++++++++++
Sources/API/index.php | 12 ++++++++++--
4 files changed, 21 insertions(+), 3 deletions(-)
rename Sources/API/{controler => controller}/.gitkeep (100%)
create mode 100644 Sources/API/controller/Controller.php
diff --git a/Sources/API/config/Config.php b/Sources/API/config/Config.php
index ea5064a..44f585a 100644
--- a/Sources/API/config/Config.php
+++ b/Sources/API/config/Config.php
@@ -2,7 +2,7 @@
//prefixe
$rep=__DIR__.'/../';
-$dsn='mysql:host=10.9.0.67;dbname='.getenv("MARIADB_DATABASE");
+$dsn='mysql:host=10.9.0.65;dbname='.getenv("MARIADB_DATABASE");
$dbname=getenv("MARIADB_DATABASE");
$usr=getenv("MARIADB_USER");
$mdp=getenv("MARIADB_PASSWORD");
diff --git a/Sources/API/controler/.gitkeep b/Sources/API/controller/.gitkeep
similarity index 100%
rename from Sources/API/controler/.gitkeep
rename to Sources/API/controller/.gitkeep
diff --git a/Sources/API/controller/Controller.php b/Sources/API/controller/Controller.php
new file mode 100644
index 0000000..58a4494
--- /dev/null
+++ b/Sources/API/controller/Controller.php
@@ -0,0 +1,10 @@
+
\ No newline at end of file
diff --git a/Sources/API/index.php b/Sources/API/index.php
index f663296..dbdd788 100644
--- a/Sources/API/index.php
+++ b/Sources/API/index.php
@@ -5,6 +5,14 @@ require_once(__DIR__.'/config/Config.php');
require_once(__DIR__.'/config/Autoload.php');
Autoload::charger();
-// loading a controler
-$cont = new FrontControler();
+$router = new AltoRouter();
+$router->map('GET|POST',"/","test");
+
+$match=$router->match();
+
+if(!$match){echo "404"; die;}
+
+if($match){
+ $cont = new Controller();
+}
?>
\ No newline at end of file
--
2.36.3
From a95557ad34aff7e0ce9e752a1cdb7b504806a032 Mon Sep 17 00:00:00 2001
From: Lucas EVARD
Date: Fri, 25 Nov 2022 11:39:44 +0100
Subject: [PATCH 014/105] =?UTF-8?q?Transf=C3=A9rer=20les=20fichiers=20vers?=
=?UTF-8?q?=20'Sources/Data'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Sources/Data/insert.sql | 43 +++++++++++
Sources/Data/tablewithgeneratedid.sql | 106 ++++++++++++++++++++++++++
2 files changed, 149 insertions(+)
create mode 100644 Sources/Data/insert.sql
create mode 100644 Sources/Data/tablewithgeneratedid.sql
diff --git a/Sources/Data/insert.sql b/Sources/Data/insert.sql
new file mode 100644
index 0000000..c296050
--- /dev/null
+++ b/Sources/Data/insert.sql
@@ -0,0 +1,43 @@
+INSERT INTO Devise VALUES('EUR','EURO');
+INSERT INTO Devise VALUES('USD','DOLLAR');
+INSERT INTO Devise VALUES('GBP','Livre Sterling');
+INSERT INTO Devise VALUES('JPY','YEN');
+INSERT INTO Devise VALUES('AUD','DOLLAR AUSTRALIEN');
+INSERT INTO Devise VALUES('NZD','DOLLAR NEO-ZELANDAIS');
+INSERT INTO Devise VALUES('ZAR','RANd');
+
+
+INSERT INTO Inscrit (nom,prenom,mail,mdp)VALUES('EVARD','LUCAS','lucasevard@gmail.com','test');
+INSERT INTO Inscrit (nom,prenom,mail,mdp)VALUES('MONCUL','STEPHANE','stef@gmail.com','teststef');
+INSERT INTO Inscrit (nom,prenom,mail,mdp)VALUES('MENFOUMETTOITOUTNU','RENAUD','renaudtoutnu@gmail.com','test000');
+INSERT INTO Inscrit (nom,prenom,mail,mdp)VALUES('YOUVOI','BENJAMIN','BENJAMIN@gmail.com','BENJAMIN');
+INSERT INTO Inscrit (nom,prenom,mail,mdp)VALUES('TUBEAU','RAOUL','raoullacouille@gmail.com','zizi');
+
+INSERT INTO DeviseInscrit VALUES('EUR','1');
+INSERT INTO DeviseInscrit VALUES('JPY','2');
+INSERT INTO DeviseInscrit VALUES('USD','3');
+INSERT INTO DeviseInscrit VALUES('NZD','4');
+
+
+INSERT INtO Banque(nom,urlsite,urllogo) VALUES('BNP PARIBAS','mabanque','imagesitebnb.fr');
+INSERT INtO Banque(nom,urlsite,urllogo) VALUES('CREDIT AGRICOLE','credit-agricole.fr','imageca');
+INSERT INtO Banque(nom,urlsite,urllogo) VALUES('BANQUE POSTALE','labanquepostale.fr','imgbp');
+INSERT INtO Banque(nom,urlsite,urllogo) VALUES('CAISSE D EPARGNE','caisse-epargne.fr','imgcaissedepargne');
+
+
+INSERT INTO InscrBanque (nomBanque,idInscrit)VALUES('BNP PARIBAS','1');
+INSERT INTO InscrBanque (nomBanque,idInscrit)VALUES('CREDIT AGRICOLE','2');
+INSERT INTO InscrBanque (nomBanque,idInscrit)VALUES('BANQUE POSTALE','3');
+INSERT INTO InscrBanque (nomBanque,idInscrit)VALUES('CAISSE D EPARGNE','4');
+
+
+INSERT INTO Compte (nom,idInscritBanque)VALUES('LIVRET A','1');
+INSERT INTO Compte (nom,idInscritBanque)VALUES('LIVRET A','2');
+INSERT INTO Compte (nom,idInscritBanque)VALUES('LIVRET A','3');
+INSERT INTO Compte (nom,idInscritBanque)VALUES('LIVRET A','4');
+
+
+INSERT INTO Planification (nom,credit,compte,datep,datecrea,methodePayement) VALUES ('EDF','190','1',now(),now(),'CB');
+INSERT INTO Planification (nom,credit,compte,datep,datecrea,methodePayement) VALUES ('SPOTIFY','190','2',now(),now(),'Prélevement');
+INSERT INTO Planification (nom,credit,compte,datep,datecrea,methodePayement) VALUES ('NETFLIX','190','3',now(),now(),'Cheque');
+INSERT INTO Planification (nom,credit,compte,datep,datecrea,methodePayement) VALUES ('PLAYSTATION PLUS','190','4',now(),now(),'Espece');
\ No newline at end of file
diff --git a/Sources/Data/tablewithgeneratedid.sql b/Sources/Data/tablewithgeneratedid.sql
new file mode 100644
index 0000000..d9c66bd
--- /dev/null
+++ b/Sources/Data/tablewithgeneratedid.sql
@@ -0,0 +1,106 @@
+DROP TABLE Planification;
+DROP TABLE Opération;
+DROP TABLE Echeancier;
+DROP TABLE Compte;
+DROP TABLE InscrBanque;
+DROP TABLE Banque;
+DROP TABLE DeviseInscrit;
+DROP TABLE Inscrit;
+DROP TABLE Devise;
+
+
+CREATE TABLE Devise
+(
+ id char(3) PRIMARY KEY,
+ nom varchar(20)
+);
+
+CREATE TABLE Inscrit
+(
+ id serial PRIMARY KEY,
+ nom varchar(40),
+ prenom varchar(40),
+ mail varchar(40) UNIQUE,
+ mdp varchar(40)
+);
+
+CREATE TABLE DeviseInscrit
+(
+ devise char(3),
+ idInscrit serial UNIQUE,
+ PRIMARY KEY(devise,idInscrit),
+ FOREIGN KEY (devise) REFERENCES Devise(id),
+ FOREIGN KEY (idInscrit) REFERENCES Inscrit(id)
+);
+
+CREATE TABLE Banque
+(
+ nom varchar(40) PRIMARY KEY,
+ urlsite varchar(60),
+ urllogo varchar(60),
+ urldl varchar(500)
+);
+
+CREATE TABLE InscrBanque
+(
+ id serial PRIMARY KEY,
+ nomBanque varchar(40),
+ idInscrit serial,
+ UNIQUE(nomBanque,idInscrit),
+ FOREIGN KEY (nomBanque) REFERENCES Banque(nom),
+ FOREIGN KEY (idInscrit) REFERENCES Inscrit(id)
+);
+
+CREATE TABLE Compte
+(
+ id serial PRIMARY KEY,
+ nom varchar(40),
+ idInscritBanque serial,
+ FOREIGN KEY (idInscritBanque) REFERENCES InscrBanque(id),
+ UNIQUE(idInscritBanque,nom)
+);
+
+CREATE TABLE Echeancier
+(
+ id serial PRIMARY KEY,
+ nom varchar(40),
+ credit numeric,
+ compte serial,
+ debit numeric,
+ dateE date,
+ datecrea date,
+ methodePayement varchar(20),
+ CONSTRAINT ck_methPaye CHECK (methodePayement IN ('CB','Cheque','Espece','Prélevement')),
+ FOREIGN KEY(compte) REFERENCES Compte(id),
+ UNIQUE (datecrea,compte)
+);
+
+CREATE TABLE Opération
+(
+ id serial PRIMARY KEY,
+ nom varchar(40),
+ credit numeric,
+ compte serial,
+ debit numeric,
+ dateO date,
+ datecrea date,
+ methodePayement varchar(20),
+ CONSTRAINT ck_methPaye CHECK (methodePayement IN ('CB','Cheque','Espece','Prélevement')),
+ FOREIGN KEY(compte) REFERENCES Compte(id),
+ UNIQUE (datecrea,compte)
+);
+
+CREATE TABLE Planification
+(
+ id serial PRIMARY KEY,
+ nom varchar(40),
+ credit numeric,
+ compte serial,
+ debit numeric,
+ dateP date,
+ datecrea date,
+ methodePayement varchar(20),
+ CONSTRAINT ck_methPaye CHECK (methodePayement IN ('CB','Cheque','Espece','Prélevement')),
+ FOREIGN KEY(compte) REFERENCES Compte(id),
+ UNIQUE (datecrea,compte)
+);,
\ No newline at end of file
--
2.36.3
From 584f87a2aa5a8c8e298767e6bed9332aea7f9bef Mon Sep 17 00:00:00 2001
From: viastolfi
Date: Fri, 25 Nov 2022 11:42:02 +0100
Subject: [PATCH 015/105] ajout de l'AltoRouteur
---
Sources/API/modele/AltoRouteur.php | 302 +++++++++++++++++++++++++++++
1 file changed, 302 insertions(+)
create mode 100644 Sources/API/modele/AltoRouteur.php
diff --git a/Sources/API/modele/AltoRouteur.php b/Sources/API/modele/AltoRouteur.php
new file mode 100644
index 0000000..be0a97d
--- /dev/null
+++ b/Sources/API/modele/AltoRouteur.php
@@ -0,0 +1,302 @@
+
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+class AltoRouter
+{
+
+ /**
+ * @var array Array of all routes (incl. named routes).
+ */
+ protected $routes = [];
+
+ /**
+ * @var array Array of all named routes.
+ */
+ protected $namedRoutes = [];
+
+ /**
+ * @var string Can be used to ignore leading part of the Request URL (if main file lives in subdirectory of host)
+ */
+ protected $basePath = '';
+
+ /**
+ * @var array Array of default match types (regex helpers)
+ */
+ protected $matchTypes = [
+ 'i' => '[0-9]++',
+ 'a' => '[0-9A-Za-z]++',
+ 'h' => '[0-9A-Fa-f]++',
+ '*' => '.+?',
+ '**' => '.++',
+ '' => '[^/\.]++'
+ ];
+
+ /**
+ * Create router in one call from config.
+ *
+ * @param array $routes
+ * @param string $basePath
+ * @param array $matchTypes
+ * @throws Exception
+ */
+ public function __construct(array $routes = [], $basePath = '', array $matchTypes = [])
+ {
+ $this->addRoutes($routes);
+ $this->setBasePath($basePath);
+ $this->addMatchTypes($matchTypes);
+ }
+
+ /**
+ * Retrieves all routes.
+ * Useful if you want to process or display routes.
+ * @return array All routes.
+ */
+ public function getRoutes()
+ {
+ return $this->routes;
+ }
+
+ /**
+ * Add multiple routes at once from array in the following format:
+ *
+ * $routes = [
+ * [$method, $route, $target, $name]
+ * ];
+ *
+ * @param array $routes
+ * @return void
+ * @author Koen Punt
+ * @throws Exception
+ */
+ public function addRoutes($routes)
+ {
+ if (!is_array($routes) && !$routes instanceof Traversable) {
+ throw new RuntimeException('Routes should be an array or an instance of Traversable');
+ }
+ foreach ($routes as $route) {
+ call_user_func_array([$this, 'map'], $route);
+ }
+ }
+
+ /**
+ * Set the base path.
+ * Useful if you are running your application from a subdirectory.
+ * @param string $basePath
+ */
+ public function setBasePath($basePath)
+ {
+ $this->basePath = $basePath;
+ }
+
+ /**
+ * Add named match types. It uses array_merge so keys can be overwritten.
+ *
+ * @param array $matchTypes The key is the name and the value is the regex.
+ */
+ public function addMatchTypes(array $matchTypes)
+ {
+ $this->matchTypes = array_merge($this->matchTypes, $matchTypes);
+ }
+
+ /**
+ * Map a route to a target
+ *
+ * @param string $method One of 5 HTTP Methods, or a pipe-separated list of multiple HTTP Methods (GET|POST|PATCH|PUT|DELETE)
+ * @param string $route The route regex, custom regex must start with an @. You can use multiple pre-set regex filters, like [i:id]
+ * @param mixed $target The target where this route should point to. Can be anything.
+ * @param string $name Optional name of this route. Supply if you want to reverse route this url in your application.
+ * @throws Exception
+ */
+ public function map($method, $route, $target, $name = null)
+ {
+
+ $this->routes[] = [$method, $route, $target, $name];
+
+ if ($name) {
+ if (isset($this->namedRoutes[$name])) {
+ throw new RuntimeException("Can not redeclare route '{$name}'");
+ }
+ $this->namedRoutes[$name] = $route;
+ }
+
+ return;
+ }
+
+ /**
+ * Reversed routing
+ *
+ * Generate the URL for a named route. Replace regexes with supplied parameters
+ *
+ * @param string $routeName The name of the route.
+ * @param array @params Associative array of parameters to replace placeholders with.
+ * @return string The URL of the route with named parameters in place.
+ * @throws Exception
+ */
+ public function generate($routeName, array $params = [])
+ {
+
+ // Check if named route exists
+ if (!isset($this->namedRoutes[$routeName])) {
+ throw new RuntimeException("Route '{$routeName}' does not exist.");
+ }
+
+ // Replace named parameters
+ $route = $this->namedRoutes[$routeName];
+
+ // prepend base path to route url again
+ $url = $this->basePath . $route;
+
+ if (preg_match_all('`(/|\.|)\[([^:\]]*+)(?::([^:\]]*+))?\](\?|)`', $route, $matches, PREG_SET_ORDER)) {
+ foreach ($matches as $index => $match) {
+ list($block, $pre, $type, $param, $optional) = $match;
+
+ if ($pre) {
+ $block = substr($block, 1);
+ }
+
+ if (isset($params[$param])) {
+ // Part is found, replace for param value
+ $url = str_replace($block, $params[$param], $url);
+ } elseif ($optional && $index !== 0) {
+ // Only strip preceding slash if it's not at the base
+ $url = str_replace($pre . $block, '', $url);
+ } else {
+ // Strip match block
+ $url = str_replace($block, '', $url);
+ }
+ }
+ }
+
+ return $url;
+ }
+
+ /**
+ * Match a given Request Url against stored routes
+ * @param string $requestUrl
+ * @param string $requestMethod
+ * @return array|boolean Array with route information on success, false on failure (no match).
+ */
+ public function match($requestUrl = null, $requestMethod = null)
+ {
+
+ $params = [];
+
+ // set Request Url if it isn't passed as parameter
+ if ($requestUrl === null) {
+ $requestUrl = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '/';
+ }
+
+ // strip base path from request url
+ $requestUrl = substr($requestUrl, strlen($this->basePath));
+
+ // Strip query string (?a=b) from Request Url
+ if (($strpos = strpos($requestUrl, '?')) !== false) {
+ $requestUrl = substr($requestUrl, 0, $strpos);
+ }
+
+ $lastRequestUrlChar = $requestUrl ? $requestUrl[strlen($requestUrl)-1] : '';
+
+ // set Request Method if it isn't passed as a parameter
+ if ($requestMethod === null) {
+ $requestMethod = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : 'GET';
+ }
+
+ foreach ($this->routes as $handler) {
+ list($methods, $route, $target, $name) = $handler;
+
+ $method_match = (stripos($methods, $requestMethod) !== false);
+
+ // Method did not match, continue to next route.
+ if (!$method_match) {
+ continue;
+ }
+
+ if ($route === '*') {
+ // * wildcard (matches all)
+ $match = true;
+ } elseif (isset($route[0]) && $route[0] === '@') {
+ // @ regex delimiter
+ $pattern = '`' . substr($route, 1) . '`u';
+ $match = preg_match($pattern, $requestUrl, $params) === 1;
+ } elseif (($position = strpos($route, '[')) === false) {
+ // No params in url, do string comparison
+ $match = strcmp($requestUrl, $route) === 0;
+ } else {
+ // Compare longest non-param string with url before moving on to regex
+ // Check if last character before param is a slash, because it could be optional if param is optional too (see https://github.com/dannyvankooten/AltoRouter/issues/241)
+ if (strncmp($requestUrl, $route, $position) !== 0 && ($lastRequestUrlChar === '/' || $route[$position-1] !== '/')) {
+ continue;
+ }
+
+ $regex = $this->compileRoute($route);
+ $match = preg_match($regex, $requestUrl, $params) === 1;
+ }
+
+ if ($match) {
+ if ($params) {
+ foreach ($params as $key => $value) {
+ if (is_numeric($key)) {
+ unset($params[$key]);
+ }
+ }
+ }
+
+ return [
+ 'target' => $target,
+ 'params' => $params,
+ 'name' => $name
+ ];
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Compile the regex for a given route (EXPENSIVE)
+ * @param $route
+ * @return string
+ */
+ protected function compileRoute($route)
+ {
+ if (preg_match_all('`(/|\.|)\[([^:\]]*+)(?::([^:\]]*+))?\](\?|)`', $route, $matches, PREG_SET_ORDER)) {
+ $matchTypes = $this->matchTypes;
+ foreach ($matches as $match) {
+ list($block, $pre, $type, $param, $optional) = $match;
+
+ if (isset($matchTypes[$type])) {
+ $type = $matchTypes[$type];
+ }
+ if ($pre === '.') {
+ $pre = '\.';
+ }
+
+ $optional = $optional !== '' ? '?' : null;
+
+ //Older versions of PCRE require the 'P' in (?P)
+ $pattern = '(?:'
+ . ($pre !== '' ? $pre : null)
+ . '('
+ . ($param !== '' ? "?P<$param>" : null)
+ . $type
+ . ')'
+ . $optional
+ . ')'
+ . $optional;
+
+ $route = str_replace($block, $pattern, $route);
+ }
+ }
+ return "`^$route$`u";
+ }
+}
\ No newline at end of file
--
2.36.3
From f5598ce94ffefb37644632d04c70bbb5d0d159e8 Mon Sep 17 00:00:00 2001
From: viastolfi
Date: Fri, 25 Nov 2022 11:45:06 +0100
Subject: [PATCH 016/105] ajout de l'AltoRouteur
---
Sources/API/modele/{AltoRouteur.php => AltoRouter.php} | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename Sources/API/modele/{AltoRouteur.php => AltoRouter.php} (100%)
diff --git a/Sources/API/modele/AltoRouteur.php b/Sources/API/modele/AltoRouter.php
similarity index 100%
rename from Sources/API/modele/AltoRouteur.php
rename to Sources/API/modele/AltoRouter.php
--
2.36.3
From 0751a60d18c374caa5f9c66d9bd664f678de19b8 Mon Sep 17 00:00:00 2001
From: viastolfi
Date: Fri, 25 Nov 2022 13:34:43 +0100
Subject: [PATCH 017/105] correction de l'autoloader
---
Sources/API/config/Autoload.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Sources/API/config/Autoload.php b/Sources/API/config/Autoload.php
index e7ca079..b6cee44 100644
--- a/Sources/API/config/Autoload.php
+++ b/Sources/API/config/Autoload.php
@@ -17,7 +17,7 @@ class Autoload{
private static function _autoload($class){
global $rep;
$filename = $class.'.php';
- $dir=array("./","config/","controler/");
+ $dir=array("./","config/","controler/","modele");
foreach($dir as $d){
$file=$rep.$d.$filename;
--
2.36.3
From ad10e2351cccb2e99dd6116ba710691c8a432e17 Mon Sep 17 00:00:00 2001
From: viastolfi
Date: Fri, 25 Nov 2022 13:36:08 +0100
Subject: [PATCH 018/105] correction de l'autoloader
---
Sources/API/config/Autoload.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Sources/API/config/Autoload.php b/Sources/API/config/Autoload.php
index b6cee44..e894d07 100644
--- a/Sources/API/config/Autoload.php
+++ b/Sources/API/config/Autoload.php
@@ -17,7 +17,7 @@ class Autoload{
private static function _autoload($class){
global $rep;
$filename = $class.'.php';
- $dir=array("./","config/","controler/","modele");
+ $dir=array("./","config/","controler/","modele/");
foreach($dir as $d){
$file=$rep.$d.$filename;
--
2.36.3
From f758b09cd69ab17085c5cf9fc9c0edf138c088b4 Mon Sep 17 00:00:00 2001
From: viastolfi
Date: Fri, 25 Nov 2022 13:38:38 +0100
Subject: [PATCH 019/105] correction de l'autoloader
---
Sources/API/config/Autoload.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Sources/API/config/Autoload.php b/Sources/API/config/Autoload.php
index e894d07..213f87c 100644
--- a/Sources/API/config/Autoload.php
+++ b/Sources/API/config/Autoload.php
@@ -17,7 +17,7 @@ class Autoload{
private static function _autoload($class){
global $rep;
$filename = $class.'.php';
- $dir=array("./","config/","controler/","modele/");
+ $dir=array("./","config/","controller/","modele/");
foreach($dir as $d){
$file=$rep.$d.$filename;
--
2.36.3
From 19600208777fef6bf19175c869d9924b5b03e716 Mon Sep 17 00:00:00 2001
From: viastolfi
Date: Fri, 25 Nov 2022 18:05:00 +0100
Subject: [PATCH 020/105] test des routes
---
Sources/API/index.php | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/Sources/API/index.php b/Sources/API/index.php
index dbdd788..100b2dd 100644
--- a/Sources/API/index.php
+++ b/Sources/API/index.php
@@ -6,13 +6,13 @@ require_once(__DIR__.'/config/Autoload.php');
Autoload::charger();
$router = new AltoRouter();
-$router->map('GET|POST',"/","test");
-$match=$router->match();
+$router->map( 'GET', '/', function() {
+ echo "OUIIIII";
+});
-if(!$match){echo "404"; die;}
-
-if($match){
- $cont = new Controller();
-}
+// map user details page
+$router->map( 'GET', '/test/', function() {
+ echo "NOOOOOOON";
+});
?>
\ No newline at end of file
--
2.36.3
From fd459d3e19cdca4e7eebfde9e83c44ed9e9e1647 Mon Sep 17 00:00:00 2001
From: viastolfi
Date: Fri, 25 Nov 2022 18:08:41 +0100
Subject: [PATCH 021/105] test des routes
---
Sources/API/index.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Sources/API/index.php b/Sources/API/index.php
index 100b2dd..4b5b99f 100644
--- a/Sources/API/index.php
+++ b/Sources/API/index.php
@@ -7,12 +7,12 @@ Autoload::charger();
$router = new AltoRouter();
-$router->map( 'GET', '/', function() {
+$router->map( 'GET|POST', '/', function() {
echo "OUIIIII";
});
// map user details page
-$router->map( 'GET', '/test/', function() {
+$router->map( 'GET|POST', '/test', function() {
echo "NOOOOOOON";
});
?>
\ No newline at end of file
--
2.36.3
From d00c09be2e9e513213c5e5554e63249172c988b9 Mon Sep 17 00:00:00 2001
From: Lucas EVARD
Date: Fri, 25 Nov 2022 18:14:16 +0100
Subject: [PATCH 022/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.drone.yml | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/.drone.yml b/.drone.yml
index cd99729..4130667 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -60,7 +60,10 @@ steps:
from_secret: db_user
CODEFIRST_CLIENTDRONE_ENV_MARIADB_PASSWORD:
from_secret: db_password
-
+ volumes:
+ - Sources/Data/tablewithgeneratedid.sql
+ - Sources/Data/insert.sql
+
- name: web-API
image: plugins/docker
settings:
--
2.36.3
From a66287d01f7a31bb1fdedb65bb4c927437087a36 Mon Sep 17 00:00:00 2001
From: Lucas EVARD
Date: Fri, 25 Nov 2022 18:14:49 +0100
Subject: [PATCH 023/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.drone.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.drone.yml b/.drone.yml
index 4130667..62f9f68 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -61,8 +61,8 @@ steps:
CODEFIRST_CLIENTDRONE_ENV_MARIADB_PASSWORD:
from_secret: db_password
volumes:
- - Sources/Data/tablewithgeneratedid.sql
- - Sources/Data/insert.sql
+ - ./Sources/Data/tablewithgeneratedid.sql
+ - ./Sources/Data/insert.sql
- name: web-API
image: plugins/docker
--
2.36.3
From 8caad87953fad45d964c8d85a3f15e738307d7d4 Mon Sep 17 00:00:00 2001
From: Lucas EVARD
Date: Fri, 25 Nov 2022 18:15:39 +0100
Subject: [PATCH 024/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.drone.yml | 3 ---
1 file changed, 3 deletions(-)
diff --git a/.drone.yml b/.drone.yml
index 62f9f68..2d8d5c7 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -60,9 +60,6 @@ steps:
from_secret: db_user
CODEFIRST_CLIENTDRONE_ENV_MARIADB_PASSWORD:
from_secret: db_password
- volumes:
- - ./Sources/Data/tablewithgeneratedid.sql
- - ./Sources/Data/insert.sql
- name: web-API
image: plugins/docker
--
2.36.3
From c0d04bf57b8c025c634953f8621e924b5c97ec77 Mon Sep 17 00:00:00 2001
From: viastolfi
Date: Fri, 25 Nov 2022 18:18:28 +0100
Subject: [PATCH 025/105] ajout du .htaccess pour rediriger les demandes de
route
---
Sources/API/.htaccess | 3 +++
1 file changed, 3 insertions(+)
create mode 100644 Sources/API/.htaccess
diff --git a/Sources/API/.htaccess b/Sources/API/.htaccess
new file mode 100644
index 0000000..7ded04e
--- /dev/null
+++ b/Sources/API/.htaccess
@@ -0,0 +1,3 @@
+RewriteEngine on
+RewriteCond %{REQUEST_FILENAME} !-f
+RewriteRule . index.php [L]
\ No newline at end of file
--
2.36.3
From 6eedeb0c5fb0c01510b51bca97e87fb49a187a09 Mon Sep 17 00:00:00 2001
From: Lucas EVARD
Date: Fri, 25 Nov 2022 18:24:12 +0100
Subject: [PATCH 026/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.drone.yml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/.drone.yml b/.drone.yml
index 2d8d5c7..9e3fe46 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -60,6 +60,8 @@ steps:
from_secret: db_user
CODEFIRST_CLIENTDRONE_ENV_MARIADB_PASSWORD:
from_secret: db_password
+ commands:
+ - mysqldump -u db_user -p db_database > Sources/Data/tablewithgeneratedid.sql
- name: web-API
image: plugins/docker
--
2.36.3
From d7becf10968e3f149a718372673e4e91a22f57da Mon Sep 17 00:00:00 2001
From: Lucas EVARD
Date: Fri, 25 Nov 2022 18:26:24 +0100
Subject: [PATCH 027/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.drone.yml | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/.drone.yml b/.drone.yml
index 9e3fe46..26fd887 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -60,8 +60,7 @@ steps:
from_secret: db_user
CODEFIRST_CLIENTDRONE_ENV_MARIADB_PASSWORD:
from_secret: db_password
- commands:
- - mysqldump -u db_user -p db_database > Sources/Data/tablewithgeneratedid.sql
+
- name: web-API
image: plugins/docker
@@ -92,4 +91,10 @@ steps:
from_secret: db_password
depends_on: [ web-API, deploy-container-mysql ]
-
\ No newline at end of file
+
+
+ - name: injectsql
+ commands:
+ - mysqldump -u db_user -p db_database > Sources/Data/tablewithgeneratedid.sql
+
+ depends_on: [ deploy-container-mysql, deploy-web-container ]
\ No newline at end of file
--
2.36.3
From 28d5adf5ee0aa129d46d924997022c95e9612049 Mon Sep 17 00:00:00 2001
From: Lucas EVARD
Date: Fri, 25 Nov 2022 18:27:27 +0100
Subject: [PATCH 028/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.drone.yml | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/.drone.yml b/.drone.yml
index 26fd887..1dd44f5 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -89,12 +89,6 @@ steps:
from_secret: db_user
CODEFIRST_CLIENTDRONE_ENV_MARIADB_PASSWORD:
from_secret: db_password
-
- depends_on: [ web-API, deploy-container-mysql ]
-
-
- - name: injectsql
commands:
- mysqldump -u db_user -p db_database > Sources/Data/tablewithgeneratedid.sql
-
- depends_on: [ deploy-container-mysql, deploy-web-container ]
\ No newline at end of file
+ depends_on: [ web-API, deploy-container-mysql ]
\ No newline at end of file
--
2.36.3
From e22ef96cfd65934a9fecaebad31f62d487d20599 Mon Sep 17 00:00:00 2001
From: Lucas EVARD
Date: Fri, 25 Nov 2022 18:28:46 +0100
Subject: [PATCH 029/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.drone.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.drone.yml b/.drone.yml
index 1dd44f5..2dfdc99 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -60,6 +60,8 @@ steps:
from_secret: db_user
CODEFIRST_CLIENTDRONE_ENV_MARIADB_PASSWORD:
from_secret: db_password
+ commands:
+ - mysql -u db_user -p db_database > Sources/Data/tablewithgeneratedid.sql
- name: web-API
@@ -89,6 +91,4 @@ steps:
from_secret: db_user
CODEFIRST_CLIENTDRONE_ENV_MARIADB_PASSWORD:
from_secret: db_password
- commands:
- - mysqldump -u db_user -p db_database > Sources/Data/tablewithgeneratedid.sql
depends_on: [ web-API, deploy-container-mysql ]
\ No newline at end of file
--
2.36.3
From 92f88b19659984604691074045e6c1c01fe99ced Mon Sep 17 00:00:00 2001
From: Lucas EVARD
Date: Fri, 25 Nov 2022 18:29:28 +0100
Subject: [PATCH 030/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.drone.yml | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/.drone.yml b/.drone.yml
index 2dfdc99..440d484 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -60,8 +60,6 @@ steps:
from_secret: db_user
CODEFIRST_CLIENTDRONE_ENV_MARIADB_PASSWORD:
from_secret: db_password
- commands:
- - mysql -u db_user -p db_database > Sources/Data/tablewithgeneratedid.sql
- name: web-API
@@ -76,6 +74,7 @@ steps:
password:
from_secret: secret-registry-password
+
- name: deploy-web-container
image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest
environment:
@@ -91,4 +90,6 @@ steps:
from_secret: db_user
CODEFIRST_CLIENTDRONE_ENV_MARIADB_PASSWORD:
from_secret: db_password
+ commands:
+ - mysql -u db_user -p db_database > Sources/Data/tablewithgeneratedid.sql
depends_on: [ web-API, deploy-container-mysql ]
\ No newline at end of file
--
2.36.3
From ce7d6b27ec7fcbc519914bdaef08a3e48cc8eb1d Mon Sep 17 00:00:00 2001
From: Lucas EVARD
Date: Fri, 25 Nov 2022 18:34:44 +0100
Subject: [PATCH 031/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.drone.yml | 2 --
1 file changed, 2 deletions(-)
diff --git a/.drone.yml b/.drone.yml
index 440d484..72a7369 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -90,6 +90,4 @@ steps:
from_secret: db_user
CODEFIRST_CLIENTDRONE_ENV_MARIADB_PASSWORD:
from_secret: db_password
- commands:
- - mysql -u db_user -p db_database > Sources/Data/tablewithgeneratedid.sql
depends_on: [ web-API, deploy-container-mysql ]
\ No newline at end of file
--
2.36.3
From 7b7f0164a86408ce5af99b154f4a51fd0c605a5c Mon Sep 17 00:00:00 2001
From: Lucas EVARD
Date: Fri, 25 Nov 2022 18:34:59 +0100
Subject: [PATCH 032/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'Dockerfile?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Dockerfile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Dockerfile b/Dockerfile
index 02d098e..2d263b9 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,3 +1,4 @@
FROM php:8.1-apache
RUN docker-php-ext-install mysqli pdo pdo_mysql && docker-php-ext-enable pdo_mysql
-COPY ./Sources/API /var/www/html/
\ No newline at end of file
+COPY ./Sources/API /var/www/html/
+RUN mysql -u db_user -p db_database > Sources/Data/tablewithgeneratedid.sql
\ No newline at end of file
--
2.36.3
From 29027efbef2b015d2ea41e62754e53f78b6f14fd Mon Sep 17 00:00:00 2001
From: Lucas EVARD
Date: Fri, 25 Nov 2022 18:37:30 +0100
Subject: [PATCH 033/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'Dockerfile?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Dockerfile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Dockerfile b/Dockerfile
index 2d263b9..63575f6 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,4 @@
FROM php:8.1-apache
RUN docker-php-ext-install mysqli pdo pdo_mysql && docker-php-ext-enable pdo_mysql
COPY ./Sources/API /var/www/html/
-RUN mysql -u db_user -p db_database > Sources/Data/tablewithgeneratedid.sql
\ No newline at end of file
+RUN mysql -u db_user -p db_database > https://codefirst.iut.uca.fr/git/ConsEcoTeam/ConsEco/src/branch/master/Sources/Data/tablewithgeneratedid.sql
\ No newline at end of file
--
2.36.3
From 53e00fdfb2feb97c3a5097df3b090ea54ae4cca4 Mon Sep 17 00:00:00 2001
From: Lucas EVARD
Date: Fri, 25 Nov 2022 18:39:14 +0100
Subject: [PATCH 034/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'Dockerfile?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Dockerfile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Dockerfile b/Dockerfile
index 63575f6..529d35f 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,4 @@
FROM php:8.1-apache
RUN docker-php-ext-install mysqli pdo pdo_mysql && docker-php-ext-enable pdo_mysql
COPY ./Sources/API /var/www/html/
-RUN mysql -u db_user -p db_database > https://codefirst.iut.uca.fr/git/ConsEcoTeam/ConsEco/src/branch/master/Sources/Data/tablewithgeneratedid.sql
\ No newline at end of file
+RUN mysql -u db_user -p db_database > /Sources/Data/tablewithgeneratedid.sql
\ No newline at end of file
--
2.36.3
From 081cd9554c33850bd8adcaadd2c271dd8f489597 Mon Sep 17 00:00:00 2001
From: Lucas EVARD
Date: Fri, 25 Nov 2022 18:41:52 +0100
Subject: [PATCH 035/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'Dockerfile?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Dockerfile | 1 +
1 file changed, 1 insertion(+)
diff --git a/Dockerfile b/Dockerfile
index 529d35f..a4dc0ab 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,5 @@
FROM php:8.1-apache
RUN docker-php-ext-install mysqli pdo pdo_mysql && docker-php-ext-enable pdo_mysql
COPY ./Sources/API /var/www/html/
+RUN pwd
RUN mysql -u db_user -p db_database > /Sources/Data/tablewithgeneratedid.sql
\ No newline at end of file
--
2.36.3
From 9b64f67fe51dd1ed0edf3665dcc5e68e85c68b2e Mon Sep 17 00:00:00 2001
From: Lucas EVARD
Date: Fri, 25 Nov 2022 18:43:14 +0100
Subject: [PATCH 036/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'Dockerfile?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Dockerfile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Dockerfile b/Dockerfile
index a4dc0ab..cac9712 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,5 +1,5 @@
FROM php:8.1-apache
RUN docker-php-ext-install mysqli pdo pdo_mysql && docker-php-ext-enable pdo_mysql
COPY ./Sources/API /var/www/html/
-RUN pwd
+RUN cd
RUN mysql -u db_user -p db_database > /Sources/Data/tablewithgeneratedid.sql
\ No newline at end of file
--
2.36.3
From e36abf4079c30bb9e206da71a63145dc0861693f Mon Sep 17 00:00:00 2001
From: Lucas EVARD
Date: Fri, 25 Nov 2022 18:44:02 +0100
Subject: [PATCH 037/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'Dockerfile?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Dockerfile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Dockerfile b/Dockerfile
index cac9712..3b93d60 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,5 +1,7 @@
FROM php:8.1-apache
RUN docker-php-ext-install mysqli pdo pdo_mysql && docker-php-ext-enable pdo_mysql
COPY ./Sources/API /var/www/html/
+RUN pwd
RUN cd
+RUN pwd
RUN mysql -u db_user -p db_database > /Sources/Data/tablewithgeneratedid.sql
\ No newline at end of file
--
2.36.3
From 345f6c83149964d2f86982016d4da476da837adb Mon Sep 17 00:00:00 2001
From: Lucas EVARD
Date: Fri, 25 Nov 2022 18:47:46 +0100
Subject: [PATCH 038/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'Dockerfile?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Dockerfile | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/Dockerfile b/Dockerfile
index 3b93d60..edc257c 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,7 +1,5 @@
FROM php:8.1-apache
RUN docker-php-ext-install mysqli pdo pdo_mysql && docker-php-ext-enable pdo_mysql
COPY ./Sources/API /var/www/html/
-RUN pwd
-RUN cd
-RUN pwd
+RUN ls -a
RUN mysql -u db_user -p db_database > /Sources/Data/tablewithgeneratedid.sql
\ No newline at end of file
--
2.36.3
From b108356b16218cb0ee5037a7eb4d8a8e199d8d00 Mon Sep 17 00:00:00 2001
From: Lucas EVARD
Date: Fri, 25 Nov 2022 18:51:19 +0100
Subject: [PATCH 039/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'Dockerfile?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Dockerfile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Dockerfile b/Dockerfile
index edc257c..981cfe3 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -2,4 +2,4 @@ FROM php:8.1-apache
RUN docker-php-ext-install mysqli pdo pdo_mysql && docker-php-ext-enable pdo_mysql
COPY ./Sources/API /var/www/html/
RUN ls -a
-RUN mysql -u db_user -p db_database > /Sources/Data/tablewithgeneratedid.sql
\ No newline at end of file
+RUN mysql -u db_user -p db_database > ./Sources/Data/tablewithgeneratedid.sql
\ No newline at end of file
--
2.36.3
From 3d5eccb6c11f739e4de35cfd173c5af4759835c1 Mon Sep 17 00:00:00 2001
From: Lucas EVARD
Date: Fri, 25 Nov 2022 18:52:41 +0100
Subject: [PATCH 040/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'Dockerfile?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Dockerfile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Dockerfile b/Dockerfile
index 981cfe3..aba45e6 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,5 +1,5 @@
FROM php:8.1-apache
RUN docker-php-ext-install mysqli pdo pdo_mysql && docker-php-ext-enable pdo_mysql
COPY ./Sources/API /var/www/html/
-RUN ls -a
-RUN mysql -u db_user -p db_database > ./Sources/Data/tablewithgeneratedid.sql
\ No newline at end of file
+RUN cd ./Sources/Data
+RUN mysql -u db_user -p db_database > tablewithgeneratedid.sql
\ No newline at end of file
--
2.36.3
From 07f46b5dfb9a2fc3cac3ceb8c2fd759d6546c556 Mon Sep 17 00:00:00 2001
From: Lucas EVARD
Date: Fri, 25 Nov 2022 18:54:57 +0100
Subject: [PATCH 041/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'Dockerfile?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Dockerfile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Dockerfile b/Dockerfile
index aba45e6..0bf2a41 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,5 +1,5 @@
FROM php:8.1-apache
RUN docker-php-ext-install mysqli pdo pdo_mysql && docker-php-ext-enable pdo_mysql
COPY ./Sources/API /var/www/html/
-RUN cd ./Sources/Data
-RUN mysql -u db_user -p db_database > tablewithgeneratedid.sql
\ No newline at end of file
+COPY ./Sources/Data /sql/
+RUN mysql -u db_user -p db_database > sql/tablewithgeneratedid.sql
\ No newline at end of file
--
2.36.3
From 6a18ef22a2d3a699a384301e60d4f236329250f2 Mon Sep 17 00:00:00 2001
From: Lucas EVARD
Date: Fri, 25 Nov 2022 18:55:58 +0100
Subject: [PATCH 042/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'Dockerfile?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Dockerfile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Dockerfile b/Dockerfile
index 0bf2a41..0b6ed22 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -2,4 +2,5 @@ FROM php:8.1-apache
RUN docker-php-ext-install mysqli pdo pdo_mysql && docker-php-ext-enable pdo_mysql
COPY ./Sources/API /var/www/html/
COPY ./Sources/Data /sql/
-RUN mysql -u db_user -p db_database > sql/tablewithgeneratedid.sql
\ No newline at end of file
+RUN cd /sql
+RUN mysql -u db_user -p db_database > tablewithgeneratedid.sql
\ No newline at end of file
--
2.36.3
From c017c769586764da6bc88de4c6c7ea1a3b82f7b7 Mon Sep 17 00:00:00 2001
From: Lucas EVARD
Date: Fri, 25 Nov 2022 18:59:00 +0100
Subject: [PATCH 043/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'Dockerfile?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Dockerfile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Dockerfile b/Dockerfile
index 0b6ed22..e6c004e 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -2,5 +2,5 @@ FROM php:8.1-apache
RUN docker-php-ext-install mysqli pdo pdo_mysql && docker-php-ext-enable pdo_mysql
COPY ./Sources/API /var/www/html/
COPY ./Sources/Data /sql/
-RUN cd /sql
-RUN mysql -u db_user -p db_database > tablewithgeneratedid.sql
\ No newline at end of file
+RUN apt-get installmysql-client
+RUN mysql -u db_user -p db_database > /sql/tablewithgeneratedid.sql
\ No newline at end of file
--
2.36.3
From 4c7f9391d008d742489e4171991e2294ef9f425b Mon Sep 17 00:00:00 2001
From: Lucas EVARD
Date: Fri, 25 Nov 2022 18:59:41 +0100
Subject: [PATCH 044/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'Dockerfile?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Dockerfile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Dockerfile b/Dockerfile
index e6c004e..9a351e1 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -2,5 +2,5 @@ FROM php:8.1-apache
RUN docker-php-ext-install mysqli pdo pdo_mysql && docker-php-ext-enable pdo_mysql
COPY ./Sources/API /var/www/html/
COPY ./Sources/Data /sql/
-RUN apt-get installmysql-client
+RUN apt-get install mysql-client
RUN mysql -u db_user -p db_database > /sql/tablewithgeneratedid.sql
\ No newline at end of file
--
2.36.3
From b9486895e036309665ab07582b00b690e15f7e1a Mon Sep 17 00:00:00 2001
From: Lucas EVARD
Date: Fri, 25 Nov 2022 19:04:06 +0100
Subject: [PATCH 045/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'Dockerfile?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Dockerfile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Dockerfile b/Dockerfile
index 9a351e1..11c1469 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -2,5 +2,5 @@ FROM php:8.1-apache
RUN docker-php-ext-install mysqli pdo pdo_mysql && docker-php-ext-enable pdo_mysql
COPY ./Sources/API /var/www/html/
COPY ./Sources/Data /sql/
-RUN apt-get install mysql-client
+FROM mysql-client
RUN mysql -u db_user -p db_database > /sql/tablewithgeneratedid.sql
\ No newline at end of file
--
2.36.3
From 7f5bbb06ba2ce85c8e7b335edbec3a8162883a9c Mon Sep 17 00:00:00 2001
From: Lucas EVARD
Date: Fri, 25 Nov 2022 19:04:50 +0100
Subject: [PATCH 046/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'Dockerfile?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Dockerfile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Dockerfile b/Dockerfile
index 11c1469..9bb6a7c 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -2,5 +2,5 @@ FROM php:8.1-apache
RUN docker-php-ext-install mysqli pdo pdo_mysql && docker-php-ext-enable pdo_mysql
COPY ./Sources/API /var/www/html/
COPY ./Sources/Data /sql/
-FROM mysql-client
+FROM mysql
RUN mysql -u db_user -p db_database > /sql/tablewithgeneratedid.sql
\ No newline at end of file
--
2.36.3
From 6a9fa57b7f2bc35dc563a4325ba3f226e60b8e46 Mon Sep 17 00:00:00 2001
From: Lucas EVARD
Date: Fri, 25 Nov 2022 19:06:44 +0100
Subject: [PATCH 047/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'Dockerfile?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Dockerfile | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/Dockerfile b/Dockerfile
index 9bb6a7c..97d8f98 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,6 +1,8 @@
FROM php:8.1-apache
RUN docker-php-ext-install mysqli pdo pdo_mysql && docker-php-ext-enable pdo_mysql
COPY ./Sources/API /var/www/html/
-COPY ./Sources/Data /sql/
FROM mysql
-RUN mysql -u db_user -p db_database > /sql/tablewithgeneratedid.sql
\ No newline at end of file
+COPY ./Sources/Data /sql/
+RUN ls -a /sql/
+RUN cd /sql/
+RUN mysql -u db_user -p db_database > tablewithgeneratedid.sql
\ No newline at end of file
--
2.36.3
From 7aa281ae21de4aea9e31648074101b15545f83c7 Mon Sep 17 00:00:00 2001
From: Lucas EVARD
Date: Fri, 25 Nov 2022 19:11:43 +0100
Subject: [PATCH 048/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'Dockerfile?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Dockerfile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Dockerfile b/Dockerfile
index 97d8f98..e8a6450 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -3,6 +3,6 @@ RUN docker-php-ext-install mysqli pdo pdo_mysql && docker-php-ext-enable pdo_mys
COPY ./Sources/API /var/www/html/
FROM mysql
COPY ./Sources/Data /sql/
-RUN ls -a /sql/
RUN cd /sql/
+RUN /etc/init.d/mysql start
RUN mysql -u db_user -p db_database > tablewithgeneratedid.sql
\ No newline at end of file
--
2.36.3
From f0bb87593f37177ce928d5d3856b76729eb5923c Mon Sep 17 00:00:00 2001
From: Lucas EVARD
Date: Fri, 25 Nov 2022 19:14:20 +0100
Subject: [PATCH 049/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'Dockerfile?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Dockerfile | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/Dockerfile b/Dockerfile
index e8a6450..735cda1 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,8 +1,7 @@
FROM php:8.1-apache
+RUN apt-get update && apt-get install -y mysql-client
RUN docker-php-ext-install mysqli pdo pdo_mysql && docker-php-ext-enable pdo_mysql
COPY ./Sources/API /var/www/html/
-FROM mysql
COPY ./Sources/Data /sql/
RUN cd /sql/
-RUN /etc/init.d/mysql start
RUN mysql -u db_user -p db_database > tablewithgeneratedid.sql
\ No newline at end of file
--
2.36.3
From e748392be93c9f513bc8e7a63f1a94b6f4c20445 Mon Sep 17 00:00:00 2001
From: Lucas EVARD
Date: Fri, 25 Nov 2022 19:16:13 +0100
Subject: [PATCH 050/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'Dockerfile?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Dockerfile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Dockerfile b/Dockerfile
index 735cda1..88d057e 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,5 +1,5 @@
FROM php:8.1-apache
-RUN apt-get update && apt-get install -y mysql-client
+RUN apt-get update && apt-get install -y mariadb-client
RUN docker-php-ext-install mysqli pdo pdo_mysql && docker-php-ext-enable pdo_mysql
COPY ./Sources/API /var/www/html/
COPY ./Sources/Data /sql/
--
2.36.3
From 709124b73042c98427415dd017af681a0aa1ea58 Mon Sep 17 00:00:00 2001
From: Lucas EVARD
Date: Fri, 25 Nov 2022 19:31:32 +0100
Subject: [PATCH 051/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.drone.yml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/.drone.yml b/.drone.yml
index 72a7369..7cf9fa5 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -60,6 +60,8 @@ steps:
from_secret: db_user
CODEFIRST_CLIENTDRONE_ENV_MARIADB_PASSWORD:
from_secret: db_password
+ volumes:
+ - ${PWD}/mariadb:/Sources/Data/tablewithgeneratedid.sql
- name: web-API
--
2.36.3
From 3f39b3e1c2301d2836699664c01b3ddf9bdb11bc Mon Sep 17 00:00:00 2001
From: Lucas EVARD
Date: Fri, 25 Nov 2022 19:31:50 +0100
Subject: [PATCH 052/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.drone.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.drone.yml b/.drone.yml
index 7cf9fa5..36b96f4 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -61,7 +61,7 @@ steps:
CODEFIRST_CLIENTDRONE_ENV_MARIADB_PASSWORD:
from_secret: db_password
volumes:
- - ${PWD}/mariadb:/Sources/Data/tablewithgeneratedid.sql
+ - /Sources/Data/tablewithgeneratedid.sql
- name: web-API
--
2.36.3
From 3002f215c16754b05c5df570fdecd4cb9560b91d Mon Sep 17 00:00:00 2001
From: Lucas EVARD
Date: Fri, 25 Nov 2022 19:32:08 +0100
Subject: [PATCH 053/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.drone.yml | 2 --
1 file changed, 2 deletions(-)
diff --git a/.drone.yml b/.drone.yml
index 36b96f4..72a7369 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -60,8 +60,6 @@ steps:
from_secret: db_user
CODEFIRST_CLIENTDRONE_ENV_MARIADB_PASSWORD:
from_secret: db_password
- volumes:
- - /Sources/Data/tablewithgeneratedid.sql
- name: web-API
--
2.36.3
From f45f252c523b79082d2ea37f522530dac996089d Mon Sep 17 00:00:00 2001
From: Lucas EVARD
Date: Fri, 25 Nov 2022 19:34:23 +0100
Subject: [PATCH 054/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.drone.yml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/.drone.yml b/.drone.yml
index 72a7369..9d747e6 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -60,6 +60,9 @@ steps:
from_secret: db_user
CODEFIRST_CLIENTDRONE_ENV_MARIADB_PASSWORD:
from_secret: db_password
+ commands:
+ - apt-get update && apt-get install -y mariadb-client
+ - mysql -u db_user -p db_database > Sources/Data/tablewithgeneratedid.sql
- name: web-API
--
2.36.3
From 03c969077f44e40071ba7cd58d7fdf151da81b2b Mon Sep 17 00:00:00 2001
From: Lucas EVARD
Date: Fri, 25 Nov 2022 19:37:08 +0100
Subject: [PATCH 055/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.drone.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.drone.yml b/.drone.yml
index 9d747e6..6799cfc 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -62,7 +62,7 @@ steps:
from_secret: db_password
commands:
- apt-get update && apt-get install -y mariadb-client
- - mysql -u db_user -p db_database > Sources/Data/tablewithgeneratedid.sql
+ - echo db_password | mysql -u db_user -p db_database > Sources/Data/tablewithgeneratedid.sql
- name: web-API
--
2.36.3
From e3d701b8b437411f4df8cfe16f36ba61cffdd36d Mon Sep 17 00:00:00 2001
From: Lucas EVARD
Date: Fri, 25 Nov 2022 19:39:05 +0100
Subject: [PATCH 056/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.drone.yml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/.drone.yml b/.drone.yml
index 6799cfc..0f04e2e 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -62,7 +62,8 @@ steps:
from_secret: db_password
commands:
- apt-get update && apt-get install -y mariadb-client
- - echo db_password | mysql -u db_user -p db_database > Sources/Data/tablewithgeneratedid.sql
+ - MYSQL_PWD = db_password
+ - mysql -u db_user -p db_database > Sources/Data/tablewithgeneratedid.sql
- name: web-API
--
2.36.3
From 9afdb0bd761abbd96bc79aa191bc260b44a6510b Mon Sep 17 00:00:00 2001
From: Lucas EVARD
Date: Fri, 25 Nov 2022 19:41:01 +0100
Subject: [PATCH 057/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.drone.yml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/.drone.yml b/.drone.yml
index 0f04e2e..561712f 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -62,7 +62,8 @@ steps:
from_secret: db_password
commands:
- apt-get update && apt-get install -y mariadb-client
- - MYSQL_PWD = db_password
+ - declare -x MYSQL_PWD
+ - MYSQL_PWD = db_password
- mysql -u db_user -p db_database > Sources/Data/tablewithgeneratedid.sql
--
2.36.3
From 901ebe3c04085280bdf06df009c12608d97aa88d Mon Sep 17 00:00:00 2001
From: Lucas EVARD
Date: Fri, 25 Nov 2022 19:48:47 +0100
Subject: [PATCH 058/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.drone.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.drone.yml b/.drone.yml
index 561712f..647c1e6 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -64,7 +64,7 @@ steps:
- apt-get update && apt-get install -y mariadb-client
- declare -x MYSQL_PWD
- MYSQL_PWD = db_password
- - mysql -u db_user -p db_database > Sources/Data/tablewithgeneratedid.sql
+ - mysql -u db_user -pdb_password db_database > Sources/Data/tablewithgeneratedid.sql
- name: web-API
--
2.36.3
From 94ac0bf95d8db7cf672a4a32278df4cbc3387a54 Mon Sep 17 00:00:00 2001
From: Lucas EVARD
Date: Fri, 25 Nov 2022 19:49:11 +0100
Subject: [PATCH 059/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.drone.yml | 2 --
1 file changed, 2 deletions(-)
diff --git a/.drone.yml b/.drone.yml
index 647c1e6..7c07bb9 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -62,8 +62,6 @@ steps:
from_secret: db_password
commands:
- apt-get update && apt-get install -y mariadb-client
- - declare -x MYSQL_PWD
- - MYSQL_PWD = db_password
- mysql -u db_user -pdb_password db_database > Sources/Data/tablewithgeneratedid.sql
--
2.36.3
From 4c268995ad286f1344f29b882921b7bd737cccb4 Mon Sep 17 00:00:00 2001
From: Lucas EVARD
Date: Fri, 25 Nov 2022 20:13:57 +0100
Subject: [PATCH 060/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.drone.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.drone.yml b/.drone.yml
index 7c07bb9..7fb04b9 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -62,7 +62,7 @@ steps:
from_secret: db_password
commands:
- apt-get update && apt-get install -y mariadb-client
- - mysql -u db_user -pdb_password db_database > Sources/Data/tablewithgeneratedid.sql
+ - mysql -u ${db_user} -p${db_password} ${db_database} > Sources/Data/tablewithgeneratedid.sql
- name: web-API
--
2.36.3
From 72f1d8fa14ba98049ffe718930321515e07090ef Mon Sep 17 00:00:00 2001
From: Lucas EVARD
Date: Fri, 25 Nov 2022 20:15:43 +0100
Subject: [PATCH 061/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.drone.yml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/.drone.yml b/.drone.yml
index 7fb04b9..64334cb 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -62,7 +62,8 @@ steps:
from_secret: db_password
commands:
- apt-get update && apt-get install -y mariadb-client
- - mysql -u ${db_user} -p${db_password} ${db_database} > Sources/Data/tablewithgeneratedid.sql
+ - mysql -u ${DB_USER} -p${DB_PASSWORD} ${DB_DATABASE} > Sources/Data/tablewithgeneratedid.sql
+ secrets: [ db_user, db_password,db_database ]
- name: web-API
--
2.36.3
From 896eaf6035a6284c294d848b44dd36c81ea5c4df Mon Sep 17 00:00:00 2001
From: Lucas EVARD
Date: Fri, 25 Nov 2022 20:16:12 +0100
Subject: [PATCH 062/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.drone.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.drone.yml b/.drone.yml
index 64334cb..ca7426d 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -63,7 +63,7 @@ steps:
commands:
- apt-get update && apt-get install -y mariadb-client
- mysql -u ${DB_USER} -p${DB_PASSWORD} ${DB_DATABASE} > Sources/Data/tablewithgeneratedid.sql
- secrets: [ db_user, db_password,db_database ]
+ secrets: [ db_user, db_password,db_database ]
- name: web-API
--
2.36.3
From 311a7a603f1604b9ebd814d34ee6dffac8ed4765 Mon Sep 17 00:00:00 2001
From: Lucas EVARD
Date: Fri, 25 Nov 2022 20:34:43 +0100
Subject: [PATCH 063/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.drone.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.drone.yml b/.drone.yml
index ca7426d..1e63758 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -62,7 +62,7 @@ steps:
from_secret: db_password
commands:
- apt-get update && apt-get install -y mariadb-client
- - mysql -u ${DB_USER} -p${DB_PASSWORD} ${DB_DATABASE} > Sources/Data/tablewithgeneratedid.sql
+ - mysql -u $${DB_USER} -p$${DB_PASSWORD} $${DB_DATABASE} > Sources/Data/tablewithgeneratedid.sql
secrets: [ db_user, db_password,db_database ]
--
2.36.3
From e07290cd63a49c9ff4cecb13b0966cca66e83917 Mon Sep 17 00:00:00 2001
From: Lucas EVARD
Date: Fri, 25 Nov 2022 20:36:32 +0100
Subject: [PATCH 064/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.drone.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.drone.yml b/.drone.yml
index 1e63758..0db98ae 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -62,7 +62,7 @@ steps:
from_secret: db_password
commands:
- apt-get update && apt-get install -y mariadb-client
- - mysql -u $${DB_USER} -p$${DB_PASSWORD} $${DB_DATABASE} > Sources/Data/tablewithgeneratedid.sql
+ - mysql -u $DB_USER -p$DB_PASSWORD $DB_DATABASE > Sources/Data/tablewithgeneratedid.sql
secrets: [ db_user, db_password,db_database ]
--
2.36.3
From 23ef83b8e971aec57a7e37160ecfdda1cf8a3af1 Mon Sep 17 00:00:00 2001
From: Lucas EVARD
Date: Fri, 25 Nov 2022 20:40:34 +0100
Subject: [PATCH 065/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.drone.yml | 1 +
1 file changed, 1 insertion(+)
diff --git a/.drone.yml b/.drone.yml
index 0db98ae..5929383 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -61,6 +61,7 @@ steps:
CODEFIRST_CLIENTDRONE_ENV_MARIADB_PASSWORD:
from_secret: db_password
commands:
+ - echo $DB_USER
- apt-get update && apt-get install -y mariadb-client
- mysql -u $DB_USER -p$DB_PASSWORD $DB_DATABASE > Sources/Data/tablewithgeneratedid.sql
secrets: [ db_user, db_password,db_database ]
--
2.36.3
From 271d5ba63020f19c833c1451eeaaa47d0f005317 Mon Sep 17 00:00:00 2001
From: Lucas EVARD
Date: Fri, 25 Nov 2022 20:41:14 +0100
Subject: [PATCH 066/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.drone.yml | 1 -
1 file changed, 1 deletion(-)
diff --git a/.drone.yml b/.drone.yml
index 5929383..0db98ae 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -61,7 +61,6 @@ steps:
CODEFIRST_CLIENTDRONE_ENV_MARIADB_PASSWORD:
from_secret: db_password
commands:
- - echo $DB_USER
- apt-get update && apt-get install -y mariadb-client
- mysql -u $DB_USER -p$DB_PASSWORD $DB_DATABASE > Sources/Data/tablewithgeneratedid.sql
secrets: [ db_user, db_password,db_database ]
--
2.36.3
From 7b2448a646a63b4245b70c372bce4499ae15551b Mon Sep 17 00:00:00 2001
From: Lucas EVARD
Date: Fri, 25 Nov 2022 20:56:06 +0100
Subject: [PATCH 067/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.drone.yml | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/.drone.yml b/.drone.yml
index 0db98ae..b74d756 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -62,9 +62,7 @@ steps:
from_secret: db_password
commands:
- apt-get update && apt-get install -y mariadb-client
- - mysql -u $DB_USER -p$DB_PASSWORD $DB_DATABASE > Sources/Data/tablewithgeneratedid.sql
- secrets: [ db_user, db_password,db_database ]
-
+ - mysql -u $db_user -p$db_password $db_database > Sources/Data/tablewithgeneratedid.sql
- name: web-API
image: plugins/docker
--
2.36.3
From 1731e4d5585952ee755f074c00720c8f5f535f15 Mon Sep 17 00:00:00 2001
From: Lucas EVARD
Date: Fri, 25 Nov 2022 20:57:27 +0100
Subject: [PATCH 068/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.drone.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.drone.yml b/.drone.yml
index b74d756..c5e0aa5 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -62,7 +62,7 @@ steps:
from_secret: db_password
commands:
- apt-get update && apt-get install -y mariadb-client
- - mysql -u $db_user -p$db_password $db_database > Sources/Data/tablewithgeneratedid.sql
+ - mysql -u $CODEFIRST_CLIENTDRONE_ENV_MARIADB_USER -p$CODEFIRST_CLIENTDRONE_ENV_MARIADB_ROOT_PASSWORD $CODEFIRST_CLIENTDRONE_ENV_MARIADB_DATABASE > Sources/Data/tablewithgeneratedid.sql
- name: web-API
image: plugins/docker
--
2.36.3
From b8a9eaf567d377136a21a5bfada0b83b5d07bd95 Mon Sep 17 00:00:00 2001
From: Lucas EVARD
Date: Fri, 25 Nov 2022 21:03:46 +0100
Subject: [PATCH 069/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.drone.yml | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/.drone.yml b/.drone.yml
index c5e0aa5..ed59caa 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -60,10 +60,7 @@ steps:
from_secret: db_user
CODEFIRST_CLIENTDRONE_ENV_MARIADB_PASSWORD:
from_secret: db_password
- commands:
- - apt-get update && apt-get install -y mariadb-client
- - mysql -u $CODEFIRST_CLIENTDRONE_ENV_MARIADB_USER -p$CODEFIRST_CLIENTDRONE_ENV_MARIADB_ROOT_PASSWORD $CODEFIRST_CLIENTDRONE_ENV_MARIADB_DATABASE > Sources/Data/tablewithgeneratedid.sql
-
+
- name: web-API
image: plugins/docker
settings:
--
2.36.3
From c72a79ae54149eb2654880ad013a8bbead802ff6 Mon Sep 17 00:00:00 2001
From: Lucas EVARD
Date: Fri, 25 Nov 2022 21:16:28 +0100
Subject: [PATCH 070/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'Dockerfile?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Dockerfile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Dockerfile b/Dockerfile
index 88d057e..06cfa2d 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -4,4 +4,4 @@ RUN docker-php-ext-install mysqli pdo pdo_mysql && docker-php-ext-enable pdo_mys
COPY ./Sources/API /var/www/html/
COPY ./Sources/Data /sql/
RUN cd /sql/
-RUN mysql -u db_user -p db_database > tablewithgeneratedid.sql
\ No newline at end of file
+RUN mysql -u lulu -plulu lulu > tablewithgeneratedid.sql
\ No newline at end of file
--
2.36.3
From 35ef3d3a7d438f7914b2786d6dc683f617c95d1c Mon Sep 17 00:00:00 2001
From: Lucas EVARD
Date: Fri, 25 Nov 2022 21:21:55 +0100
Subject: [PATCH 071/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'Dockerfile?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Dockerfile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Dockerfile b/Dockerfile
index 06cfa2d..094b901 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -4,4 +4,4 @@ RUN docker-php-ext-install mysqli pdo pdo_mysql && docker-php-ext-enable pdo_mys
COPY ./Sources/API /var/www/html/
COPY ./Sources/Data /sql/
RUN cd /sql/
-RUN mysql -u lulu -plulu lulu > tablewithgeneratedid.sql
\ No newline at end of file
+RUN mysql --user=lulu --password=lulu lulu > tablewithgeneratedid.sql
\ No newline at end of file
--
2.36.3
From ef18ad6a88ae82c8a0b6bb0abf0e6a4749a8ab66 Mon Sep 17 00:00:00 2001
From: Lucas EVARD
Date: Fri, 25 Nov 2022 21:25:48 +0100
Subject: [PATCH 072/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'Dockerfile?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Dockerfile | 1 -
1 file changed, 1 deletion(-)
diff --git a/Dockerfile b/Dockerfile
index 094b901..c76abc5 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -4,4 +4,3 @@ RUN docker-php-ext-install mysqli pdo pdo_mysql && docker-php-ext-enable pdo_mys
COPY ./Sources/API /var/www/html/
COPY ./Sources/Data /sql/
RUN cd /sql/
-RUN mysql --user=lulu --password=lulu lulu > tablewithgeneratedid.sql
\ No newline at end of file
--
2.36.3
From 670161bea992e16076c8940a7f0c51f7a5a10b88 Mon Sep 17 00:00:00 2001
From: viastolfi
Date: Mon, 28 Nov 2022 11:12:58 +0100
Subject: [PATCH 073/105] =?UTF-8?q?ajout=20des=20routes=20et=20d'une=20pre?=
=?UTF-8?q?mi=C3=A8re=20requ=C3=AAte=20en=20base=20de=20donn=C3=A9es=20(no?=
=?UTF-8?q?rmalement=20l'API=20focntionne=20d=C3=A9sormais?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Sources/API/.htaccess | 3 -
Sources/API/config/Autoload.php | 2 +-
Sources/API/controller/Controller.php | 15 +-
Sources/API/index.php | 15 +-
Sources/API/modele/AltoRouter.php | 302 ------------------
Sources/API/modele/Connection.php | 36 +++
Sources/API/modele/MdlInscrit.php | 14 +
.../API/modele/gateways/InscritGateway.php | 17 +
8 files changed, 86 insertions(+), 318 deletions(-)
delete mode 100644 Sources/API/modele/AltoRouter.php
create mode 100644 Sources/API/modele/Connection.php
create mode 100644 Sources/API/modele/MdlInscrit.php
create mode 100644 Sources/API/modele/gateways/InscritGateway.php
diff --git a/Sources/API/.htaccess b/Sources/API/.htaccess
index 7ded04e..e69de29 100644
--- a/Sources/API/.htaccess
+++ b/Sources/API/.htaccess
@@ -1,3 +0,0 @@
-RewriteEngine on
-RewriteCond %{REQUEST_FILENAME} !-f
-RewriteRule . index.php [L]
\ No newline at end of file
diff --git a/Sources/API/config/Autoload.php b/Sources/API/config/Autoload.php
index 213f87c..10eb20c 100644
--- a/Sources/API/config/Autoload.php
+++ b/Sources/API/config/Autoload.php
@@ -17,7 +17,7 @@ class Autoload{
private static function _autoload($class){
global $rep;
$filename = $class.'.php';
- $dir=array("./","config/","controller/","modele/");
+ $dir=array("./","config/","controller/","modele/","modele/gateways/");
foreach($dir as $d){
$file=$rep.$d.$filename;
diff --git a/Sources/API/controller/Controller.php b/Sources/API/controller/Controller.php
index 58a4494..4d1fdb1 100644
--- a/Sources/API/controller/Controller.php
+++ b/Sources/API/controller/Controller.php
@@ -2,8 +2,19 @@
class Controller{
- function __construct(){
- echo "tu es bien arrivé";
+ function __construct($url){
+ switch($url[0]){
+ case "SELECT":
+ switch($url[1]){
+ case "Inscrit":
+ $res=MdlInscrit::selectAll();
+ print(json_encode($res));
+ break;
+ }
+ break;
+ default:
+ echo "ERREUR";
+ }
}
}
diff --git a/Sources/API/index.php b/Sources/API/index.php
index 4b5b99f..8ba788e 100644
--- a/Sources/API/index.php
+++ b/Sources/API/index.php
@@ -1,18 +1,13 @@
map( 'GET|POST', '/', function() {
- echo "OUIIIII";
-});
+$url='';
+if(isset($_GET['url'])){
+ $url = explode('/',$_GET['url']);
+}
-// map user details page
-$router->map( 'GET|POST', '/test', function() {
- echo "NOOOOOOON";
-});
+$cont = new Controller($url);
?>
\ No newline at end of file
diff --git a/Sources/API/modele/AltoRouter.php b/Sources/API/modele/AltoRouter.php
deleted file mode 100644
index be0a97d..0000000
--- a/Sources/API/modele/AltoRouter.php
+++ /dev/null
@@ -1,302 +0,0 @@
-
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-*/
-
-class AltoRouter
-{
-
- /**
- * @var array Array of all routes (incl. named routes).
- */
- protected $routes = [];
-
- /**
- * @var array Array of all named routes.
- */
- protected $namedRoutes = [];
-
- /**
- * @var string Can be used to ignore leading part of the Request URL (if main file lives in subdirectory of host)
- */
- protected $basePath = '';
-
- /**
- * @var array Array of default match types (regex helpers)
- */
- protected $matchTypes = [
- 'i' => '[0-9]++',
- 'a' => '[0-9A-Za-z]++',
- 'h' => '[0-9A-Fa-f]++',
- '*' => '.+?',
- '**' => '.++',
- '' => '[^/\.]++'
- ];
-
- /**
- * Create router in one call from config.
- *
- * @param array $routes
- * @param string $basePath
- * @param array $matchTypes
- * @throws Exception
- */
- public function __construct(array $routes = [], $basePath = '', array $matchTypes = [])
- {
- $this->addRoutes($routes);
- $this->setBasePath($basePath);
- $this->addMatchTypes($matchTypes);
- }
-
- /**
- * Retrieves all routes.
- * Useful if you want to process or display routes.
- * @return array All routes.
- */
- public function getRoutes()
- {
- return $this->routes;
- }
-
- /**
- * Add multiple routes at once from array in the following format:
- *
- * $routes = [
- * [$method, $route, $target, $name]
- * ];
- *
- * @param array $routes
- * @return void
- * @author Koen Punt
- * @throws Exception
- */
- public function addRoutes($routes)
- {
- if (!is_array($routes) && !$routes instanceof Traversable) {
- throw new RuntimeException('Routes should be an array or an instance of Traversable');
- }
- foreach ($routes as $route) {
- call_user_func_array([$this, 'map'], $route);
- }
- }
-
- /**
- * Set the base path.
- * Useful if you are running your application from a subdirectory.
- * @param string $basePath
- */
- public function setBasePath($basePath)
- {
- $this->basePath = $basePath;
- }
-
- /**
- * Add named match types. It uses array_merge so keys can be overwritten.
- *
- * @param array $matchTypes The key is the name and the value is the regex.
- */
- public function addMatchTypes(array $matchTypes)
- {
- $this->matchTypes = array_merge($this->matchTypes, $matchTypes);
- }
-
- /**
- * Map a route to a target
- *
- * @param string $method One of 5 HTTP Methods, or a pipe-separated list of multiple HTTP Methods (GET|POST|PATCH|PUT|DELETE)
- * @param string $route The route regex, custom regex must start with an @. You can use multiple pre-set regex filters, like [i:id]
- * @param mixed $target The target where this route should point to. Can be anything.
- * @param string $name Optional name of this route. Supply if you want to reverse route this url in your application.
- * @throws Exception
- */
- public function map($method, $route, $target, $name = null)
- {
-
- $this->routes[] = [$method, $route, $target, $name];
-
- if ($name) {
- if (isset($this->namedRoutes[$name])) {
- throw new RuntimeException("Can not redeclare route '{$name}'");
- }
- $this->namedRoutes[$name] = $route;
- }
-
- return;
- }
-
- /**
- * Reversed routing
- *
- * Generate the URL for a named route. Replace regexes with supplied parameters
- *
- * @param string $routeName The name of the route.
- * @param array @params Associative array of parameters to replace placeholders with.
- * @return string The URL of the route with named parameters in place.
- * @throws Exception
- */
- public function generate($routeName, array $params = [])
- {
-
- // Check if named route exists
- if (!isset($this->namedRoutes[$routeName])) {
- throw new RuntimeException("Route '{$routeName}' does not exist.");
- }
-
- // Replace named parameters
- $route = $this->namedRoutes[$routeName];
-
- // prepend base path to route url again
- $url = $this->basePath . $route;
-
- if (preg_match_all('`(/|\.|)\[([^:\]]*+)(?::([^:\]]*+))?\](\?|)`', $route, $matches, PREG_SET_ORDER)) {
- foreach ($matches as $index => $match) {
- list($block, $pre, $type, $param, $optional) = $match;
-
- if ($pre) {
- $block = substr($block, 1);
- }
-
- if (isset($params[$param])) {
- // Part is found, replace for param value
- $url = str_replace($block, $params[$param], $url);
- } elseif ($optional && $index !== 0) {
- // Only strip preceding slash if it's not at the base
- $url = str_replace($pre . $block, '', $url);
- } else {
- // Strip match block
- $url = str_replace($block, '', $url);
- }
- }
- }
-
- return $url;
- }
-
- /**
- * Match a given Request Url against stored routes
- * @param string $requestUrl
- * @param string $requestMethod
- * @return array|boolean Array with route information on success, false on failure (no match).
- */
- public function match($requestUrl = null, $requestMethod = null)
- {
-
- $params = [];
-
- // set Request Url if it isn't passed as parameter
- if ($requestUrl === null) {
- $requestUrl = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '/';
- }
-
- // strip base path from request url
- $requestUrl = substr($requestUrl, strlen($this->basePath));
-
- // Strip query string (?a=b) from Request Url
- if (($strpos = strpos($requestUrl, '?')) !== false) {
- $requestUrl = substr($requestUrl, 0, $strpos);
- }
-
- $lastRequestUrlChar = $requestUrl ? $requestUrl[strlen($requestUrl)-1] : '';
-
- // set Request Method if it isn't passed as a parameter
- if ($requestMethod === null) {
- $requestMethod = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : 'GET';
- }
-
- foreach ($this->routes as $handler) {
- list($methods, $route, $target, $name) = $handler;
-
- $method_match = (stripos($methods, $requestMethod) !== false);
-
- // Method did not match, continue to next route.
- if (!$method_match) {
- continue;
- }
-
- if ($route === '*') {
- // * wildcard (matches all)
- $match = true;
- } elseif (isset($route[0]) && $route[0] === '@') {
- // @ regex delimiter
- $pattern = '`' . substr($route, 1) . '`u';
- $match = preg_match($pattern, $requestUrl, $params) === 1;
- } elseif (($position = strpos($route, '[')) === false) {
- // No params in url, do string comparison
- $match = strcmp($requestUrl, $route) === 0;
- } else {
- // Compare longest non-param string with url before moving on to regex
- // Check if last character before param is a slash, because it could be optional if param is optional too (see https://github.com/dannyvankooten/AltoRouter/issues/241)
- if (strncmp($requestUrl, $route, $position) !== 0 && ($lastRequestUrlChar === '/' || $route[$position-1] !== '/')) {
- continue;
- }
-
- $regex = $this->compileRoute($route);
- $match = preg_match($regex, $requestUrl, $params) === 1;
- }
-
- if ($match) {
- if ($params) {
- foreach ($params as $key => $value) {
- if (is_numeric($key)) {
- unset($params[$key]);
- }
- }
- }
-
- return [
- 'target' => $target,
- 'params' => $params,
- 'name' => $name
- ];
- }
- }
-
- return false;
- }
-
- /**
- * Compile the regex for a given route (EXPENSIVE)
- * @param $route
- * @return string
- */
- protected function compileRoute($route)
- {
- if (preg_match_all('`(/|\.|)\[([^:\]]*+)(?::([^:\]]*+))?\](\?|)`', $route, $matches, PREG_SET_ORDER)) {
- $matchTypes = $this->matchTypes;
- foreach ($matches as $match) {
- list($block, $pre, $type, $param, $optional) = $match;
-
- if (isset($matchTypes[$type])) {
- $type = $matchTypes[$type];
- }
- if ($pre === '.') {
- $pre = '\.';
- }
-
- $optional = $optional !== '' ? '?' : null;
-
- //Older versions of PCRE require the 'P' in (?P)
- $pattern = '(?:'
- . ($pre !== '' ? $pre : null)
- . '('
- . ($param !== '' ? "?P<$param>" : null)
- . $type
- . ')'
- . $optional
- . ')'
- . $optional;
-
- $route = str_replace($block, $pattern, $route);
- }
- }
- return "`^$route$`u";
- }
-}
\ No newline at end of file
diff --git a/Sources/API/modele/Connection.php b/Sources/API/modele/Connection.php
new file mode 100644
index 0000000..9f3b119
--- /dev/null
+++ b/Sources/API/modele/Connection.php
@@ -0,0 +1,36 @@
+setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
+}
+
+/** * @param string $query
+ * @param array $parameters *
+ * @return bool Returns `true` on success, `false` otherwise
+*/
+
+public function executeQuery(string $query, array $parameters = []) : bool{
+ $this->stmt = parent::prepare($query);
+ foreach ($parameters as $name => $value) {
+ $this->stmt->bindValue($name, $value[0], $value[1]);
+ }
+
+ return $this->stmt->execute();
+}
+
+public function getResults() : array {
+ return $this->stmt->fetchall();
+}
+
+public function executeQueryWithoutParameters($query) : bool{
+ $this->stmt = parent::prepare($query);
+ return $this->stmt->execute();
+}
+}
+
+?>
\ No newline at end of file
diff --git a/Sources/API/modele/MdlInscrit.php b/Sources/API/modele/MdlInscrit.php
new file mode 100644
index 0000000..ed71324
--- /dev/null
+++ b/Sources/API/modele/MdlInscrit.php
@@ -0,0 +1,14 @@
+selectAll();
+ }
+}
+
+?>
\ No newline at end of file
diff --git a/Sources/API/modele/gateways/InscritGateway.php b/Sources/API/modele/gateways/InscritGateway.php
new file mode 100644
index 0000000..de3bfa4
--- /dev/null
+++ b/Sources/API/modele/gateways/InscritGateway.php
@@ -0,0 +1,17 @@
+con=$con;
+ }
+
+ public function selectAll(){
+ $query="SELECT * FROM Inscrit;";
+ $this->con->executeQueryWithoutParameters($query);
+ return $this->con->getResults();
+ }
+}
+
+?>
\ No newline at end of file
--
2.36.3
From 37bb27e889943b12b54a6dfbe506fe09412501a7 Mon Sep 17 00:00:00 2001
From: Vincent ASTOLFI
Date: Mon, 28 Nov 2022 12:27:40 +0100
Subject: [PATCH 074/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.drone.yml | 1 +
1 file changed, 1 insertion(+)
diff --git a/.drone.yml b/.drone.yml
index ed59caa..1f7e26c 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -52,6 +52,7 @@ steps:
CONTAINERNAME: mariadb
COMMAND: create
#OVERWRITE: true
+ PRIVATE: false
CODEFIRST_CLIENTDRONE_ENV_MARIADB_ROOT_PASSWORD:
from_secret: db_root_password
CODEFIRST_CLIENTDRONE_ENV_MARIADB_DATABASE:
--
2.36.3
From cf1b4ec647b4b251c8e30c81d8e3bec581148359 Mon Sep 17 00:00:00 2001
From: viastolfi
Date: Wed, 30 Nov 2022 14:05:15 +0100
Subject: [PATCH 075/105] =?UTF-8?q?scripy=20d'insertion=20des=20tables=20e?=
=?UTF-8?q?t=20test=20d'affichage=20des=20donn=C3=A9es=20gr=C3=A2ce=20?=
=?UTF-8?q?=C3=A0=20l'API?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Sources/API/controller/Controller.php | 148 +++++++++++++++++++++++++-
1 file changed, 147 insertions(+), 1 deletion(-)
diff --git a/Sources/API/controller/Controller.php b/Sources/API/controller/Controller.php
index 4d1fdb1..2e2dd03 100644
--- a/Sources/API/controller/Controller.php
+++ b/Sources/API/controller/Controller.php
@@ -3,11 +3,157 @@
class Controller{
function __construct($url){
+ global $dsn, $usr, $mdp;
+ $con = new Connection($dsn, $usr, $mdp);
+ $query ='CREATE TABLE Devise
+ (
+ id char(3) PRIMARY KEY,
+ nom varchar(20)
+ );
+
+ CREATE TABLE Inscrit
+ (
+ id serial PRIMARY KEY,
+ nom varchar(40),
+ prenom varchar(40),
+ mail varchar(40) UNIQUE,
+ mdp varchar(40)
+ );
+
+ CREATE TABLE DeviseInscrit
+ (
+ devise char(3),
+ idInscrit serial UNIQUE,
+ PRIMARY KEY(devise,idInscrit),
+ FOREIGN KEY (devise) REFERENCES Devise(id),
+ FOREIGN KEY (idInscrit) REFERENCES Inscrit(id)
+ );
+
+ CREATE TABLE Banque
+ (
+ nom varchar(40) PRIMARY KEY,
+ urlsite varchar(60),
+ urllogo varchar(60),
+ urldl varchar(500)
+ );
+
+ CREATE TABLE InscrBanque
+ (
+ id serial PRIMARY KEY,
+ nomBanque varchar(40),
+ idInscrit serial,
+ UNIQUE(nomBanque,idInscrit),
+ FOREIGN KEY (nomBanque) REFERENCES Banque(nom),
+ FOREIGN KEY (idInscrit) REFERENCES Inscrit(id)
+ );
+
+ CREATE TABLE Compte
+ (
+ id serial PRIMARY KEY,
+ nom varchar(40),
+ idInscritBanque serial,
+ FOREIGN KEY (idInscritBanque) REFERENCES InscrBanque(id),
+ UNIQUE(idInscritBanque,nom)
+ );
+
+ CREATE TABLE Echeancier
+ (
+ id serial PRIMARY KEY,
+ nom varchar(40),
+ credit numeric,
+ compte serial,
+ debit numeric,
+ dateE date,
+ datecrea date,
+ methodePayement varchar(20),
+ CONSTRAINT ck_methPaye CHECK (methodePayement IN ("CB","Cheque","Espece","Prélevement")),
+ FOREIGN KEY(compte) REFERENCES Compte(id),
+ UNIQUE (datecrea,compte)
+ );
+
+ CREATE TABLE Opération
+ (
+ id serial PRIMARY KEY,
+ nom varchar(40),
+ credit numeric,
+ compte serial,
+ debit numeric,
+ dateO date,
+ datecrea date,
+ methodePayement varchar(20),
+ CONSTRAINT ck_methPaye CHECK (methodePayement IN ("CB","Cheque","Espece","Prélevement")),
+ FOREIGN KEY(compte) REFERENCES Compte(id),
+ UNIQUE (datecrea,compte)
+ );
+
+ CREATE TABLE Planification
+ (
+ id serial PRIMARY KEY,
+ nom varchar(40),
+ credit numeric,
+ compte serial,
+ debit numeric,
+ dateP date,
+ datecrea date,
+ methodePayement varchar(20),
+ CONSTRAINT ck_methPaye CHECK (methodePayement IN ("CB","Cheque","Espece","Prélevement")),
+ FOREIGN KEY(compte) REFERENCES Compte(id),
+ UNIQUE (datecrea,compte)
+ );,';
+ $con->executeQueryWithoutParameters($query);
+
+ $query='INSERT INTO Devise VALUES("EUR","EURO");
+ INSERT INTO Devise VALUES("USD","DOLLAR");
+ INSERT INTO Devise VALUES("GBP","Livre Sterling");
+ INSERT INTO Devise VALUES("JPY","YEN");
+ INSERT INTO Devise VALUES("AUD","DOLLAR AUSTRALIEN");
+ INSERT INTO Devise VALUES("NZD","DOLLAR NEO-ZELANDAIS");
+ INSERT INTO Devise VALUES("ZAR","RANd");
+
+
+ INSERT INTO Inscrit (nom,prenom,mail,mdp)VALUES("EVARD","LUCAS","lucasevard@gmail.com","test");
+ INSERT INTO Inscrit (nom,prenom,mail,mdp)VALUES("MONCUL","STEPHANE","stef@gmail.com","teststef");
+ INSERT INTO Inscrit (nom,prenom,mail,mdp)VALUES("MENFOUMETTOITOUTNU","RENAUD","renaudtoutnu@gmail.com","test000");
+ INSERT INTO Inscrit (nom,prenom,mail,mdp)VALUES("YOUVOI","BENJAMIN","BENJAMIN@gmail.com","BENJAMIN");
+ INSERT INTO Inscrit (nom,prenom,mail,mdp)VALUES("TUBEAU","RAOUL","raoullacouille@gmail.com","zizi");
+
+ INSERT INTO DeviseInscrit VALUES("EUR","1");
+ INSERT INTO DeviseInscrit VALUES("JPY","2");
+ INSERT INTO DeviseInscrit VALUES("USD","3");
+ INSERT INTO DeviseInscrit VALUES("NZD","4");
+
+
+ INSERT INtO Banque(nom,urlsite,urllogo) VALUES("BNP PARIBAS","mabanque","imagesitebnb.fr");
+ INSERT INtO Banque(nom,urlsite,urllogo) VALUES("CREDIT AGRICOLE","credit-agricole.fr","imageca");
+ INSERT INtO Banque(nom,urlsite,urllogo) VALUES("BANQUE POSTALE","labanquepostale.fr","imgbp");
+ INSERT INtO Banque(nom,urlsite,urllogo) VALUES("CAISSE D EPARGNE","caisse-epargne.fr","imgcaissedepargne");
+
+
+ INSERT INTO InscrBanque (nomBanque,idInscrit)VALUES("BNP PARIBAS","1");
+ INSERT INTO InscrBanque (nomBanque,idInscrit)VALUES("CREDIT AGRICOLE","2");
+ INSERT INTO InscrBanque (nomBanque,idInscrit)VALUES("BANQUE POSTALE","3");
+ INSERT INTO InscrBanque (nomBanque,idInscrit)VALUES("CAISSE D EPARGNE","4");
+
+
+ INSERT INTO Compte (nom,idInscritBanque)VALUES("LIVRET A","1");
+ INSERT INTO Compte (nom,idInscritBanque)VALUES("LIVRET A","2");
+ INSERT INTO Compte (nom,idInscritBanque)VALUES("LIVRET A","3");
+ INSERT INTO Compte (nom,idInscritBanque)VALUES("LIVRET A","4");
+
+
+ INSERT INTO Planification (nom,credit,compte,datep,datecrea,methodePayement) VALUES ("EDF","190","1",now(),now(),"CB");
+ INSERT INTO Planification (nom,credit,compte,datep,datecrea,methodePayement) VALUES ("SPOTIFY","190","2",now(),now(),"Prélevement");
+ INSERT INTO Planification (nom,credit,compte,datep,datecrea,methodePayement) VALUES ("NETFLIX","190","3",now(),now(),"Cheque");
+ INSERT INTO Planification (nom,credit,compte,datep,datecrea,methodePayement) VALUES ("PLAYSTATION PLUS","190","4",now(),now(),"Espece");';
+
+ $con->ExecuteQueryWithoutParameters($query);
switch($url[0]){
case "SELECT":
switch($url[1]){
case "Inscrit":
- $res=MdlInscrit::selectAll();
+ $query = 'SELECT * FROM Inscrit';
+ $con->executeQueryWithoutParameters($query);
+ $res = $con->getResults();
print(json_encode($res));
break;
}
--
2.36.3
From 552bf01be6c92338b45d896bf82601ad20c8102b Mon Sep 17 00:00:00 2001
From: Vincent ASTOLFI
Date: Wed, 30 Nov 2022 14:08:48 +0100
Subject: [PATCH 076/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.drone.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.drone.yml b/.drone.yml
index 1f7e26c..df10309 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -51,7 +51,7 @@ steps:
IMAGENAME: mariadb:latest
CONTAINERNAME: mariadb
COMMAND: create
- #OVERWRITE: true
+ OVERWRITE: false
PRIVATE: false
CODEFIRST_CLIENTDRONE_ENV_MARIADB_ROOT_PASSWORD:
from_secret: db_root_password
--
2.36.3
From e4a38e1994a794091f5d53d36ec1c9fafd2754dd Mon Sep 17 00:00:00 2001
From: Vincent ASTOLFI
Date: Wed, 30 Nov 2022 14:10:56 +0100
Subject: [PATCH 077/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'Sources/AP?=
=?UTF-8?q?I/config/Config.php'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Sources/API/config/Config.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Sources/API/config/Config.php b/Sources/API/config/Config.php
index 44f585a..ad977c7 100644
--- a/Sources/API/config/Config.php
+++ b/Sources/API/config/Config.php
@@ -2,7 +2,7 @@
//prefixe
$rep=__DIR__.'/../';
-$dsn='mysql:host=10.9.0.65;dbname='.getenv("MARIADB_DATABASE");
+$dsn='mysql:host=10.9.0.50;dbname='.getenv("MARIADB_DATABASE");
$dbname=getenv("MARIADB_DATABASE");
$usr=getenv("MARIADB_USER");
$mdp=getenv("MARIADB_PASSWORD");
--
2.36.3
From cbf6169d3ff8d88086eae27cfa4c45ce9e59c856 Mon Sep 17 00:00:00 2001
From: Vincent ASTOLFI
Date: Wed, 30 Nov 2022 14:16:24 +0100
Subject: [PATCH 078/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'Sources/AP?=
=?UTF-8?q?I/config/Config.php'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Sources/API/config/Config.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Sources/API/config/Config.php b/Sources/API/config/Config.php
index ad977c7..4628f62 100644
--- a/Sources/API/config/Config.php
+++ b/Sources/API/config/Config.php
@@ -2,7 +2,7 @@
//prefixe
$rep=__DIR__.'/../';
-$dsn='mysql:host=10.9.0.50;dbname='.getenv("MARIADB_DATABASE");
+$dsn='mysql:host=10.9.0.8;dbname='.getenv("MARIADB_DATABASE");
$dbname=getenv("MARIADB_DATABASE");
$usr=getenv("MARIADB_USER");
$mdp=getenv("MARIADB_PASSWORD");
--
2.36.3
From c536d9fc6d7fa3825ff35d712be3f2526e3c1c75 Mon Sep 17 00:00:00 2001
From: Vincent ASTOLFI
Date: Wed, 30 Nov 2022 14:34:06 +0100
Subject: [PATCH 079/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.drone.yml | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/.drone.yml b/.drone.yml
index df10309..405256c 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -52,7 +52,7 @@ steps:
CONTAINERNAME: mariadb
COMMAND: create
OVERWRITE: false
- PRIVATE: false
+ PRIVATE: true
CODEFIRST_CLIENTDRONE_ENV_MARIADB_ROOT_PASSWORD:
from_secret: db_root_password
CODEFIRST_CLIENTDRONE_ENV_MARIADB_DATABASE:
@@ -82,6 +82,8 @@ steps:
CONTAINERNAME: conseco
COMMAND: create
OVERWRITE: true
+ CODEFIRST_CLIENTDRONE_ENV_DB_SERVER:
+ from_secret: db_server
CODEFIRST_CLIENTDRONE_ENV_MARIADB_ROOT_PASSWORD:
from_secret: db_root_password
CODEFIRST_CLIENTDRONE_ENV_MARIADB_DATABASE:
--
2.36.3
From 2d6ebc22e624b054754cbae4e2e1fdaa24acca07 Mon Sep 17 00:00:00 2001
From: Vincent ASTOLFI
Date: Wed, 30 Nov 2022 14:36:58 +0100
Subject: [PATCH 080/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'Sources/AP?=
=?UTF-8?q?I/config/Config.php'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Sources/API/config/Config.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Sources/API/config/Config.php b/Sources/API/config/Config.php
index 4628f62..6fc3766 100644
--- a/Sources/API/config/Config.php
+++ b/Sources/API/config/Config.php
@@ -2,7 +2,7 @@
//prefixe
$rep=__DIR__.'/../';
-$dsn='mysql:host=10.9.0.8;dbname='.getenv("MARIADB_DATABASE");
+$dsn=getenv("DB_SERVER");
$dbname=getenv("MARIADB_DATABASE");
$usr=getenv("MARIADB_USER");
$mdp=getenv("MARIADB_PASSWORD");
--
2.36.3
From 1fb222dea53476264ac10fdf6dfddbdbcede10f2 Mon Sep 17 00:00:00 2001
From: Vincent ASTOLFI
Date: Wed, 30 Nov 2022 14:40:01 +0100
Subject: [PATCH 081/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'Sources/AP?=
=?UTF-8?q?I/config/Config.php'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Sources/API/config/Config.php | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Sources/API/config/Config.php b/Sources/API/config/Config.php
index 6fc3766..7b29cdc 100644
--- a/Sources/API/config/Config.php
+++ b/Sources/API/config/Config.php
@@ -6,4 +6,6 @@ $dsn=getenv("DB_SERVER");
$dbname=getenv("MARIADB_DATABASE");
$usr=getenv("MARIADB_USER");
$mdp=getenv("MARIADB_PASSWORD");
+
+echo $dsn;
?>
\ No newline at end of file
--
2.36.3
From 2233808a9ce8f06907325d6911ce64e0384eaad5 Mon Sep 17 00:00:00 2001
From: Vincent ASTOLFI
Date: Wed, 30 Nov 2022 15:44:33 +0100
Subject: [PATCH 082/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'Sources/AP?=
=?UTF-8?q?I/config/Config.php'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Sources/API/config/Config.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Sources/API/config/Config.php b/Sources/API/config/Config.php
index 7b29cdc..d89ee28 100644
--- a/Sources/API/config/Config.php
+++ b/Sources/API/config/Config.php
@@ -2,7 +2,7 @@
//prefixe
$rep=__DIR__.'/../';
-$dsn=getenv("DB_SERVER");
+$dsn='mysql:host='.getenv("DB_SERVER").';dbname='.getenv("MARIADB_DATABASE");
$dbname=getenv("MARIADB_DATABASE");
$usr=getenv("MARIADB_USER");
$mdp=getenv("MARIADB_PASSWORD");
--
2.36.3
From cb53baf55d2167c90c95c2f222bf61899209135f Mon Sep 17 00:00:00 2001
From: Vincent ASTOLFI
Date: Wed, 30 Nov 2022 18:34:44 +0100
Subject: [PATCH 083/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.drone.yml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/.drone.yml b/.drone.yml
index 405256c..3d93f33 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -53,6 +53,8 @@ steps:
COMMAND: create
OVERWRITE: false
PRIVATE: true
+ CODEFIRST_CLIENTDRONE_ENV_DB_SERVER:
+ from_secret: db_server
CODEFIRST_CLIENTDRONE_ENV_MARIADB_ROOT_PASSWORD:
from_secret: db_root_password
CODEFIRST_CLIENTDRONE_ENV_MARIADB_DATABASE:
--
2.36.3
From 7e254fbbacb17f3b7ea4c89812265b898ca23536 Mon Sep 17 00:00:00 2001
From: Vincent ASTOLFI
Date: Wed, 30 Nov 2022 18:36:29 +0100
Subject: [PATCH 084/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'Sources/AP?=
=?UTF-8?q?I/config/Config.php'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Sources/API/config/Config.php | 2 --
1 file changed, 2 deletions(-)
diff --git a/Sources/API/config/Config.php b/Sources/API/config/Config.php
index d89ee28..5b648a6 100644
--- a/Sources/API/config/Config.php
+++ b/Sources/API/config/Config.php
@@ -6,6 +6,4 @@ $dsn='mysql:host='.getenv("DB_SERVER").';dbname='.getenv("MARIADB_DATABASE");
$dbname=getenv("MARIADB_DATABASE");
$usr=getenv("MARIADB_USER");
$mdp=getenv("MARIADB_PASSWORD");
-
-echo $dsn;
?>
\ No newline at end of file
--
2.36.3
From e0096cad4089ee58b9861ef06f34149d359a7126 Mon Sep 17 00:00:00 2001
From: Vincent ASTOLFI
Date: Thu, 1 Dec 2022 07:53:53 +0100
Subject: [PATCH 085/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.drone.yml | 2 --
1 file changed, 2 deletions(-)
diff --git a/.drone.yml b/.drone.yml
index 3d93f33..405256c 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -53,8 +53,6 @@ steps:
COMMAND: create
OVERWRITE: false
PRIVATE: true
- CODEFIRST_CLIENTDRONE_ENV_DB_SERVER:
- from_secret: db_server
CODEFIRST_CLIENTDRONE_ENV_MARIADB_ROOT_PASSWORD:
from_secret: db_root_password
CODEFIRST_CLIENTDRONE_ENV_MARIADB_DATABASE:
--
2.36.3
From 7e7ef88126e9a9b28d16ed0ee35c4b07cb7178de Mon Sep 17 00:00:00 2001
From: Vincent ASTOLFI
Date: Thu, 1 Dec 2022 08:06:54 +0100
Subject: [PATCH 086/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'README.md'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 4d1c84d..dfee953 100644
--- a/README.md
+++ b/README.md
@@ -16,4 +16,6 @@
---
-[Nous vous conseillons d'aller voir le wiki de ce projet](https://codefirst.iut.uca.fr/git/hugo.livet/ConsEco/wiki)
\ No newline at end of file
+[Nous vous conseillons d'aller voir le wiki de ce projet](https://codefirst.iut.uca.fr/git/hugo.livet/ConsEco/wiki)
+
+bonjour
\ No newline at end of file
--
2.36.3
From fd5bff0cc8055367375f7a61583dbeb2e2986d56 Mon Sep 17 00:00:00 2001
From: Vincent ASTOLFI
Date: Fri, 2 Dec 2022 10:51:52 +0100
Subject: [PATCH 087/105] tw
---
README.md | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/README.md b/README.md
index dfee953..4d1c84d 100644
--- a/README.md
+++ b/README.md
@@ -16,6 +16,4 @@
---
-[Nous vous conseillons d'aller voir le wiki de ce projet](https://codefirst.iut.uca.fr/git/hugo.livet/ConsEco/wiki)
-
-bonjour
\ No newline at end of file
+[Nous vous conseillons d'aller voir le wiki de ce projet](https://codefirst.iut.uca.fr/git/hugo.livet/ConsEco/wiki)
\ No newline at end of file
--
2.36.3
From 4296e9b524f6218e112fad31740e5f3fe5f7f420 Mon Sep 17 00:00:00 2001
From: Vincent ASTOLFI
Date: Fri, 2 Dec 2022 13:37:36 +0100
Subject: [PATCH 088/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.drone.yml | 2 --
1 file changed, 2 deletions(-)
diff --git a/.drone.yml b/.drone.yml
index 405256c..9077b42 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -51,8 +51,6 @@ steps:
IMAGENAME: mariadb:latest
CONTAINERNAME: mariadb
COMMAND: create
- OVERWRITE: false
- PRIVATE: true
CODEFIRST_CLIENTDRONE_ENV_MARIADB_ROOT_PASSWORD:
from_secret: db_root_password
CODEFIRST_CLIENTDRONE_ENV_MARIADB_DATABASE:
--
2.36.3
From 3120c193b6a85d03ea9c0be47cb0fd1bc725996b Mon Sep 17 00:00:00 2001
From: Vincent ASTOLFI
Date: Fri, 2 Dec 2022 13:38:15 +0100
Subject: [PATCH 089/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.drone.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.drone.yml b/.drone.yml
index 9077b42..46d64b0 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -66,7 +66,7 @@ steps:
dockerfile: ./Dockerfile
context: ./
registry: hub.codefirst.iut.uca.fr
- repo: hub.codefirst.iut.uca.fr/consecoteam/conseco
+ repo: hub.codefirst.iut.uca.fr/vincent.astolfi/conseco
username:
from_secret: secret-registry-username
password:
--
2.36.3
From 7afa8f4b52e35eef1faf880c7aed74d79c2879c6 Mon Sep 17 00:00:00 2001
From: Vincent ASTOLFI
Date: Fri, 2 Dec 2022 13:42:31 +0100
Subject: [PATCH 090/105] tw
---
README.md | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 4d1c84d..b20c443 100644
--- a/README.md
+++ b/README.md
@@ -16,4 +16,6 @@
---
-[Nous vous conseillons d'aller voir le wiki de ce projet](https://codefirst.iut.uca.fr/git/hugo.livet/ConsEco/wiki)
\ No newline at end of file
+[Nous vous conseillons d'aller voir le wiki de ce projet](https://codefirst.iut.uca.fr/git/hugo.livet/ConsEco/wiki)
+
+test
\ No newline at end of file
--
2.36.3
From 03c36276d4a0d95edd75fa3f5f350e03a7557159 Mon Sep 17 00:00:00 2001
From: Vincent ASTOLFI
Date: Fri, 2 Dec 2022 13:45:25 +0100
Subject: [PATCH 091/105] tweaks
---
README.md | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/README.md b/README.md
index b20c443..4d1c84d 100644
--- a/README.md
+++ b/README.md
@@ -16,6 +16,4 @@
---
-[Nous vous conseillons d'aller voir le wiki de ce projet](https://codefirst.iut.uca.fr/git/hugo.livet/ConsEco/wiki)
-
-test
\ No newline at end of file
+[Nous vous conseillons d'aller voir le wiki de ce projet](https://codefirst.iut.uca.fr/git/hugo.livet/ConsEco/wiki)
\ No newline at end of file
--
2.36.3
From 5bc558d87ffd3d8a0177472e6ff020e4d17ecd6c Mon Sep 17 00:00:00 2001
From: viastolfi
Date: Fri, 2 Dec 2022 13:48:19 +0100
Subject: [PATCH 092/105] correction affichage
---
Sources/API/config/Config.php | 2 --
1 file changed, 2 deletions(-)
diff --git a/Sources/API/config/Config.php b/Sources/API/config/Config.php
index d89ee28..5b648a6 100644
--- a/Sources/API/config/Config.php
+++ b/Sources/API/config/Config.php
@@ -6,6 +6,4 @@ $dsn='mysql:host='.getenv("DB_SERVER").';dbname='.getenv("MARIADB_DATABASE");
$dbname=getenv("MARIADB_DATABASE");
$usr=getenv("MARIADB_USER");
$mdp=getenv("MARIADB_PASSWORD");
-
-echo $dsn;
?>
\ No newline at end of file
--
2.36.3
From 3f072984fe74cf36f5ed5bd7b2cccacd6a1925bd Mon Sep 17 00:00:00 2001
From: Vincent ASTOLFI
Date: Fri, 2 Dec 2022 13:54:21 +0100
Subject: [PATCH 093/105] =?UTF-8?q?test=20r=C3=A9solution=20de=20la=20base?=
=?UTF-8?q?=20de=20donn=C3=A9es?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Sources/API/config/Config.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Sources/API/config/Config.php b/Sources/API/config/Config.php
index 5b648a6..9e24917 100644
--- a/Sources/API/config/Config.php
+++ b/Sources/API/config/Config.php
@@ -2,7 +2,7 @@
//prefixe
$rep=__DIR__.'/../';
-$dsn='mysql:host='.getenv("DB_SERVER").';dbname='.getenv("MARIADB_DATABASE");
+$dsn='mysql:host='.getenv("DB_SERVER").':3306'.';dbname='.getenv("MARIADB_DATABASE");
$dbname=getenv("MARIADB_DATABASE");
$usr=getenv("MARIADB_USER");
$mdp=getenv("MARIADB_PASSWORD");
--
2.36.3
From 989fbea0f228c82789b68d44c82ae66542f33003 Mon Sep 17 00:00:00 2001
From: Vincent ASTOLFI
Date: Fri, 2 Dec 2022 13:57:08 +0100
Subject: [PATCH 094/105] =?UTF-8?q?test=20r=C3=A9solution=20de=20la=20bdd?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Sources/API/config/Config.php | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Sources/API/config/Config.php b/Sources/API/config/Config.php
index 9e24917..8cdc1b1 100644
--- a/Sources/API/config/Config.php
+++ b/Sources/API/config/Config.php
@@ -6,4 +6,6 @@ $dsn='mysql:host='.getenv("DB_SERVER").':3306'.';dbname='.getenv("MARIADB_DATABA
$dbname=getenv("MARIADB_DATABASE");
$usr=getenv("MARIADB_USER");
$mdp=getenv("MARIADB_PASSWORD");
+
+echo $dsn
?>
\ No newline at end of file
--
2.36.3
From 442490d3ec286fa6f7822f17befcb30d326e0315 Mon Sep 17 00:00:00 2001
From: Vincent ASTOLFI
Date: Fri, 2 Dec 2022 14:02:40 +0100
Subject: [PATCH 095/105] =?UTF-8?q?test=20r=C3=A9solution=20de=20la=20base?=
=?UTF-8?q?=20de=20donn=C3=A9es?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Sources/API/config/Config.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Sources/API/config/Config.php b/Sources/API/config/Config.php
index 8cdc1b1..4ec7ce3 100644
--- a/Sources/API/config/Config.php
+++ b/Sources/API/config/Config.php
@@ -2,7 +2,7 @@
//prefixe
$rep=__DIR__.'/../';
-$dsn='mysql:host='.getenv("DB_SERVER").':3306'.';dbname='.getenv("MARIADB_DATABASE");
+$dsn='mysql:host='.getenv("DB_SERVER").';dbname='.getenv("MARIADB_DATABASE");
$dbname=getenv("MARIADB_DATABASE");
$usr=getenv("MARIADB_USER");
$mdp=getenv("MARIADB_PASSWORD");
--
2.36.3
From aa37947d27bbf584a62c4bfcd3771dcebc7d0c5e Mon Sep 17 00:00:00 2001
From: Vincent ASTOLFI
Date: Fri, 2 Dec 2022 14:05:22 +0100
Subject: [PATCH 096/105] =?UTF-8?q?test=20r=C3=A9solution=20de=20la=20base?=
=?UTF-8?q?=20de=20donn=C3=A9es?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Sources/API/config/Config.php | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Sources/API/config/Config.php b/Sources/API/config/Config.php
index 4ec7ce3..d562580 100644
--- a/Sources/API/config/Config.php
+++ b/Sources/API/config/Config.php
@@ -7,5 +7,6 @@ $dbname=getenv("MARIADB_DATABASE");
$usr=getenv("MARIADB_USER");
$mdp=getenv("MARIADB_PASSWORD");
-echo $dsn
+echo getenv("DB_SERVER");
+echo getenv("MARIADB_DATABASE");
?>
\ No newline at end of file
--
2.36.3
From 86c436e8551a58ce394ec2f7c4be6bde02d23c12 Mon Sep 17 00:00:00 2001
From: Vincent ASTOLFI
Date: Fri, 2 Dec 2022 14:07:28 +0100
Subject: [PATCH 097/105] =?UTF-8?q?test=20r=C3=A9solution=20de=20la=20base?=
=?UTF-8?q?=20de=20donn=C3=A9es?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Sources/API/config/Config.php | 1 +
1 file changed, 1 insertion(+)
diff --git a/Sources/API/config/Config.php b/Sources/API/config/Config.php
index d562580..d4e8009 100644
--- a/Sources/API/config/Config.php
+++ b/Sources/API/config/Config.php
@@ -7,6 +7,7 @@ $dbname=getenv("MARIADB_DATABASE");
$usr=getenv("MARIADB_USER");
$mdp=getenv("MARIADB_PASSWORD");
+echo "test";
echo getenv("DB_SERVER");
echo getenv("MARIADB_DATABASE");
?>
\ No newline at end of file
--
2.36.3
From 602c77d881e1c332252433dd55067802ce8871db Mon Sep 17 00:00:00 2001
From: Vincent ASTOLFI
Date: Fri, 2 Dec 2022 14:10:07 +0100
Subject: [PATCH 098/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.drone.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.drone.yml b/.drone.yml
index 46d64b0..9f53d29 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -76,7 +76,7 @@ steps:
- name: deploy-web-container
image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest
environment:
- IMAGENAME: hub.codefirst.iut.uca.fr/consecoteam/conseco:latest
+ IMAGENAME: hub.codefirst.iut.uca.fr/vincent.astolfi/conseco:latest
CONTAINERNAME: conseco
COMMAND: create
OVERWRITE: true
--
2.36.3
From b4b0bd1807a8b41084d6b1c1c0f8e7d77a961e80 Mon Sep 17 00:00:00 2001
From: Vincent ASTOLFI
Date: Fri, 2 Dec 2022 14:13:10 +0100
Subject: [PATCH 099/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.drone.yml | 1 +
1 file changed, 1 insertion(+)
diff --git a/.drone.yml b/.drone.yml
index 9f53d29..00a61c4 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -51,6 +51,7 @@ steps:
IMAGENAME: mariadb:latest
CONTAINERNAME: mariadb
COMMAND: create
+ PRIVATE: false
CODEFIRST_CLIENTDRONE_ENV_MARIADB_ROOT_PASSWORD:
from_secret: db_root_password
CODEFIRST_CLIENTDRONE_ENV_MARIADB_DATABASE:
--
2.36.3
From 97bf4b2829a42f4b6f4398e2368826a3f95d18c5 Mon Sep 17 00:00:00 2001
From: Vincent ASTOLFI
Date: Fri, 2 Dec 2022 14:15:08 +0100
Subject: [PATCH 100/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml?=
=?UTF-8?q?'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.drone.yml | 1 +
1 file changed, 1 insertion(+)
diff --git a/.drone.yml b/.drone.yml
index 00a61c4..253b4fd 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -51,6 +51,7 @@ steps:
IMAGENAME: mariadb:latest
CONTAINERNAME: mariadb
COMMAND: create
+ OVERWRITE: true
PRIVATE: false
CODEFIRST_CLIENTDRONE_ENV_MARIADB_ROOT_PASSWORD:
from_secret: db_root_password
--
2.36.3
From 2c15eeedb6a0970fd6c147be2419d86f72cf9c4d Mon Sep 17 00:00:00 2001
From: Vincent ASTOLFI
Date: Fri, 2 Dec 2022 14:19:05 +0100
Subject: [PATCH 101/105] =?UTF-8?q?test=20r=C3=A9solution=20de=20la=20base?=
=?UTF-8?q?=20de=20donn=C3=A9es?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Sources/API/controller/Controller.php | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/Sources/API/controller/Controller.php b/Sources/API/controller/Controller.php
index 2e2dd03..3725f68 100644
--- a/Sources/API/controller/Controller.php
+++ b/Sources/API/controller/Controller.php
@@ -5,7 +5,17 @@ class Controller{
function __construct($url){
global $dsn, $usr, $mdp;
$con = new Connection($dsn, $usr, $mdp);
- $query ='CREATE TABLE Devise
+ $query ='DROP TABLE Planification;
+ DROP TABLE IF EXISTS Opération;
+ DROP TABLE IF EXISTS Echeancier;
+ DROP TABLE IF EXISTS Compte;
+ DROP TABLE IF EXISTS InscrBanque;
+ DROP TABLE IF EXISTS Banque;
+ DROP TABLE IF EXISTS DeviseInscrit;
+ DROP TABLE IF EXISTS Inscrit;
+ DROP TABLE IF EXISTS Devise;
+
+ CREATE TABLE Devise
(
id char(3) PRIMARY KEY,
nom varchar(20)
--
2.36.3
From d15bb0215a4af7c2f01c67e0f8c691415df7ef83 Mon Sep 17 00:00:00 2001
From: Vincent ASTOLFI
Date: Fri, 2 Dec 2022 14:20:42 +0100
Subject: [PATCH 102/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'Sources/AP?=
=?UTF-8?q?I/controller/Controller.php'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Sources/API/controller/Controller.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Sources/API/controller/Controller.php b/Sources/API/controller/Controller.php
index 3725f68..81ef754 100644
--- a/Sources/API/controller/Controller.php
+++ b/Sources/API/controller/Controller.php
@@ -5,7 +5,7 @@ class Controller{
function __construct($url){
global $dsn, $usr, $mdp;
$con = new Connection($dsn, $usr, $mdp);
- $query ='DROP TABLE Planification;
+ $query ='DROP TABLE IF EXISTS Planification;
DROP TABLE IF EXISTS Opération;
DROP TABLE IF EXISTS Echeancier;
DROP TABLE IF EXISTS Compte;
--
2.36.3
From c39a66beb57f7794f125ba4b00781252f31cef67 Mon Sep 17 00:00:00 2001
From: Vincent ASTOLFI
Date: Fri, 2 Dec 2022 14:23:31 +0100
Subject: [PATCH 103/105] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'Sources/AP?=
=?UTF-8?q?I/config/Config.php'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Sources/API/config/Config.php | 4 ----
1 file changed, 4 deletions(-)
diff --git a/Sources/API/config/Config.php b/Sources/API/config/Config.php
index d4e8009..5b648a6 100644
--- a/Sources/API/config/Config.php
+++ b/Sources/API/config/Config.php
@@ -6,8 +6,4 @@ $dsn='mysql:host='.getenv("DB_SERVER").';dbname='.getenv("MARIADB_DATABASE");
$dbname=getenv("MARIADB_DATABASE");
$usr=getenv("MARIADB_USER");
$mdp=getenv("MARIADB_PASSWORD");
-
-echo "test";
-echo getenv("DB_SERVER");
-echo getenv("MARIADB_DATABASE");
?>
\ No newline at end of file
--
2.36.3
From ba71d3f6bfd9ca78691f182b7fce9e7622713879 Mon Sep 17 00:00:00 2001
From: Vincent ASTOLFI
Date: Fri, 2 Dec 2022 14:28:12 +0100
Subject: [PATCH 104/105] Supprimer 'Sources/Data/insert.sql'
---
Sources/Data/insert.sql | 43 -----------------------------------------
1 file changed, 43 deletions(-)
delete mode 100644 Sources/Data/insert.sql
diff --git a/Sources/Data/insert.sql b/Sources/Data/insert.sql
deleted file mode 100644
index c296050..0000000
--- a/Sources/Data/insert.sql
+++ /dev/null
@@ -1,43 +0,0 @@
-INSERT INTO Devise VALUES('EUR','EURO');
-INSERT INTO Devise VALUES('USD','DOLLAR');
-INSERT INTO Devise VALUES('GBP','Livre Sterling');
-INSERT INTO Devise VALUES('JPY','YEN');
-INSERT INTO Devise VALUES('AUD','DOLLAR AUSTRALIEN');
-INSERT INTO Devise VALUES('NZD','DOLLAR NEO-ZELANDAIS');
-INSERT INTO Devise VALUES('ZAR','RANd');
-
-
-INSERT INTO Inscrit (nom,prenom,mail,mdp)VALUES('EVARD','LUCAS','lucasevard@gmail.com','test');
-INSERT INTO Inscrit (nom,prenom,mail,mdp)VALUES('MONCUL','STEPHANE','stef@gmail.com','teststef');
-INSERT INTO Inscrit (nom,prenom,mail,mdp)VALUES('MENFOUMETTOITOUTNU','RENAUD','renaudtoutnu@gmail.com','test000');
-INSERT INTO Inscrit (nom,prenom,mail,mdp)VALUES('YOUVOI','BENJAMIN','BENJAMIN@gmail.com','BENJAMIN');
-INSERT INTO Inscrit (nom,prenom,mail,mdp)VALUES('TUBEAU','RAOUL','raoullacouille@gmail.com','zizi');
-
-INSERT INTO DeviseInscrit VALUES('EUR','1');
-INSERT INTO DeviseInscrit VALUES('JPY','2');
-INSERT INTO DeviseInscrit VALUES('USD','3');
-INSERT INTO DeviseInscrit VALUES('NZD','4');
-
-
-INSERT INtO Banque(nom,urlsite,urllogo) VALUES('BNP PARIBAS','mabanque','imagesitebnb.fr');
-INSERT INtO Banque(nom,urlsite,urllogo) VALUES('CREDIT AGRICOLE','credit-agricole.fr','imageca');
-INSERT INtO Banque(nom,urlsite,urllogo) VALUES('BANQUE POSTALE','labanquepostale.fr','imgbp');
-INSERT INtO Banque(nom,urlsite,urllogo) VALUES('CAISSE D EPARGNE','caisse-epargne.fr','imgcaissedepargne');
-
-
-INSERT INTO InscrBanque (nomBanque,idInscrit)VALUES('BNP PARIBAS','1');
-INSERT INTO InscrBanque (nomBanque,idInscrit)VALUES('CREDIT AGRICOLE','2');
-INSERT INTO InscrBanque (nomBanque,idInscrit)VALUES('BANQUE POSTALE','3');
-INSERT INTO InscrBanque (nomBanque,idInscrit)VALUES('CAISSE D EPARGNE','4');
-
-
-INSERT INTO Compte (nom,idInscritBanque)VALUES('LIVRET A','1');
-INSERT INTO Compte (nom,idInscritBanque)VALUES('LIVRET A','2');
-INSERT INTO Compte (nom,idInscritBanque)VALUES('LIVRET A','3');
-INSERT INTO Compte (nom,idInscritBanque)VALUES('LIVRET A','4');
-
-
-INSERT INTO Planification (nom,credit,compte,datep,datecrea,methodePayement) VALUES ('EDF','190','1',now(),now(),'CB');
-INSERT INTO Planification (nom,credit,compte,datep,datecrea,methodePayement) VALUES ('SPOTIFY','190','2',now(),now(),'Prélevement');
-INSERT INTO Planification (nom,credit,compte,datep,datecrea,methodePayement) VALUES ('NETFLIX','190','3',now(),now(),'Cheque');
-INSERT INTO Planification (nom,credit,compte,datep,datecrea,methodePayement) VALUES ('PLAYSTATION PLUS','190','4',now(),now(),'Espece');
\ No newline at end of file
--
2.36.3
From aee8ec0e1f1135d603540b6dac9c07fe183a241a Mon Sep 17 00:00:00 2001
From: Vincent ASTOLFI
Date: Fri, 2 Dec 2022 14:28:17 +0100
Subject: [PATCH 105/105] Supprimer 'Sources/Data/tablewithgeneratedid.sql'
---
Sources/Data/tablewithgeneratedid.sql | 106 --------------------------
1 file changed, 106 deletions(-)
delete mode 100644 Sources/Data/tablewithgeneratedid.sql
diff --git a/Sources/Data/tablewithgeneratedid.sql b/Sources/Data/tablewithgeneratedid.sql
deleted file mode 100644
index d9c66bd..0000000
--- a/Sources/Data/tablewithgeneratedid.sql
+++ /dev/null
@@ -1,106 +0,0 @@
-DROP TABLE Planification;
-DROP TABLE Opération;
-DROP TABLE Echeancier;
-DROP TABLE Compte;
-DROP TABLE InscrBanque;
-DROP TABLE Banque;
-DROP TABLE DeviseInscrit;
-DROP TABLE Inscrit;
-DROP TABLE Devise;
-
-
-CREATE TABLE Devise
-(
- id char(3) PRIMARY KEY,
- nom varchar(20)
-);
-
-CREATE TABLE Inscrit
-(
- id serial PRIMARY KEY,
- nom varchar(40),
- prenom varchar(40),
- mail varchar(40) UNIQUE,
- mdp varchar(40)
-);
-
-CREATE TABLE DeviseInscrit
-(
- devise char(3),
- idInscrit serial UNIQUE,
- PRIMARY KEY(devise,idInscrit),
- FOREIGN KEY (devise) REFERENCES Devise(id),
- FOREIGN KEY (idInscrit) REFERENCES Inscrit(id)
-);
-
-CREATE TABLE Banque
-(
- nom varchar(40) PRIMARY KEY,
- urlsite varchar(60),
- urllogo varchar(60),
- urldl varchar(500)
-);
-
-CREATE TABLE InscrBanque
-(
- id serial PRIMARY KEY,
- nomBanque varchar(40),
- idInscrit serial,
- UNIQUE(nomBanque,idInscrit),
- FOREIGN KEY (nomBanque) REFERENCES Banque(nom),
- FOREIGN KEY (idInscrit) REFERENCES Inscrit(id)
-);
-
-CREATE TABLE Compte
-(
- id serial PRIMARY KEY,
- nom varchar(40),
- idInscritBanque serial,
- FOREIGN KEY (idInscritBanque) REFERENCES InscrBanque(id),
- UNIQUE(idInscritBanque,nom)
-);
-
-CREATE TABLE Echeancier
-(
- id serial PRIMARY KEY,
- nom varchar(40),
- credit numeric,
- compte serial,
- debit numeric,
- dateE date,
- datecrea date,
- methodePayement varchar(20),
- CONSTRAINT ck_methPaye CHECK (methodePayement IN ('CB','Cheque','Espece','Prélevement')),
- FOREIGN KEY(compte) REFERENCES Compte(id),
- UNIQUE (datecrea,compte)
-);
-
-CREATE TABLE Opération
-(
- id serial PRIMARY KEY,
- nom varchar(40),
- credit numeric,
- compte serial,
- debit numeric,
- dateO date,
- datecrea date,
- methodePayement varchar(20),
- CONSTRAINT ck_methPaye CHECK (methodePayement IN ('CB','Cheque','Espece','Prélevement')),
- FOREIGN KEY(compte) REFERENCES Compte(id),
- UNIQUE (datecrea,compte)
-);
-
-CREATE TABLE Planification
-(
- id serial PRIMARY KEY,
- nom varchar(40),
- credit numeric,
- compte serial,
- debit numeric,
- dateP date,
- datecrea date,
- methodePayement varchar(20),
- CONSTRAINT ck_methPaye CHECK (methodePayement IN ('CB','Cheque','Espece','Prélevement')),
- FOREIGN KEY(compte) REFERENCES Compte(id),
- UNIQUE (datecrea,compte)
-);,
\ No newline at end of file
--
2.36.3