Skip to content

🐛 fix(table-designer): fix table sorting and column options (#705)#709

Merged
Syngnat merged 1 commit into
Syngnat:devfrom
virgosgod-maker:fix/705-table-sort-and-mysql-columns
Jul 24, 2026
Merged

🐛 fix(table-designer): fix table sorting and column options (#705)#709
Syngnat merged 1 commit into
Syngnat:devfrom
virgosgod-maker:fix/705-table-sort-and-mysql-columns

Conversation

@virgosgod-maker

Copy link
Copy Markdown
Contributor

Summary

  • sort table names in natural numeric order in both the table overview and sidebar
  • preserve MySQL column default values, including explicit empty-string defaults and supported expressions
  • add per-column default, character set, collation, and comment editing
  • generate complete MySQL column definitions while filtering DEFAULT_GENERATED
  • keep column-level character set behavior scoped to MySQL

Testing

  • npm --prefix frontend test -- src/components/TableDesignerSqlPreview.test.tsx src/utils/tableOverviewFilter.test.ts src/utils/columnDefinition.test.ts src/components/tableDesignerSchemaSql.test.ts (58 passed)
  • sidebar natural-sort focused test (passed)
  • npm --prefix frontend run build (passed; existing chunk-size warning only)
  • go test ./internal/db ./internal/connection (passed)
  • i18n JSON validation, Go formatting check, and git show --check (passed)

Validation notes

  • The full sidebar test file still has 5 unrelated source/CSS sentinel failures. The same 5 failures reproduce against the pre-sidebar-change baseline.
  • Repository-wide frontend and Go suites contain existing environment/baseline failures unrelated to this change.
  • Docker was unavailable, so a disposable MySQL round-trip test could not be run.
  • The development page was reachable, but Playwright is not installed in the repository, so automated UI interaction screenshots were not produced.

Known limitation

MySQL SHOW FULL COLUMNS cannot reliably distinguish no DEFAULT clause from an explicit DEFAULT NULL. This change preserves non-null defaults and explicit empty-string defaults without introducing a full SHOW CREATE TABLE parser.

Closes #705

@Syngnat
Syngnat merged commit 55b24b2 into Syngnat:dev Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Enhancement] 表排序和字段

2 participants