Subversion Repositories ALCASAR

Rev

Details | Last modification | View Log

Rev Author Line No. Line
1349 richard 1
-- phpMyAdmin SQL Dump
2
-- version 3.5.8.2
3
-- http://www.phpmyadmin.net
4
--
5
-- Client: localhost
6
-- Généré le: Mar 06 Mai 2014 à 10:39
7
-- Version du serveur: 5.5.25-MariaDB
8
-- Version de PHP: 5.3.27
9
 
10
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
11
SET time_zone = "+00:00";
12
 
13
 
14
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
15
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
16
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
17
/*!40101 SET NAMES utf8 */;
18
 
19
--
20
-- Base de données: `gammu`
21
--
22
 
23
-- --------------------------------------------------------
24
 
25
--
26
-- Structure de la table `daemons`
27
--
28
 
29
CREATE TABLE IF NOT EXISTS `daemons` (
30
  `Start` text NOT NULL,
31
  `Info` text NOT NULL
32
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
33
 
34
-- --------------------------------------------------------
35
 
36
--
37
-- Structure de la table `gammu`
38
--
39
 
40
CREATE TABLE IF NOT EXISTS `gammu` (
41
  `Version` int(11) NOT NULL DEFAULT '0'
42
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
43
 
44
--
45
-- Contenu de la table `gammu`
46
--
47
 
48
INSERT INTO `gammu` (`Version`) VALUES
49
(13);
50
 
51
-- --------------------------------------------------------
52
 
53
--
54
-- Structure de la table `inbox`
55
--
56
 
57
CREATE TABLE IF NOT EXISTS `inbox` (
58
  `UpdatedInDB` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
59
  `ReceivingDateTime` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
60
  `Text` text NOT NULL,
61
  `SenderNumber` varchar(20) NOT NULL DEFAULT '',
62
  `Coding` enum('Default_No_Compression','Unicode_No_Compression','8bit','Default_Compression','Unicode_Compression') NOT NULL DEFAULT 'Default_No_Compression',
63
  `UDH` text NOT NULL,
64
  `SMSCNumber` varchar(20) NOT NULL DEFAULT '',
65
  `Class` int(11) NOT NULL DEFAULT '-1',
66
  `TextDecoded` text NOT NULL,
67
  `ID` int(10) unsigned NOT NULL AUTO_INCREMENT,
68
  `RecipientID` text NOT NULL,
69
  `Processed` enum('false','true') NOT NULL DEFAULT 'false',
70
  PRIMARY KEY (`ID`)
71
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=18 ;
72
 
73
--
74
-- Déclencheurs `inbox`
75
--
76
DROP TRIGGER IF EXISTS `inbox_timestamp`;
77
DELIMITER //
78
CREATE TRIGGER `inbox_timestamp` BEFORE INSERT ON `inbox`
79
 FOR EACH ROW BEGIN
80
    IF NEW.ReceivingDateTime = '0000-00-00 00:00:00' THEN
81
        SET NEW.ReceivingDateTime = CURRENT_TIMESTAMP();
82
    END IF;
83
END
84
//
85
DELIMITER ;
86
 
87
-- --------------------------------------------------------
88
 
89
--
90
-- Structure de la table `outbox`
91
--
92
 
93
CREATE TABLE IF NOT EXISTS `outbox` (
94
  `UpdatedInDB` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
95
  `InsertIntoDB` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
96
  `SendingDateTime` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
97
  `SendBefore` time NOT NULL DEFAULT '23:59:59',
98
  `SendAfter` time NOT NULL DEFAULT '00:00:00',
99
  `Text` text,
100
  `DestinationNumber` varchar(20) NOT NULL DEFAULT '',
101
  `Coding` enum('Default_No_Compression','Unicode_No_Compression','8bit','Default_Compression','Unicode_Compression') NOT NULL DEFAULT 'Default_No_Compression',
102
  `UDH` text,
103
  `Class` int(11) DEFAULT '-1',
104
  `TextDecoded` text NOT NULL,
105
  `ID` int(10) unsigned NOT NULL AUTO_INCREMENT,
106
  `MultiPart` enum('false','true') DEFAULT 'false',
107
  `RelativeValidity` int(11) DEFAULT '-1',
108
  `SenderID` varchar(255) DEFAULT NULL,
109
  `SendingTimeOut` timestamp NULL DEFAULT '0000-00-00 00:00:00',
110
  `DeliveryReport` enum('default','yes','no') DEFAULT 'default',
111
  `CreatorID` text NOT NULL,
112
  PRIMARY KEY (`ID`),
113
  KEY `outbox_date` (`SendingDateTime`,`SendingTimeOut`),
114
  KEY `outbox_sender` (`SenderID`)
115
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
116
 
117
--
118
-- Déclencheurs `outbox`
119
--
120
DROP TRIGGER IF EXISTS `outbox_timestamp`;
121
DELIMITER //
122
CREATE TRIGGER `outbox_timestamp` BEFORE INSERT ON `outbox`
123
 FOR EACH ROW BEGIN
124
    IF NEW.InsertIntoDB = '0000-00-00 00:00:00' THEN
125
        SET NEW.InsertIntoDB = CURRENT_TIMESTAMP();
126
    END IF;
127
    IF NEW.SendingDateTime = '0000-00-00 00:00:00' THEN
128
        SET NEW.SendingDateTime = CURRENT_TIMESTAMP();
129
    END IF;
130
    IF NEW.SendingTimeOut = '0000-00-00 00:00:00' THEN
131
        SET NEW.SendingTimeOut = CURRENT_TIMESTAMP();
132
    END IF;
133
END
134
//
135
DELIMITER ;
136
 
137
-- --------------------------------------------------------
138
 
139
--
140
-- Structure de la table `outbox_multipart`
141
--
142
 
143
CREATE TABLE IF NOT EXISTS `outbox_multipart` (
144
  `Text` text,
145
  `Coding` enum('Default_No_Compression','Unicode_No_Compression','8bit','Default_Compression','Unicode_Compression') NOT NULL DEFAULT 'Default_No_Compression',
146
  `UDH` text,
147
  `Class` int(11) DEFAULT '-1',
148
  `TextDecoded` text,
149
  `ID` int(10) unsigned NOT NULL DEFAULT '0',
150
  `SequencePosition` int(11) NOT NULL DEFAULT '1',
151
  PRIMARY KEY (`ID`,`SequencePosition`)
152
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
153
 
154
-- --------------------------------------------------------
155
 
156
--
157
-- Structure de la table `pbk`
158
--
159
 
160
CREATE TABLE IF NOT EXISTS `pbk` (
161
  `ID` int(11) NOT NULL AUTO_INCREMENT,
162
  `GroupID` int(11) NOT NULL DEFAULT '-1',
163
  `Name` text NOT NULL,
164
  `Number` text NOT NULL,
165
  PRIMARY KEY (`ID`)
166
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
167
 
168
-- --------------------------------------------------------
169
 
170
--
171
-- Structure de la table `pbk_groups`
172
--
173
 
174
CREATE TABLE IF NOT EXISTS `pbk_groups` (
175
  `Name` text NOT NULL,
176
  `ID` int(11) NOT NULL AUTO_INCREMENT,
177
  PRIMARY KEY (`ID`)
178
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
179
 
180
-- --------------------------------------------------------
181
 
182
--
183
-- Structure de la table `phones`
184
--
185
 
186
CREATE TABLE IF NOT EXISTS `phones` (
187
  `ID` text NOT NULL,
188
  `UpdatedInDB` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
189
  `InsertIntoDB` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
190
  `TimeOut` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
191
  `Send` enum('yes','no') NOT NULL DEFAULT 'no',
192
  `Receive` enum('yes','no') NOT NULL DEFAULT 'no',
193
  `IMEI` varchar(35) NOT NULL,
194
  `Client` text NOT NULL,
195
  `Battery` int(11) NOT NULL DEFAULT '-1',
196
  `Signal` int(11) NOT NULL DEFAULT '-1',
197
  `Sent` int(11) NOT NULL DEFAULT '0',
198
  `Received` int(11) NOT NULL DEFAULT '0',
199
  PRIMARY KEY (`IMEI`)
200
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
201
 
202
 
203
--
204
-- Déclencheurs `phones`
205
--
206
DROP TRIGGER IF EXISTS `phones_timestamp`;
207
DELIMITER //
208
CREATE TRIGGER `phones_timestamp` BEFORE INSERT ON `phones`
209
 FOR EACH ROW BEGIN
210
    IF NEW.InsertIntoDB = '0000-00-00 00:00:00' THEN
211
        SET NEW.InsertIntoDB = CURRENT_TIMESTAMP();
212
    END IF;
213
    IF NEW.TimeOut = '0000-00-00 00:00:00' THEN
214
        SET NEW.TimeOut = CURRENT_TIMESTAMP();
215
    END IF;
216
END
217
//
218
DELIMITER ;
219
 
220
-- --------------------------------------------------------
221
 
222
--
223
-- Structure de la table `sentitems`
224
--
225
 
226
CREATE TABLE IF NOT EXISTS `sentitems` (
227
  `UpdatedInDB` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
228
  `InsertIntoDB` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
229
  `SendingDateTime` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
230
  `DeliveryDateTime` timestamp NULL DEFAULT NULL,
231
  `Text` text NOT NULL,
232
  `DestinationNumber` varchar(20) NOT NULL DEFAULT '',
233
  `Coding` enum('Default_No_Compression','Unicode_No_Compression','8bit','Default_Compression','Unicode_Compression') NOT NULL DEFAULT 'Default_No_Compression',
234
  `UDH` text NOT NULL,
235
  `SMSCNumber` varchar(20) NOT NULL DEFAULT '',
236
  `Class` int(11) NOT NULL DEFAULT '-1',
237
  `TextDecoded` text NOT NULL,
238
  `ID` int(10) unsigned NOT NULL DEFAULT '0',
239
  `SenderID` varchar(255) NOT NULL,
240
  `SequencePosition` int(11) NOT NULL DEFAULT '1',
241
  `Status` enum('SendingOK','SendingOKNoReport','SendingError','DeliveryOK','DeliveryFailed','DeliveryPending','DeliveryUnknown','Error') NOT NULL DEFAULT 'SendingOK',
242
  `StatusError` int(11) NOT NULL DEFAULT '-1',
243
  `TPMR` int(11) NOT NULL DEFAULT '-1',
244
  `RelativeValidity` int(11) NOT NULL DEFAULT '-1',
245
  `CreatorID` text NOT NULL,
246
  PRIMARY KEY (`ID`,`SequencePosition`),
247
  KEY `sentitems_date` (`DeliveryDateTime`),
248
  KEY `sentitems_tpmr` (`TPMR`),
249
  KEY `sentitems_dest` (`DestinationNumber`),
250
  KEY `sentitems_sender` (`SenderID`)
251
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
252
 
253
--
254
-- Déclencheurs `sentitems`
255
--
256
DROP TRIGGER IF EXISTS `sentitems_timestamp`;
257
DELIMITER //
258
CREATE TRIGGER `sentitems_timestamp` BEFORE INSERT ON `sentitems`
259
 FOR EACH ROW BEGIN
260
    IF NEW.InsertIntoDB = '0000-00-00 00:00:00' THEN
261
        SET NEW.InsertIntoDB = CURRENT_TIMESTAMP();
262
    END IF;
263
    IF NEW.SendingDateTime = '0000-00-00 00:00:00' THEN
264
        SET NEW.SendingDateTime = CURRENT_TIMESTAMP();
265
    END IF;
266
END
267
//
268
DELIMITER ;
269
 
270
-- --------------------------------------------------------
271
 
272
--
273
-- Structure de la table `SMS_ban_perm`
274
--
275
 
276
CREATE TABLE IF NOT EXISTS `SMS_ban_perm` (
277
  `SenderNumber` varchar(20) CHARACTER SET utf8 NOT NULL,
278
  `Expiration` varchar(255) CHARACTER SET utf8 NOT NULL,
279
  `Perm` int(11) NOT NULL,
280
  `date_add` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
281
  PRIMARY KEY (`SenderNumber`)
282
) ENGINE=MyISAM DEFAULT CHARSET=utf32;
283
 
284
 
285
-- --------------------------------------------------------
286
 
287
--
288
-- Structure de la table `SMS_ban_temp`
289
--
290
 
291
CREATE TABLE IF NOT EXISTS `SMS_ban_temp` (
292
  `ID` int(11) NOT NULL AUTO_INCREMENT,
293
  `SenderNumber` varchar(20) NOT NULL,
294
  PRIMARY KEY (`ID`)
295
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;