Revision 371
Added by Matthias almost 18 years ago
install.php | ||
---|---|---|
33 | 33 |
// Create tables |
34 | 34 |
$database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_form_fields`"); |
35 | 35 |
$mod_form = 'CREATE TABLE `'.TABLE_PREFIX.'mod_form_fields` ( `field_id` INT NOT NULL AUTO_INCREMENT,' |
36 |
. ' `section_id` INT NOT NULL ,'
|
|
37 |
. ' `page_id` INT NOT NULL ,'
|
|
38 |
. ' `position` INT NOT NULL ,'
|
|
39 |
. ' `title` VARCHAR(255) NOT NULL DEFAULT \'\' ,'
|
|
40 |
. ' `type` VARCHAR(255) NOT NULL DEFAULT \'\' ,'
|
|
41 |
. ' `required` INT NOT NULL ,'
|
|
42 |
. ' `value` TEXT NOT NULL DEFAULT \'\' ,'
|
|
43 |
. ' `extra` TEXT NOT NULL DEFAULT \'\' ,'
|
|
44 |
. ' PRIMARY KEY ( `field_id` ) )'
|
|
45 |
. ' ';
|
|
36 |
. ' `section_id` INT NOT NULL DEFAULT \'0\' ,'
|
|
37 |
. ' `page_id` INT NOT NULL DEFAULT \'0\' ,'
|
|
38 |
. ' `position` INT NOT NULL DEFAULT \'0\' ,'
|
|
39 |
. ' `title` VARCHAR(255) NOT NULL DEFAULT \'\' ,'
|
|
40 |
. ' `type` VARCHAR(255) NOT NULL DEFAULT \'\' ,'
|
|
41 |
. ' `required` INT NOT NULL DEFAULT \'0\' ,'
|
|
42 |
. ' `value` TEXT NOT NULL ,'
|
|
43 |
. ' `extra` TEXT NOT NULL ,'
|
|
44 |
. ' PRIMARY KEY ( `field_id` ) '
|
|
45 |
. ' )';
|
|
46 | 46 |
$database->query($mod_form); |
47 | 47 |
$database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_form_settings`"); |
48 | 48 |
$mod_form = 'CREATE TABLE `'.TABLE_PREFIX.'mod_form_settings` (' |
49 |
. ' `section_id` INT NOT NULL,'
|
|
50 |
. ' `page_id` INT NOT NULL,'
|
|
51 |
. ' `header` TEXT NOT NULL DEFAULT \'\' ,'
|
|
52 |
. ' `field_loop` TEXT NOT NULL DEFAULT \'\' ,'
|
|
53 |
. ' `footer` TEXT NOT NULL DEFAULT \'\' ,'
|
|
54 |
. ' `email_to` TEXT NOT NULL DEFAULT \'\' ,'
|
|
55 |
. ' `email_from` VARCHAR(255) NOT NULL DEFAULT \'\' ,'
|
|
56 |
. ' `email_subject` VARCHAR(255) NOT NULL DEFAULT \'\' ,'
|
|
57 |
. ' `success_message` TEXT NOT NULL DEFAULT \'\' ,'
|
|
58 |
. ' `stored_submissions` INT NOT NULL,'
|
|
59 |
. ' `max_submissions` INT NOT NULL,'
|
|
60 |
. ' `use_captcha` INT NOT NULL,'
|
|
61 |
. ' PRIMARY KEY ( `section_id` ) )'
|
|
62 |
. ' ';
|
|
49 |
. ' `section_id` INT NOT NULL DEFAULT \'0\' ,'
|
|
50 |
. ' `page_id` INT NOT NULL DEFAULT \'0\' ,'
|
|
51 |
. ' `header` TEXT NOT NULL ,'
|
|
52 |
. ' `field_loop` TEXT NOT NULL ,'
|
|
53 |
. ' `footer` TEXT NOT NULL ,'
|
|
54 |
. ' `email_to` TEXT NOT NULL ,'
|
|
55 |
. ' `email_from` VARCHAR(255) NOT NULL DEFAULT \'\' ,'
|
|
56 |
. ' `email_subject` VARCHAR(255) NOT NULL DEFAULT \'\' ,'
|
|
57 |
. ' `success_message` TEXT NOT NULL ,'
|
|
58 |
. ' `stored_submissions` INT NOT NULL DEFAULT \'0\' ,'
|
|
59 |
. ' `max_submissions` INT NOT NULL DEFAULT \'0\' ,'
|
|
60 |
. ' `use_captcha` INT NOT NULL DEFAULT \'0\' ,'
|
|
61 |
. ' PRIMARY KEY ( `section_id` ) '
|
|
62 |
. ' )';
|
|
63 | 63 |
$database->query($mod_form); |
64 | 64 |
$database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_form_submissions`"); |
65 | 65 |
$mod_form = 'CREATE TABLE `'.TABLE_PREFIX.'mod_form_submissions` ( `submission_id` INT NOT NULL AUTO_INCREMENT,' |
66 |
. ' `section_id` INT NOT NULL,'
|
|
67 |
. ' `page_id` INT NOT NULL,'
|
|
68 |
. ' `submitted_when` INT NOT NULL,'
|
|
69 |
. ' `submitted_by` INT NOT NULL,'
|
|
70 |
. ' `body` TEXT NOT NULL DEFAULT \'\' ,'
|
|
71 |
. ' PRIMARY KEY ( `submission_id` ) )'
|
|
72 |
. ' ';
|
|
66 |
. ' `section_id` INT NOT NULL DEFAULT \'0\' ,'
|
|
67 |
. ' `page_id` INT NOT NULL DEFAULT \'0\' ,'
|
|
68 |
. ' `submitted_when` INT NOT NULL DEFAULT \'0\' ,'
|
|
69 |
. ' `submitted_by` INT NOT NULL DEFAULT \'0\','
|
|
70 |
. ' `body` TEXT NOT NULL,'
|
|
71 |
. ' PRIMARY KEY ( `submission_id` ) '
|
|
72 |
. ' )';
|
|
73 | 73 |
$database->query($mod_form); |
74 | 74 |
|
75 | 75 |
// Insert info into the search table |
Also available in: Unified diff
Fixed missing default values for INT fields in all system and modules tables (#329)