aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorPatrick Webster <noxwizard@phpbb.com>2014-03-01 23:11:19 -0600
committerPatrick Webster <noxwizard@phpbb.com>2014-03-28 17:04:56 -0500
commit83be9907013b9463f737f9761d85e3e6b907ad16 (patch)
tree6f46d3526a1328df453516121446eeadbb8536af /phpBB
parent68ae8dfa97f81cd7febff92b38a5f6296d50c43f (diff)
downloadforums-83be9907013b9463f737f9761d85e3e6b907ad16.tar
forums-83be9907013b9463f737f9761d85e3e6b907ad16.tar.gz
forums-83be9907013b9463f737f9761d85e3e6b907ad16.tar.bz2
forums-83be9907013b9463f737f9761d85e3e6b907ad16.tar.xz
forums-83be9907013b9463f737f9761d85e3e6b907ad16.zip
[ticket/9725] Create MSSQL primary keys if none exist
PHPBB3-9725
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/db/db_tools.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/phpBB/includes/db/db_tools.php b/phpBB/includes/db/db_tools.php
index 0518b7eb29..3a7ea2f945 100644
--- a/phpBB/includes/db/db_tools.php
+++ b/phpBB/includes/db/db_tools.php
@@ -523,6 +523,15 @@ class phpbb_db_tools
// this means that we can add the one we really wanted instead
if (!$primary_key_gen)
{
+ 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';
+ }
+ }
+
// Write primary key
if (isset($table_data['PRIMARY_KEY']))
{