Skip to content

feat(schema): events, system databases, and dragging objects into the editor (#291) - #643

Merged
EVWorth merged 1 commit into
mainfrom
feat/schema-events-and-drag
Sep 11, 2026
Merged

EVWorth merged 1 commit into
mainfrom
feat/schema-events-and-drag

Conversation

@EVWorth

@EVWorth EVWorth commented Sep 11, 2026

Copy link
Copy Markdown
Owner

Follows #640.

FR-4.1.1 lists Events alongside the other object types; FR-4.1.4 asks for drag-to-editor; FR-4.1.6 for a system-database toggle. None existed.

Events

There was no query at all. information_schema.EVENTS reports the same columns on MySQL 8 and MariaDB 11, so one query serves both — verified against each.

The folder shows the schedule for an enabled event and "off" for a disabled one, because "it's off" is the usual answer to why an event didn't run, and a schedule shown beside a disabled event would be misleading. The menu offers enable and disable, which is a statement nobody remembers the syntax of.

A one-shot event reports no interval rather than an invented one: it has a time, not a period.

System databases

They were excluded in the SCHEMATA query, which made mysql and information_schema unreachable at any price — wrong for a tool whose users are the people who administer the server.

The server now reports which schemas are its own and the tree decides, so the toggle is instant rather than a second round trip. Off by default, and the toggle only appears on a server that has some — so SQLite doesn't grow a control for something it has none of.

Drag to the editor

Carries a qualified `db`.`object` as text/plain, which is what Monaco's own drop handling reads — so the editor needed no change to accept it. Offered on every object type, where double-click only ever worked for tables and views, and only ever at the cursor.

Groundwork for #292

get_partitions is added here, along with a live-server test for the existing get_foreign_keys.

One correction to #292 while I'm here: it says ForeignKeyInfo is "declared but never queried". It is queried — get_foreign_keys exists, is exposed as a command, and the table designer uses it. What's missing is the details panel that shows it, which is the rest of that issue.

Verification

2548 unit + 341 browser tests, plus 5 new live-server Rust tests covering events (recurring, one-shot, none), a composite foreign key in key order, partitions in declared order, and an unpartitioned table reporting none rather than a partition called "null".

Closes #291

🤖 Generated with Claude Code

… editor

FR-4.1.1 lists Events alongside the other object types; FR-4.1.4 asks for
drag-to-editor; FR-4.1.6 for a system-database toggle. None existed (#291).

Events had no query at all. `information_schema.EVENTS` reports the same
columns on MySQL 8 and MariaDB 11, so one query serves both — verified against
each. The folder shows the schedule for an enabled event and "off" for a
disabled one, because "it is off" is the usual answer to why an event did not
run, and a schedule shown beside a disabled event would be misleading. The
menu offers enable and disable, which is a statement nobody remembers the
syntax of.

A one-shot event reports no interval rather than an invented one: it has a
time, not a period.

System databases were excluded in the `SCHEMATA` query, which made `mysql` and
`information_schema` unreachable at any price — wrong for a tool whose users
are the people who administer the server. The server now reports which schemas
are its own and the tree decides, so the toggle is instant rather than a
second round trip. Off by default, and the toggle only appears on a server
that has some, so SQLite does not grow a control for something it has none of.

Dragging carries a qualified `` `db`.`object` `` as `text/plain`, which is what
Monaco's own drop handling reads — so the editor needed no change to accept
it. Offered on every object type, where double-click only ever worked for
tables and views and only ever at the cursor.

Also added, for #292's details panel: `get_partitions`, and a live-server test
for the existing `get_foreign_keys`. The issue says `ForeignKeyInfo` is
"declared but never queried" — it was queried, and wired to the designer; what
was missing is the panel that shows it.

Co-Authored-By: Claude Opus 5 <[email protected]>
@EVWorth
EVWorth merged commit 097ee76 into main Sep 11, 2026
12 checks passed
@EVWorth
EVWorth deleted the feat/schema-events-and-drag branch September 11, 2026 22:38
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.

[P1][bug] Events folder/drag-to-editor/system-DB toggle/columns-as-nodes are missing (FR-4.1.1, FR-4.1.4, FR-4.1.6)

1 participant