1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-13 20:24:08 +02:00
This commit should increase the total number of BBCodes from 31 to 2040. Some things to watch out for:

Each database likes to deal with binary data in its own, special way. They are, quite frankly, too cool for school.

MySQL, MSSQL and Oracle all allow me to send in a default value for their binary column using a hex number. However, MSSQL forces me to send the specific data as a hex number and thus we must CAST it.

PostgreSQL allows me to set a binary column, but with a twist. It demands that the default be in _octal_ and its datatype allows somewhere around a gigabyte's worth of BBCodes ( PGSQL users, we shut you down to 2040 for your own good! )

Firebird has no decent mechanism for allowing me to shuttle in binary data so I must force my way in. By virtue of triggers and a UDF, we ram in our default values.

SQLite is the most bizarre of them all. They have no mechanism for turning an ASCII code into a ASCII character. Because of this, we have a trigger and a UDF (just like Firebird!) but with a twist! The UDF is defined on the PHP side of things instead of SQL. SQLite also demands that it's data be encoded before being sent off.

Other notes:
- SQLite installs again :D
- Firebird nearly installs again :P
- Database backup is not screwed up :P

P.S.
I hope nothing broke :D


git-svn-id: file:///svn/phpbb/trunk@6209 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
David M
2006-07-24 10:08:36 +00:00
parent 48b2dc1277
commit 9532514c2a
26 changed files with 1526 additions and 616 deletions

View File

@@ -432,7 +432,7 @@ CREATE TABLE phpbb_forums (
forum_parents clob DEFAULT '' NOT NULL,
forum_name varchar2(3000) DEFAULT '' NOT NULL,
forum_desc clob DEFAULT '' NOT NULL,
forum_desc_bitfield number(11) DEFAULT '0' NOT NULL,
forum_desc_bitfield raw(255) DEFAULT '' NOT NULL,
forum_desc_options number(1) DEFAULT '0' NOT NULL,
forum_desc_uid varchar2(5) DEFAULT '' NOT NULL,
forum_link varchar2(255) DEFAULT '' NOT NULL,
@@ -441,7 +441,7 @@ CREATE TABLE phpbb_forums (
forum_image varchar2(255) DEFAULT '' NOT NULL,
forum_rules clob DEFAULT '' NOT NULL,
forum_rules_link varchar2(255) DEFAULT '' NOT NULL,
forum_rules_bitfield number(11) DEFAULT '0' NOT NULL,
forum_rules_bitfield raw(255) DEFAULT '' NOT NULL,
forum_rules_options number(1) DEFAULT '0' NOT NULL,
forum_rules_uid varchar2(5) DEFAULT '' NOT NULL,
forum_topics_per_page number(4) DEFAULT '0' NOT NULL,
@@ -529,7 +529,7 @@ CREATE TABLE phpbb_groups (
group_type number(4) DEFAULT '1' NOT NULL,
group_name varchar2(255) DEFAULT '' NOT NULL,
group_desc clob DEFAULT '' NOT NULL,
group_desc_bitfield number(11) DEFAULT '0' NOT NULL,
group_desc_bitfield raw(255) DEFAULT '' NOT NULL,
group_desc_options number(1) DEFAULT '0' NOT NULL,
group_desc_uid varchar2(5) DEFAULT '' NOT NULL,
group_display number(1) DEFAULT '0' NOT NULL,
@@ -776,7 +776,7 @@ CREATE TABLE phpbb_posts (
post_checksum varchar2(32) DEFAULT '' NOT NULL,
post_encoding varchar2(20) DEFAULT 'iso-8859-1' NOT NULL,
post_attachment number(1) DEFAULT '0' NOT NULL,
bbcode_bitfield number(11) DEFAULT '0' NOT NULL,
bbcode_bitfield raw(255) DEFAULT '' NOT NULL,
bbcode_uid varchar2(5) DEFAULT '' NOT NULL,
post_edit_time number(11) DEFAULT '0' NOT NULL,
post_edit_reason varchar2(3000) DEFAULT '' NOT NULL,
@@ -834,7 +834,7 @@ CREATE TABLE phpbb_privmsgs (
message_edit_user number(8) DEFAULT '0' NOT NULL,
message_encoding varchar2(20) DEFAULT 'iso-8859-1' NOT NULL,
message_attachment number(1) DEFAULT '0' NOT NULL,
bbcode_bitfield number(11) DEFAULT '0' NOT NULL,
bbcode_bitfield raw(255) DEFAULT '' NOT NULL,
bbcode_uid varchar2(5) DEFAULT '' NOT NULL,
message_edit_time number(11) DEFAULT '0' NOT NULL,
message_edit_count number(4) DEFAULT '0' NOT NULL,
@@ -1299,7 +1299,7 @@ CREATE TABLE phpbb_styles_template (
template_name varchar2(255) DEFAULT '' NOT NULL,
template_copyright varchar2(255) DEFAULT '' NOT NULL,
template_path varchar2(100) DEFAULT '' NOT NULL,
bbcode_bitfield number(11) DEFAULT '6921' NOT NULL,
bbcode_bitfield raw(255) DEFAULT '90D8' NOT NULL,
template_storedb number(1) DEFAULT '0' NOT NULL,
CONSTRAINT pk_phpbb_styles_template PRIMARY KEY (template_id),
CONSTRAINT u_phpbb_template_name UNIQUE (template_name)
@@ -1675,7 +1675,7 @@ CREATE TABLE phpbb_users (
user_avatar_height number(4) DEFAULT '0' NOT NULL,
user_sig clob DEFAULT '' NOT NULL,
user_sig_bbcode_uid varchar2(5) DEFAULT '' NOT NULL,
user_sig_bbcode_bitfield number(11) DEFAULT '0' NOT NULL,
user_sig_bbcode_bitfield raw(255) DEFAULT '' NOT NULL,
user_from varchar2(100) DEFAULT '' NOT NULL,
user_icq varchar2(15) DEFAULT '' NOT NULL,
user_aim varchar2(255) DEFAULT '' NOT NULL,