Commit 30698f8
authored
Quote constraint name in MySQL DROP FOREIGN KEY statement (#1088)
The MySQL adapter built `DROP FOREIGN KEY <name>` without quoting the
constraint identifier. That produces invalid SQL whenever the constraint
name is not a bare identifier, e.g. names containing whitespace, or the
numeric names ("1", "2", ...) that MariaDB 12 auto-assigns to foreign
keys created without an explicit name.
Quote the identifier via quoteColumnName(), matching the Postgres and
SQL Server adapters, which already quote the dropped constraint name.1 parent 78a1e6b commit 30698f8
2 files changed
Lines changed: 27 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1061 | 1061 | | |
1062 | 1062 | | |
1063 | 1063 | | |
1064 | | - | |
| 1064 | + | |
1065 | 1065 | | |
1066 | 1066 | | |
1067 | 1067 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1848 | 1848 | | |
1849 | 1849 | | |
1850 | 1850 | | |
| 1851 | + | |
| 1852 | + | |
| 1853 | + | |
| 1854 | + | |
| 1855 | + | |
| 1856 | + | |
| 1857 | + | |
| 1858 | + | |
| 1859 | + | |
| 1860 | + | |
| 1861 | + | |
| 1862 | + | |
| 1863 | + | |
| 1864 | + | |
| 1865 | + | |
| 1866 | + | |
| 1867 | + | |
| 1868 | + | |
| 1869 | + | |
| 1870 | + | |
| 1871 | + | |
| 1872 | + | |
| 1873 | + | |
| 1874 | + | |
| 1875 | + | |
| 1876 | + | |
1851 | 1877 | | |
1852 | 1878 | | |
1853 | 1879 | | |
| |||
0 commit comments