-
Notifications
You must be signed in to change notification settings - Fork 0
/
skoule.sql
149 lines (121 loc) · 4.33 KB
/
skoule.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
-- phpMyAdmin SQL Dump
-- version 4.9.5deb2
-- https://www.phpmyadmin.net/
--
-- Hôte : localhost:3306
-- Généré le : sam. 02 avr. 2022 à 14:28
-- Version du serveur : 8.0.28-0ubuntu0.20.04.3
-- Version de PHP : 7.4.28
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Base de données : `skoule`
--
-- --------------------------------------------------------
--
-- Structure de la table `app_user`
--
CREATE TABLE `app_user` (
`id` int UNSIGNED NOT NULL,
`email` varchar(128) NOT NULL,
`name` varchar(64) DEFAULT NULL,
`password` varchar(60) NOT NULL,
`role` enum('user','admin') NOT NULL,
`status` tinyint NOT NULL DEFAULT '0',
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
--
-- Déchargement des données de la table `app_user`
--
INSERT INTO `app_user` (`id`, `email`, `name`, `password`, `role`, `status`, `created_at`, `updated_at`) VALUES
(3, 'bonnal.tristan@hotmail.fr', 'Tristan Bonnal', '$2y$10$MngTqDeZaNJmJ/S8WdgRrOHsqQlIcDd5Du8fw2kWrNVIrcFRCyE9m', 'admin', 1, '2022-04-02 12:27:23', NULL),
(4, 'user.normal@hotmail.fr', 'Sous-fifre', '$2y$10$w4iXPPdxYAM0Cm/pINuKN.YxiUnYRGBLxKJiZ8UlEZx9D2/d2AR/W', 'user', 1, '2022-04-02 12:28:09', NULL);
-- --------------------------------------------------------
--
-- Structure de la table `student`
--
CREATE TABLE `student` (
`id` int UNSIGNED NOT NULL,
`firstname` varchar(64) DEFAULT NULL,
`lastname` varchar(64) DEFAULT NULL,
`status` tinyint NOT NULL DEFAULT '0',
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NULL DEFAULT NULL,
`teacher_id` int UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
--
-- Déchargement des données de la table `student`
--
INSERT INTO `student` (`id`, `firstname`, `lastname`, `status`, `created_at`, `updated_at`, `teacher_id`) VALUES
(1, 'Théodore', 'Bagwell', 1, '2022-03-24 13:16:46', '2022-04-02 12:15:08', 1),
(2, 'Johnny', 'Bravo', 1, '2022-03-24 13:16:46', '2022-04-02 12:15:35', 1),
(3, 'Marty', 'Macfly', 1, '2022-03-24 13:16:46', '2022-04-02 12:15:56', 1);
-- --------------------------------------------------------
--
-- Structure de la table `teacher`
--
CREATE TABLE `teacher` (
`id` int UNSIGNED NOT NULL,
`firstname` varchar(64) DEFAULT NULL,
`lastname` varchar(64) DEFAULT NULL,
`job` varchar(64) DEFAULT NULL,
`status` tinyint NOT NULL DEFAULT '0',
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
--
-- Déchargement des données de la table `teacher`
--
INSERT INTO `teacher` (`id`, `firstname`, `lastname`, `job`, `status`, `created_at`, `updated_at`) VALUES
(1, 'Jean', 'Passe', 'Formateur PHP/MySQL', 1, '2022-03-24 13:16:46', '2022-04-02 12:13:21'),
(2, 'Paul', 'Ochon', 'Formateur PHP/MySQL', 1, '2022-03-24 13:16:46', '2022-04-02 12:13:44'),
(3, 'Annie', 'Versaire', 'Formateur PHP/MySQL', 1, '2022-03-24 13:16:46', '2022-04-02 12:14:12');
--
-- Index pour les tables déchargées
--
--
-- Index pour la table `app_user`
--
ALTER TABLE `app_user`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `email_UNIQUE` (`email`);
--
-- Index pour la table `student`
--
ALTER TABLE `student`
ADD PRIMARY KEY (`id`),
ADD KEY `fk_student_teacher_idx` (`teacher_id`);
--
-- Index pour la table `teacher`
--
ALTER TABLE `teacher`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT pour les tables déchargées
--
--
-- AUTO_INCREMENT pour la table `app_user`
--
ALTER TABLE `app_user`
MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT pour la table `student`
--
ALTER TABLE `student`
MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT pour la table `teacher`
--
ALTER TABLE `teacher`
MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;