aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-01-17 21:53:08 +0100
committerJoas Schilling <nickvergessen@gmx.de>2014-01-17 21:53:08 +0100
commit39ff387d36001c14dc2130feaf811d51e946c886 (patch)
tree3aaa960357e2bdca651a46c7a6bd89c415c8e47a
parentaa2f0a652ff19490def8137bc73255dff282f305 (diff)
downloadforums-39ff387d36001c14dc2130feaf811d51e946c886.tar
forums-39ff387d36001c14dc2130feaf811d51e946c886.tar.gz
forums-39ff387d36001c14dc2130feaf811d51e946c886.tar.bz2
forums-39ff387d36001c14dc2130feaf811d51e946c886.tar.xz
forums-39ff387d36001c14dc2130feaf811d51e946c886.zip
[ticket/11201] Update schema files and unit test
PHPBB3-11201
-rw-r--r--phpBB/includes/db/schema_data.php4
-rw-r--r--phpBB/install/schemas/firebird_schema.sql4
-rw-r--r--phpBB/install/schemas/mssql_schema.sql4
-rw-r--r--phpBB/install/schemas/mysql_40_schema.sql4
-rw-r--r--phpBB/install/schemas/mysql_41_schema.sql4
-rw-r--r--phpBB/install/schemas/oracle_schema.sql4
-rw-r--r--phpBB/install/schemas/postgres_schema.sql4
-rw-r--r--phpBB/install/schemas/sqlite_schema.sql4
-rw-r--r--tests/profile/fixtures/profile_fields.xml6
9 files changed, 19 insertions, 19 deletions
diff --git a/phpBB/includes/db/schema_data.php b/phpBB/includes/db/schema_data.php
index 69d39e0f8c..039cb18ec2 100644
--- a/phpBB/includes/db/schema_data.php
+++ b/phpBB/includes/db/schema_data.php
@@ -758,7 +758,7 @@ $schema_data['phpbb_profile_fields'] = array(
'COLUMNS' => array(
'field_id' => array('UINT', NULL, 'auto_increment'),
'field_name' => array('VCHAR_UNI', ''),
- 'field_type' => array('TINT:4', 0),
+ 'field_type' => array('VCHAR:100', ''),
'field_ident' => array('VCHAR:20', ''),
'field_length' => array('VCHAR:20', ''),
'field_minlen' => array('VCHAR', ''),
@@ -796,7 +796,7 @@ $schema_data['phpbb_profile_fields_lang'] = array(
'field_id' => array('UINT', 0),
'lang_id' => array('UINT', 0),
'option_id' => array('UINT', 0),
- 'field_type' => array('TINT:4', 0),
+ 'field_type' => array('VCHAR:100', ''),
'lang_value' => array('VCHAR_UNI', ''),
),
'PRIMARY_KEY' => array('field_id', 'lang_id', 'option_id'),
diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql
index 6c6aca447d..a5e49fcdad 100644
--- a/phpBB/install/schemas/firebird_schema.sql
+++ b/phpBB/install/schemas/firebird_schema.sql
@@ -908,7 +908,7 @@ CREATE INDEX phpbb_privmsgs_to_usr_flder_id ON phpbb_privmsgs_to(user_id, folder
CREATE TABLE phpbb_profile_fields (
field_id INTEGER NOT NULL,
field_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- field_type INTEGER DEFAULT 0 NOT NULL,
+ field_type VARCHAR(100) CHARACTER SET NONE DEFAULT '' NOT NULL,
field_ident VARCHAR(20) CHARACTER SET NONE DEFAULT '' NOT NULL,
field_length VARCHAR(20) CHARACTER SET NONE DEFAULT '' NOT NULL,
field_minlen VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
@@ -957,7 +957,7 @@ CREATE TABLE phpbb_profile_fields_lang (
field_id INTEGER DEFAULT 0 NOT NULL,
lang_id INTEGER DEFAULT 0 NOT NULL,
option_id INTEGER DEFAULT 0 NOT NULL,
- field_type INTEGER DEFAULT 0 NOT NULL,
+ field_type VARCHAR(100) CHARACTER SET NONE DEFAULT '' NOT NULL,
lang_value VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE
);;
diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql
index 49804bdcc0..58a5749428 100644
--- a/phpBB/install/schemas/mssql_schema.sql
+++ b/phpBB/install/schemas/mssql_schema.sql
@@ -1114,7 +1114,7 @@ GO
CREATE TABLE [phpbb_profile_fields] (
[field_id] [int] IDENTITY (1, 1) NOT NULL ,
[field_name] [varchar] (255) DEFAULT ('') NOT NULL ,
- [field_type] [int] DEFAULT (0) NOT NULL ,
+ [field_type] [varchar] (100) DEFAULT ('') NOT NULL ,
[field_ident] [varchar] (20) DEFAULT ('') NOT NULL ,
[field_length] [varchar] (20) DEFAULT ('') NOT NULL ,
[field_minlen] [varchar] (255) DEFAULT ('') NOT NULL ,
@@ -1172,7 +1172,7 @@ CREATE TABLE [phpbb_profile_fields_lang] (
[field_id] [int] DEFAULT (0) NOT NULL ,
[lang_id] [int] DEFAULT (0) NOT NULL ,
[option_id] [int] DEFAULT (0) NOT NULL ,
- [field_type] [int] DEFAULT (0) NOT NULL ,
+ [field_type] [varchar] (100) DEFAULT ('') NOT NULL ,
[lang_value] [varchar] (255) DEFAULT ('') NOT NULL
) ON [PRIMARY]
GO
diff --git a/phpBB/install/schemas/mysql_40_schema.sql b/phpBB/install/schemas/mysql_40_schema.sql
index e287e7dde1..dfdf312588 100644
--- a/phpBB/install/schemas/mysql_40_schema.sql
+++ b/phpBB/install/schemas/mysql_40_schema.sql
@@ -645,7 +645,7 @@ CREATE TABLE phpbb_privmsgs_to (
CREATE TABLE phpbb_profile_fields (
field_id mediumint(8) UNSIGNED NOT NULL auto_increment,
field_name blob NOT NULL,
- field_type tinyint(4) DEFAULT '0' NOT NULL,
+ field_type varbinary(100) DEFAULT '' NOT NULL,
field_ident varbinary(20) DEFAULT '' NOT NULL,
field_length varbinary(20) DEFAULT '' NOT NULL,
field_minlen varbinary(255) DEFAULT '' NOT NULL,
@@ -681,7 +681,7 @@ CREATE TABLE phpbb_profile_fields_lang (
field_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
lang_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- field_type tinyint(4) DEFAULT '0' NOT NULL,
+ field_type varbinary(100) DEFAULT '' NOT NULL,
lang_value blob NOT NULL,
PRIMARY KEY (field_id, lang_id, option_id)
);
diff --git a/phpBB/install/schemas/mysql_41_schema.sql b/phpBB/install/schemas/mysql_41_schema.sql
index 870fbd05e4..e352a894f6 100644
--- a/phpBB/install/schemas/mysql_41_schema.sql
+++ b/phpBB/install/schemas/mysql_41_schema.sql
@@ -645,7 +645,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 tinyint(4) DEFAULT '0' NOT NULL,
+ field_type varchar(100) DEFAULT '' NOT NULL,
field_ident varchar(20) DEFAULT '' NOT NULL,
field_length varchar(20) DEFAULT '' NOT NULL,
field_minlen varchar(255) DEFAULT '' NOT NULL,
@@ -681,7 +681,7 @@ CREATE TABLE phpbb_profile_fields_lang (
field_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
lang_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- field_type tinyint(4) DEFAULT '0' NOT NULL,
+ field_type varchar(100) DEFAULT '' NOT NULL,
lang_value varchar(255) DEFAULT '' NOT NULL,
PRIMARY KEY (field_id, lang_id, option_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql
index 5354e5b1bb..bdc66880ca 100644
--- a/phpBB/install/schemas/oracle_schema.sql
+++ b/phpBB/install/schemas/oracle_schema.sql
@@ -1217,7 +1217,7 @@ CREATE INDEX phpbb_privmsgs_to_usr_flder_id ON phpbb_privmsgs_to (user_id, folde
CREATE TABLE phpbb_profile_fields (
field_id number(8) NOT NULL,
field_name varchar2(765) DEFAULT '' ,
- field_type number(4) DEFAULT '0' NOT NULL,
+ field_type varchar2(100) DEFAULT '' ,
field_ident varchar2(20) DEFAULT '' ,
field_length varchar2(20) DEFAULT '' ,
field_minlen varchar2(255) DEFAULT '' ,
@@ -1277,7 +1277,7 @@ CREATE TABLE phpbb_profile_fields_lang (
field_id number(8) DEFAULT '0' NOT NULL,
lang_id number(8) DEFAULT '0' NOT NULL,
option_id number(8) DEFAULT '0' NOT NULL,
- field_type number(4) DEFAULT '0' NOT NULL,
+ field_type varchar2(100) DEFAULT '' ,
lang_value varchar2(765) DEFAULT '' ,
CONSTRAINT pk_phpbb_profile_fields_lang PRIMARY KEY (field_id, lang_id, option_id)
)
diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql
index 7773602c16..0b34b8b22c 100644
--- a/phpBB/install/schemas/postgres_schema.sql
+++ b/phpBB/install/schemas/postgres_schema.sql
@@ -853,7 +853,7 @@ CREATE SEQUENCE phpbb_profile_fields_seq;
CREATE TABLE phpbb_profile_fields (
field_id INT4 DEFAULT nextval('phpbb_profile_fields_seq'),
field_name varchar(255) DEFAULT '' NOT NULL,
- field_type INT2 DEFAULT '0' NOT NULL,
+ field_type varchar(100) DEFAULT '' NOT NULL,
field_ident varchar(20) DEFAULT '' NOT NULL,
field_length varchar(20) DEFAULT '' NOT NULL,
field_minlen varchar(255) DEFAULT '' NOT NULL,
@@ -893,7 +893,7 @@ CREATE TABLE phpbb_profile_fields_lang (
field_id INT4 DEFAULT '0' NOT NULL CHECK (field_id >= 0),
lang_id INT4 DEFAULT '0' NOT NULL CHECK (lang_id >= 0),
option_id INT4 DEFAULT '0' NOT NULL CHECK (option_id >= 0),
- field_type INT2 DEFAULT '0' NOT NULL,
+ field_type varchar(100) DEFAULT '' NOT NULL,
lang_value varchar(255) DEFAULT '' NOT NULL,
PRIMARY KEY (field_id, lang_id, option_id)
);
diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql
index 079d48bc65..683fcaeddf 100644
--- a/phpBB/install/schemas/sqlite_schema.sql
+++ b/phpBB/install/schemas/sqlite_schema.sql
@@ -626,7 +626,7 @@ CREATE INDEX phpbb_privmsgs_to_usr_flder_id ON phpbb_privmsgs_to (user_id, folde
CREATE TABLE phpbb_profile_fields (
field_id INTEGER PRIMARY KEY NOT NULL ,
field_name varchar(255) NOT NULL DEFAULT '',
- field_type tinyint(4) NOT NULL DEFAULT '0',
+ field_type varchar(100) NOT NULL DEFAULT '',
field_ident varchar(20) NOT NULL DEFAULT '',
field_length varchar(20) NOT NULL DEFAULT '',
field_minlen varchar(255) NOT NULL DEFAULT '',
@@ -661,7 +661,7 @@ CREATE TABLE phpbb_profile_fields_lang (
field_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
lang_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
option_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- field_type tinyint(4) NOT NULL DEFAULT '0',
+ field_type varchar(100) NOT NULL DEFAULT '',
lang_value varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (field_id, lang_id, option_id)
);
diff --git a/tests/profile/fixtures/profile_fields.xml b/tests/profile/fixtures/profile_fields.xml
index 0b2929f625..e0c260bbf5 100644
--- a/tests/profile/fixtures/profile_fields.xml
+++ b/tests/profile/fixtures/profile_fields.xml
@@ -10,21 +10,21 @@
<value>1</value>
<value>1</value>
<value>0</value>
- <value>5</value>
+ <value>profilefields.type.dropdown</value>
<value>Default Option</value>
</row>
<row>
<value>1</value>
<value>1</value>
<value>1</value>
- <value>5</value>
+ <value>profilefields.type.dropdown</value>
<value>First Alternative</value>
</row>
<row>
<value>1</value>
<value>1</value>
<value>2</value>
- <value>5</value>
+ <value>profilefields.type.dropdown</value>
<value>Third Alternative</value>
</row>
</table>