Document Schema
functionalGenerate Markdown documentation of the database's schema, ready for a repo or wiki.
Generate Markdown documentation of the database's schema in one step: choose the action, pick where to save, done. There is deliberately nothing to configure, the document is built from the schema model SQLly already loaded for IntelliSense, so it needs no extra server round-trip and reflects exactly what the app knows.
The output is a data dictionary headed with the connection and database, sectioned into Tables, Views, Procedures, Functions, and Other Objects. Each table gets a column grid, name, type, nullability, default, and key annotations (primary key, identity, FK → target) - plus its foreign keys as a list; routines get their parameter signatures and return types. Very large schemas split automatically into an index file plus one file per schema, so the result stays navigable in a repository or wiki.


Writing a data dictionary
- Connect, and give the schema model a moment to load (it is the same model that powers completions). If it has not loaded yet, SQLly says so in the status bar and does nothing.
- Right-click the database in the explorer and choose Schema › Document Schema (Markdown)..., or run Document Schema (Markdown)... from the command palette. Opening it from the explorer makes that database the active one first.
- A save dialog opens with
schema-docs.mdsuggested. Pick a folder and name. - The status bar confirms where it was saved, and how many files were written when the schema was split.
What the Markdown looks like
Objects are sorted by section and then by name. A small schema produces something like this:
# Data Dictionary — Shop / sales Generated by SQLLY from the loaded schema model. 2 objects. ## Tables ### dbo.Orders | Column | Type | Nullable | Default | Key | |---|---|---|---|---| | OrderId | int | no | | PK, identity | | CustomerId | int | no | | FK → dbo.Customers | | Total | decimal | yes | | | - Foreign key (CustomerId) → dbo.Customers (CustomerId) ## Procedures ### dbo.PlaceOrder | Parameter | Type | Mode | Default | |---|---|---|---| | @CustomerId | int | in | |
- Tables - one row per column. Nullable is
yes,no, or?when the model does not know. The Key cell combinesPK,FK → target, andidentity. - Views - a Column / Type grid, or Columns not recorded in the schema model when the model only knows the view's name.
- Procedures and functions - a Parameter / Type / Mode / Default grid
(mode is
in,out, orin/out), No parameters. when there are none, and a Returns: line for functions. - Other Objects - synonyms show their target; anything else is listed by name with No structural details recorded.
Pipe characters in values are escaped and line breaks flattened, so defaults and types never break the table layout.
Large schemas
Up to 2,000 objects go into the single file you named. Past that, SQLly writes that file as an
index listing every schema with its object count and a link, plus one file
per schema next to it, named after your file: schema-docs.sales.md,
schema-docs.audit.md, and so on. Schema names are made filename-safe, and two
schemas that would collide get a numeric suffix rather than overwriting each other. Nothing
is truncated.
Things to know
- It works on every engine SQLly connects to, because it reads SQLly's own model rather than an engine-specific catalog.
- The document is only as complete as the loaded model. If the model never recorded a view's columns, the document says so rather than guessing.
- Saving writes the file directly; existing files with the same names are replaced.
- Saving to a file is not available in the browser preview; use the desktop app.