— CONFLUENCE APP

Drawtabase for Confluence

Design database schemas on Confluence pages. Tables and foreign keys sit on a canvas, the CREATE TABLE statements sit beside them, and the two stay in sync.

LAST UPDATED

The short version

  • Type /Drawtabase on a page you are editing to add a schema.
  • Draw tables and foreign keys, or write SQL: each side follows the other.
  • Save to page stores the schema inside the page. Readers see it as a picture.
  • Nothing leaves Confluence: no server, no account, no tracking.
The Drawtabase editor in Confluence: a palette of table templates, four tables joined by foreign keys on a canvas, and the CREATE TABLE statements in the code panel.
The Drawtabase editor, open on a Confluence page.

Install

Drawtabase is a Confluence Cloud app. A site admin installs it from the Atlassian Marketplace: find Drawtabase there, or in Confluence’s own list of apps, and choose to get the app. It does not work on Confluence Data Center.

It asks for no access to your Confluence content. It cannot read or change anything except the schemas you add with it.

Add a schema

  1. Open a page and choose Edit.
  2. Type /Drawtabase and choose Drawtabase from the list, or insert it from the editor’s insert menu.
  3. The editor opens full-size, with a small example schema to start from.
  4. Edit the schema (see Working in the editor).
  5. Choose Save to page. The editor closes and the schema appears in the page.
  6. Publish or update the page.

Edit it later

Edit the page, select the schema, and open it from its toolbar. The editor opens full-size on the schema as it was saved.

  • Save to page saves and closes the editor.
  • Ctrl+S (Cmd+S on a Mac) saves and keeps the editor open.
  • Cancel closes without saving. If you changed something since the last save, it asks first.

Remember to update the page afterwards, as with any other change to it.

Working in the editor

The schema is on one side and its SQL on the other. Change either one and the other follows.

  • Drag a table template from the palette onto the canvas, or click it. Then add and rename columns, set their types, and mark primary keys, NOT NULL, UNIQUE and default values.
  • Draw a foreign key by dragging from a column’s edge handle to the column it references. The line binds to those two columns.
  • Place tables where you like, or arrange them with the layout buttons: left to right (LR), top down (TD) or automatic (Auto).
  • Or edit the SQL in the code panel. The diagram follows a moment after you stop typing. If the SQL has an error, the diagram stays as it was and a message says what is wrong.
  • To bring in an existing schema, paste its DDL into the code panel. Drawtabase reads CREATE TABLE statements with their column and table constraints, foreign keys with ON DELETE and ON UPDATE, and ALTER TABLE … ADD FOREIGN KEY.

Undo and redo, search, and the Download menu work as in the web editor. The editor follows Confluence’s light or dark theme.

What readers see

Readers see the schema as a picture, with the tables where you placed them. Under it, Download .sql saves the SQL and SVG saves the picture.

The picture follows Confluence’s light or dark theme.

Where it is stored

The schema is stored inside the page, as part of the Drawtabase element you added. So it behaves like the rest of the page:

  • Page history keeps every saved version. Restoring an older version of the page restores the schema too.
  • Page restrictions decide who can see and edit it.
  • Copying the page copies the schema. The copy is independent of the original.

Drawtabase has no server. It sends nothing anywhere, uses no cookies and no analytics, and needs no account. The privacy policy and the terms of service cover the Confluence apps.

Compared with the web editor

The Confluence editor is the same editor as Drawtabase on the web, with the parts that belong to a browser tab taken out:

  • No list of documents and no opening files: each Drawtabase element on a page holds one schema.
  • No version history of its own: page history is the history.
  • No saving to your disk and no share links. Use the page, or the download buttons.
  • No theme switch: it follows Confluence.

Known limits

  • If two people edit the same schema at the same time, the last one to save wins.
  • Statements other than CREATE TABLE and ALTER TABLE … ADD FOREIGN KEY, and constraints Drawtabase does not know, are reported with a warning and dropped the next time you edit the diagram. Code with no CREATE TABLE at all is refused.
  • Downloaded files are named Untitled.sql.
  • Exporting the page to Word does not include the schema. Download the SVG to use it elsewhere.

Help

Email contact@drawdiags.com. Name the app, your site address (yoursite.atlassian.net) and what you see. Don’t send page content you are not allowed to share. The contact page has more on what to include.

Guides for the other Confluence apps: Drawpenapi, Drawmaid, Drawlize, Drawuml.