Project

General

Profile

« Previous | Next » 

Revision 371

Added by Matthias almost 18 years ago

Fixed missing default values for INT fields in all system and modules tables (#329)

View differences:

install.php
27 27
	
28 28
	$database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_news_posts`");
29 29
	$mod_news = 'CREATE TABLE `'.TABLE_PREFIX.'mod_news_posts` ( '
30
					 . '`post_id` INT NOT NULL AUTO_INCREMENT,'
31
					 . '`section_id` INT NOT NULL,'
32
					 . '`page_id` INT NOT NULL,'
33
					 . '`group_id` INT NOT NULL,'
34
					 . '`active` INT NOT NULL,'
35
					 . '`position` INT NOT NULL,'
36
					 . '`title` VARCHAR(255) NOT NULL DEFAULT \'\','
37
					 . '`link` TEXT NOT NULL DEFAULT \'\','
38
					 . '`content_short` TEXT NOT NULL DEFAULT \'\','
39
					 . '`content_long` TEXT NOT NULL DEFAULT \'\','
40
					 . '`commenting` VARCHAR(7) NOT NULL DEFAULT \'\','
41
		   	    	 . '`posted_when` INT NOT NULL ,'
42
					 . '`posted_by` INT NOT NULL ,'
43
					 . 'PRIMARY KEY (post_id)'
44
                . ' )';
30
		. '`post_id` INT NOT NULL AUTO_INCREMENT,'
31
		. '`section_id` INT NOT NULL DEFAULT \'0\' ,'
32
		. '`page_id` INT NOT NULL DEFAULT \'0\' ,'
33
		. '`group_id` INT NOT NULL DEFAULT \'0\' ,'
34
		. '`active` INT NOT NULL DEFAULT \'0\' ,'
35
		. '`position` INT NOT NULL DEFAULT \'0\','
36
		. '`title` VARCHAR(255) NOT NULL DEFAULT \'\','
37
		. '`link` TEXT NOT NULL ,'
38
		. '`content_short` TEXT NOT NULL ,'
39
		. '`content_long` TEXT NOT NULL ,'
40
		. '`commenting` VARCHAR(7) NOT NULL DEFAULT \'\','
41
		. '`posted_when` INT NOT NULL DEFAULT \'0\' ,'
42
		. '`posted_by` INT NOT NULL DEFAULT \'0\','
43
		. 'PRIMARY KEY (post_id)'
44
		. ' )';
45 45
	$database->query($mod_news);
46 46
	
47 47
	$database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_news_groups`");
48 48
	$mod_news = 'CREATE TABLE `'.TABLE_PREFIX.'mod_news_groups` ( '
49
					 . '`group_id` INT NOT NULL AUTO_INCREMENT,'
50
					 . '`section_id` INT NOT NULL,'
51
					 . '`page_id` INT NOT NULL,'
52
					 . '`active` INT NOT NULL,'
53
					 . '`position` INT NOT NULL,'
54
					 . '`title` VARCHAR(255) NOT NULL DEFAULT \'\','
55
					 . 'PRIMARY KEY (group_id)'
56
                . ' )';
49
		. '`group_id` INT NOT NULL AUTO_INCREMENT,'
50
		. '`section_id` INT NOT NULL DEFAULT \'0\' ,'
51
		. '`page_id` INT NOT NULL DEFAULT \'0\','
52
		. '`active` INT NOT NULL DEFAULT \'0\','
53
		. '`position` INT NOT NULL DEFAULT \'0\','
54
		. '`title` VARCHAR(255) NOT NULL DEFAULT \'\','
55
		. 'PRIMARY KEY (group_id)'
56
		. ' )';
57 57
	$database->query($mod_news);
58 58
	
59 59
	$database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_news_comments`");
60 60
	$mod_news = 'CREATE TABLE `'.TABLE_PREFIX.'mod_news_comments` ( '
61
					 . '`comment_id` INT NOT NULL AUTO_INCREMENT,'
62
					 . '`section_id` INT NOT NULL,'
63
					 . '`page_id` INT NOT NULL,'
64
					 . '`post_id` INT NOT NULL,'
65
					 . '`title` VARCHAR(255) NOT NULL DEFAULT \'\','
66
					 . '`comment` TEXT NOT NULL DEFAULT \'\','
67
		   	    . '`commented_when` INT NOT NULL ,'
68
					 . '`commented_by` INT NOT NULL ,'
69
					 . 'PRIMARY KEY (comment_id)'
70
                . ' )';
61
		. '`comment_id` INT NOT NULL AUTO_INCREMENT,'
62
		. '`section_id` INT NOT NULL DEFAULT \'0\' ,'
63
		. '`page_id` INT NOT NULL DEFAULT \'0\' ,'
64
		. '`post_id` INT NOT NULL DEFAULT \'0\','
65
		. '`title` VARCHAR(255) NOT NULL DEFAULT \'\' ,'
66
		. '`comment` TEXT NOT NULL ,'
67
		. '`commented_when` INT NOT NULL DEFAULT \'0\' ,'
68
		. '`commented_by` INT NOT NULL DEFAULT \'0\' ,'
69
		. 'PRIMARY KEY (comment_id)'
70
		. ' )';
71 71
	$database->query($mod_news);
72 72
	
73 73
	$database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_news_settings`");
74 74
	$mod_news = 'CREATE TABLE `'.TABLE_PREFIX.'mod_news_settings` ( '
75
					 . '`section_id` INT NOT NULL,'
76
					 . '`page_id` INT NOT NULL,'
77
					 . '`header` TEXT NOT NULL DEFAULT \'\','
78
					 . '`post_loop` TEXT NOT NULL DEFAULT \'\','
79
					 . '`footer` TEXT NOT NULL DEFAULT \'\','
80
					 . '`posts_per_page` INT NOT NULL,'
81
					 . '`post_header` TEXT NOT NULL DEFAULT \'\','
82
					 . '`post_footer` TEXT NOT NULL DEFAULT \'\','
83
					 . '`comments_header` TEXT NOT NULL DEFAULT \'\','
84
					 . '`comments_loop` TEXT NOT NULL DEFAULT \'\','
85
					 . '`comments_footer` TEXT NOT NULL DEFAULT \'\','
86
					 . '`comments_page` TEXT NOT NULL DEFAULT \'\','
87
					 . '`commenting` VARCHAR(7) NOT NULL DEFAULT \'\','
88
					 . '`resize` INT NOT NULL,'
89
					 . ' `use_captcha` INT NOT NULL,'
90
					 . 'PRIMARY KEY (section_id)'
91
                . ' )';
75
		. '`section_id` INT NOT NULL DEFAULT \'0\' ,'
76
		. '`page_id` INT NOT NULL DEFAULT \'0\','
77
		. '`header` TEXT NOT NULL ,'
78
		. '`post_loop` TEXT NOT NULL ,'
79
		. '`footer` TEXT NOT NULL ,'
80
		. '`posts_per_page` INT NOT NULL DEFAULT \'0\','
81
		. '`post_header` TEXT NOT NULL ,'
82
		. '`post_footer` TEXT NOT NULL ,'
83
		. '`comments_header` TEXT NOT NULL ,'
84
		. '`comments_loop` TEXT NOT NULL ,'
85
		. '`comments_footer` TEXT NOT NULL ,'
86
		. '`comments_page` TEXT NOT NULL ,'
87
		. '`commenting` VARCHAR(7) NOT NULL DEFAULT \'\' ,'
88
		. '`resize` INT NOT NULL DEFAULT \'0\' ,'
89
		. ' `use_captcha` INT NOT NULL DEFAULT \'0\' ,'
90
		. 'PRIMARY KEY (section_id)'
91
		. ' )';
92 92
	$database->query($mod_news);
93 93
		
94 94
	// Insert info into the search table

Also available in: Unified diff