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
222
223
224
225
226
227
228
|
-- phpMyAdmin SQL Dump
-- version 3.4.7.1
-- http://www.phpmyadmin.net
--
-- Client: localhost
-- Généré le : Dim 20 Novembre 2011 à 13:31
-- Version du serveur: 5.5.17
-- Version de PHP: 5.3.8
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
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 utf8 */;
--
-- Base de données: `alex_auvolat`
--
-- --------------------------------------------------------
--
-- Structure de la table `account`
--
CREATE TABLE IF NOT EXISTS `account` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`login` varchar(255) NOT NULL,
`password` varchar(100) NOT NULL,
`priv` int(11) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
UNIQUE KEY `login` (`login`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=8 ;
-- --------------------------------------------------------
--
-- Structure de la table `batches`
--
CREATE TABLE IF NOT EXISTS `batches` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`list` int(11) NOT NULL,
`name` varchar(255) NOT NULL,
`model` text NOT NULL,
`contents` text NOT NULL,
`json_data` text NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `unique_name` (`list`,`name`),
KEY `list` (`list`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ;
-- --------------------------------------------------------
--
-- Structure de la table `batch_review`
--
CREATE TABLE IF NOT EXISTS `batch_review` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user` int(11) NOT NULL,
`batch` int(11) NOT NULL,
`results` text NOT NULL,
`score` int(11) NOT NULL,
`date` date NOT NULL,
PRIMARY KEY (`id`),
KEY `batch` (`batch`),
KEY `user_idx` (`user`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=8 ;
-- --------------------------------------------------------
--
-- Structure de la table `batch_study`
--
CREATE TABLE IF NOT EXISTS `batch_study` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user` int(11) NOT NULL,
`batch` int(11) NOT NULL,
`last_review` int(11) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `batch` (`batch`),
KEY `user_idx` (`user`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ;
-- --------------------------------------------------------
--
-- Structure de la table `cards`
--
CREATE TABLE IF NOT EXISTS `cards` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`deck` int(11) NOT NULL,
`number` int(11) NOT NULL,
`name` varchar(255) NOT NULL,
`text_md` text NOT NULL,
`text_html` text NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `unique_name` (`deck`,`name`),
UNIQUE KEY `unique_number` (`deck`,`number`),
KEY `deck_idx` (`deck`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=9 ;
-- --------------------------------------------------------
--
-- Structure de la table `card_study`
--
CREATE TABLE IF NOT EXISTS `card_study` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`deck_study` int(11) NOT NULL,
`card` int(11) NOT NULL,
`level` int(11) NOT NULL,
`next_review` date NOT NULL,
PRIMARY KEY (`id`),
KEY `deck_study` (`deck_study`,`card`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=19 ;
-- --------------------------------------------------------
--
-- Structure de la table `decks`
--
CREATE TABLE IF NOT EXISTS `decks` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`owner` int(11) NOT NULL,
`name` varchar(255) NOT NULL,
`comment_md` text NOT NULL,
`comment_html` text NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `unique_name` (`owner`,`name`),
KEY `owner_idx` (`owner`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
-- --------------------------------------------------------
--
-- Structure de la table `deck_study`
--
CREATE TABLE IF NOT EXISTS `deck_study` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user` int(11) NOT NULL,
`deck` int(11) NOT NULL,
`last_card` int(11) NOT NULL DEFAULT '0',
`learn_rate` int(11) NOT NULL DEFAULT '10',
`need_check` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `unique_user_deck` (`user`,`deck`),
KEY `user_idx` (`user`),
KEY `deck_idx` (`deck`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=10 ;
-- --------------------------------------------------------
--
-- Structure de la table `images`
--
CREATE TABLE IF NOT EXISTS `images` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`owner` int(11) NOT NULL,
`extension` varchar(5) NOT NULL,
PRIMARY KEY (`id`),
KEY `owner` (`owner`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=9 ;
-- --------------------------------------------------------
--
-- Structure de la table `lists`
--
CREATE TABLE IF NOT EXISTS `lists` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`owner` int(11) NOT NULL,
`name` varchar(255) NOT NULL,
`comment_md` text NOT NULL,
`comment_html` text NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `unique_name` (`owner`,`name`),
KEY `owner` (`owner`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;
-- --------------------------------------------------------
--
-- Structure de la table `list_study`
--
CREATE TABLE IF NOT EXISTS `list_study` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user` int(11) NOT NULL,
`list` int(11) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `unique_user_list` (`user`,`list`),
KEY `user` (`user`),
KEY `list_idx` (`list`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;
-- --------------------------------------------------------
--
-- Structure de la table `notes`
--
CREATE TABLE IF NOT EXISTS `notes` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`owner` int(11) NOT NULL,
`parent` int(11) NOT NULL,
`title` varchar(255) NOT NULL,
`text` text NOT NULL,
`text_html` text NOT NULL,
`public` tinyint(1) NOT NULL,
PRIMARY KEY (`id`),
KEY `owner` (`owner`,`parent`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=34 ;
/*!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 */;
|