Commit 1673be8
When dropping a table/schema referenced by foreign key constraints,
MySQL returns error 3730. This was passing through as a raw pymysql
OperationalError, making it difficult for users to catch and handle.
Now translates to datajoint.errors.IntegrityError, consistent with
other foreign key constraint errors (1217, 1451, 1452).
Before:
pymysql.err.OperationalError: (3730, "Cannot drop table...")
After:
datajoint.errors.IntegrityError: Cannot drop table '#table'
referenced by a foreign key constraint...
Fixes #1032
Co-authored-by: Claude Opus 4.5 <[email protected]>
1 parent d38a670 commit 1673be8
1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
70 | 74 | | |
71 | 75 | | |
72 | 76 | | |
| |||
0 commit comments