Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Atelier_1_CIASIE
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
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
CERISARA Theo
Atelier_1_CIASIE
Commits
3406a37a
Commit
3406a37a
authored
4 years ago
by
theo
Browse files
Options
Downloads
Patches
Plain Diff
correction sql
parent
d9c50132
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/atelier.sql
+113
-32
113 additions, 32 deletions
doc/atelier.sql
with
113 additions
and
32 deletions
doc/atelier.sql
+
113
−
32
View file @
3406a37a
-- phpMyAdmin SQL Dump
-- version 5.0.
2
-- version 5.0.
4
-- https://www.phpmyadmin.net/
--
-- H
ôte
: db
-- G
énéré le : lun. 09 nov. 2020 à 13:08
--
V
er
sion du s
erve
ur :
8.0.2
1
-- Version
de PHP
: 7.4.11
-- H
ost
: db
-- G
eneration Time: Nov 10, 2020 at 09:13 AM
--
S
er
v
er
ve
rsion:
8.0.2
2
--
PHP
Version: 7.4.11
SET
SQL_MODE
=
"NO_AUTO_VALUE_ON_ZERO"
;
START
TRANSACTION
;
...
...
@@ -18,13 +18,13 @@ SET time_zone = "+00:00";
/*!40101 SET NAMES utf8mb4 */
;
--
--
Base de données
: `atelier`
--
Database
: `atelier`
--
-- --------------------------------------------------------
--
--
S
tructure
de la
table `commentaire`
--
Table s
tructure
for
table `commentaire`
--
CREATE
TABLE
`commentaire`
(
...
...
@@ -36,7 +36,7 @@ CREATE TABLE `commentaire` (
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_0900_ai_ci
;
--
-- D
échargement des données de la
table `commentaire`
-- D
umping data for
table `commentaire`
--
INSERT
INTO
`commentaire`
(
`id_commentaire`
,
`id_photo`
,
`id_user`
,
`content`
,
`date`
)
VALUES
...
...
@@ -45,7 +45,7 @@ INSERT INTO `commentaire` (`id_commentaire`, `id_photo`, `id_user`, `content`, `
-- --------------------------------------------------------
--
--
S
tructure
de la
table `galerie`
--
Table s
tructure
for
table `galerie`
--
CREATE
TABLE
`galerie`
(
...
...
@@ -58,7 +58,7 @@ CREATE TABLE `galerie` (
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_0900_ai_ci
;
--
-- D
échargement des données de la
table `galerie`
-- D
umping data for
table `galerie`
--
INSERT
INTO
`galerie`
(
`id_galerie`
,
`nom`
,
`description`
,
`type`
,
`motscles`
,
`date`
)
VALUES
...
...
@@ -74,7 +74,34 @@ INSERT INTO `galerie` (`id_galerie`, `nom`, `description`, `type`, `motscles`, `
-- --------------------------------------------------------
--
-- Structure de la table `photos`
-- Table structure for table `groupe`
--
CREATE
TABLE
`groupe`
(
`id_group`
int
NOT
NULL
,
`nom_group`
varchar
(
20
)
DEFAULT
NULL
,
`id_admin`
int
DEFAULT
NULL
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_0900_ai_ci
;
--
-- Dumping data for table `groupe`
--
INSERT
INTO
`groupe`
(
`id_group`
,
`nom_group`
,
`id_admin`
)
VALUES
(
1
,
'test'
,
5
),
(
6
,
'retfhgjklm'
,
5
),
(
7
,
'retfhgjklm'
,
5
),
(
8
,
'qsdfrt'
,
5
),
(
9
,
'qsdfrtdddddddddddddd'
,
5
),
(
10
,
'124568'
,
5
),
(
11
,
'8846585757545'
,
5
),
(
12
,
'8846585757545'
,
5
),
(
13
,
'ezyqbzkezrih kd'
,
5
);
-- --------------------------------------------------------
--
-- Table structure for table `photos`
--
CREATE
TABLE
`photos`
(
...
...
@@ -87,7 +114,7 @@ CREATE TABLE `photos` (
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_0900_ai_ci
;
--
-- D
échargement des données de la
table `photos`
-- D
umping data for
table `photos`
--
INSERT
INTO
`photos`
(
`id_photo`
,
`id_galerie`
,
`titre`
,
`imageUrl`
,
`motsCles`
,
`date`
)
VALUES
...
...
@@ -103,7 +130,7 @@ INSERT INTO `photos` (`id_photo`, `id_galerie`, `titre`, `imageUrl`, `motsCles`,
-- --------------------------------------------------------
--
--
S
tructure
de la
table `user`
--
Table s
tructure
for
table `user`
--
CREATE
TABLE
`user`
(
...
...
@@ -114,7 +141,7 @@ CREATE TABLE `user` (
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_0900_ai_ci
;
--
-- D
échargement des données de la
table `user`
-- D
umping data for
table `user`
--
INSERT
INTO
`user`
(
`id_user`
,
`nom`
,
`email`
,
`password`
)
VALUES
...
...
@@ -125,7 +152,7 @@ INSERT INTO `user` (`id_user`, `nom`, `email`, `password`) VALUES
-- --------------------------------------------------------
--
--
S
tructure
de la
table `user_2_galerie`
--
Table s
tructure
for
table `user_2_galerie`
--
CREATE
TABLE
`user_2_galerie`
(
...
...
@@ -135,7 +162,7 @@ CREATE TABLE `user_2_galerie` (
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_0900_ai_ci
;
--
-- D
échargement des données de la
table `user_2_galerie`
-- D
umping data for
table `user_2_galerie`
--
INSERT
INTO
`user_2_galerie`
(
`id_user`
,
`id_galerie`
,
`acces`
)
VALUES
...
...
@@ -148,12 +175,32 @@ INSERT INTO `user_2_galerie` (`id_user`, `id_galerie`, `acces`) VALUES
(
7
,
10
,
3
),
(
7
,
11
,
3
);
-- --------------------------------------------------------
--
--
Index pour les tables déchargées
--
Table structure for table `user_2_group`
--
CREATE
TABLE
`user_2_group`
(
`id_group`
int
NOT
NULL
,
`id_user`
int
NOT
NULL
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_0900_ai_ci
;
--
-- Dumping data for table `user_2_group`
--
INSERT
INTO
`user_2_group`
(
`id_group`
,
`id_user`
)
VALUES
(
1
,
7
),
(
13
,
6
),
(
13
,
7
);
--
-- Index pour la table `commentaire`
-- Indexes for dumped tables
--
--
-- Indexes for table `commentaire`
--
ALTER
TABLE
`commentaire`
ADD
PRIMARY
KEY
(
`id_commentaire`
),
...
...
@@ -161,82 +208,116 @@ ALTER TABLE `commentaire`
ADD
KEY
`FK_id_photo2`
(
`id_photo`
);
--
-- Index
pour la
table `galerie`
-- Index
es for
table `galerie`
--
ALTER
TABLE
`galerie`
ADD
PRIMARY
KEY
(
`id_galerie`
);
--
-- Index pour la table `photos`
-- Indexes for table `groupe`
--
ALTER
TABLE
`groupe`
ADD
PRIMARY
KEY
(
`id_group`
),
ADD
KEY
`id_admin`
(
`id_admin`
);
--
-- Indexes for table `photos`
--
ALTER
TABLE
`photos`
ADD
PRIMARY
KEY
(
`id_photo`
),
ADD
KEY
`FK_id_galerie`
(
`id_galerie`
);
--
-- Index
pour la
table `user`
-- Index
es for
table `user`
--
ALTER
TABLE
`user`
ADD
PRIMARY
KEY
(
`id_user`
);
--
-- Index
pour la
table `user_2_galerie`
-- Index
es for
table `user_2_galerie`
--
ALTER
TABLE
`user_2_galerie`
ADD
PRIMARY
KEY
(
`id_user`
,
`id_galerie`
),
ADD
KEY
`FK_id_galerie1`
(
`id_galerie`
);
--
-- AUTO_INCREMENT pour les tables déchargées
-- Indexes for table `user_2_group`
--
ALTER
TABLE
`user_2_group`
ADD
PRIMARY
KEY
(
`id_user`
,
`id_group`
),
ADD
KEY
`id_group`
(
`id_group`
);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT
pour la
table `commentaire`
-- AUTO_INCREMENT
for
table `commentaire`
--
ALTER
TABLE
`commentaire`
MODIFY
`id_commentaire`
int
NOT
NULL
AUTO_INCREMENT
,
AUTO_INCREMENT
=
3
;
MODIFY
`id_commentaire`
int
NOT
NULL
AUTO_INCREMENT
,
AUTO_INCREMENT
=
4
;
--
-- AUTO_INCREMENT
pour la
table `galerie`
-- AUTO_INCREMENT
for
table `galerie`
--
ALTER
TABLE
`galerie`
MODIFY
`id_galerie`
int
NOT
NULL
AUTO_INCREMENT
,
AUTO_INCREMENT
=
13
;
--
-- AUTO_INCREMENT pour la table `photos`
-- AUTO_INCREMENT for table `groupe`
--
ALTER
TABLE
`groupe`
MODIFY
`id_group`
int
NOT
NULL
AUTO_INCREMENT
,
AUTO_INCREMENT
=
14
;
--
-- AUTO_INCREMENT for table `photos`
--
ALTER
TABLE
`photos`
MODIFY
`id_photo`
int
NOT
NULL
AUTO_INCREMENT
,
AUTO_INCREMENT
=
12
;
--
-- AUTO_INCREMENT
pour la
table `user`
-- AUTO_INCREMENT
for
table `user`
--
ALTER
TABLE
`user`
MODIFY
`id_user`
int
NOT
NULL
AUTO_INCREMENT
,
AUTO_INCREMENT
=
8
;
--
-- Contraint
e
s
pour les tables déchargé
es
-- Con
s
traints
for dumped tabl
es
--
--
-- Contraint
e
s
pour la
table `commentaire`
-- Con
s
traints
for
table `commentaire`
--
ALTER
TABLE
`commentaire`
ADD
CONSTRAINT
`FK_id_photo2`
FOREIGN
KEY
(
`id_photo`
)
REFERENCES
`photos`
(
`id_photo`
)
ON
DELETE
RESTRICT
ON
UPDATE
RESTRICT
,
ADD
CONSTRAINT
`FK_id_user2`
FOREIGN
KEY
(
`id_user`
)
REFERENCES
`user`
(
`id_user`
)
ON
DELETE
RESTRICT
ON
UPDATE
RESTRICT
;
--
-- Contraintes pour la table `photos`
-- Constraints for table `groupe`
--
ALTER
TABLE
`groupe`
ADD
CONSTRAINT
`groupe_ibfk_1`
FOREIGN
KEY
(
`id_admin`
)
REFERENCES
`user`
(
`id_user`
);
--
-- Constraints for table `photos`
--
ALTER
TABLE
`photos`
ADD
CONSTRAINT
`FK_id_galerie`
FOREIGN
KEY
(
`id_galerie`
)
REFERENCES
`galerie`
(
`id_galerie`
);
--
-- Contraint
e
s
pour la
table `user_2_galerie`
-- Con
s
traints
for
table `user_2_galerie`
--
ALTER
TABLE
`user_2_galerie`
ADD
CONSTRAINT
`FK_id_galerie1`
FOREIGN
KEY
(
`id_galerie`
)
REFERENCES
`galerie`
(
`id_galerie`
),
ADD
CONSTRAINT
`FK_id_user1`
FOREIGN
KEY
(
`id_user`
)
REFERENCES
`user`
(
`id_user`
);
--
-- Constraints for table `user_2_group`
--
ALTER
TABLE
`user_2_group`
ADD
CONSTRAINT
`user_2_group_ibfk_1`
FOREIGN
KEY
(
`id_user`
)
REFERENCES
`user`
(
`id_user`
),
ADD
CONSTRAINT
`user_2_group_ibfk_2`
FOREIGN
KEY
(
`id_group`
)
REFERENCES
`groupe`
(
`id_group`
),
ADD
CONSTRAINT
`user_2_group_ibfk_3`
FOREIGN
KEY
(
`id_user`
)
REFERENCES
`user`
(
`id_user`
);
COMMIT
;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */
;
...
...
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