3
3
-- http://www.phpmyadmin.net
4
4
--
5
5
-- Host: localhost
6
- -- Generation Time: Apr 09 , 2015 at 05:58 PM
6
+ -- Generation Time: Apr 10 , 2015 at 05:29 PM
7
7
-- Server version: 5.5.41-0ubuntu0.12.04.1-log
8
8
-- PHP Version: 5.3.10-1ubuntu3.17
9
9
@@ -31,39 +31,9 @@ CREATE TABLE IF NOT EXISTS `contacts` (
31
31
` contact_name` varchar (100 ) NOT NULL ,
32
32
` contact_email` varchar (200 ) NOT NULL ,
33
33
` created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ,
34
- ` updated_at` timestamp NOT NULL DEFAULT ' 0000-00-00 00:00:00'
35
- ) ENGINE= InnoDB AUTO_INCREMENT= 9 DEFAULT CHARSET= latin1;
36
-
37
- --
38
- -- Dumping data for table `contacts`
39
- --
40
-
41
- INSERT INTO ` contacts` (` id` , ` contact_name` , ` contact_email` , ` created_at` , ` updated_at` ) VALUES
42
- (
1 ,
' Admins' ,
' [email protected] ' ,
' 0000-00-00 00:00:00' ,
' 2015-04-08 20:56:06' ),
43
- (
4 ,
' New contact' ,
' [email protected] ' ,
' 2015-04-09 10:27:59' ,
' 2015-04-09 10:27:59' ),
44
- (
5 ,
' New contact' ,
' [email protected] ' ,
' 2015-04-09 11:30:05' ,
' 2015-04-09 11:30:05' ),
45
- (
6 ,
' Webmaster' ,
' [email protected] ' ,
' 2015-04-09 12:05:15' ,
' 2015-04-09 12:05:27' ),
46
- (
7 ,
' Alfonso' ,
' [email protected] ' ,
' 2015-04-09 14:57:32' ,
' 2015-04-09 14:57:41' ),
47
- (
8 ,
' New contact' ,
' [email protected] ' ,
' 2015-04-09 16:45:31' ,
' 2015-04-09 16:45:31' );
48
-
49
- -- --------------------------------------------------------
50
-
51
- --
52
- -- Table structure for table `contact_form`
53
- --
54
-
55
- CREATE TABLE IF NOT EXISTS ` contact_form` (
56
- ` id` int (11 ) NOT NULL ,
57
- ` form_id` int (11 ) NOT NULL ,
58
- ` contact_id` int (11 ) NOT NULL
59
- ) ENGINE= InnoDB AUTO_INCREMENT= 9 DEFAULT CHARSET= latin1;
60
-
61
- --
62
- -- Dumping data for table `contact_form`
63
- --
64
-
65
- INSERT INTO ` contact_form` (` id` , ` form_id` , ` contact_id` ) VALUES
66
- (7 , 50 , 7 );
34
+ ` updated_at` timestamp NOT NULL DEFAULT ' 0000-00-00 00:00:00' ,
35
+ ` form_id` int (11 ) NOT NULL
36
+ ) ENGINE= InnoDB AUTO_INCREMENT= 18 DEFAULT CHARSET= latin1;
67
37
68
38
-- --------------------------------------------------------
69
39
@@ -80,14 +50,7 @@ CREATE TABLE IF NOT EXISTS `fields` (
80
50
` length` int (11 ) NOT NULL DEFAULT ' 100' ,
81
51
` created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ,
82
52
` updated_at` timestamp NOT NULL DEFAULT ' 0000-00-00 00:00:00'
83
- ) ENGINE= InnoDB AUTO_INCREMENT= 41 DEFAULT CHARSET= latin1;
84
-
85
- --
86
- -- Dumping data for table `fields`
87
- --
88
-
89
- INSERT INTO ` fields` (` id` , ` field_name` , ` form_id` , ` type_id` , ` placeholder` , ` length` , ` created_at` , ` updated_at` ) VALUES
90
- (31 , ' Your name' , 50 , 1 , ' Please give me your name' , 150 , ' 2015-04-09 13:05:17' , ' 2015-04-09 14:57:58' );
53
+ ) ENGINE= InnoDB AUTO_INCREMENT= 49 DEFAULT CHARSET= latin1;
91
54
92
55
-- --------------------------------------------------------
93
56
@@ -101,43 +64,7 @@ CREATE TABLE IF NOT EXISTS `forms` (
101
64
` redirect` varchar (300 ) NOT NULL ,
102
65
` created_at` timestamp NOT NULL DEFAULT ' 0000-00-00 00:00:00' ,
103
66
` updated_at` timestamp NOT NULL DEFAULT ' 0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP
104
- ) ENGINE= InnoDB AUTO_INCREMENT= 55 DEFAULT CHARSET= latin1;
105
-
106
- --
107
- -- Dumping data for table `forms`
108
- --
109
-
110
- INSERT INTO ` forms` (` id` , ` form_name` , ` redirect` , ` created_at` , ` updated_at` ) VALUES
111
- (50 , ' My shiny form' , ' http://localhost:9079' , ' 2015-04-09 13:05:17' , ' 2015-04-09 14:57:28' );
112
-
113
- -- --------------------------------------------------------
114
-
115
- --
116
- -- Table structure for table `responses_50`
117
- --
118
-
119
- CREATE TABLE IF NOT EXISTS ` responses_50` (
120
- ` id` int (11 ) NOT NULL ,
121
- ` field_31` varchar (150 ) COLLATE utf8_unicode_ci DEFAULT NULL ,
122
- ` created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ,
123
- ` updated_at` timestamp NOT NULL DEFAULT ' 0000-00-00 00:00:00' ,
124
- ` form_id` int (11 ) NOT NULL
125
- ) ENGINE= InnoDB AUTO_INCREMENT= 14 DEFAULT CHARSET= utf8 COLLATE= utf8_unicode_ci;
126
-
127
- --
128
- -- Dumping data for table `responses_50`
129
- --
130
-
131
- INSERT INTO ` responses_50` (` id` , ` field_31` , ` created_at` , ` updated_at` , ` form_id` ) VALUES
132
- (5 , ' My name is pepe' , ' 2015-04-09 14:58:10' , ' 2015-04-09 14:58:10' , 50 ),
133
- (6 , ' my name is joe' , ' 2015-04-09 16:44:00' , ' 2015-04-09 16:44:00' , 50 ),
134
- (7 , ' sasasa' , ' 2015-04-09 17:23:33' , ' 2015-04-09 17:23:33' , 50 ),
135
- (8 , ' sasasa' , ' 2015-04-09 17:31:58' , ' 2015-04-09 17:31:58' , 50 ),
136
- (9 , ' sasasa' , ' 2015-04-09 17:32:12' , ' 2015-04-09 17:32:12' , 50 ),
137
- (10 , ' pepe' , ' 2015-04-09 17:52:19' , ' 2015-04-09 17:52:19' , 50 ),
138
- (11 , ' pepe' , ' 2015-04-09 17:52:49' , ' 2015-04-09 17:52:49' , 50 ),
139
- (12 , ' pepe' , ' 2015-04-09 17:53:08' , ' 2015-04-09 17:53:08' , 50 ),
140
- (13 , ' pepe' , ' 2015-04-09 17:53:33' , ' 2015-04-09 17:53:33' , 50 );
67
+ ) ENGINE= InnoDB AUTO_INCREMENT= 62 DEFAULT CHARSET= latin1;
141
68
142
69
-- --------------------------------------------------------
143
70
@@ -149,7 +76,7 @@ CREATE TABLE IF NOT EXISTS `types` (
149
76
` id` int (11 ) NOT NULL ,
150
77
` name` varchar (150 ) NOT NULL ,
151
78
` sql_format` varchar (300 ) NOT NULL
152
- ) ENGINE= InnoDB AUTO_INCREMENT= 4 DEFAULT CHARSET= latin1;
79
+ ) ENGINE= InnoDB AUTO_INCREMENT= 5 DEFAULT CHARSET= latin1;
153
80
154
81
--
155
82
-- Dumping data for table `types`
@@ -158,7 +85,8 @@ CREATE TABLE IF NOT EXISTS `types` (
158
85
INSERT INTO ` types` (` id` , ` name` , ` sql_format` ) VALUES
159
86
(1 , ' text' , ' varchar(**length**)' ),
160
87
(2 , ' textarea' , ' text' ),
161
- (3 , ' checkbox' , ' tinyint(1)' );
88
+ (3 , ' checkbox' , ' tinyint(1)' ),
89
+ (4 , ' email' , ' varchar(250)' );
162
90
163
91
-- --------------------------------------------------------
164
92
@@ -187,15 +115,8 @@ INSERT INTO `users` (`id`, `username`, `password`) VALUES
187
115
-- Indexes for table `contacts`
188
116
--
189
117
ALTER TABLE ` contacts`
190
- ADD PRIMARY KEY (` id` );
191
-
192
- --
193
- -- Indexes for table `contact_form`
194
- --
195
- ALTER TABLE ` contact_form`
196
118
ADD PRIMARY KEY (` id` ),
197
- ADD KEY ` form_id` (` form_id` ),
198
- ADD KEY ` contact_id` (` contact_id` );
119
+ ADD KEY ` form_id` (` form_id` );
199
120
200
121
--
201
122
-- Indexes for table `fields`
@@ -212,13 +133,6 @@ ALTER TABLE `fields`
212
133
ALTER TABLE ` forms`
213
134
ADD PRIMARY KEY (` id` );
214
135
215
- --
216
- -- Indexes for table `responses_50`
217
- --
218
- ALTER TABLE ` responses_50`
219
- ADD PRIMARY KEY (` id` ),
220
- ADD KEY ` form_id` (` form_id` );
221
-
222
136
--
223
137
-- Indexes for table `types`
224
138
--
@@ -239,32 +153,22 @@ ALTER TABLE `users`
239
153
-- AUTO_INCREMENT for table `contacts`
240
154
--
241
155
ALTER TABLE ` contacts`
242
- MODIFY ` id` int (11 ) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT= 9 ;
243
- --
244
- -- AUTO_INCREMENT for table `contact_form`
245
- --
246
- ALTER TABLE ` contact_form`
247
- MODIFY ` id` int (11 ) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT= 9 ;
156
+ MODIFY ` id` int (11 ) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT= 18 ;
248
157
--
249
158
-- AUTO_INCREMENT for table `fields`
250
159
--
251
160
ALTER TABLE ` fields`
252
- MODIFY ` id` int (11 ) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT= 41 ;
161
+ MODIFY ` id` int (11 ) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT= 49 ;
253
162
--
254
163
-- AUTO_INCREMENT for table `forms`
255
164
--
256
165
ALTER TABLE ` forms`
257
- MODIFY ` id` int (11 ) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT= 55 ;
258
- --
259
- -- AUTO_INCREMENT for table `responses_50`
260
- --
261
- ALTER TABLE ` responses_50`
262
- MODIFY ` id` int (11 ) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT= 14 ;
166
+ MODIFY ` id` int (11 ) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT= 62 ;
263
167
--
264
168
-- AUTO_INCREMENT for table `types`
265
169
--
266
170
ALTER TABLE ` types`
267
- MODIFY ` id` int (11 ) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT= 4 ;
171
+ MODIFY ` id` int (11 ) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT= 5 ;
268
172
--
269
173
-- AUTO_INCREMENT for table `users`
270
174
--
@@ -275,11 +179,10 @@ ALTER TABLE `users`
275
179
--
276
180
277
181
--
278
- -- Constraints for table `contact_form `
182
+ -- Constraints for table `contacts `
279
183
--
280
- ALTER TABLE ` contact_form`
281
- ADD CONSTRAINT ` contact_form_ibfk_1` FOREIGN KEY (` form_id` ) REFERENCES ` forms` (` id` ),
282
- ADD CONSTRAINT ` contact_form_ibfk_2` FOREIGN KEY (` contact_id` ) REFERENCES ` contacts` (` id` );
184
+ ALTER TABLE ` contacts`
185
+ ADD CONSTRAINT ` contacts_ibfk_1` FOREIGN KEY (` form_id` ) REFERENCES ` forms` (` id` );
283
186
284
187
--
285
188
-- Constraints for table `fields`
@@ -288,12 +191,6 @@ ALTER TABLE `fields`
288
191
ADD CONSTRAINT ` fields_ibfk_3` FOREIGN KEY (` form_id` ) REFERENCES ` forms` (` id` ),
289
192
ADD CONSTRAINT ` fields_ibfk_4` FOREIGN KEY (` type_id` ) REFERENCES ` types` (` id` );
290
193
291
- --
292
- -- Constraints for table `responses_50`
293
- --
294
- ALTER TABLE ` responses_50`
295
- ADD CONSTRAINT ` responses_50_ibfk_1` FOREIGN KEY (` form_id` ) REFERENCES ` forms` (` id` );
296
-
297
194
/* !40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */ ;
298
195
/* !40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */ ;
299
196
/* !40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */ ;
0 commit comments