1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-17 20:01:25 +02:00

MS SQL: Foreign key in create table

This commit is contained in:
Jakub Vrana
2010-11-28 16:28:15 +01:00
parent ca27ffc2c4
commit 4a2fe5eac1
3 changed files with 5 additions and 1 deletions

View File

@@ -425,6 +425,9 @@ WHERE OBJECT_NAME(i.object_id) = " . q($table)
if ($table != $name) {
queries("EXEC sp_rename " . q(table($table)) . ", " . q($name));
}
if ($foreign) {
$alter[""] = $foreign;
}
foreach ($alter as $key => $val) {
if (!queries("ALTER TABLE " . idf_escape($name) . " $key" . implode(",", $val))) {
return false;