You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Disable Apply when the designer fails to load: it sends CREATE TABLE orders () #796
Open ?mock=connected. In devtools, wrap window.__TAURI_INTERNALS__.invoke so that get_foreign_keys rejects with an error string (for example a permissions error on information_schema).
Right-click shop > Tables > orders and pick Design Table.
The header shows "Failed to load table structure: …" in red. The error text squeezes the header, so "Preview SQL" and "Apply Changes" wrap. Below it is a blank form with one unnamed INT column, and Apply Changes is still enabled.
Apply Changes sends that statement and reports "Table saved successfully!" (the mock accepts it; a real server rejects it).
Cause
src/components/designer/TableDesigner.tsx:196 loads columns, indexes, foreign keys and DDL with Promise.all, so one failed read empties the whole form.
originalConfig then stays null, and generateSql (:291-294) falls back to generateCreateTable even though the tab is in alter mode.
runSave (:326) clears the load error before it runs.
Fix
Use Promise.allSettled and keep what did load, as TableStructure.tsx:72 does.
If columns or DDL fail, show a full-panel error with Retry and disable Apply and Preview.
Never generate CREATE TABLE while tableName is set.
Activity
fix(designer): block Apply when the table fails to load
release: 1.4.0 (#871)