Skip to content

Commit

Permalink
MS SQL: Create primary key for Auto Increment column
Browse files Browse the repository at this point in the history
  • Loading branch information
vrana committed Nov 29, 2010
1 parent d7079f1 commit a4982c9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion adminer/drivers/mssql.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ function rename_database($name, $collation) {
}

function auto_increment() {
return " IDENTITY" . ($_POST["Auto_increment"] != "" ? "(" . (+$_POST["Auto_increment"]) . ",1)" : "");
return " IDENTITY" . ($_POST["Auto_increment"] != "" ? "(" . (+$_POST["Auto_increment"]) . ",1)" : "") . " PRIMARY KEY";
}

function alter_table($table, $name, $fields, $foreign, $comment, $engine, $collation, $auto_increment, $partitioning) {
Expand Down
1 change: 1 addition & 0 deletions todo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Column rights - http:https://www.postgresql.org/docs/8.4/static/functions-info.html
bool in Editor

MS SQL:
Display default value
Non UTF-8 character sets
Detection of table collation
PDO_MSSQL and PDO_SQLSRV driver with seek
Expand Down

0 comments on commit a4982c9

Please sign in to comment.