aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.travis.yml1
-rw-r--r--README.md8
-rw-r--r--phpBB/develop/create_schema_files.php19
-rw-r--r--phpBB/includes/acp/acp_users.php2
-rw-r--r--phpBB/includes/db/db_tools.php146
-rw-r--r--phpBB/includes/functions_admin.php16
-rw-r--r--phpBB/includes/functions_posting.php4
-rw-r--r--phpBB/install/install_convert.php2
-rw-r--r--phpBB/install/schemas/mssql_schema.sql605
-rw-r--r--phpBB/language/en/common.php2
-rw-r--r--phpBB/styles/prosilver/template/ucp_profile_profile_info.html6
-rw-r--r--tests/functions_content/get_username_string_test.php125
-rwxr-xr-xtravis/setup-webserver.sh82
13 files changed, 642 insertions, 376 deletions
diff --git a/.travis.yml b/.travis.yml
index 6915ba4304..da9236a82f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -6,6 +6,7 @@ php:
- 5.4
- 5.5
- 5.6
+ - hhvm
env:
- DB=mysql
diff --git a/README.md b/README.md
index 22d826f4bc..37a42fa57f 100644
--- a/README.md
+++ b/README.md
@@ -17,9 +17,11 @@ Find support and lots more on [phpBB.com](http://www.phpbb.com)! Discuss the dev
## AUTOMATED TESTING
-We have unit and functional tests in order to prevent regressions. You can view the bamboo continuous integration [here](http://bamboo.phpbb.com) or check our travis build below.
-develop - [![Build Status](https://secure.travis-ci.org/phpbb/phpbb.png?branch=develop)](http://travis-ci.org/phpbb/phpbb)
-develop-olympus - [![Build Status](https://secure.travis-ci.org/phpbb/phpbb.png?branch=develop-olympus)](http://travis-ci.org/phpbb/phpbb)
+We have unit and functional tests in order to prevent regressions. You can view the bamboo continuous integration [here](http://bamboo.phpbb.com) or check our travis build below:
+
+* develop [![Build Status](https://secure.travis-ci.org/phpbb/phpbb.png?branch=develop)](http://travis-ci.org/phpbb/phpbb)
+* develop-ascraeus [![Build Status](https://secure.travis-ci.org/phpbb/phpbb.png?branch=develop-ascraeus)](http://travis-ci.org/phpbb/phpbb)
+* develop-olympus [![Build Status](https://secure.travis-ci.org/phpbb/phpbb.png?branch=develop-olympus)](http://travis-ci.org/phpbb/phpbb)
## LICENSE
diff --git a/phpBB/develop/create_schema_files.php b/phpBB/develop/create_schema_files.php
index 7b1fff40fb..b5f1202c0d 100644
--- a/phpBB/develop/create_schema_files.php
+++ b/phpBB/develop/create_schema_files.php
@@ -237,6 +237,19 @@ $supported_dbms = array('firebird', 'mssql', 'mysql_40', 'mysql_41', 'oracle', '
foreach ($supported_dbms as $dbms)
{
+ $schema_data = get_schema_struct();
+ if ($dbms == 'mssql')
+ {
+ foreach ($schema_data as $table_name => $table_data)
+ {
+ if (!isset($table_data['PRIMARY_KEY']))
+ {
+ $schema_data[$table_name]['COLUMNS']['mssqlindex'] = array('UINT', NULL, 'auto_increment');
+ $schema_data[$table_name]['PRIMARY_KEY'] = 'mssqlindex';
+ }
+ }
+ }
+
$fp = fopen($schema_path . $dbms . '_schema.sql', 'wb');
$line = '';
@@ -552,7 +565,7 @@ foreach ($supported_dbms as $dbms)
case 'mssql':
$line = substr($line, 0, -2);
- $line .= "\n) ON [PRIMARY]" . (($textimage) ? ' TEXTIMAGE_ON [PRIMARY]' : '') . "\n";
+ $line .= "\n)";// ON [PRIMARY]" . (($textimage) ? ' TEXTIMAGE_ON [PRIMARY]' : '') . "\n";
$line .= "GO\n\n";
break;
}
@@ -589,7 +602,7 @@ foreach ($supported_dbms as $dbms)
$line .= "\tCONSTRAINT [PK_{$table_name}] PRIMARY KEY CLUSTERED \n";
$line .= "\t(\n";
$line .= "\t\t[" . implode("],\n\t\t[", $table_data['PRIMARY_KEY']) . "]\n";
- $line .= "\t) ON [PRIMARY] \n";
+ $line .= "\t)\n";
$line .= "GO\n\n";
break;
@@ -684,7 +697,7 @@ foreach ($supported_dbms as $dbms)
case 'mssql':
$line .= ($key_data[0] == 'INDEX') ? 'CREATE INDEX' : '';
$line .= ($key_data[0] == 'UNIQUE') ? 'CREATE UNIQUE INDEX' : '';
- $line .= " [{$key_name}] ON [{$table_name}]([" . implode('], [', $key_data[1]) . "]) ON [PRIMARY]\n";
+ $line .= " [{$key_name}] ON [{$table_name}]([" . implode('], [', $key_data[1]) . "])\n";
$line .= "GO\n\n";
break;
diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php
index 8aaefb02c5..b82be8887c 100644
--- a/phpBB/includes/acp/acp_users.php
+++ b/phpBB/includes/acp/acp_users.php
@@ -2015,7 +2015,7 @@ class acp_users
WHERE a.poster_id = ' . $user_id . "
AND a.is_orphan = 0
ORDER BY $order_by";
- $result = $db->sql_query_limit($sql, $config['posts_per_page'], $start);
+ $result = $db->sql_query_limit($sql, $config['topics_per_page'], $start);
while ($row = $db->sql_fetchrow($result))
{
diff --git a/phpBB/includes/db/db_tools.php b/phpBB/includes/db/db_tools.php
index e394b1ffa0..8dce769395 100644
--- a/phpBB/includes/db/db_tools.php
+++ b/phpBB/includes/db/db_tools.php
@@ -452,9 +452,6 @@ class phpbb_db_tools
// Determine if we have created a PRIMARY KEY in the earliest
$primary_key_gen = false;
- // Determine if the table must be created with TEXTIMAGE
- $create_textimage = false;
-
// Determine if the table requires a sequence
$create_sequence = false;
@@ -471,6 +468,15 @@ class phpbb_db_tools
break;
}
+ if ($this->sql_layer == 'mssql' || $this->sql_layer == 'mssqlnative')
+ {
+ if (!isset($table_data['PRIMARY_KEY']))
+ {
+ $table_data['COLUMNS']['mssqlindex'] = array('UINT', null, 'auto_increment');
+ $table_data['PRIMARY_KEY'] = 'mssqlindex';
+ }
+ }
+
// Iterate through the columns to create a table
foreach ($table_data['COLUMNS'] as $column_name => $column_data)
{
@@ -501,12 +507,6 @@ class phpbb_db_tools
$primary_key_gen = isset($prepared_column['primary_key_set']) && $prepared_column['primary_key_set'];
}
- // create textimage DDL based off of the existance of certain column types
- if (!$create_textimage)
- {
- $create_textimage = isset($prepared_column['textimage']) && $prepared_column['textimage'];
- }
-
// create sequence DDL based off of the existance of auto incrementing columns
if (!$create_sequence && isset($prepared_column['auto_increment']) && $prepared_column['auto_increment'])
{
@@ -521,13 +521,9 @@ class phpbb_db_tools
switch ($this->sql_layer)
{
case 'firebird':
- $table_sql .= "\n);";
- $statements[] = $table_sql;
- break;
-
case 'mssql':
case 'mssqlnative':
- $table_sql .= "\n) ON [PRIMARY]" . (($create_textimage) ? ' TEXTIMAGE_ON [PRIMARY]' : '');
+ $table_sql .= "\n);";
$statements[] = $table_sql;
break;
}
@@ -1819,22 +1815,49 @@ class phpbb_db_tools
case 'mssql':
case 'mssqlnative':
- // remove default cosntraints first
- // http://msdn.microsoft.com/en-us/library/aa175912%28v=sql.80%29.aspx
- $statements[] = "DECLARE @drop_default_name VARCHAR(100), @cmd VARCHAR(1000)
- SET @drop_default_name =
- (SELECT so.name FROM sysobjects so
- JOIN sysconstraints sc ON so.id = sc.constid
- WHERE object_name(so.parent_obj) = '{$table_name}'
- AND so.xtype = 'D'
- AND sc.colid = (SELECT colid FROM syscolumns
- WHERE id = object_id('{$table_name}')
- AND name = '{$column_name}'))
- IF @drop_default_name <> ''
- BEGIN
- SET @cmd = 'ALTER TABLE [{$table_name}] DROP CONSTRAINT [' + @drop_default_name + ']'
- EXEC(@cmd)
- END";
+ $sql = "SELECT CAST(SERVERPROPERTY('productversion') AS VARCHAR(25)) AS mssql_version";
+ $result = $this->db->sql_query($sql);
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ // Remove default constraints
+ if ($row['mssql_version'][0] == '8') // SQL Server 2000
+ {
+ // http://msdn.microsoft.com/en-us/library/aa175912%28v=sql.80%29.aspx
+ // Deprecated in SQL Server 2005
+ $statements[] = "DECLARE @drop_default_name VARCHAR(100), @cmd VARCHAR(1000)
+ SET @drop_default_name =
+ (SELECT so.name FROM sysobjects so
+ JOIN sysconstraints sc ON so.id = sc.constid
+ WHERE object_name(so.parent_obj) = '{$table_name}'
+ AND so.xtype = 'D'
+ AND sc.colid = (SELECT colid FROM syscolumns
+ WHERE id = object_id('{$table_name}')
+ AND name = '{$column_name}'))
+ IF @drop_default_name <> ''
+ BEGIN
+ SET @cmd = 'ALTER TABLE [{$table_name}] DROP CONSTRAINT [' + @drop_default_name + ']'
+ EXEC(@cmd)
+ END";
+ }
+ else
+ {
+ $sql = "SELECT dobj.name AS def_name
+ FROM sys.columns col
+ LEFT OUTER JOIN sys.objects dobj ON (dobj.object_id = col.default_object_id AND dobj.type = 'D')
+ WHERE col.object_id = object_id('{$table_name}')
+ AND col.name = '{$column_name}'
+ AND dobj.name IS NOT NULL";
+ $result = $this->db->sql_query($sql);
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ if ($row)
+ {
+ $statements[] = 'ALTER TABLE [' . $table_name . '] DROP CONSTRAINT [' . $row['def_name'] . ']';
+ }
+ }
+
$statements[] = 'ALTER TABLE [' . $table_name . '] DROP COLUMN [' . $column_name . ']';
break;
@@ -2038,7 +2061,7 @@ class phpbb_db_tools
$sql = "ALTER TABLE [{$table_name}] WITH NOCHECK ADD ";
$sql .= "CONSTRAINT [PK_{$table_name}] PRIMARY KEY CLUSTERED (";
$sql .= '[' . implode("],\n\t\t[", $column) . ']';
- $sql .= ') ON [PRIMARY]';
+ $sql .= ')';
$statements[] = $sql;
break;
@@ -2136,7 +2159,7 @@ class phpbb_db_tools
case 'mssql':
case 'mssqlnative':
- $statements[] = 'CREATE UNIQUE INDEX ' . $index_name . ' ON ' . $table_name . '(' . implode(', ', $column) . ') ON [PRIMARY]';
+ $statements[] = 'CREATE UNIQUE INDEX ' . $index_name . ' ON ' . $table_name . '(' . implode(', ', $column) . ')';
break;
}
@@ -2189,7 +2212,7 @@ class phpbb_db_tools
case 'mssql':
case 'mssqlnative':
- $statements[] = 'CREATE INDEX ' . $index_name . ' ON ' . $table_name . '(' . implode(', ', $column) . ') ON [PRIMARY]';
+ $statements[] = 'CREATE INDEX ' . $index_name . ' ON ' . $table_name . '(' . implode(', ', $column) . ')';
break;
}
@@ -2321,23 +2344,48 @@ class phpbb_db_tools
if (!empty($column_data['default']))
{
+ $sql = "SELECT CAST(SERVERPROPERTY('productversion') AS VARCHAR(25)) AS mssql_version";
+ $result = $this->db->sql_query($sql);
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
// Using TRANSACT-SQL for this statement because we do not want to have colliding data if statements are executed at a later stage
- $statements[] = "DECLARE @drop_default_name VARCHAR(100), @cmd VARCHAR(1000)
- SET @drop_default_name =
- (SELECT so.name FROM sysobjects so
- JOIN sysconstraints sc ON so.id = sc.constid
- WHERE object_name(so.parent_obj) = '{$table_name}'
- AND so.xtype = 'D'
- AND sc.colid = (SELECT colid FROM syscolumns
- WHERE id = object_id('{$table_name}')
- AND name = '{$column_name}'))
- IF @drop_default_name <> ''
- BEGIN
- SET @cmd = 'ALTER TABLE [{$table_name}] DROP CONSTRAINT [' + @drop_default_name + ']'
- EXEC(@cmd)
- END
- SET @cmd = 'ALTER TABLE [{$table_name}] ADD CONSTRAINT [DF_{$table_name}_{$column_name}_1] {$column_data['default']} FOR [{$column_name}]'
- EXEC(@cmd)";
+ if ($row['mssql_version'][0] == '8') // SQL Server 2000
+ {
+ $statements[] = "DECLARE @drop_default_name VARCHAR(100), @cmd VARCHAR(1000)
+ SET @drop_default_name =
+ (SELECT so.name FROM sysobjects so
+ JOIN sysconstraints sc ON so.id = sc.constid
+ WHERE object_name(so.parent_obj) = '{$table_name}'
+ AND so.xtype = 'D'
+ AND sc.colid = (SELECT colid FROM syscolumns
+ WHERE id = object_id('{$table_name}')
+ AND name = '{$column_name}'))
+ IF @drop_default_name <> ''
+ BEGIN
+ SET @cmd = 'ALTER TABLE [{$table_name}] DROP CONSTRAINT [' + @drop_default_name + ']'
+ EXEC(@cmd)
+ END
+ SET @cmd = 'ALTER TABLE [{$table_name}] ADD CONSTRAINT [DF_{$table_name}_{$column_name}_1] {$column_data['default']} FOR [{$column_name}]'
+ EXEC(@cmd)";
+ }
+ else
+ {
+ $statements[] = "DECLARE @drop_default_name VARCHAR(100), @cmd VARCHAR(1000)
+ SET @drop_default_name =
+ (SELECT dobj.name FROM sys.columns col
+ LEFT OUTER JOIN sys.objects dobj ON (dobj.object_id = col.default_object_id AND dobj.type = 'D')
+ WHERE col.object_id = object_id('{$table_name}')
+ AND col.name = '{$column_name}'
+ AND dobj.name IS NOT NULL)
+ IF @drop_default_name <> ''
+ BEGIN
+ SET @cmd = 'ALTER TABLE [{$table_name}] DROP CONSTRAINT [' + @drop_default_name + ']'
+ EXEC(@cmd)
+ END
+ SET @cmd = 'ALTER TABLE [{$table_name}] ADD CONSTRAINT [DF_{$table_name}_{$column_name}_1] {$column_data['default']} FOR [{$column_name}]'
+ EXEC(@cmd)";
+ }
}
break;
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index 2f73858ea2..3e69a997a2 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -3057,8 +3057,24 @@ function get_database_size()
case 'mssql':
case 'mssql_odbc':
case 'mssqlnative':
+ $sql = 'SELECT @@VERSION AS mssql_version';
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
$sql = 'SELECT ((SUM(size) * 8.0) * 1024.0) as dbsize
FROM sysfiles';
+
+ if ($row)
+ {
+ // Azure stats are stored elsewhere
+ if (strpos($row['mssql_version'], 'SQL Azure') !== false)
+ {
+ $sql = 'SELECT ((SUM(reserved_page_count) * 8.0) * 1024.0) as dbsize
+ FROM sys.dm_db_partition_stats';
+ }
+ }
+
$result = $db->sql_query($sql, 7200);
$database_size = ($row = $db->sql_fetchrow($result)) ? $row['dbsize'] : false;
$db->sql_freeresult($result);
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 11a5067ef9..3f0a78a7cb 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -394,6 +394,10 @@ function upload_attachment($form_name, $forum_id, $local = false, $local_storage
{
$upload->set_disallowed_content(explode('|', $config['mime_triggers']));
}
+ else if (!$config['check_attachment_content'])
+ {
+ $upload->set_disallowed_content(array());
+ }
if (!$local)
{
diff --git a/phpBB/install/install_convert.php b/phpBB/install/install_convert.php
index fb97255981..725cb4fdee 100644
--- a/phpBB/install/install_convert.php
+++ b/phpBB/install/install_convert.php
@@ -417,7 +417,7 @@ class install_convert extends module
if (!isset($available_dbms[$src_dbms]) || !$available_dbms[$src_dbms]['AVAILABLE'])
{
- $error['db'][] = $lang['INST_ERR_NO_DB'];
+ $error[] = $lang['INST_ERR_NO_DB'];
$connect_test = false;
}
else
diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql
index 0b2f8368de..68993d45ee 100644
--- a/phpBB/install/schemas/mssql_schema.sql
+++ b/phpBB/install/schemas/mssql_schema.sql
@@ -25,29 +25,28 @@ CREATE TABLE [phpbb_attachments] (
[filesize] [int] DEFAULT (0) NOT NULL ,
[filetime] [int] DEFAULT (0) NOT NULL ,
[thumbnail] [int] DEFAULT (0) NOT NULL
-) ON [PRIMARY]
-GO
+)GO
ALTER TABLE [phpbb_attachments] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_attachments] PRIMARY KEY CLUSTERED
(
[attach_id]
- ) ON [PRIMARY]
+ )
GO
-CREATE INDEX [filetime] ON [phpbb_attachments]([filetime]) ON [PRIMARY]
+CREATE INDEX [filetime] ON [phpbb_attachments]([filetime])
GO
-CREATE INDEX [post_msg_id] ON [phpbb_attachments]([post_msg_id]) ON [PRIMARY]
+CREATE INDEX [post_msg_id] ON [phpbb_attachments]([post_msg_id])
GO
-CREATE INDEX [topic_id] ON [phpbb_attachments]([topic_id]) ON [PRIMARY]
+CREATE INDEX [topic_id] ON [phpbb_attachments]([topic_id])
GO
-CREATE INDEX [poster_id] ON [phpbb_attachments]([poster_id]) ON [PRIMARY]
+CREATE INDEX [poster_id] ON [phpbb_attachments]([poster_id])
GO
-CREATE INDEX [is_orphan] ON [phpbb_attachments]([is_orphan]) ON [PRIMARY]
+CREATE INDEX [is_orphan] ON [phpbb_attachments]([is_orphan])
GO
@@ -59,17 +58,24 @@ CREATE TABLE [phpbb_acl_groups] (
[forum_id] [int] DEFAULT (0) NOT NULL ,
[auth_option_id] [int] DEFAULT (0) NOT NULL ,
[auth_role_id] [int] DEFAULT (0) NOT NULL ,
- [auth_setting] [int] DEFAULT (0) NOT NULL
-) ON [PRIMARY]
+ [auth_setting] [int] DEFAULT (0) NOT NULL ,
+ [mssqlindex] [int] IDENTITY (1, 1) NOT NULL
+)GO
+
+ALTER TABLE [phpbb_acl_groups] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_acl_groups] PRIMARY KEY CLUSTERED
+ (
+ [mssqlindex]
+ )
GO
-CREATE INDEX [group_id] ON [phpbb_acl_groups]([group_id]) ON [PRIMARY]
+CREATE INDEX [group_id] ON [phpbb_acl_groups]([group_id])
GO
-CREATE INDEX [auth_opt_id] ON [phpbb_acl_groups]([auth_option_id]) ON [PRIMARY]
+CREATE INDEX [auth_opt_id] ON [phpbb_acl_groups]([auth_option_id])
GO
-CREATE INDEX [auth_role_id] ON [phpbb_acl_groups]([auth_role_id]) ON [PRIMARY]
+CREATE INDEX [auth_role_id] ON [phpbb_acl_groups]([auth_role_id])
GO
@@ -82,17 +88,16 @@ CREATE TABLE [phpbb_acl_options] (
[is_global] [int] DEFAULT (0) NOT NULL ,
[is_local] [int] DEFAULT (0) NOT NULL ,
[founder_only] [int] DEFAULT (0) NOT NULL
-) ON [PRIMARY]
-GO
+)GO
ALTER TABLE [phpbb_acl_options] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_acl_options] PRIMARY KEY CLUSTERED
(
[auth_option_id]
- ) ON [PRIMARY]
+ )
GO
-CREATE UNIQUE INDEX [auth_option] ON [phpbb_acl_options]([auth_option]) ON [PRIMARY]
+CREATE UNIQUE INDEX [auth_option] ON [phpbb_acl_options]([auth_option])
GO
@@ -105,20 +110,19 @@ CREATE TABLE [phpbb_acl_roles] (
[role_description] [varchar] (4000) DEFAULT ('') NOT NULL ,
[role_type] [varchar] (10) DEFAULT ('') NOT NULL ,
[role_order] [int] DEFAULT (0) NOT NULL
-) ON [PRIMARY]
-GO
+)GO
ALTER TABLE [phpbb_acl_roles] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_acl_roles] PRIMARY KEY CLUSTERED
(
[role_id]
- ) ON [PRIMARY]
+ )
GO
-CREATE INDEX [role_type] ON [phpbb_acl_roles]([role_type]) ON [PRIMARY]
+CREATE INDEX [role_type] ON [phpbb_acl_roles]([role_type])
GO
-CREATE INDEX [role_order] ON [phpbb_acl_roles]([role_order]) ON [PRIMARY]
+CREATE INDEX [role_order] ON [phpbb_acl_roles]([role_order])
GO
@@ -129,18 +133,17 @@ CREATE TABLE [phpbb_acl_roles_data] (
[role_id] [int] DEFAULT (0) NOT NULL ,
[auth_option_id] [int] DEFAULT (0) NOT NULL ,
[auth_setting] [int] DEFAULT (0) NOT NULL
-) ON [PRIMARY]
-GO
+)GO
ALTER TABLE [phpbb_acl_roles_data] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_acl_roles_data] PRIMARY KEY CLUSTERED
(
[role_id],
[auth_option_id]
- ) ON [PRIMARY]
+ )
GO
-CREATE INDEX [ath_op_id] ON [phpbb_acl_roles_data]([auth_option_id]) ON [PRIMARY]
+CREATE INDEX [ath_op_id] ON [phpbb_acl_roles_data]([auth_option_id])
GO
@@ -152,17 +155,24 @@ CREATE TABLE [phpbb_acl_users] (
[forum_id] [int] DEFAULT (0) NOT NULL ,
[auth_option_id] [int] DEFAULT (0) NOT NULL ,
[auth_role_id] [int] DEFAULT (0) NOT NULL ,
- [auth_setting] [int] DEFAULT (0) NOT NULL
-) ON [PRIMARY]
+ [auth_setting] [int] DEFAULT (0) NOT NULL ,
+ [mssqlindex] [int] IDENTITY (1, 1) NOT NULL
+)GO
+
+ALTER TABLE [phpbb_acl_users] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_acl_users] PRIMARY KEY CLUSTERED
+ (
+ [mssqlindex]
+ )
GO
-CREATE INDEX [user_id] ON [phpbb_acl_users]([user_id]) ON [PRIMARY]
+CREATE INDEX [user_id] ON [phpbb_acl_users]([user_id])
GO
-CREATE INDEX [auth_option_id] ON [phpbb_acl_users]([auth_option_id]) ON [PRIMARY]
+CREATE INDEX [auth_option_id] ON [phpbb_acl_users]([auth_option_id])
GO
-CREATE INDEX [auth_role_id] ON [phpbb_acl_users]([auth_role_id]) ON [PRIMARY]
+CREATE INDEX [auth_role_id] ON [phpbb_acl_users]([auth_role_id])
GO
@@ -179,26 +189,25 @@ CREATE TABLE [phpbb_banlist] (
[ban_exclude] [int] DEFAULT (0) NOT NULL ,
[ban_reason] [varchar] (255) DEFAULT ('') NOT NULL ,
[ban_give_reason] [varchar] (255) DEFAULT ('') NOT NULL
-) ON [PRIMARY]
-GO
+)GO
ALTER TABLE [phpbb_banlist] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_banlist] PRIMARY KEY CLUSTERED
(
[ban_id]
- ) ON [PRIMARY]
+ )
GO
-CREATE INDEX [ban_end] ON [phpbb_banlist]([ban_end]) ON [PRIMARY]
+CREATE INDEX [ban_end] ON [phpbb_banlist]([ban_end])
GO
-CREATE INDEX [ban_user] ON [phpbb_banlist]([ban_userid], [ban_exclude]) ON [PRIMARY]
+CREATE INDEX [ban_user] ON [phpbb_banlist]([ban_userid], [ban_exclude])
GO
-CREATE INDEX [ban_email] ON [phpbb_banlist]([ban_email], [ban_exclude]) ON [PRIMARY]
+CREATE INDEX [ban_email] ON [phpbb_banlist]([ban_email], [ban_exclude])
GO
-CREATE INDEX [ban_ip] ON [phpbb_banlist]([ban_ip], [ban_exclude]) ON [PRIMARY]
+CREATE INDEX [ban_ip] ON [phpbb_banlist]([ban_ip], [ban_exclude])
GO
@@ -216,17 +225,16 @@ CREATE TABLE [phpbb_bbcodes] (
[first_pass_replace] [text] DEFAULT ('') NOT NULL ,
[second_pass_match] [text] DEFAULT ('') NOT NULL ,
[second_pass_replace] [text] DEFAULT ('') NOT NULL
-) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
-GO
+)GO
ALTER TABLE [phpbb_bbcodes] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_bbcodes] PRIMARY KEY CLUSTERED
(
[bbcode_id]
- ) ON [PRIMARY]
+ )
GO
-CREATE INDEX [display_on_post] ON [phpbb_bbcodes]([display_on_posting]) ON [PRIMARY]
+CREATE INDEX [display_on_post] ON [phpbb_bbcodes]([display_on_posting])
GO
@@ -236,15 +244,14 @@ GO
CREATE TABLE [phpbb_bookmarks] (
[topic_id] [int] DEFAULT (0) NOT NULL ,
[user_id] [int] DEFAULT (0) NOT NULL
-) ON [PRIMARY]
-GO
+)GO
ALTER TABLE [phpbb_bookmarks] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_bookmarks] PRIMARY KEY CLUSTERED
(
[topic_id],
[user_id]
- ) ON [PRIMARY]
+ )
GO
@@ -258,17 +265,16 @@ CREATE TABLE [phpbb_bots] (
[user_id] [int] DEFAULT (0) NOT NULL ,
[bot_agent] [varchar] (255) DEFAULT ('') NOT NULL ,
[bot_ip] [varchar] (255) DEFAULT ('') NOT NULL
-) ON [PRIMARY]
-GO
+)GO
ALTER TABLE [phpbb_bots] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_bots] PRIMARY KEY CLUSTERED
(
[bot_id]
- ) ON [PRIMARY]
+ )
GO
-CREATE INDEX [bot_active] ON [phpbb_bots]([bot_active]) ON [PRIMARY]
+CREATE INDEX [bot_active] ON [phpbb_bots]([bot_active])
GO
@@ -279,17 +285,16 @@ CREATE TABLE [phpbb_config] (
[config_name] [varchar] (255) DEFAULT ('') NOT NULL ,
[config_value] [varchar] (255) DEFAULT ('') NOT NULL ,
[is_dynamic] [int] DEFAULT (0) NOT NULL
-) ON [PRIMARY]
-GO
+)GO
ALTER TABLE [phpbb_config] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_config] PRIMARY KEY CLUSTERED
(
[config_name]
- ) ON [PRIMARY]
+ )
GO
-CREATE INDEX [is_dynamic] ON [phpbb_config]([is_dynamic]) ON [PRIMARY]
+CREATE INDEX [is_dynamic] ON [phpbb_config]([is_dynamic])
GO
@@ -303,18 +308,17 @@ CREATE TABLE [phpbb_confirm] (
[code] [varchar] (8) DEFAULT ('') NOT NULL ,
[seed] [int] DEFAULT (0) NOT NULL ,
[attempts] [int] DEFAULT (0) NOT NULL
-) ON [PRIMARY]
-GO
+)GO
ALTER TABLE [phpbb_confirm] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_confirm] PRIMARY KEY CLUSTERED
(
[session_id],
[confirm_id]
- ) ON [PRIMARY]
+ )
GO
-CREATE INDEX [confirm_type] ON [phpbb_confirm]([confirm_type]) ON [PRIMARY]
+CREATE INDEX [confirm_type] ON [phpbb_confirm]([confirm_type])
GO
@@ -324,14 +328,13 @@ GO
CREATE TABLE [phpbb_disallow] (
[disallow_id] [int] IDENTITY (1, 1) NOT NULL ,
[disallow_username] [varchar] (255) DEFAULT ('') NOT NULL
-) ON [PRIMARY]
-GO
+)GO
ALTER TABLE [phpbb_disallow] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_disallow] PRIMARY KEY CLUSTERED
(
[disallow_id]
- ) ON [PRIMARY]
+ )
GO
@@ -346,17 +349,16 @@ CREATE TABLE [phpbb_drafts] (
[save_time] [int] DEFAULT (0) NOT NULL ,
[draft_subject] [varchar] (255) DEFAULT ('') NOT NULL ,
[draft_message] [text] DEFAULT ('') NOT NULL
-) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
-GO
+)GO
ALTER TABLE [phpbb_drafts] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_drafts] PRIMARY KEY CLUSTERED
(
[draft_id]
- ) ON [PRIMARY]
+ )
GO
-CREATE INDEX [save_time] ON [phpbb_drafts]([save_time]) ON [PRIMARY]
+CREATE INDEX [save_time] ON [phpbb_drafts]([save_time])
GO
@@ -367,14 +369,13 @@ CREATE TABLE [phpbb_extensions] (
[extension_id] [int] IDENTITY (1, 1) NOT NULL ,
[group_id] [int] DEFAULT (0) NOT NULL ,
[extension] [varchar] (100) DEFAULT ('') NOT NULL
-) ON [PRIMARY]
-GO
+)GO
ALTER TABLE [phpbb_extensions] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_extensions] PRIMARY KEY CLUSTERED
(
[extension_id]
- ) ON [PRIMARY]
+ )
GO
@@ -391,14 +392,13 @@ CREATE TABLE [phpbb_extension_groups] (
[max_filesize] [int] DEFAULT (0) NOT NULL ,
[allowed_forums] [varchar] (8000) DEFAULT ('') NOT NULL ,
[allow_in_pm] [int] DEFAULT (0) NOT NULL
-) ON [PRIMARY]
-GO
+)GO
ALTER TABLE [phpbb_extension_groups] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_extension_groups] PRIMARY KEY CLUSTERED
(
[group_id]
- ) ON [PRIMARY]
+ )
GO
@@ -448,20 +448,19 @@ CREATE TABLE [phpbb_forums] (
[prune_days] [int] DEFAULT (0) NOT NULL ,
[prune_viewed] [int] DEFAULT (0) NOT NULL ,
[prune_freq] [int] DEFAULT (0) NOT NULL
-) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
-GO
+)GO
ALTER TABLE [phpbb_forums] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_forums] PRIMARY KEY CLUSTERED
(
[forum_id]
- ) ON [PRIMARY]
+ )
GO
-CREATE INDEX [left_right_id] ON [phpbb_forums]([left_id], [right_id]) ON [PRIMARY]
+CREATE INDEX [left_right_id] ON [phpbb_forums]([left_id], [right_id])
GO
-CREATE INDEX [forum_lastpost_id] ON [phpbb_forums]([forum_last_post_id]) ON [PRIMARY]
+CREATE INDEX [forum_lastpost_id] ON [phpbb_forums]([forum_last_post_id])
GO
@@ -472,8 +471,7 @@ CREATE TABLE [phpbb_forums_access] (
[forum_id] [int] DEFAULT (0) NOT NULL ,
[user_id] [int] DEFAULT (0) NOT NULL ,
[session_id] [char] (32) DEFAULT ('') NOT NULL
-) ON [PRIMARY]
-GO
+)GO
ALTER TABLE [phpbb_forums_access] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_forums_access] PRIMARY KEY CLUSTERED
@@ -481,7 +479,7 @@ ALTER TABLE [phpbb_forums_access] WITH NOCHECK ADD
[forum_id],
[user_id],
[session_id]
- ) ON [PRIMARY]
+ )
GO
@@ -492,15 +490,14 @@ CREATE TABLE [phpbb_forums_track] (
[user_id] [int] DEFAULT (0) NOT NULL ,
[forum_id] [int] DEFAULT (0) NOT NULL ,
[mark_time] [int] DEFAULT (0) NOT NULL
-) ON [PRIMARY]
-GO
+)GO
ALTER TABLE [phpbb_forums_track] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_forums_track] PRIMARY KEY CLUSTERED
(
[user_id],
[forum_id]
- ) ON [PRIMARY]
+ )
GO
@@ -510,17 +507,24 @@ GO
CREATE TABLE [phpbb_forums_watch] (
[forum_id] [int] DEFAULT (0) NOT NULL ,
[user_id] [int] DEFAULT (0) NOT NULL ,
- [notify_status] [int] DEFAULT (0) NOT NULL
-) ON [PRIMARY]
+ [notify_status] [int] DEFAULT (0) NOT NULL ,
+ [mssqlindex] [int] IDENTITY (1, 1) NOT NULL
+)GO
+
+ALTER TABLE [phpbb_forums_watch] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_forums_watch] PRIMARY KEY CLUSTERED
+ (
+ [mssqlindex]
+ )
GO
-CREATE INDEX [forum_id] ON [phpbb_forums_watch]([forum_id]) ON [PRIMARY]
+CREATE INDEX [forum_id] ON [phpbb_forums_watch]([forum_id])
GO
-CREATE INDEX [user_id] ON [phpbb_forums_watch]([user_id]) ON [PRIMARY]
+CREATE INDEX [user_id] ON [phpbb_forums_watch]([user_id])
GO
-CREATE INDEX [notify_stat] ON [phpbb_forums_watch]([notify_status]) ON [PRIMARY]
+CREATE INDEX [notify_stat] ON [phpbb_forums_watch]([notify_status])
GO
@@ -549,17 +553,16 @@ CREATE TABLE [phpbb_groups] (
[group_message_limit] [int] DEFAULT (0) NOT NULL ,
[group_max_recipients] [int] DEFAULT (0) NOT NULL ,
[group_legend] [int] DEFAULT (1) NOT NULL
-) ON [PRIMARY]
-GO
+)GO
ALTER TABLE [phpbb_groups] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_groups] PRIMARY KEY CLUSTERED
(
[group_id]
- ) ON [PRIMARY]
+ )
GO
-CREATE INDEX [group_legend_name] ON [phpbb_groups]([group_legend], [group_name]) ON [PRIMARY]
+CREATE INDEX [group_legend_name] ON [phpbb_groups]([group_legend], [group_name])
GO
@@ -573,17 +576,16 @@ CREATE TABLE [phpbb_icons] (
[icons_height] [int] DEFAULT (0) NOT NULL ,
[icons_order] [int] DEFAULT (0) NOT NULL ,
[display_on_posting] [int] DEFAULT (1) NOT NULL
-) ON [PRIMARY]
-GO
+)GO
ALTER TABLE [phpbb_icons] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_icons] PRIMARY KEY CLUSTERED
(
[icons_id]
- ) ON [PRIMARY]
+ )
GO
-CREATE INDEX [display_on_posting] ON [phpbb_icons]([display_on_posting]) ON [PRIMARY]
+CREATE INDEX [display_on_posting] ON [phpbb_icons]([display_on_posting])
GO
@@ -597,17 +599,16 @@ CREATE TABLE [phpbb_lang] (
[lang_english_name] [varchar] (100) DEFAULT ('') NOT NULL ,
[lang_local_name] [varchar] (255) DEFAULT ('') NOT NULL ,
[lang_author] [varchar] (255) DEFAULT ('') NOT NULL
-) ON [PRIMARY]
-GO
+)GO
ALTER TABLE [phpbb_lang] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_lang] PRIMARY KEY CLUSTERED
(
[lang_id]
- ) ON [PRIMARY]
+ )
GO
-CREATE INDEX [lang_iso] ON [phpbb_lang]([lang_iso]) ON [PRIMARY]
+CREATE INDEX [lang_iso] ON [phpbb_lang]([lang_iso])
GO
@@ -625,29 +626,28 @@ CREATE TABLE [phpbb_log] (
[log_time] [int] DEFAULT (0) NOT NULL ,
[log_operation] [varchar] (4000) DEFAULT ('') NOT NULL ,
[log_data] [text] DEFAULT ('') NOT NULL
-) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
-GO
+)GO
ALTER TABLE [phpbb_log] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_log] PRIMARY KEY CLUSTERED
(
[log_id]
- ) ON [PRIMARY]
+ )
GO
-CREATE INDEX [log_type] ON [phpbb_log]([log_type]) ON [PRIMARY]
+CREATE INDEX [log_type] ON [phpbb_log]([log_type])
GO
-CREATE INDEX [forum_id] ON [phpbb_log]([forum_id]) ON [PRIMARY]
+CREATE INDEX [forum_id] ON [phpbb_log]([forum_id])
GO
-CREATE INDEX [topic_id] ON [phpbb_log]([topic_id]) ON [PRIMARY]
+CREATE INDEX [topic_id] ON [phpbb_log]([topic_id])
GO
-CREATE INDEX [reportee_id] ON [phpbb_log]([reportee_id]) ON [PRIMARY]
+CREATE INDEX [reportee_id] ON [phpbb_log]([reportee_id])
GO
-CREATE INDEX [user_id] ON [phpbb_log]([user_id]) ON [PRIMARY]
+CREATE INDEX [user_id] ON [phpbb_log]([user_id])
GO
@@ -661,20 +661,27 @@ CREATE TABLE [phpbb_login_attempts] (
[attempt_time] [int] DEFAULT (0) NOT NULL ,
[user_id] [int] DEFAULT (0) NOT NULL ,
[username] [varchar] (255) DEFAULT (0) NOT NULL ,
- [username_clean] [varchar] (255) DEFAULT (0) NOT NULL
-) ON [PRIMARY]
+ [username_clean] [varchar] (255) DEFAULT (0) NOT NULL ,
+ [mssqlindex] [int] IDENTITY (1, 1) NOT NULL
+)GO
+
+ALTER TABLE [phpbb_login_attempts] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_login_attempts] PRIMARY KEY CLUSTERED
+ (
+ [mssqlindex]
+ )
GO
-CREATE INDEX [att_ip] ON [phpbb_login_attempts]([attempt_ip], [attempt_time]) ON [PRIMARY]
+CREATE INDEX [att_ip] ON [phpbb_login_attempts]([attempt_ip], [attempt_time])
GO
-CREATE INDEX [att_for] ON [phpbb_login_attempts]([attempt_forwarded_for], [attempt_time]) ON [PRIMARY]
+CREATE INDEX [att_for] ON [phpbb_login_attempts]([attempt_forwarded_for], [attempt_time])
GO
-CREATE INDEX [att_time] ON [phpbb_login_attempts]([attempt_time]) ON [PRIMARY]
+CREATE INDEX [att_time] ON [phpbb_login_attempts]([attempt_time])
GO
-CREATE INDEX [user_id] ON [phpbb_login_attempts]([user_id]) ON [PRIMARY]
+CREATE INDEX [user_id] ON [phpbb_login_attempts]([user_id])
GO
@@ -687,14 +694,21 @@ CREATE TABLE [phpbb_moderator_cache] (
[username] [varchar] (255) DEFAULT ('') NOT NULL ,
[group_id] [int] DEFAULT (0) NOT NULL ,
[group_name] [varchar] (255) DEFAULT ('') NOT NULL ,
- [display_on_index] [int] DEFAULT (1) NOT NULL
-) ON [PRIMARY]
+ [display_on_index] [int] DEFAULT (1) NOT NULL ,
+ [mssqlindex] [int] IDENTITY (1, 1) NOT NULL
+)GO
+
+ALTER TABLE [phpbb_moderator_cache] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_moderator_cache] PRIMARY KEY CLUSTERED
+ (
+ [mssqlindex]
+ )
GO
-CREATE INDEX [disp_idx] ON [phpbb_moderator_cache]([display_on_index]) ON [PRIMARY]
+CREATE INDEX [disp_idx] ON [phpbb_moderator_cache]([display_on_index])
GO
-CREATE INDEX [forum_id] ON [phpbb_moderator_cache]([forum_id]) ON [PRIMARY]
+CREATE INDEX [forum_id] ON [phpbb_moderator_cache]([forum_id])
GO
@@ -713,23 +727,22 @@ CREATE TABLE [phpbb_modules] (
[module_langname] [varchar] (255) DEFAULT ('') NOT NULL ,
[module_mode] [varchar] (255) DEFAULT ('') NOT NULL ,
[module_auth] [varchar] (255) DEFAULT ('') NOT NULL
-) ON [PRIMARY]
-GO
+)GO
ALTER TABLE [phpbb_modules] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_modules] PRIMARY KEY CLUSTERED
(
[module_id]
- ) ON [PRIMARY]
+ )
GO
-CREATE INDEX [left_right_id] ON [phpbb_modules]([left_id], [right_id]) ON [PRIMARY]
+CREATE INDEX [left_right_id] ON [phpbb_modules]([left_id], [right_id])
GO
-CREATE INDEX [module_enabled] ON [phpbb_modules]([module_enabled]) ON [PRIMARY]
+CREATE INDEX [module_enabled] ON [phpbb_modules]([module_enabled])
GO
-CREATE INDEX [class_left_id] ON [phpbb_modules]([module_class], [left_id]) ON [PRIMARY]
+CREATE INDEX [class_left_id] ON [phpbb_modules]([module_class], [left_id])
GO
@@ -740,14 +753,21 @@ CREATE TABLE [phpbb_poll_options] (
[poll_option_id] [int] DEFAULT (0) NOT NULL ,
[topic_id] [int] DEFAULT (0) NOT NULL ,
[poll_option_text] [varchar] (4000) DEFAULT ('') NOT NULL ,
- [poll_option_total] [int] DEFAULT (0) NOT NULL
-) ON [PRIMARY]
+ [poll_option_total] [int] DEFAULT (0) NOT NULL ,
+ [mssqlindex] [int] IDENTITY (1, 1) NOT NULL
+)GO
+
+ALTER TABLE [phpbb_poll_options] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_poll_options] PRIMARY KEY CLUSTERED
+ (
+ [mssqlindex]
+ )
GO
-CREATE INDEX [poll_opt_id] ON [phpbb_poll_options]([poll_option_id]) ON [PRIMARY]
+CREATE INDEX [poll_opt_id] ON [phpbb_poll_options]([poll_option_id])
GO
-CREATE INDEX [topic_id] ON [phpbb_poll_options]([topic_id]) ON [PRIMARY]
+CREATE INDEX [topic_id] ON [phpbb_poll_options]([topic_id])
GO
@@ -758,17 +778,24 @@ CREATE TABLE [phpbb_poll_votes] (
[topic_id] [int] DEFAULT (0) NOT NULL ,
[poll_option_id] [int] DEFAULT (0) NOT NULL ,
[vote_user_id] [int] DEFAULT (0) NOT NULL ,
- [vote_user_ip] [varchar] (40) DEFAULT ('') NOT NULL
-) ON [PRIMARY]
+ [vote_user_ip] [varchar] (40) DEFAULT ('') NOT NULL ,
+ [mssqlindex] [int] IDENTITY (1, 1) NOT NULL
+)GO
+
+ALTER TABLE [phpbb_poll_votes] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_poll_votes] PRIMARY KEY CLUSTERED
+ (
+ [mssqlindex]
+ )
GO
-CREATE INDEX [topic_id] ON [phpbb_poll_votes]([topic_id]) ON [PRIMARY]
+CREATE INDEX [topic_id] ON [phpbb_poll_votes]([topic_id])
GO
-CREATE INDEX [vote_user_id] ON [phpbb_poll_votes]([vote_user_id]) ON [PRIMARY]
+CREATE INDEX [vote_user_id] ON [phpbb_poll_votes]([vote_user_id])
GO
-CREATE INDEX [vote_user_ip] ON [phpbb_poll_votes]([vote_user_ip]) ON [PRIMARY]
+CREATE INDEX [vote_user_ip] ON [phpbb_poll_votes]([vote_user_ip])
GO
@@ -802,35 +829,34 @@ CREATE TABLE [phpbb_posts] (
[post_edit_user] [int] DEFAULT (0) NOT NULL ,
[post_edit_count] [int] DEFAULT (0) NOT NULL ,
[post_edit_locked] [int] DEFAULT (0) NOT NULL
-) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
-GO
+)GO
ALTER TABLE [phpbb_posts] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_posts] PRIMARY KEY CLUSTERED
(
[post_id]
- ) ON [PRIMARY]
+ )
GO
-CREATE INDEX [forum_id] ON [phpbb_posts]([forum_id]) ON [PRIMARY]
+CREATE INDEX [forum_id] ON [phpbb_posts]([forum_id])
GO
-CREATE INDEX [topic_id] ON [phpbb_posts]([topic_id]) ON [PRIMARY]
+CREATE INDEX [topic_id] ON [phpbb_posts]([topic_id])
GO
-CREATE INDEX [poster_ip] ON [phpbb_posts]([poster_ip]) ON [PRIMARY]
+CREATE INDEX [poster_ip] ON [phpbb_posts]([poster_ip])
GO
-CREATE INDEX [poster_id] ON [phpbb_posts]([poster_id]) ON [PRIMARY]
+CREATE INDEX [poster_id] ON [phpbb_posts]([poster_id])
GO
-CREATE INDEX [post_approved] ON [phpbb_posts]([post_approved]) ON [PRIMARY]
+CREATE INDEX [post_approved] ON [phpbb_posts]([post_approved])
GO
-CREATE INDEX [post_username] ON [phpbb_posts]([post_username]) ON [PRIMARY]
+CREATE INDEX [post_username] ON [phpbb_posts]([post_username])
GO
-CREATE INDEX [tid_post_time] ON [phpbb_posts]([topic_id], [post_time]) ON [PRIMARY]
+CREATE INDEX [tid_post_time] ON [phpbb_posts]([topic_id], [post_time])
GO
@@ -860,26 +886,25 @@ CREATE TABLE [phpbb_privmsgs] (
[to_address] [varchar] (4000) DEFAULT ('') NOT NULL ,
[bcc_address] [varchar] (4000) DEFAULT ('') NOT NULL ,
[message_reported] [int] DEFAULT (0) NOT NULL
-) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
-GO
+)GO
ALTER TABLE [phpbb_privmsgs] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_privmsgs] PRIMARY KEY CLUSTERED
(
[msg_id]
- ) ON [PRIMARY]
+ )
GO
-CREATE INDEX [author_ip] ON [phpbb_privmsgs]([author_ip]) ON [PRIMARY]
+CREATE INDEX [author_ip] ON [phpbb_privmsgs]([author_ip])
GO
-CREATE INDEX [message_time] ON [phpbb_privmsgs]([message_time]) ON [PRIMARY]
+CREATE INDEX [message_time] ON [phpbb_privmsgs]([message_time])
GO
-CREATE INDEX [author_id] ON [phpbb_privmsgs]([author_id]) ON [PRIMARY]
+CREATE INDEX [author_id] ON [phpbb_privmsgs]([author_id])
GO
-CREATE INDEX [root_level] ON [phpbb_privmsgs]([root_level]) ON [PRIMARY]
+CREATE INDEX [root_level] ON [phpbb_privmsgs]([root_level])
GO
@@ -891,17 +916,16 @@ CREATE TABLE [phpbb_privmsgs_folder] (
[user_id] [int] DEFAULT (0) NOT NULL ,
[folder_name] [varchar] (255) DEFAULT ('') NOT NULL ,
[pm_count] [int] DEFAULT (0) NOT NULL
-) ON [PRIMARY]
-GO
+)GO
ALTER TABLE [phpbb_privmsgs_folder] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_privmsgs_folder] PRIMARY KEY CLUSTERED
(
[folder_id]
- ) ON [PRIMARY]
+ )
GO
-CREATE INDEX [user_id] ON [phpbb_privmsgs_folder]([user_id]) ON [PRIMARY]
+CREATE INDEX [user_id] ON [phpbb_privmsgs_folder]([user_id])
GO
@@ -918,17 +942,16 @@ CREATE TABLE [phpbb_privmsgs_rules] (
[rule_group_id] [int] DEFAULT (0) NOT NULL ,
[rule_action] [int] DEFAULT (0) NOT NULL ,
[rule_folder_id] [int] DEFAULT (0) NOT NULL
-) ON [PRIMARY]
-GO
+)GO
ALTER TABLE [phpbb_privmsgs_rules] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_privmsgs_rules] PRIMARY KEY CLUSTERED
(
[rule_id]
- ) ON [PRIMARY]
+ )
GO
-CREATE INDEX [user_id] ON [phpbb_privmsgs_rules]([user_id]) ON [PRIMARY]
+CREATE INDEX [user_id] ON [phpbb_privmsgs_rules]([user_id])
GO
@@ -945,17 +968,24 @@ CREATE TABLE [phpbb_privmsgs_to] (
[pm_replied] [int] DEFAULT (0) NOT NULL ,
[pm_marked] [int] DEFAULT (0) NOT NULL ,
[pm_forwarded] [int] DEFAULT (0) NOT NULL ,
- [folder_id] [int] DEFAULT (0) NOT NULL
-) ON [PRIMARY]
+ [folder_id] [int] DEFAULT (0) NOT NULL ,
+ [mssqlindex] [int] IDENTITY (1, 1) NOT NULL
+)GO
+
+ALTER TABLE [phpbb_privmsgs_to] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_privmsgs_to] PRIMARY KEY CLUSTERED
+ (
+ [mssqlindex]
+ )
GO
-CREATE INDEX [msg_id] ON [phpbb_privmsgs_to]([msg_id]) ON [PRIMARY]
+CREATE INDEX [msg_id] ON [phpbb_privmsgs_to]([msg_id])
GO
-CREATE INDEX [author_id] ON [phpbb_privmsgs_to]([author_id]) ON [PRIMARY]
+CREATE INDEX [author_id] ON [phpbb_privmsgs_to]([author_id])
GO
-CREATE INDEX [usr_flder_id] ON [phpbb_privmsgs_to]([user_id], [folder_id]) ON [PRIMARY]
+CREATE INDEX [usr_flder_id] ON [phpbb_privmsgs_to]([user_id], [folder_id])
GO
@@ -982,20 +1012,19 @@ CREATE TABLE [phpbb_profile_fields] (
[field_no_view] [int] DEFAULT (0) NOT NULL ,
[field_active] [int] DEFAULT (0) NOT NULL ,
[field_order] [int] DEFAULT (0) NOT NULL
-) ON [PRIMARY]
-GO
+)GO
ALTER TABLE [phpbb_profile_fields] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_profile_fields] PRIMARY KEY CLUSTERED
(
[field_id]
- ) ON [PRIMARY]
+ )
GO
-CREATE INDEX [fld_type] ON [phpbb_profile_fields]([field_type]) ON [PRIMARY]
+CREATE INDEX [fld_type] ON [phpbb_profile_fields]([field_type])
GO
-CREATE INDEX [fld_ordr] ON [phpbb_profile_fields]([field_order]) ON [PRIMARY]
+CREATE INDEX [fld_ordr] ON [phpbb_profile_fields]([field_order])
GO
@@ -1004,14 +1033,13 @@ GO
*/
CREATE TABLE [phpbb_profile_fields_data] (
[user_id] [int] DEFAULT (0) NOT NULL
-) ON [PRIMARY]
-GO
+)GO
ALTER TABLE [phpbb_profile_fields_data] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_profile_fields_data] PRIMARY KEY CLUSTERED
(
[user_id]
- ) ON [PRIMARY]
+ )
GO
@@ -1024,8 +1052,7 @@ CREATE TABLE [phpbb_profile_fields_lang] (
[option_id] [int] DEFAULT (0) NOT NULL ,
[field_type] [int] DEFAULT (0) NOT NULL ,
[lang_value] [varchar] (255) DEFAULT ('') NOT NULL
-) ON [PRIMARY]
-GO
+)GO
ALTER TABLE [phpbb_profile_fields_lang] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_profile_fields_lang] PRIMARY KEY CLUSTERED
@@ -1033,7 +1060,7 @@ ALTER TABLE [phpbb_profile_fields_lang] WITH NOCHECK ADD
[field_id],
[lang_id],
[option_id]
- ) ON [PRIMARY]
+ )
GO
@@ -1046,15 +1073,14 @@ CREATE TABLE [phpbb_profile_lang] (
[lang_name] [varchar] (255) DEFAULT ('') NOT NULL ,
[lang_explain] [varchar] (4000) DEFAULT ('') NOT NULL ,
[lang_default_value] [varchar] (255) DEFAULT ('') NOT NULL
-) ON [PRIMARY]
-GO
+)GO
ALTER TABLE [phpbb_profile_lang] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_profile_lang] PRIMARY KEY CLUSTERED
(
[field_id],
[lang_id]
- ) ON [PRIMARY]
+ )
GO
@@ -1067,14 +1093,13 @@ CREATE TABLE [phpbb_ranks] (
[rank_min] [int] DEFAULT (0) NOT NULL ,
[rank_special] [int] DEFAULT (0) NOT NULL ,
[rank_image] [varchar] (255) DEFAULT ('') NOT NULL
-) ON [PRIMARY]
-GO
+)GO
ALTER TABLE [phpbb_ranks] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_ranks] PRIMARY KEY CLUSTERED
(
[rank_id]
- ) ON [PRIMARY]
+ )
GO
@@ -1091,20 +1116,19 @@ CREATE TABLE [phpbb_reports] (
[report_closed] [int] DEFAULT (0) NOT NULL ,
[report_time] [int] DEFAULT (0) NOT NULL ,
[report_text] [text] DEFAULT ('') NOT NULL
-) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
-GO
+)GO
ALTER TABLE [phpbb_reports] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_reports] PRIMARY KEY CLUSTERED
(
[report_id]
- ) ON [PRIMARY]
+ )
GO
-CREATE INDEX [post_id] ON [phpbb_reports]([post_id]) ON [PRIMARY]
+CREATE INDEX [post_id] ON [phpbb_reports]([post_id])
GO
-CREATE INDEX [pm_id] ON [phpbb_reports]([pm_id]) ON [PRIMARY]
+CREATE INDEX [pm_id] ON [phpbb_reports]([pm_id])
GO
@@ -1116,14 +1140,13 @@ CREATE TABLE [phpbb_reports_reasons] (
[reason_title] [varchar] (255) DEFAULT ('') NOT NULL ,
[reason_description] [text] DEFAULT ('') NOT NULL ,
[reason_order] [int] DEFAULT (0) NOT NULL
-) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
-GO
+)GO
ALTER TABLE [phpbb_reports_reasons] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_reports_reasons] PRIMARY KEY CLUSTERED
(
[reason_id]
- ) ON [PRIMARY]
+ )
GO
@@ -1135,14 +1158,13 @@ CREATE TABLE [phpbb_search_results] (
[search_time] [int] DEFAULT (0) NOT NULL ,
[search_keywords] [text] DEFAULT ('') NOT NULL ,
[search_authors] [text] DEFAULT ('') NOT NULL
-) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
-GO
+)GO
ALTER TABLE [phpbb_search_results] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_search_results] PRIMARY KEY CLUSTERED
(
[search_key]
- ) ON [PRIMARY]
+ )
GO
@@ -1154,20 +1176,19 @@ CREATE TABLE [phpbb_search_wordlist] (
[word_text] [varchar] (255) DEFAULT ('') NOT NULL ,
[word_common] [int] DEFAULT (0) NOT NULL ,
[word_count] [int] DEFAULT (0) NOT NULL
-) ON [PRIMARY]
-GO
+)GO
ALTER TABLE [phpbb_search_wordlist] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_search_wordlist] PRIMARY KEY CLUSTERED
(
[word_id]
- ) ON [PRIMARY]
+ )
GO
-CREATE UNIQUE INDEX [wrd_txt] ON [phpbb_search_wordlist]([word_text]) ON [PRIMARY]
+CREATE UNIQUE INDEX [wrd_txt] ON [phpbb_search_wordlist]([word_text])
GO
-CREATE INDEX [wrd_cnt] ON [phpbb_search_wordlist]([word_count]) ON [PRIMARY]
+CREATE INDEX [wrd_cnt] ON [phpbb_search_wordlist]([word_count])
GO
@@ -1177,17 +1198,24 @@ GO
CREATE TABLE [phpbb_search_wordmatch] (
[post_id] [int] DEFAULT (0) NOT NULL ,
[word_id] [int] DEFAULT (0) NOT NULL ,
- [title_match] [int] DEFAULT (0) NOT NULL
-) ON [PRIMARY]
+ [title_match] [int] DEFAULT (0) NOT NULL ,
+ [mssqlindex] [int] IDENTITY (1, 1) NOT NULL
+)GO
+
+ALTER TABLE [phpbb_search_wordmatch] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_search_wordmatch] PRIMARY KEY CLUSTERED
+ (
+ [mssqlindex]
+ )
GO
-CREATE UNIQUE INDEX [unq_mtch] ON [phpbb_search_wordmatch]([word_id], [post_id], [title_match]) ON [PRIMARY]
+CREATE UNIQUE INDEX [unq_mtch] ON [phpbb_search_wordmatch]([word_id], [post_id], [title_match])
GO
-CREATE INDEX [word_id] ON [phpbb_search_wordmatch]([word_id]) ON [PRIMARY]
+CREATE INDEX [word_id] ON [phpbb_search_wordmatch]([word_id])
GO
-CREATE INDEX [post_id] ON [phpbb_search_wordmatch]([post_id]) ON [PRIMARY]
+CREATE INDEX [post_id] ON [phpbb_search_wordmatch]([post_id])
GO
@@ -1208,23 +1236,22 @@ CREATE TABLE [phpbb_sessions] (
[session_viewonline] [int] DEFAULT (1) NOT NULL ,
[session_autologin] [int] DEFAULT (0) NOT NULL ,
[session_admin] [int] DEFAULT (0) NOT NULL
-) ON [PRIMARY]
-GO
+)GO
ALTER TABLE [phpbb_sessions] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_sessions] PRIMARY KEY CLUSTERED
(
[session_id]
- ) ON [PRIMARY]
+ )
GO
-CREATE INDEX [session_time] ON [phpbb_sessions]([session_time]) ON [PRIMARY]
+CREATE INDEX [session_time] ON [phpbb_sessions]([session_time])
GO
-CREATE INDEX [session_user_id] ON [phpbb_sessions]([session_user_id]) ON [PRIMARY]
+CREATE INDEX [session_user_id] ON [phpbb_sessions]([session_user_id])
GO
-CREATE INDEX [session_fid] ON [phpbb_sessions]([session_forum_id]) ON [PRIMARY]
+CREATE INDEX [session_fid] ON [phpbb_sessions]([session_forum_id])
GO
@@ -1236,18 +1263,17 @@ CREATE TABLE [phpbb_sessions_keys] (
[user_id] [int] DEFAULT (0) NOT NULL ,
[last_ip] [varchar] (40) DEFAULT ('') NOT NULL ,
[last_login] [int] DEFAULT (0) NOT NULL
-) ON [PRIMARY]
-GO
+)GO
ALTER TABLE [phpbb_sessions_keys] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_sessions_keys] PRIMARY KEY CLUSTERED
(
[key_id],
[user_id]
- ) ON [PRIMARY]
+ )
GO
-CREATE INDEX [last_login] ON [phpbb_sessions_keys]([last_login]) ON [PRIMARY]
+CREATE INDEX [last_login] ON [phpbb_sessions_keys]([last_login])
GO
@@ -1259,14 +1285,13 @@ CREATE TABLE [phpbb_sitelist] (
[site_ip] [varchar] (40) DEFAULT ('') NOT NULL ,
[site_hostname] [varchar] (255) DEFAULT ('') NOT NULL ,
[ip_exclude] [int] DEFAULT (0) NOT NULL
-) ON [PRIMARY]
-GO
+)GO
ALTER TABLE [phpbb_sitelist] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_sitelist] PRIMARY KEY CLUSTERED
(
[site_id]
- ) ON [PRIMARY]
+ )
GO
@@ -1282,17 +1307,16 @@ CREATE TABLE [phpbb_smilies] (
[smiley_height] [int] DEFAULT (0) NOT NULL ,
[smiley_order] [int] DEFAULT (0) NOT NULL ,
[display_on_posting] [int] DEFAULT (1) NOT NULL
-) ON [PRIMARY]
-GO
+)GO
ALTER TABLE [phpbb_smilies] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_smilies] PRIMARY KEY CLUSTERED
(
[smiley_id]
- ) ON [PRIMARY]
+ )
GO
-CREATE INDEX [display_on_post] ON [phpbb_smilies]([display_on_posting]) ON [PRIMARY]
+CREATE INDEX [display_on_post] ON [phpbb_smilies]([display_on_posting])
GO
@@ -1307,26 +1331,25 @@ CREATE TABLE [phpbb_styles] (
[template_id] [int] DEFAULT (0) NOT NULL ,
[theme_id] [int] DEFAULT (0) NOT NULL ,
[imageset_id] [int] DEFAULT (0) NOT NULL
-) ON [PRIMARY]
-GO
+)GO
ALTER TABLE [phpbb_styles] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_styles] PRIMARY KEY CLUSTERED
(
[style_id]
- ) ON [PRIMARY]
+ )
GO
-CREATE UNIQUE INDEX [style_name] ON [phpbb_styles]([style_name]) ON [PRIMARY]
+CREATE UNIQUE INDEX [style_name] ON [phpbb_styles]([style_name])
GO
-CREATE INDEX [template_id] ON [phpbb_styles]([template_id]) ON [PRIMARY]
+CREATE INDEX [template_id] ON [phpbb_styles]([template_id])
GO
-CREATE INDEX [theme_id] ON [phpbb_styles]([theme_id]) ON [PRIMARY]
+CREATE INDEX [theme_id] ON [phpbb_styles]([theme_id])
GO
-CREATE INDEX [imageset_id] ON [phpbb_styles]([imageset_id]) ON [PRIMARY]
+CREATE INDEX [imageset_id] ON [phpbb_styles]([imageset_id])
GO
@@ -1342,17 +1365,16 @@ CREATE TABLE [phpbb_styles_template] (
[template_storedb] [int] DEFAULT (0) NOT NULL ,
[template_inherits_id] [int] DEFAULT (0) NOT NULL ,
[template_inherit_path] [varchar] (255) DEFAULT ('') NOT NULL
-) ON [PRIMARY]
-GO
+)GO
ALTER TABLE [phpbb_styles_template] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_styles_template] PRIMARY KEY CLUSTERED
(
[template_id]
- ) ON [PRIMARY]
+ )
GO
-CREATE UNIQUE INDEX [tmplte_nm] ON [phpbb_styles_template]([template_name]) ON [PRIMARY]
+CREATE UNIQUE INDEX [tmplte_nm] ON [phpbb_styles_template]([template_name])
GO
@@ -1364,14 +1386,21 @@ CREATE TABLE [phpbb_styles_template_data] (
[template_filename] [varchar] (100) DEFAULT ('') NOT NULL ,
[template_included] [varchar] (8000) DEFAULT ('') NOT NULL ,
[template_mtime] [int] DEFAULT (0) NOT NULL ,
- [template_data] [text] DEFAULT ('') NOT NULL
-) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
+ [template_data] [text] DEFAULT ('') NOT NULL ,
+ [mssqlindex] [int] IDENTITY (1, 1) NOT NULL
+)GO
+
+ALTER TABLE [phpbb_styles_template_data] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_styles_template_data] PRIMARY KEY CLUSTERED
+ (
+ [mssqlindex]
+ )
GO
-CREATE INDEX [tid] ON [phpbb_styles_template_data]([template_id]) ON [PRIMARY]
+CREATE INDEX [tid] ON [phpbb_styles_template_data]([template_id])
GO
-CREATE INDEX [tfn] ON [phpbb_styles_template_data]([template_filename]) ON [PRIMARY]
+CREATE INDEX [tfn] ON [phpbb_styles_template_data]([template_filename])
GO
@@ -1386,17 +1415,16 @@ CREATE TABLE [phpbb_styles_theme] (
[theme_storedb] [int] DEFAULT (0) NOT NULL ,
[theme_mtime] [int] DEFAULT (0) NOT NULL ,
[theme_data] [text] DEFAULT ('') NOT NULL
-) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
-GO
+)GO
ALTER TABLE [phpbb_styles_theme] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_styles_theme] PRIMARY KEY CLUSTERED
(
[theme_id]
- ) ON [PRIMARY]
+ )
GO
-CREATE UNIQUE INDEX [theme_name] ON [phpbb_styles_theme]([theme_name]) ON [PRIMARY]
+CREATE UNIQUE INDEX [theme_name] ON [phpbb_styles_theme]([theme_name])
GO
@@ -1408,17 +1436,16 @@ CREATE TABLE [phpbb_styles_imageset] (
[imageset_name] [varchar] (255) DEFAULT ('') NOT NULL ,
[imageset_copyright] [varchar] (255) DEFAULT ('') NOT NULL ,
[imageset_path] [varchar] (100) DEFAULT ('') NOT NULL
-) ON [PRIMARY]
-GO
+)GO
ALTER TABLE [phpbb_styles_imageset] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_styles_imageset] PRIMARY KEY CLUSTERED
(
[imageset_id]
- ) ON [PRIMARY]
+ )
GO
-CREATE UNIQUE INDEX [imgset_nm] ON [phpbb_styles_imageset]([imageset_name]) ON [PRIMARY]
+CREATE UNIQUE INDEX [imgset_nm] ON [phpbb_styles_imageset]([imageset_name])
GO
@@ -1433,17 +1460,16 @@ CREATE TABLE [phpbb_styles_imageset_data] (
[image_height] [int] DEFAULT (0) NOT NULL ,
[image_width] [int] DEFAULT (0) NOT NULL ,
[imageset_id] [int] DEFAULT (0) NOT NULL
-) ON [PRIMARY]
-GO
+)GO
ALTER TABLE [phpbb_styles_imageset_data] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_styles_imageset_data] PRIMARY KEY CLUSTERED
(
[image_id]
- ) ON [PRIMARY]
+ )
GO
-CREATE INDEX [i_d] ON [phpbb_styles_imageset_data]([imageset_id]) ON [PRIMARY]
+CREATE INDEX [i_d] ON [phpbb_styles_imageset_data]([imageset_id])
GO
@@ -1485,32 +1511,31 @@ CREATE TABLE [phpbb_topics] (
[poll_max_options] [int] DEFAULT (1) NOT NULL ,
[poll_last_vote] [int] DEFAULT (0) NOT NULL ,
[poll_vote_change] [int] DEFAULT (0) NOT NULL
-) ON [PRIMARY]
-GO
+)GO
ALTER TABLE [phpbb_topics] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_topics] PRIMARY KEY CLUSTERED
(
[topic_id]
- ) ON [PRIMARY]
+ )
GO
-CREATE INDEX [forum_id] ON [phpbb_topics]([forum_id]) ON [PRIMARY]
+CREATE INDEX [forum_id] ON [phpbb_topics]([forum_id])
GO
-CREATE INDEX [forum_id_type] ON [phpbb_topics]([forum_id], [topic_type]) ON [PRIMARY]
+CREATE INDEX [forum_id_type] ON [phpbb_topics]([forum_id], [topic_type])
GO
-CREATE INDEX [last_post_time] ON [phpbb_topics]([topic_last_post_time]) ON [PRIMARY]
+CREATE INDEX [last_post_time] ON [phpbb_topics]([topic_last_post_time])
GO
-CREATE INDEX [topic_approved] ON [phpbb_topics]([topic_approved]) ON [PRIMARY]
+CREATE INDEX [topic_approved] ON [phpbb_topics]([topic_approved])
GO
-CREATE INDEX [forum_appr_last] ON [phpbb_topics]([forum_id], [topic_approved], [topic_last_post_id]) ON [PRIMARY]
+CREATE INDEX [forum_appr_last] ON [phpbb_topics]([forum_id], [topic_approved], [topic_last_post_id])
GO
-CREATE INDEX [fid_time_moved] ON [phpbb_topics]([forum_id], [topic_last_post_time], [topic_moved_id]) ON [PRIMARY]
+CREATE INDEX [fid_time_moved] ON [phpbb_topics]([forum_id], [topic_last_post_time], [topic_moved_id])
GO
@@ -1522,21 +1547,20 @@ CREATE TABLE [phpbb_topics_track] (
[topic_id] [int] DEFAULT (0) NOT NULL ,
[forum_id] [int] DEFAULT (0) NOT NULL ,
[mark_time] [int] DEFAULT (0) NOT NULL
-) ON [PRIMARY]
-GO
+)GO
ALTER TABLE [phpbb_topics_track] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_topics_track] PRIMARY KEY CLUSTERED
(
[user_id],
[topic_id]
- ) ON [PRIMARY]
+ )
GO
-CREATE INDEX [topic_id] ON [phpbb_topics_track]([topic_id]) ON [PRIMARY]
+CREATE INDEX [topic_id] ON [phpbb_topics_track]([topic_id])
GO
-CREATE INDEX [forum_id] ON [phpbb_topics_track]([forum_id]) ON [PRIMARY]
+CREATE INDEX [forum_id] ON [phpbb_topics_track]([forum_id])
GO
@@ -1547,15 +1571,14 @@ CREATE TABLE [phpbb_topics_posted] (
[user_id] [int] DEFAULT (0) NOT NULL ,
[topic_id] [int] DEFAULT (0) NOT NULL ,
[topic_posted] [int] DEFAULT (0) NOT NULL
-) ON [PRIMARY]
-GO
+)GO
ALTER TABLE [phpbb_topics_posted] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_topics_posted] PRIMARY KEY CLUSTERED
(
[user_id],
[topic_id]
- ) ON [PRIMARY]
+ )
GO
@@ -1565,17 +1588,24 @@ GO
CREATE TABLE [phpbb_topics_watch] (
[topic_id] [int] DEFAULT (0) NOT NULL ,
[user_id] [int] DEFAULT (0) NOT NULL ,
- [notify_status] [int] DEFAULT (0) NOT NULL
-) ON [PRIMARY]
+ [notify_status] [int] DEFAULT (0) NOT NULL ,
+ [mssqlindex] [int] IDENTITY (1, 1) NOT NULL
+)GO
+
+ALTER TABLE [phpbb_topics_watch] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_topics_watch] PRIMARY KEY CLUSTERED
+ (
+ [mssqlindex]
+ )
GO
-CREATE INDEX [topic_id] ON [phpbb_topics_watch]([topic_id]) ON [PRIMARY]
+CREATE INDEX [topic_id] ON [phpbb_topics_watch]([topic_id])
GO
-CREATE INDEX [user_id] ON [phpbb_topics_watch]([user_id]) ON [PRIMARY]
+CREATE INDEX [user_id] ON [phpbb_topics_watch]([user_id])
GO
-CREATE INDEX [notify_stat] ON [phpbb_topics_watch]([notify_status]) ON [PRIMARY]
+CREATE INDEX [notify_stat] ON [phpbb_topics_watch]([notify_status])
GO
@@ -1586,17 +1616,24 @@ CREATE TABLE [phpbb_user_group] (
[group_id] [int] DEFAULT (0) NOT NULL ,
[user_id] [int] DEFAULT (0) NOT NULL ,
[group_leader] [int] DEFAULT (0) NOT NULL ,
- [user_pending] [int] DEFAULT (1) NOT NULL
-) ON [PRIMARY]
+ [user_pending] [int] DEFAULT (1) NOT NULL ,
+ [mssqlindex] [int] IDENTITY (1, 1) NOT NULL
+)GO
+
+ALTER TABLE [phpbb_user_group] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_user_group] PRIMARY KEY CLUSTERED
+ (
+ [mssqlindex]
+ )
GO
-CREATE INDEX [group_id] ON [phpbb_user_group]([group_id]) ON [PRIMARY]
+CREATE INDEX [group_id] ON [phpbb_user_group]([group_id])
GO
-CREATE INDEX [user_id] ON [phpbb_user_group]([user_id]) ON [PRIMARY]
+CREATE INDEX [user_id] ON [phpbb_user_group]([user_id])
GO
-CREATE INDEX [group_leader] ON [phpbb_user_group]([group_leader]) ON [PRIMARY]
+CREATE INDEX [group_leader] ON [phpbb_user_group]([group_leader])
GO
@@ -1680,26 +1717,25 @@ CREATE TABLE [phpbb_users] (
[user_new] [int] DEFAULT (1) NOT NULL ,
[user_reminded] [int] DEFAULT (0) NOT NULL ,
[user_reminded_time] [int] DEFAULT (0) NOT NULL
-) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
-GO
+)GO
ALTER TABLE [phpbb_users] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_users] PRIMARY KEY CLUSTERED
(
[user_id]
- ) ON [PRIMARY]
+ )
GO
-CREATE INDEX [user_birthday] ON [phpbb_users]([user_birthday]) ON [PRIMARY]
+CREATE INDEX [user_birthday] ON [phpbb_users]([user_birthday])
GO
-CREATE INDEX [user_email_hash] ON [phpbb_users]([user_email_hash]) ON [PRIMARY]
+CREATE INDEX [user_email_hash] ON [phpbb_users]([user_email_hash])
GO
-CREATE INDEX [user_type] ON [phpbb_users]([user_type]) ON [PRIMARY]
+CREATE INDEX [user_type] ON [phpbb_users]([user_type])
GO
-CREATE UNIQUE INDEX [username_clean] ON [phpbb_users]([username_clean]) ON [PRIMARY]
+CREATE UNIQUE INDEX [username_clean] ON [phpbb_users]([username_clean])
GO
@@ -1712,14 +1748,13 @@ CREATE TABLE [phpbb_warnings] (
[post_id] [int] DEFAULT (0) NOT NULL ,
[log_id] [int] DEFAULT (0) NOT NULL ,
[warning_time] [int] DEFAULT (0) NOT NULL
-) ON [PRIMARY]
-GO
+)GO
ALTER TABLE [phpbb_warnings] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_warnings] PRIMARY KEY CLUSTERED
(
[warning_id]
- ) ON [PRIMARY]
+ )
GO
@@ -1730,14 +1765,13 @@ CREATE TABLE [phpbb_words] (
[word_id] [int] IDENTITY (1, 1) NOT NULL ,
[word] [varchar] (255) DEFAULT ('') NOT NULL ,
[replacement] [varchar] (255) DEFAULT ('') NOT NULL
-) ON [PRIMARY]
-GO
+)GO
ALTER TABLE [phpbb_words] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_words] PRIMARY KEY CLUSTERED
(
[word_id]
- ) ON [PRIMARY]
+ )
GO
@@ -1749,15 +1783,14 @@ CREATE TABLE [phpbb_zebra] (
[zebra_id] [int] DEFAULT (0) NOT NULL ,
[friend] [int] DEFAULT (0) NOT NULL ,
[foe] [int] DEFAULT (0) NOT NULL
-) ON [PRIMARY]
-GO
+)GO
ALTER TABLE [phpbb_zebra] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_zebra] PRIMARY KEY CLUSTERED
(
[user_id],
[zebra_id]
- ) ON [PRIMARY]
+ )
GO
diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php
index 62c18c109c..0bf48eb841 100644
--- a/phpBB/language/en/common.php
+++ b/phpBB/language/en/common.php
@@ -654,7 +654,7 @@ $lang = array_merge($lang, array(
'TOTAL_USERS_ZERO' => 'Total members <strong>0</strong>',
'TRACKED_PHP_ERROR' => 'Tracked PHP errors: %s',
- 'UNABLE_GET_IMAGE_SIZE' => 'It was not possible to determine the dimensions of the image.',
+ 'UNABLE_GET_IMAGE_SIZE' => 'It was not possible to determine the dimensions of the image. Please verify that the URL you entered is correct.',
'UNABLE_TO_DELIVER_FILE'=> 'Unable to deliver file.',
'UNKNOWN_BROWSER' => 'Unknown browser',
'UNMARK_ALL' => 'Unmark all',
diff --git a/phpBB/styles/prosilver/template/ucp_profile_profile_info.html b/phpBB/styles/prosilver/template/ucp_profile_profile_info.html
index 1bd54619b9..0d3a48c334 100644
--- a/phpBB/styles/prosilver/template/ucp_profile_profile_info.html
+++ b/phpBB/styles/prosilver/template/ucp_profile_profile_info.html
@@ -50,9 +50,9 @@
<dl>
<dt><label for="bday_day">{L_BIRTHDAY}:</label><br /><span>{L_BIRTHDAY_EXPLAIN}</span></dt>
<dd>
- <label for="bday_day">{L_DAY}: <select name="bday_day" id="bday_day" style="width: 4em;">{S_BIRTHDAY_DAY_OPTIONS}</select></label>
- <label for="bday_month">{L_MONTH}: <select name="bday_month" id="bday_month" style="width: 4em;">{S_BIRTHDAY_MONTH_OPTIONS}</select></label>
- <label for="bday_year">{L_YEAR}: <select name="bday_year" id="bday_year" style="width: 6em;">{S_BIRTHDAY_YEAR_OPTIONS}</select></label>
+ <label for="bday_day">{L_DAY}: <select name="bday_day" id="bday_day">{S_BIRTHDAY_DAY_OPTIONS}</select></label>
+ <label for="bday_month">{L_MONTH}: <select name="bday_month" id="bday_month">{S_BIRTHDAY_MONTH_OPTIONS}</select></label>
+ <label for="bday_year">{L_YEAR}: <select name="bday_year" id="bday_year">{S_BIRTHDAY_YEAR_OPTIONS}</select></label>
</dd>
</dl>
<!-- ENDIF -->
diff --git a/tests/functions_content/get_username_string_test.php b/tests/functions_content/get_username_string_test.php
new file mode 100644
index 0000000000..48e8936cc1
--- /dev/null
+++ b/tests/functions_content/get_username_string_test.php
@@ -0,0 +1,125 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions_content.php';
+
+class phpbb_functions_content_get_username_string_test extends phpbb_test_case
+{
+ public function setUp()
+ {
+ parent::setUp();
+
+ global $auth, $user;
+ $auth = $this->getMock('auth');
+ $auth->expects($this->any())
+ ->method('acl_get')
+ ->with($this->stringContains('_'), $this->anything())
+ ->will($this->returnValueMap(array(
+ array('u_viewprofile', true),
+ )));
+ $user->data['user_id'] = ANONYMOUS;
+ $user->lang['GUEST'] = 'Guest';
+ }
+
+ public function get_username_string_profile_data()
+ {
+ global $phpbb_root_path, $phpEx;
+
+ return array(
+ array(ANONYMOUS, 'Anonymous', '', false, false, ''),
+ array(2, 'Administrator', 'FF0000', false, false, "{$phpbb_root_path}memberlist.$phpEx?mode=viewprofile&amp;u=2"),
+ array(42, 'User42', '', false, 'http://www.example.org/user.php?mode=show', 'http://www.example.org/user.php?mode=show&amp;u=42'),
+ );
+ }
+
+ /**
+ * @dataProvider get_username_string_profile_data
+ */
+ public function test_get_username_string_profile($user_id, $username, $user_colour, $guest_username, $custom_profile_url, $expected)
+ {
+ $this->assertEquals($expected, get_username_string('profile', $user_id, $username, $user_colour, $guest_username, $custom_profile_url));
+ }
+
+ public function get_username_string_username_data()
+ {
+ return array(
+ array(ANONYMOUS, '', '', false, false, 'Guest'),
+ array(ANONYMOUS, '', '', 'CustomName', false, 'CustomName'),
+ array(2, 'User2', '', false, false, 'User2'),
+ array(5, 'User5', '', 'Anonymous', false, 'User5'),
+ array(128, 'User128', '', false, false, 'User128'),
+ );
+ }
+
+ /**
+ * @dataProvider get_username_string_username_data
+ */
+ public function test_get_username_string_username($user_id, $username, $user_colour, $guest_username, $custom_profile_url, $expected)
+ {
+ $this->assertEquals($expected, get_username_string('username', $user_id, $username, $user_colour, $guest_username, $custom_profile_url));
+ }
+
+ public function get_username_string_colour_data()
+ {
+ return array(
+ array(0, '', '', false, false, ''),
+ array(0, '', 'F0F0F0', false, false, '#F0F0F0'),
+ array(ANONYMOUS, 'Anonymous', '000000', false, false, '#000000'),
+ array(2, 'Administrator', '', false, false, ''),
+ );
+ }
+
+ /**
+ * @dataProvider get_username_string_colour_data
+ */
+ public function test_get_username_string_colour($user_id, $username, $user_colour, $guest_username, $custom_profile_url, $expected)
+ {
+ $this->assertEquals($expected, get_username_string('colour', $user_id, $username, $user_colour, $guest_username, $custom_profile_url));
+ }
+
+ public function get_username_string_full_data()
+ {
+ global $phpbb_root_path, $phpEx;
+
+ return array(
+ array(0, '', '', false, false, 'Guest'),
+ array(ANONYMOUS, 'Anonymous', '', false, false, 'Anonymous'),
+ array(2, 'Administrator', 'FF0000', false, false, '<a href="' . $phpbb_root_path . 'memberlist.' . $phpEx . '?mode=viewprofile&amp;u=2" style="color: #FF0000;" class="username-coloured">Administrator</a>'),
+ array(5, 'User5', '', false, 'http://www.example.org/user.php?mode=show', '<a href="http://www.example.org/user.php?mode=show&amp;u=5">User5</a>'),
+ array(8, 'Eight', '', false, false, '<a href="' . $phpbb_root_path . 'memberlist.php?mode=viewprofile&amp;u=8">Eight</a>'),
+ );
+ }
+
+ /**
+ * @dataProvider get_username_string_full_data
+ */
+ public function test_get_username_string_full($user_id, $username, $user_colour, $guest_username, $custom_profile_url, $expected)
+ {
+ $this->assertEquals($expected, get_username_string('full', $user_id, $username, $user_colour, $guest_username, $custom_profile_url));
+ }
+
+ public function get_username_string_no_profile_data()
+ {
+ return array(
+ array(ANONYMOUS, 'Anonymous', '', false, false, 'Anonymous'),
+ array(ANONYMOUS, 'Anonymous', '', '', false, 'Guest'),
+ array(2, 'Administrator', 'FF0000', false, false, '<span style="color: #FF0000;" class="username-coloured">Administrator</span>'),
+ array(8, 'Eight', '', false, false, 'Eight'),
+ );
+ }
+
+ /**
+ * @dataProvider get_username_string_no_profile_data
+ */
+ public function test_get_username_string_no_profile($user_id, $username, $user_colour, $guest_username, $custom_profile_url, $expected)
+ {
+ $this->assertEquals($expected, get_username_string('no_profile', $user_id, $username, $user_colour, $guest_username, $custom_profile_url));
+ }
+}
diff --git a/travis/setup-webserver.sh b/travis/setup-webserver.sh
index f1bf69c575..6188d2c232 100755
--- a/travis/setup-webserver.sh
+++ b/travis/setup-webserver.sh
@@ -1,55 +1,79 @@
#!/bin/bash
#
-# @copyright (c) 2013 phpBB Group
+# @copyright (c) 2014 phpBB Group
# @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
#
set -e
set -x
+if [ "$TRAVIS_PHP_VERSION" = 'hhvm' ]
+then
+ # Add PPA providing dependencies for recent HHVM on Ubuntu 12.04.
+ sudo add-apt-repository -y ppa:mapnik/boost
+fi
+
sudo apt-get update
sudo apt-get install -y nginx realpath
sudo service nginx stop
DIR=$(dirname "$0")
+USER=$(whoami)
PHPBB_ROOT_PATH=$(realpath "$DIR/../phpBB")
-
NGINX_CONF="/etc/nginx/sites-enabled/default"
+APP_SOCK=$(realpath "$DIR")/php-app.sock
-PHP_FPM_BIN="$HOME/.phpenv/versions/$TRAVIS_PHP_VERSION/sbin/php-fpm"
-PHP_FPM_CONF="$DIR/php-fpm.conf"
-PHP_FPM_SOCK=$(realpath "$DIR")/php-fpm.sock
+if [ "$TRAVIS_PHP_VERSION" = 'hhvm' ]
+then
+ # Upgrade to a recent stable version of HHVM
+ sudo apt-get -o Dpkg::Options::="--force-confnew" install -y hhvm-nightly
-USER=$(whoami)
+ # MySQLi is broken in HHVM 3.0.0~precise and still does not work for us in
+ # 2014.03.28~saucy, i.e. needs more work. Use MySQL extension for now.
+ sed -i "s/mysqli/mysql/" "$DIR/phpunit-mysql-travis.xml"
-# php-fpm configuration
-echo "
-[global]
+ HHVM_LOG=$(realpath "$DIR")/hhvm.log
-[travis]
-user = $USER
-group = $USER
-listen = $PHP_FPM_SOCK
-pm = static
-pm.max_children = 2
+ sudo hhvm \
+ --mode daemon \
+ --user "$USER" \
+ -vServer.Type=fastcgi \
+ -vServer.FileSocket="$APP_SOCK" \
+ -vLog.File="$HHVM_LOG"
+else
+ # php-fpm
+ PHP_FPM_BIN="$HOME/.phpenv/versions/$TRAVIS_PHP_VERSION/sbin/php-fpm"
+ PHP_FPM_CONF="$DIR/php-fpm.conf"
-php_admin_value[memory_limit] = 128M
-" > $PHP_FPM_CONF
+ echo "
+ [global]
-# nginx configuration
+ [travis]
+ user = $USER
+ group = $USER
+ listen = $APP_SOCK
+ pm = static
+ pm.max_children = 2
+
+ php_admin_value[memory_limit] = 128M
+ " > $PHP_FPM_CONF
+
+ sudo $PHP_FPM_BIN \
+ --fpm-config "$DIR/php-fpm.conf"
+fi
+
+# nginx
echo "
-server {
- listen 80;
- root $PHPBB_ROOT_PATH/;
- index index.php index.html;
-
- location ~ \.php {
- fastcgi_pass unix:$PHP_FPM_SOCK;
- include fastcgi_params;
+ server {
+ listen 80;
+ root $PHPBB_ROOT_PATH/;
+ index index.php index.html;
+
+ location ~ \.php {
+ fastcgi_pass unix:$APP_SOCK;
+ include fastcgi_params;
+ }
}
-}
" | sudo tee $NGINX_CONF > /dev/null
-# Start daemons
-sudo $PHP_FPM_BIN --fpm-config "$DIR/php-fpm.conf"
sudo service nginx start