Merge branch 'ticket/erikfrerejean/7778' into develop-olympus

* ticket/erikfrerejean/7778:
  [ticket/7778] Update all the schema files
  [ticket/7778] Add the column change to `mysql_upgrader.php`
  [ticket/7778] BBCode single limit
This commit is contained in:
Oleg Pudeyev 2011-02-23 22:02:39 -05:00
commit df92b7bdf2
10 changed files with 20 additions and 10 deletions

View file

@ -926,7 +926,7 @@ function get_schema_struct()
$schema_data['phpbb_bbcodes'] = array( $schema_data['phpbb_bbcodes'] = array(
'COLUMNS' => array( 'COLUMNS' => array(
'bbcode_id' => array('TINT:3', 0), 'bbcode_id' => array('USINT', 0),
'bbcode_tag' => array('VCHAR:16', ''), 'bbcode_tag' => array('VCHAR:16', ''),
'bbcode_helpline' => array('VCHAR_UNI', ''), 'bbcode_helpline' => array('VCHAR_UNI', ''),
'display_on_posting' => array('BOOL', 0), 'display_on_posting' => array('BOOL', 0),

View file

@ -414,7 +414,7 @@ function get_schema_struct()
$schema_data['phpbb_bbcodes'] = array( $schema_data['phpbb_bbcodes'] = array(
'COLUMNS' => array( 'COLUMNS' => array(
'bbcode_id' => array('TINT:3', 0), 'bbcode_id' => array('USINT', 0),
'bbcode_tag' => array('VCHAR:16', ''), 'bbcode_tag' => array('VCHAR:16', ''),
'bbcode_helpline' => array('VCHAR_UNI', ''), 'bbcode_helpline' => array('VCHAR_UNI', ''),
'display_on_posting' => array('BOOL', 0), 'display_on_posting' => array('BOOL', 0),

View file

@ -213,7 +213,7 @@ class acp_bbcodes
$bbcode_id = NUM_CORE_BBCODES + 1; $bbcode_id = NUM_CORE_BBCODES + 1;
} }
if ($bbcode_id > 1511) if ($bbcode_id > BBCODE_LIMIT)
{ {
trigger_error($user->lang['TOO_MANY_BBCODES'] . adm_back_link($this->u_action), E_USER_WARNING); trigger_error($user->lang['TOO_MANY_BBCODES'] . adm_back_link($this->u_action), E_USER_WARNING);
} }

View file

@ -173,6 +173,9 @@ define('BBCODE_UID_LEN', 8);
// Number of core BBCodes // Number of core BBCodes
define('NUM_CORE_BBCODES', 12); define('NUM_CORE_BBCODES', 12);
// BBCode hard limit
define('BBCODE_LIMIT', 1511);
// Smiley hard limit // Smiley hard limit
define('SMILEY_LIMIT', 1000); define('SMILEY_LIMIT', 1000);

View file

@ -916,8 +916,15 @@ function database_update_info()
'3.0.7-PL1' => array(), '3.0.7-PL1' => array(),
// No changes from 3.0.8-RC1 to 3.0.8 // No changes from 3.0.8-RC1 to 3.0.8
'3.0.8-RC1' => array(), '3.0.8-RC1' => array(),
// No changes from 3.0.8 to 3.0.9-RC1
'3.0.8' => array(), // Changes from 3.0.8 to 3.0.9-RC1
'3.0.8' => array(
'change_columns' => array(
BBCODES_TABLE => array(
'bbcode_id' => array('USINT', 0),
),
),
),
); );
} }

View file

@ -110,7 +110,7 @@ CREATE TABLE phpbb_banlist (
# Table: 'phpbb_bbcodes' # Table: 'phpbb_bbcodes'
CREATE TABLE phpbb_bbcodes ( CREATE TABLE phpbb_bbcodes (
bbcode_id tinyint(3) DEFAULT '0' NOT NULL, bbcode_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
bbcode_tag varbinary(16) DEFAULT '' NOT NULL, bbcode_tag varbinary(16) DEFAULT '' NOT NULL,
bbcode_helpline blob NOT NULL, bbcode_helpline blob NOT NULL,
display_on_posting tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, display_on_posting tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,

View file

@ -110,7 +110,7 @@ CREATE TABLE phpbb_banlist (
# Table: 'phpbb_bbcodes' # Table: 'phpbb_bbcodes'
CREATE TABLE phpbb_bbcodes ( CREATE TABLE phpbb_bbcodes (
bbcode_id tinyint(3) DEFAULT '0' NOT NULL, bbcode_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
bbcode_tag varchar(16) DEFAULT '' NOT NULL, bbcode_tag varchar(16) DEFAULT '' NOT NULL,
bbcode_helpline varchar(255) DEFAULT '' NOT NULL, bbcode_helpline varchar(255) DEFAULT '' NOT NULL,
display_on_posting tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, display_on_posting tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,

View file

@ -254,7 +254,7 @@ END;
Table: 'phpbb_bbcodes' Table: 'phpbb_bbcodes'
*/ */
CREATE TABLE phpbb_bbcodes ( CREATE TABLE phpbb_bbcodes (
bbcode_id number(3) DEFAULT '0' NOT NULL, bbcode_id number(4) DEFAULT '0' NOT NULL,
bbcode_tag varchar2(16) DEFAULT '' , bbcode_tag varchar2(16) DEFAULT '' ,
bbcode_helpline varchar2(765) DEFAULT '' , bbcode_helpline varchar2(765) DEFAULT '' ,
display_on_posting number(1) DEFAULT '0' NOT NULL, display_on_posting number(1) DEFAULT '0' NOT NULL,

View file

@ -213,7 +213,7 @@ CREATE INDEX phpbb_banlist_ban_ip ON phpbb_banlist (ban_ip, ban_exclude);
Table: 'phpbb_bbcodes' Table: 'phpbb_bbcodes'
*/ */
CREATE TABLE phpbb_bbcodes ( CREATE TABLE phpbb_bbcodes (
bbcode_id INT2 DEFAULT '0' NOT NULL, bbcode_id INT2 DEFAULT '0' NOT NULL CHECK (bbcode_id >= 0),
bbcode_tag varchar(16) DEFAULT '' NOT NULL, bbcode_tag varchar(16) DEFAULT '' NOT NULL,
bbcode_helpline varchar(255) DEFAULT '' NOT NULL, bbcode_helpline varchar(255) DEFAULT '' NOT NULL,
display_on_posting INT2 DEFAULT '0' NOT NULL CHECK (display_on_posting >= 0), display_on_posting INT2 DEFAULT '0' NOT NULL CHECK (display_on_posting >= 0),

View file

@ -108,7 +108,7 @@ CREATE INDEX phpbb_banlist_ban_ip ON phpbb_banlist (ban_ip, ban_exclude);
# Table: 'phpbb_bbcodes' # Table: 'phpbb_bbcodes'
CREATE TABLE phpbb_bbcodes ( CREATE TABLE phpbb_bbcodes (
bbcode_id tinyint(3) NOT NULL DEFAULT '0', bbcode_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
bbcode_tag varchar(16) NOT NULL DEFAULT '', bbcode_tag varchar(16) NOT NULL DEFAULT '',
bbcode_helpline varchar(255) NOT NULL DEFAULT '', bbcode_helpline varchar(255) NOT NULL DEFAULT '',
display_on_posting INTEGER UNSIGNED NOT NULL DEFAULT '0', display_on_posting INTEGER UNSIGNED NOT NULL DEFAULT '0',