mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
[ticket/9725] Create MSSQL primary keys if none exist
PHPBB3-9725
This commit is contained in:
parent
68ae8dfa97
commit
83be990701
1 changed files with 9 additions and 0 deletions
|
@ -523,6 +523,15 @@ class phpbb_db_tools
|
||||||
// this means that we can add the one we really wanted instead
|
// this means that we can add the one we really wanted instead
|
||||||
if (!$primary_key_gen)
|
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
|
// Write primary key
|
||||||
if (isset($table_data['PRIMARY_KEY']))
|
if (isset($table_data['PRIMARY_KEY']))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue