Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DojoTestBackend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dojo Project (HES-SO)
Projects
Backend
DojoTestBackend
Commits
58584218
Commit
58584218
authored
2 years ago
by
michael.minelli
Browse files
Options
Downloads
Patches
Plain Diff
Update API and docker for Prisma backend support
parent
70741859
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
API
+1
-1
1 addition, 1 deletion
API
Database/docker-entrypoint-initdb.d/1-Dojo.sql
+0
-180
0 additions, 180 deletions
Database/docker-entrypoint-initdb.d/1-Dojo.sql
Dockerfile_Dojo_Database
+0
-4
0 additions, 4 deletions
Dockerfile_Dojo_Database
docker-compose.yml
+1
-3
1 addition, 3 deletions
docker-compose.yml
with
2 additions
and
188 deletions
API
@
a4e246cf
Compare
8f87568e
...
a4e246cf
Subproject commit
8f87568edb45cae354d840f0304fea770c41f0d7
Subproject commit
a4e246cf313cfc35a27338142c76dd410a85432c
This diff is collapsed.
Click to expand it.
Database/docker-entrypoint-initdb.d/1-Dojo.sql
deleted
100644 → 0
+
0
−
180
View file @
70741859
SET
SQL_MODE
=
"NO_AUTO_VALUE_ON_ZERO"
;
START
TRANSACTION
;
SET
time_zone
=
"+00:00"
;
--
-- Base de données : `Dojo`
--
CREATE
DATABASE
IF
NOT
EXISTS
`Dojo`
DEFAULT
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
;
USE
`Dojo`
;
-- --------------------------------------------------------
--
-- Structure de la table `Enonce`
--
CREATE
TABLE
`Enonce`
(
`enonceID`
int
(
11
)
NOT
NULL
,
`enonceName`
varchar
(
64
)
NOT
NULL
,
`enonceGitLink`
text
NOT
NULL
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_general_ci
;
-- --------------------------------------------------------
--
-- Structure de la table `EnonceStaff`
--
CREATE
TABLE
`EnonceStaff`
(
`enonceID`
int
(
11
)
NOT
NULL
,
`userID`
int
(
11
)
NOT
NULL
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_general_ci
;
-- --------------------------------------------------------
--
-- Structure de la table `Exercice`
--
CREATE
TABLE
`Exercice`
(
`exerciceID`
int
(
11
)
NOT
NULL
,
`exerciceEnonceID`
int
(
11
)
NOT
NULL
,
`exerciceProjectKey`
varchar
(
36
)
NOT
NULL
,
`exerciceGitLink`
text
NOT
NULL
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_general_ci
;
-- --------------------------------------------------------
--
-- Structure de la table `ExerciceMembers`
--
CREATE
TABLE
`ExerciceMembers`
(
`exerciceID`
int
(
11
)
NOT
NULL
,
`userID`
int
(
11
)
NOT
NULL
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_general_ci
;
-- --------------------------------------------------------
--
-- Structure de la table `Results`
--
CREATE
TABLE
`Results`
(
`resultTimestamp`
bigint
(
20
)
NOT
NULL
,
`resultExerciceID`
int
(
11
)
NOT
NULL
,
`resultPass`
tinyint
(
1
)
NOT
NULL
,
`resultDetails`
text
NOT
NULL
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_general_ci
;
-- --------------------------------------------------------
--
-- Structure de la table `Users`
--
CREATE
TABLE
`Users`
(
`userID`
int
(
11
)
NOT
NULL
,
`userFirstname`
varchar
(
32
)
NOT
NULL
,
`userLastname`
varchar
(
32
)
NOT
NULL
,
`userMail`
varchar
(
32
)
NOT
NULL
,
`userRole`
varchar
(
8
)
NOT
NULL
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_general_ci
;
--
-- Index pour les tables déchargées
--
--
-- Index pour la table `Enonce`
--
ALTER
TABLE
`Enonce`
ADD
PRIMARY
KEY
(
`enonceID`
);
--
-- Index pour la table `EnonceStaff`
--
ALTER
TABLE
`EnonceStaff`
ADD
PRIMARY
KEY
(
`enonceID`
,
`userID`
),
ADD
KEY
`userID`
(
`userID`
);
--
-- Index pour la table `Exercice`
--
ALTER
TABLE
`Exercice`
ADD
PRIMARY
KEY
(
`exerciceID`
),
ADD
KEY
`exerciceEnonceID`
(
`exerciceEnonceID`
);
--
-- Index pour la table `ExerciceMembers`
--
ALTER
TABLE
`ExerciceMembers`
ADD
PRIMARY
KEY
(
`exerciceID`
,
`userID`
),
ADD
KEY
`userID`
(
`userID`
);
--
-- Index pour la table `Results`
--
ALTER
TABLE
`Results`
ADD
PRIMARY
KEY
(
`resultTimestamp`
,
`resultExerciceID`
),
ADD
KEY
`resultExerciceID`
(
`resultExerciceID`
);
--
-- Index pour la table `Users`
--
ALTER
TABLE
`Users`
ADD
PRIMARY
KEY
(
`userID`
);
--
-- AUTO_INCREMENT pour les tables déchargées
--
--
-- AUTO_INCREMENT pour la table `Enonce`
--
ALTER
TABLE
`Enonce`
MODIFY
`enonceID`
int
(
11
)
NOT
NULL
AUTO_INCREMENT
;
--
-- AUTO_INCREMENT pour la table `Exercice`
--
ALTER
TABLE
`Exercice`
MODIFY
`exerciceID`
int
(
11
)
NOT
NULL
AUTO_INCREMENT
;
--
-- AUTO_INCREMENT pour la table `Users`
--
ALTER
TABLE
`Users`
MODIFY
`userID`
int
(
11
)
NOT
NULL
AUTO_INCREMENT
;
--
-- Contraintes pour les tables déchargées
--
--
-- Contraintes pour la table `EnonceStaff`
--
ALTER
TABLE
`EnonceStaff`
ADD
CONSTRAINT
`EnonceStaff_ibfk_1`
FOREIGN
KEY
(
`enonceID`
)
REFERENCES
`Enonce`
(
`enonceID`
),
ADD
CONSTRAINT
`EnonceStaff_ibfk_2`
FOREIGN
KEY
(
`userID`
)
REFERENCES
`Users`
(
`userID`
);
--
-- Contraintes pour la table `Exercice`
--
ALTER
TABLE
`Exercice`
ADD
CONSTRAINT
`Exercice_ibfk_1`
FOREIGN
KEY
(
`exerciceEnonceID`
)
REFERENCES
`Enonce`
(
`enonceID`
);
--
-- Contraintes pour la table `ExerciceMembers`
--
ALTER
TABLE
`ExerciceMembers`
ADD
CONSTRAINT
`ExerciceMembers_ibfk_1`
FOREIGN
KEY
(
`exerciceID`
)
REFERENCES
`Exercice`
(
`exerciceID`
),
ADD
CONSTRAINT
`ExerciceMembers_ibfk_2`
FOREIGN
KEY
(
`userID`
)
REFERENCES
`Users`
(
`userID`
);
--
-- Contraintes pour la table `Results`
--
ALTER
TABLE
`Results`
ADD
CONSTRAINT
`Results_ibfk_1`
FOREIGN
KEY
(
`resultExerciceID`
)
REFERENCES
`Exercice`
(
`exerciceID`
);
COMMIT
;
This diff is collapsed.
Click to expand it.
Dockerfile_Dojo_Database
deleted
100644 → 0
+
0
−
4
View file @
70741859
FROM mariadb:10.11
LABEL maintainer="Michaël Minelli <michael-jean.minelli@hesge.ch>"
ADD Database/docker-entrypoint-initdb.d/ /docker-entrypoint-initdb.d/
\ No newline at end of file
This diff is collapsed.
Click to expand it.
docker-compose.yml
+
1
−
3
View file @
58584218
...
@@ -2,9 +2,7 @@ version: '3.8'
...
@@ -2,9 +2,7 @@ version: '3.8'
services
:
services
:
dojo-database
:
dojo-database
:
container_name
:
dojo-database
container_name
:
dojo-database
build
:
image
:
mariadb:11.0
context
:
./
dockerfile
:
Dockerfile_Dojo_Database
environment
:
environment
:
MARIADB_DATABASE
:
'
${DATABASE_NAME}'
MARIADB_DATABASE
:
'
${DATABASE_NAME}'
MARIADB_ROOT_PASSWORD
:
'
${DATABASE_ROOT_PASSWORD}'
MARIADB_ROOT_PASSWORD
:
'
${DATABASE_ROOT_PASSWORD}'
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment