Welcome Guest, Not a member yet? Register   Sign In
dbforge mssql problem.
#1

[eluser]ghst[/eluser]
Hi. I'm using dbforge for mssql driver.

Trying to add to my "ID" int AUTO_INCREMENT = TRUE, but nothing happens.

MS SQL syntax does not have such thing like auto_increment, in syntax there is IDENTITY.
So if i open mssql_forge.php file and change AUTO_ICREMENT to IDENTITY then my code works and dbforge sets identity to column = TRUE

This is my code from mssql_forge.php file:

Code:
//if (array_key_exists('AUTO_INCREMENT', $attributes) && $attributes['AUTO_INCREMENT'] === TRUE)
//{
// $sql .= ' AUTO_INCREMENT';
//}
  
if (array_key_exists('IDENTITY', $attributes) && $attributes['IDENTITY'] === TRUE)
{
$sql .= ' IDENTITY';
}

Is this a bug ? Or i'm doing something wrong.
#2

[eluser]Unknown[/eluser]
Looks like a bug to me too. Your fix worked. Thanks.




Theme © iAndrew 2016 - Forum software by © MyBB