aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/install')
-rw-r--r--phpBB/install/schemas/firebird_schema.sql43
-rw-r--r--phpBB/install/schemas/mssql_schema.sql25
-rw-r--r--phpBB/install/schemas/mysql_schema.sql40
-rw-r--r--phpBB/install/schemas/oracle_schema.sql38
-rw-r--r--phpBB/install/schemas/sqlite_schema.sql32
5 files changed, 102 insertions, 76 deletions
diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql
index 3b03c818bc..0b8173ce68 100644
--- a/phpBB/install/schemas/firebird_schema.sql
+++ b/phpBB/install/schemas/firebird_schema.sql
@@ -321,9 +321,9 @@ END;;
# phpbb_forums
CREATE TABLE phpbb_forums (
forum_id INTEGER NOT NULL,
- parent_id INTEGER NOT NULL,
- left_id INTEGER NOT NULL,
- right_id INTEGER NOT NULL,
+ parent_id INTEGER DEFAULT 0 NOT NULL,
+ left_id INTEGER DEFAULT 0 NOT NULL,
+ right_id INTEGER DEFAULT 0 NOT NULL,
forum_parents BLOB SUB_TYPE TEXT,
forum_name BLOB SUB_TYPE TEXT,
forum_desc BLOB SUB_TYPE TEXT,
@@ -353,8 +353,8 @@ CREATE TABLE phpbb_forums (
enable_icons INTEGER DEFAULT 1 NOT NULL,
enable_prune INTEGER DEFAULT 0 NOT NULL,
prune_next INTEGER,
- prune_days INTEGER NOT NULL,
- prune_viewed INTEGER NOT NULL,
+ prune_days INTEGER DEFAULT 0 NOT NULL,
+ prune_viewed INTEGER DEFAULT 0 NOT NULL,
prune_freq INTEGER DEFAULT 0 NOT NULL
);;
@@ -447,9 +447,9 @@ END;;
CREATE TABLE phpbb_icons (
icons_id INTEGER NOT NULL,
icons_url VARCHAR(255),
- icons_width INTEGER NOT NULL,
- icons_height INTEGER NOT NULL,
- icons_order INTEGER NOT NULL,
+ icons_width INTEGER DEFAULT 0 NOT NULL,
+ icons_height INTEGER DEFAULT 0 NOT NULL,
+ icons_order INTEGER DEFAULT 0 NOT NULL,
display_on_posting INTEGER DEFAULT 1 NOT NULL
);;
@@ -498,7 +498,7 @@ CREATE TABLE phpbb_log (
topic_id INTEGER DEFAULT 0 NOT NULL,
reportee_id INTEGER DEFAULT 0 NOT NULL,
log_ip VARCHAR(40) NOT NULL,
- log_time INTEGER NOT NULL,
+ log_time INTEGER DEFAULT 0 NOT NULL,
log_operation BLOB SUB_TYPE TEXT,
log_data BLOB SUB_TYPE TEXT
);;
@@ -571,7 +571,7 @@ END;;
# phpbb_poll_options
CREATE TABLE phpbb_poll_options (
poll_option_id INTEGER DEFAULT 0 NOT NULL,
- topic_id INTEGER NOT NULL,
+ topic_id INTEGER DEFAULT 0 NOT NULL,
poll_option_text BLOB SUB_TYPE TEXT,
poll_option_total INTEGER DEFAULT 0 NOT NULL
);;
@@ -757,7 +757,7 @@ CREATE INDEX phpbb_privmsgs_to_user_id ON phpbb_privmsgs_to(user_id, folder_id);
CREATE TABLE phpbb_profile_fields (
field_id INTEGER NOT NULL,
field_name VARCHAR(255) NOT NULL,
- field_type INTEGER NOT NULL,
+ field_type INTEGER DEFAULT 0 NOT NULL,
field_ident VARCHAR(20) DEFAULT '' NOT NULL,
field_length VARCHAR(20) DEFAULT '' NOT NULL,
field_minlen VARCHAR(255) DEFAULT '' NOT NULL,
@@ -992,9 +992,9 @@ CREATE TABLE phpbb_smilies (
code VARCHAR(50),
emotion VARCHAR(50),
smiley_url VARCHAR(50),
- smiley_width INTEGER NOT NULL,
- smiley_height INTEGER NOT NULL,
- smiley_order INTEGER NOT NULL,
+ smiley_width INTEGER DEFAULT 0 NOT NULL,
+ smiley_height INTEGER DEFAULT 0 NOT NULL,
+ smiley_order INTEGER DEFAULT 0 NOT NULL,
display_on_posting INTEGER DEFAULT 1 NOT NULL
);;
@@ -1017,11 +1017,18 @@ CREATE TABLE phpbb_styles (
style_name VARCHAR(252) DEFAULT '' NOT NULL,
style_copyright VARCHAR(255) DEFAULT '' NOT NULL,
style_active INTEGER DEFAULT 1 NOT NULL,
- template_id INTEGER NOT NULL,
- theme_id INTEGER NOT NULL,
- imageset_id INTEGER NOT NULL
+ template_id INTEGER DEFAULT 0 NOT NULL,
+ theme_id INTEGER DEFAULT 0 NOT NULL,
+ imageset_id INTEGER DEFAULT 0 NOT NULL
);;
+ALTER TABLE phpbb_styles ADD PRIMARY KEY (style_id);;
+
+CREATE UNIQUE INDEX phpbb_styles_tmplte_nm ON phpbb_styles(template_name);;
+CREATE INDEX phpbb_styles_template_id ON phpbb_styles(template_id);;
+CREATE INDEX phpbb_styles_theme_id ON phpbb_styles(theme_id);;
+CREATE INDEX phpbb_styles_imageset_id ON phpbb_styles(imageset_id);;
+
# phpbb_styles_template
CREATE TABLE phpbb_styles_template (
template_id INTEGER NOT NULL,
@@ -1039,7 +1046,7 @@ CREATE UNIQUE INDEX phpbb_styles_template_tmplte_nm ON phpbb_styles_template(tem
# phpbb_styles_template_data
CREATE TABLE phpbb_styles_template_data (
- template_id INTEGER NOT NULL,
+ template_id INTEGER DEFAULT 0 NOT NULL,
template_filename VARCHAR(100) DEFAULT '' NOT NULL,
template_included BLOB SUB_TYPE TEXT,
template_mtime INTEGER DEFAULT 0 NOT NULL,
diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql
index a74e214aa7..8ec30cc226 100644
--- a/phpBB/install/schemas/mssql_schema.sql
+++ b/phpBB/install/schemas/mssql_schema.sql
@@ -543,6 +543,9 @@ ALTER TABLE [phpbb_forums] WITH NOCHECK ADD
GO
ALTER TABLE [phpbb_forums] WITH NOCHECK ADD
+ CONSTRAINT [DF_phpbb_forums_parent_id] DEFAULT (0) FOR [parent_id],
+ CONSTRAINT [DF_phpbb_forums_left_id] DEFAULT (0) FOR [left_id],
+ CONSTRAINT [DF_phpbb_forums_right_id] DEFAULT (0) FOR [right_id],
CONSTRAINT [DF_phpbb_forums_desc_bitfield] DEFAULT (0) FOR [forum_desc_bitfield],
CONSTRAINT [DF_phpbb_forums_rules_bitfield] DEFAULT (0) FOR [forum_rules_bitfield],
CONSTRAINT [DF_phpbb_forums_topics_per_page] DEFAULT (0) FOR [forum_topics_per_page],
@@ -559,6 +562,8 @@ ALTER TABLE [phpbb_forums] WITH NOCHECK ADD
CONSTRAINT [DF_phpbb_forums_enable_indexing] DEFAULT (1) FOR [enable_indexing],
CONSTRAINT [DF_phpbb_forums_enable_icons] DEFAULT (1) FOR [enable_icons],
CONSTRAINT [DF_phpbb_forums_enable_prune] DEFAULT (0) FOR [enable_prune],
+ CONSTRAINT [DF_phpbb_forums_prune_days] DEFAULT (0) FOR [prune_days],
+ CONSTRAINT [DF_phpbb_forums_prune_viewed] DEFAULT (0) FOR [prune_viewed],
CONSTRAINT [DF_phpbb_forums_prune_freq] DEFAULT (0) FOR [prune_freq],
CONSTRAINT [DF_phpbb_forums_forum_desc_uid] DEFAULT ('') FOR [forum_desc_uid],
CONSTRAINT [DF_phpbb_forums_forum_link] DEFAULT ('') FOR [forum_link],
@@ -728,7 +733,10 @@ ALTER TABLE [phpbb_icons] WITH NOCHECK ADD
GO
ALTER TABLE [phpbb_icons] WITH NOCHECK ADD
- CONSTRAINT [DF_phpbb_icons__display_on_posting] DEFAULT (1) FOR [display_on_posting]
+ CONSTRAINT [DF_phpbb_icons__display_on_posting] DEFAULT (1) FOR [display_on_posting],
+ CONSTRAINT [DF_phpbb_icons__icons_width] DEFAULT (0) FOR [icons_width],
+ CONSTRAINT [DF_phpbb_icons__icons_height] DEFAULT (0) FOR [icons_height],
+ CONSTRAINT [DF_phpbb_icons__icons_order] DEFAULT (0) FOR [icons_order]
GO
@@ -782,7 +790,8 @@ ALTER TABLE [phpbb_log] WITH NOCHECK ADD
CONSTRAINT [DF_phpbb_log____user_id] DEFAULT (0) FOR [user_id],
CONSTRAINT [DF_phpbb_log____forum_id] DEFAULT (0) FOR [forum_id],
CONSTRAINT [DF_phpbb_log____topic_id] DEFAULT (0) FOR [topic_id],
- CONSTRAINT [DF_phpbb_log____reportee_id] DEFAULT (0) FOR [reportee_id]
+ CONSTRAINT [DF_phpbb_log____reportee_id] DEFAULT (0) FOR [reportee_id],
+ CONSTRAINT [DF_phpbb_log____log_time] DEFAULT (0) FOR [log_time]
GO
CREATE INDEX [log_type] ON [phpbb_log]([log_type]) ON [PRIMARY]
@@ -815,6 +824,7 @@ CREATE TABLE [phpbb_moderator_cache] (
GO
ALTER TABLE [phpbb_moderator_cache] WITH NOCHECK ADD
+ CONSTRAINT [DF_phpbb_modera_forum_id] DEFAULT (0) FOR [forum_id],
CONSTRAINT [DF_phpbb_modera_user_id] DEFAULT (0) FOR [user_id],
CONSTRAINT [DF_phpbb_modera_group_id] DEFAULT (0) FOR [group_id],
CONSTRAINT [DF_phpbb_modera_display_on_index] DEFAULT (1) FOR [display_on_index],
@@ -891,6 +901,7 @@ GO
ALTER TABLE [phpbb_poll_options] WITH NOCHECK ADD
CONSTRAINT [DF_phpbb_poll_o_poll_option_id] DEFAULT (0) FOR [poll_option_id],
CONSTRAINT [DF_phpbb_poll_o_poll_option_total] DEFAULT (0) FOR [poll_option_total]
+ CONSTRAINT [DF_phpbb_poll_o_topic_id] DEFAULT (0) FOR [topic_id]
GO
CREATE INDEX [poll_option_id] ON [phpbb_poll_options]([poll_option_id]) ON [PRIMARY]
@@ -1207,6 +1218,7 @@ ALTER TABLE [phpbb_profile_fields] WITH NOCHECK ADD
GO
ALTER TABLE [phpbb_profile_fields] WITH NOCHECK ADD
+ CONSTRAINT [DF_phpbb_pffiel_field_type] DEFAULT (0) FOR [field_type],
CONSTRAINT [DF_phpbb_pffiel_field_default_value] DEFAULT ('0') FOR [field_default_value],
CONSTRAINT [DF_phpbb_pffiel_field_required] DEFAULT (0) FOR [field_required],
CONSTRAINT [DF_phpbb_pffiel_field_show_on_reg] DEFAULT (0) FOR [field_show_on_reg],
@@ -1583,6 +1595,9 @@ ALTER TABLE [phpbb_smilies] WITH NOCHECK ADD
GO
ALTER TABLE [phpbb_smilies] WITH NOCHECK ADD
+ CONSTRAINT [DF_phpbb_smilie_smiley_width] DEFAULT (0) FOR [smiley_width],
+ CONSTRAINT [DF_phpbb_smilie_smiley_height] DEFAULT (0) FOR [smiley_height],
+ CONSTRAINT [DF_phpbb_smilie_smiley_order] DEFAULT (0) FOR [smiley_order],
CONSTRAINT [DF_phpbb_smilie_display_on_posting] DEFAULT (1) FOR [display_on_posting]
GO
@@ -1611,7 +1626,10 @@ GO
ALTER TABLE [phpbb_styles] WITH NOCHECK ADD
CONSTRAINT [DF_phpbb_styles_style_active] DEFAULT (1) FOR [style_active],
CONSTRAINT [DF_phpbb_styles_style_name] DEFAULT ('') FOR [style_name],
- CONSTRAINT [DF_phpbb_styles_style_copyright] DEFAULT ('') FOR [style_copyright]
+ CONSTRAINT [DF_phpbb_styles_style_copyright] DEFAULT ('') FOR [style_copyright],
+ CONSTRAINT [DF_phpbb_styles_template_id] DEFAULT (0) FOR [template_id],
+ CONSTRAINT [DF_phpbb_styles_theme_id] DEFAULT (0) FOR [theme_id],
+ CONSTRAINT [DF_phpbb_styles_imageset_id] DEFAULT (0) FOR [imageset_id]
GO
CREATE UNIQUE INDEX [style_name] ON [phpbb_styles]([style_name]) ON [PRIMARY]
@@ -1669,6 +1687,7 @@ CREATE TABLE [phpbb_styles_template_data] (
GO
ALTER TABLE [phpbb_styles_template_data] WITH NOCHECK ADD
+ CONSTRAINT [DF_phpbb_tpldat_template_id] DEFAULT (0) FOR [template_id],
CONSTRAINT [DF_phpbb_tpldat_template_mtime] DEFAULT (0) FOR [template_mtime],
CONSTRAINT [DF_phpbb_tpldat_template_filename] DEFAULT ('') FOR [template_filename]
GO
diff --git a/phpBB/install/schemas/mysql_schema.sql b/phpBB/install/schemas/mysql_schema.sql
index f89f468085..fad2c457e3 100644
--- a/phpBB/install/schemas/mysql_schema.sql
+++ b/phpBB/install/schemas/mysql_schema.sql
@@ -195,9 +195,9 @@ CREATE TABLE phpbb_extension_groups (
# Table: 'phpbb_forums'
CREATE TABLE phpbb_forums (
forum_id smallint(5) UNSIGNED NOT NULL auto_increment,
- parent_id smallint(5) UNSIGNED NOT NULL,
- left_id smallint(5) UNSIGNED NOT NULL,
- right_id smallint(5) UNSIGNED NOT NULL,
+ parent_id smallint(5) DEFAULT '0' UNSIGNED NOT NULL,
+ left_id smallint(5) DEFAULT '0' UNSIGNED NOT NULL,
+ right_id smallint(5) DEFAULT '0' UNSIGNED NOT NULL,
forum_parents text,
forum_name text,
forum_desc text,
@@ -227,8 +227,8 @@ CREATE TABLE phpbb_forums (
enable_icons tinyint(1) DEFAULT '1' NOT NULL,
enable_prune tinyint(1) DEFAULT '0' NOT NULL,
prune_next int(11) UNSIGNED,
- prune_days tinyint(4) UNSIGNED NOT NULL,
- prune_viewed tinyint(4) UNSIGNED NOT NULL,
+ prune_days tinyint(4) DEFAULT '0' UNSIGNED NOT NULL,
+ prune_viewed tinyint(4) DEFAULT '0' UNSIGNED NOT NULL,
prune_freq tinyint(4) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (forum_id),
KEY left_right_id (left_id, right_id),
@@ -289,9 +289,9 @@ CREATE TABLE phpbb_groups (
CREATE TABLE phpbb_icons (
icons_id tinyint(4) UNSIGNED NOT NULL auto_increment,
icons_url varchar(255),
- icons_width tinyint(4) UNSIGNED NOT NULL,
- icons_height tinyint(4) UNSIGNED NOT NULL,
- icons_order tinyint(4) UNSIGNED NOT NULL,
+ icons_width tinyint(4) DEFAULT '0' UNSIGNED NOT NULL,
+ icons_height tinyint(4) DEFAULT '0' UNSIGNED NOT NULL,
+ icons_order tinyint(4) DEFAULT '0' UNSIGNED NOT NULL,
display_on_posting tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
PRIMARY KEY (icons_id)
);
@@ -311,12 +311,12 @@ CREATE TABLE phpbb_lang (
CREATE TABLE phpbb_log (
log_id mediumint(8) UNSIGNED NOT NULL auto_increment,
log_type tinyint(4) UNSIGNED DEFAULT '0' NOT NULL,
- user_id mediumint(8) DEFAULT '0' NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
reportee_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
log_ip varchar(40) NOT NULL,
- log_time int(11) NOT NULL,
+ log_time int(11) DEFAULT '0' NOT NULL,
log_operation text,
log_data text,
PRIMARY KEY (log_id),
@@ -329,7 +329,7 @@ CREATE TABLE phpbb_log (
# Table: 'phpbb_moderator_cache'
CREATE TABLE phpbb_moderator_cache (
- forum_id mediumint(8) UNSIGNED NOT NULL,
+ forum_id mediumint(8) DEFAULT '0' UNSIGNED NOT NULL,
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
username varchar(255) DEFAULT '' NOT NULL,
group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
@@ -361,7 +361,7 @@ CREATE TABLE phpbb_modules (
# Table: 'phpbb_poll_options'
CREATE TABLE phpbb_poll_options (
poll_option_id tinyint(4) UNSIGNED DEFAULT '0' NOT NULL,
- topic_id mediumint(8) UNSIGNED NOT NULL,
+ topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
poll_option_text text,
poll_option_total mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
KEY poll_option_id (poll_option_id),
@@ -491,7 +491,7 @@ CREATE TABLE phpbb_privmsgs_to (
CREATE TABLE phpbb_profile_fields (
field_id mediumint(8) UNSIGNED NOT NULL auto_increment,
field_name varchar(255) DEFAULT '' NOT NULL,
- field_type mediumint(8) UNSIGNED NOT NULL,
+ field_type mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
field_ident varchar(20) DEFAULT '' NOT NULL,
field_length varchar(20) DEFAULT '' NOT NULL,
field_minlen varchar(255) DEFAULT '' NOT NULL,
@@ -637,9 +637,9 @@ CREATE TABLE phpbb_smilies (
code varchar(50),
emotion varchar(50),
smiley_url varchar(50),
- smiley_width tinyint(4) UNSIGNED NOT NULL,
- smiley_height tinyint(4) UNSIGNED NOT NULL,
- smiley_order tinyint(4) UNSIGNED NOT NULL,
+ smiley_width tinyint(4) DEFAULT '0' UNSIGNED NOT NULL,
+ smiley_height tinyint(4) DEFAULT '0' UNSIGNED NOT NULL,
+ smiley_order tinyint(4) DEFAULT '0' UNSIGNED NOT NULL,
display_on_posting tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
PRIMARY KEY (smiley_id)
);
@@ -650,9 +650,9 @@ CREATE TABLE phpbb_styles (
style_name varchar(255) DEFAULT '' NOT NULL,
style_copyright varchar(255) DEFAULT '' NOT NULL,
style_active tinyint(1) DEFAULT '1' NOT NULL,
- template_id tinyint(4) UNSIGNED NOT NULL,
- theme_id tinyint(4) UNSIGNED NOT NULL,
- imageset_id tinyint(4) UNSIGNED NOT NULL,
+ template_id tinyint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ theme_id tinyint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ imageset_id tinyint(4) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (style_id),
UNIQUE style_name (style_name),
KEY (template_id),
@@ -674,7 +674,7 @@ CREATE TABLE phpbb_styles_template (
# Table: 'phpbb_styles_template_data'
CREATE TABLE phpbb_styles_template_data (
- template_id tinyint(4) UNSIGNED NOT NULL,
+ template_id tinyint(4) UNSIGNED DEFAULT '0' NOT NULL,
template_filename varchar(100) DEFAULT '' NOT NULL,
template_included text,
template_mtime int(11) DEFAULT '0' NOT NULL,
diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql
index 5851bed653..98adcf5649 100644
--- a/phpBB/install/schemas/oracle_schema.sql
+++ b/phpBB/install/schemas/oracle_schema.sql
@@ -460,9 +460,9 @@ END;
*/
CREATE TABLE phpbb_forums (
forum_id number(5) NOT NULL,
- parent_id number(5) NOT NULL,
- left_id number(5) NOT NULL,
- right_id number(5) NOT NULL,
+ parent_id number(5) DEFAULT '0' NOT NULL,
+ left_id number(5) DEFAULT '0' NOT NULL,
+ right_id number(5) DEFAULT '0' NOT NULL,
forum_parents clob,
forum_name varchar2(3000),
forum_desc clob,
@@ -492,8 +492,8 @@ CREATE TABLE phpbb_forums (
enable_icons number(1) DEFAULT '1' NOT NULL,
enable_prune number(1) DEFAULT '0' NOT NULL,
prune_next number(11),
- prune_days number(4) NOT NULL,
- prune_viewed number(4) NOT NULL,
+ prune_days number(4) DEFAULT '0' NOT NULL,
+ prune_viewed number(4) DEFAULT '0' NOT NULL,
prune_freq number(4) DEFAULT '0' NOT NULL,
CONSTRAINT pk_phpbb_forums PRIMARY KEY (forum_id)
)
@@ -613,9 +613,9 @@ CREATE INDEX phpbb_groups_group_legend on phpbb_groups (group_legend)
CREATE TABLE phpbb_icons (
icons_id number(4) NOT NULL,
icons_url varchar2(255),
- icons_width number(4) NOT NULL,
- icons_height number(4) NOT NULL,
- icons_order number(4) NOT NULL,
+ icons_width number(4) DEFAULT '0' NOT NULL,
+ icons_height number(4) DEFAULT '0' NOT NULL,
+ icons_order number(4) DEFAULT '0' NOT NULL,
display_on_posting number(1) DEFAULT '1' NOT NULL,
CONSTRAINT pk_phpbb_icons PRIMARY KEY (icons_id)
)
@@ -678,7 +678,7 @@ CREATE TABLE phpbb_log (
topic_id number(8) DEFAULT '0' NOT NULL,
reportee_id number(8) DEFAULT '0' NOT NULL,
log_ip varchar2(40) NOT NULL,
- log_time number(11) NOT NULL,
+ log_time number(11) DEFAULT '0' NOT NULL,
log_operation clob,
log_data clob,
CONSTRAINT pk_phpbb_log PRIMARY KEY (log_id)
@@ -716,7 +716,7 @@ CREATE INDEX phpbb_log_user_id on phpbb_log (user_id)
Table: phpbb_moderator_cache
*/
CREATE TABLE phpbb_moderator_cache (
- forum_id number(8) NOT NULL,
+ forum_id number(8) DEFAULT '0' NOT NULL,
user_id number(8) DEFAULT '0' NOT NULL,
username varchar2(255) DEFAULT '',
group_id number(8) DEFAULT '0' NOT NULL,
@@ -778,7 +778,7 @@ CREATE INDEX phpbb_modules_class_left_id on phpbb_modules (module_class, left_id
*/
CREATE TABLE phpbb_poll_options (
poll_option_id number(4) DEFAULT '0' NOT NULL,
- topic_id number(8) NOT NULL,
+ topic_id number(8) DEFAULT '0' NOT NULL,
poll_option_text varchar2(3000),
poll_option_total number(8) DEFAULT '0' NOT NULL
)
@@ -1020,7 +1020,7 @@ CREATE INDEX phpbb_privmsgs_to_user_id on phpbb_privmsgs_to (user_id, folder_id)
CREATE TABLE phpbb_profile_fields (
field_id number(8) NOT NULL,
field_name varchar2(255) DEFAULT '',
- field_type number(8) NOT NULL,
+ field_type number(8) DEFAULT '0' NOT NULL,
field_ident varchar2(20) DEFAULT '',
field_length varchar2(20) DEFAULT '',
field_minlen varchar2(255) DEFAULT '',
@@ -1320,9 +1320,9 @@ CREATE TABLE phpbb_smilies (
code varchar2(50),
emotion varchar2(50),
smiley_url varchar2(50),
- smiley_width number(4) NOT NULL,
- smiley_height number(4) NOT NULL,
- smiley_order number(4) NOT NULL,
+ smiley_width number(4) DEFAULT '0' NOT NULL,
+ smiley_height number(4) DEFAULT '0' NOT NULL,
+ smiley_order number(4) DEFAULT '0' NOT NULL,
display_on_posting number(1) DEFAULT '1' NOT NULL,
CONSTRAINT pk_phpbb_smilies PRIMARY KEY (smiley_id)
)
@@ -1352,9 +1352,9 @@ CREATE TABLE phpbb_styles (
style_name varchar2(255) DEFAULT '',
style_copyright varchar2(255) DEFAULT '',
style_active number(1) DEFAULT '1' NOT NULL,
- template_id number(4) NOT NULL,
- theme_id number(4) NOT NULL,
- imageset_id number(4) NOT NULL,
+ template_id number(4) DEFAULT '0' NOT NULL,
+ theme_id number(4) DEFAULT '0' NOT NULL,
+ imageset_id number(4) DEFAULT '0' NOT NULL,
CONSTRAINT pk_phpbb_styles PRIMARY KEY (style_id),
CONSTRAINT u_phpbb_style_name UNIQUE (style_name)
)
@@ -1418,7 +1418,7 @@ END;
Table: phpbb_styles_template_data
*/
CREATE TABLE phpbb_styles_template_data (
- template_id number(4) NOT NULL,
+ template_id number(4) NOT NULL DEFAULT '0',
template_filename varchar2(100) DEFAULT '',
template_included clob,
template_mtime number(11) DEFAULT '0' NOT NULL,
diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql
index af59df634b..ecfd85a7d9 100644
--- a/phpBB/install/schemas/sqlite_schema.sql
+++ b/phpBB/install/schemas/sqlite_schema.sql
@@ -213,9 +213,9 @@ CREATE TABLE phpbb_extension_groups (
# Table: phpbb_forums
CREATE TABLE phpbb_forums (
forum_id INTEGER PRIMARY KEY NOT NULL,
- parent_id smallint(5) NOT NULL,
- left_id smallint(5) NOT NULL,
- right_id smallint(5) NOT NULL,
+ parent_id smallint(5) NOT NULL DEFAULT '0',
+ left_id smallint(5) NOT NULL DEFAULT '0',
+ right_id smallint(5) NOT NULL DEFAULT '0',
forum_parents text(65535),
forum_name text(65535),
forum_desc text(65535),
@@ -245,8 +245,8 @@ CREATE TABLE phpbb_forums (
enable_icons tinyint(1) NOT NULL DEFAULT '1',
enable_prune tinyint(1) NOT NULL DEFAULT '0',
prune_next int(11),
- prune_days tinyint(4) NOT NULL,
- prune_viewed tinyint(4) NOT NULL,
+ prune_days tinyint(4) NOT NULL DEFAULT '0',
+ prune_viewed tinyint(4) NOT NULL DEFAULT '0',
prune_freq tinyint(4) NOT NULL DEFAULT '0'
);
@@ -313,9 +313,9 @@ CREATE INDEX phpbb_groups_group_legend on phpbb_groups (group_legend);
CREATE TABLE phpbb_icons (
icons_id INTEGER PRIMARY KEY NOT NULL,
icons_url varchar(255),
- icons_width tinyint(4) NOT NULL,
- icons_height tinyint(4) NOT NULL,
- icons_order tinyint(4) NOT NULL,
+ icons_width tinyint(4) NOT NULL DEFAULT '0',
+ icons_height tinyint(4) NOT NULL DEFAULT '0',
+ icons_order tinyint(4) NOT NULL DEFAULT '0',
display_on_posting tinyint(1) NOT NULL DEFAULT '1'
);
@@ -340,7 +340,7 @@ CREATE TABLE phpbb_log (
topic_id mediumint(8) NOT NULL DEFAULT '0',
reportee_id mediumint(8) NOT NULL DEFAULT '0',
log_ip varchar(40) NOT NULL,
- log_time int(11) NOT NULL,
+ log_time int(11) NOT NULL DEFAULT '0',
log_operation text(65535),
log_data text(65535)
);
@@ -354,7 +354,7 @@ CREATE INDEX phpbb_log_user_id on phpbb_log (user_id);
# Table: phpbb_moderator_cache
CREATE TABLE phpbb_moderator_cache (
- forum_id mediumint(8) NOT NULL,
+ forum_id mediumint(8) NOT NULL DEFAULT '0',
user_id mediumint(8) NOT NULL DEFAULT '0',
username varchar(255) NOT NULL DEFAULT '',
group_id mediumint(8) NOT NULL DEFAULT '0',
@@ -389,7 +389,7 @@ CREATE INDEX phpbb_modules_class_left_id on phpbb_modules (module_class, left_id
# Table: phpbb_poll_options
CREATE TABLE phpbb_poll_options (
poll_option_id tinyint(4) NOT NULL DEFAULT '0',
- topic_id mediumint(8) NOT NULL,
+ topic_id mediumint(8) NOT NULL DEFAULT '0',
poll_option_text text(65535),
poll_option_total mediumint(8) NOT NULL DEFAULT '0'
);
@@ -528,7 +528,7 @@ CREATE INDEX phpbb_privmsgs_to_user_id on phpbb_privmsgs_to (user_id, folder_id)
CREATE TABLE phpbb_profile_fields (
field_id INTEGER PRIMARY KEY NOT NULL,
field_name varchar(255) NOT NULL DEFAULT '',
- field_type mediumint(8) NOT NULL,
+ field_type mediumint(8) NOT NULL DEFAULT '0',
field_ident varchar(20) NOT NULL DEFAULT '',
field_length varchar(20) NOT NULL DEFAULT '',
field_minlen varchar(255) NOT NULL DEFAULT '',
@@ -685,9 +685,9 @@ CREATE TABLE phpbb_smilies (
code varchar(50),
emotion varchar(50),
smiley_url varchar(50),
- smiley_width tinyint(4) NOT NULL,
- smiley_height tinyint(4) NOT NULL,
- smiley_order tinyint(4) NOT NULL,
+ smiley_width tinyint(4) NOT NULL DEFAULT '0',
+ smiley_height tinyint(4) NOT NULL DEFAULT '0',
+ smiley_order tinyint(4) NOT NULL DEFAULT '0',
display_on_posting tinyint(1) NOT NULL DEFAULT '1'
);
@@ -724,7 +724,7 @@ CREATE UNIQUE INDEX phpbb_styles_template_template_name on phpbb_styles_template
# Table: phpbb_styles_template_data
CREATE TABLE phpbb_styles_template_data (
- template_id tinyint(4) NOT NULL,
+ template_id tinyint(4) NOT NULL DEFAULT '0',
template_filename varchar(100) NOT NULL DEFAULT '',
template_included text(65535),
template_mtime int(11) NOT NULL DEFAULT '0',