Skip to content

Commit 4ccfd7a

Browse files
authored
Merge pull request #28770 from staudenmeir/28750
[5.8] Simplify #28750
2 parents 42657be + 0058571 commit 4ccfd7a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Illuminate/Database/Schema/Grammars/SqlServerGrammar.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -320,9 +320,8 @@ public function compileDisableForeignKeyConstraints()
320320
public function compileDropAllForeignKeys()
321321
{
322322
return "DECLARE @sql NVARCHAR(MAX) = N'';
323-
SELECT @sql += 'ALTER TABLE ' + QUOTENAME(OBJECT_SCHEMA_NAME(parent_object_id))
324-
+ '.' + QUOTENAME(OBJECT_NAME(parent_object_id)) +
325-
' DROP CONSTRAINT ' + QUOTENAME(name) + ';'
323+
SELECT @sql += 'ALTER TABLE ' + QUOTENAME(OBJECT_NAME(parent_object_id))
324+
+ ' DROP CONSTRAINT ' + QUOTENAME(name) + ';'
326325
FROM sys.foreign_keys;
327326
328327
EXEC sp_executesql @sql;";

0 commit comments

Comments
 (0)