Skip to content

Commit de9baa3

Browse files
author
Jim Hamill
committed
Drop table fix for MySQL
1 parent 148b2e4 commit de9baa3

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

Extension/MySQLExtension.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ int MySQLExtension::createTable(QString table)
188188
int MySQLExtension::removeTable(QString table)
189189
{
190190
// Run the drop query
191-
QSqlQuery query = m_database->exec("DROP TABLE " + table);
191+
QSqlQuery query = m_database->exec("SET foreign_key_checks = 0; DROP TABLE " + table + "; SET foreign_key_checks = 1;");
192192

193193
return true;
194194
}

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
- Export selected
99

1010
## Bugs
11-
- Remove Table doesn't work if table has constraints (MySQL)
1211
- SQL Splitter (Not sure if class works 100%)
1312

1413
## SQLite Database Schema

0 commit comments

Comments
 (0)