-
Notifications
You must be signed in to change notification settings - Fork 0
/
database.sql
221 lines (180 loc) · 6.43 KB
/
database.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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Hôte : localhost
-- Généré le : sam. 01 août 2020 à 11:00
-- Version du serveur : 5.7.24
-- Version de PHP : 7.2.19
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
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 : `__a_renseigner__`
--
-- --------------------------------------------------------
--
-- Structure de la table `aer_account`
--
CREATE TABLE `aer_account` (
`id` int(11) NOT NULL,
`enable` tinyint(1) NOT NULL DEFAULT '1',
`user` varchar(30) NOT NULL,
`password` varchar(128) NOT NULL DEFAULT '',
`rank` enum('guest','user','operator','admin','root') NOT NULL DEFAULT 'user',
`email` varchar(80) NOT NULL,
`created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`last_connected` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`guid` varchar(150) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Structure de la table `aer_captcha`
--
CREATE TABLE `aer_captcha` (
`remote_ip` varchar(80) NOT NULL DEFAULT '',
`picture` blob,
`code` varchar(10) NOT NULL DEFAULT '',
`user_target` varchar(50) DEFAULT NULL,
`created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`last_test` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Structure de la table `aer_extra_info`
--
CREATE TABLE `aer_extra_info` (
`sql_update` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`id_account` int(11) NOT NULL,
`gender` enum('male','female') NOT NULL DEFAULT 'male',
`firstName` varchar(50) NOT NULL DEFAULT '',
`lastName` varchar(50) NOT NULL DEFAULT '',
`phone` varchar(32) NOT NULL DEFAULT '',
`age` date NOT NULL DEFAULT '1982-01-01',
`adress` varchar(255) NOT NULL DEFAULT '',
`citycode` varchar(10) NOT NULL DEFAULT '00000',
`city` varchar(50) NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Structure de la table `aer_internal_mail`
--
CREATE TABLE `aer_internal_mail` (
`sql_update` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`id_account` int(11) NOT NULL,
`can_expire` tinyint(1) NOT NULL DEFAULT '1',
`hash_to_return` varchar(128) NOT NULL,
`email` varchar(80) NOT NULL,
`created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`type` enum('recover_password','account_enable','change_email','close_account','recover_personnal_data') DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Structure de la table `aer_preventspam_ip`
--
CREATE TABLE `aer_preventspam_ip` (
`sql_update` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`IP` varchar(80) NOT NULL,
`created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Structure de la table `aer_preventspam_mail`
--
CREATE TABLE `aer_preventspam_mail` (
`sql_update` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`id_account` int(11) NOT NULL,
`email` varchar(80) NOT NULL,
`created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Structure de la table `aer_session_active`
--
CREATE TABLE `aer_session_active` (
`sql_update` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`id_account` int(11) NOT NULL,
`loggedIn` tinyint(1) NOT NULL DEFAULT '0',
`jwt_hash` varchar(32) NOT NULL,
`last_access_data` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Index pour les tables déchargées
--
--
-- Index pour la table `aer_account`
--
ALTER TABLE `aer_account`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `user` (`user`),
ADD UNIQUE KEY `email` (`email`);
--
-- Index pour la table `aer_captcha`
--
ALTER TABLE `aer_captcha`
ADD UNIQUE KEY `remote_ip` (`remote_ip`);
--
-- Index pour la table `aer_extra_info`
--
ALTER TABLE `aer_extra_info`
ADD UNIQUE KEY `id_account` (`id_account`);
--
-- Index pour la table `aer_internal_mail`
--
ALTER TABLE `aer_internal_mail`
ADD UNIQUE KEY `id_account` (`id_account`),
ADD UNIQUE KEY `hash_to_return` (`hash_to_return`);
--
-- Index pour la table `aer_preventspam_ip`
--
ALTER TABLE `aer_preventspam_ip`
ADD UNIQUE KEY `IP` (`IP`);
--
-- Index pour la table `aer_preventspam_mail`
--
ALTER TABLE `aer_preventspam_mail`
ADD UNIQUE KEY `id_account` (`id_account`);
--
-- Index pour la table `aer_session_active`
--
ALTER TABLE `aer_session_active`
ADD UNIQUE KEY `id_account` (`id_account`);
--
-- AUTO_INCREMENT pour les tables déchargées
--
--
-- AUTO_INCREMENT pour la table `aer_account`
--
ALTER TABLE `aer_account`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4466;
--
-- Contraintes pour les tables déchargées
--
--
-- Contraintes pour la table `aer_extra_info`
--
ALTER TABLE `aer_extra_info`
ADD CONSTRAINT `account_extra_info_related_id` FOREIGN KEY (`id_account`) REFERENCES `aer_account` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Contraintes pour la table `aer_internal_mail`
--
ALTER TABLE `aer_internal_mail`
ADD CONSTRAINT `account_internal_mail_related_id` FOREIGN KEY (`id_account`) REFERENCES `aer_account` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Contraintes pour la table `aer_preventspam_mail`
--
ALTER TABLE `aer_preventspam_mail`
ADD CONSTRAINT `account_mail_preventspam_related_id` FOREIGN KEY (`id_account`) REFERENCES `aer_account` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Contraintes pour la table `aer_session_active`
--
ALTER TABLE `aer_session_active`
ADD CONSTRAINT `account_session_active_related_id` FOREIGN KEY (`id_account`) REFERENCES `aer_account` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
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 */;