Move and arrange

Reorder columns, move tables where you want them, choose how the layout arranges them, and put everything back where it places them.

The app places every table for you. You can reorder a table's columns, and move tables, enums, notes and groups where you want them.

Move columns

Columns keep the order you give them. To move the selected column, do one of these:

  • Hold ⌥ (Alt on Windows and Linux) and press ↑ or ↓.
  • Choose Move up or Move down in More (⋯) on the selection bar.
  • Drag the row up or down within its table.

Move tables

Drag a table by its header, or an enum or a note by its card, or a group by its frame. Let go where you want it.

While you drag, the lines that touch it follow. A group's frame grows to hold its tables. Near the edge of the canvas, the view pans so you can keep going.

It lands on the grid, unless you've turned off Snap to grid in the canvas menu. To move several tables at once, select them and drag one of them.

What stays where you put it

A table you've moved stays where you put it when you edit the diagram, in the code or with the assistant. Tables you haven't moved are still placed by the layout.

Schema code doesn't write where tables are. So a file you export, or a schema you import, carries no positions.

Choose an arrangement

The layout can arrange tables four ways. Right-click empty canvas and choose Arrange:

  • Left to right (the default) follows the foreign keys: a table sits to the right of the tables it references. Best for schemas with long chains of keys.
  • Stages gives each group its own column, ordered the way keys point between groups, with its tables stacked inside. Tables in no group share columns of their own. Best when groups are steps, such as raw, staging and marts. It needs at least one group.
  • Hub puts the most connected table in the middle, with the tables it joins in the columns either side and the next ones further out. Best for warehouse schemas, where a fact table joins many dimensions.
  • Packed packs tables into a tight block, with tables that join each other kept together. Best for schemas with few relationships.

A group's tables stay together in its frame in every arrangement.

Choosing an arrangement lays out every table again, so tables you moved go back in place. It's one undo step. New tables, and Tidy up, follow the arrangement the diagram has.

The arrangement is saved with the diagram, like the spacing, but it isn't written in schema code. The assistant can set it too: ask it to "put the fact table in the middle" or "give each group its own column".

Tidy up and set spacing

Right-click empty canvas to open the canvas menu:

  • Tidy up puts everything back where the layout places it.
  • Set spacing sets how far apart the layout places tables: Compact, Standard (the default), Roomy or Spacious.

To put back one table, enum or note, choose Back to its place in its right-click menu.

Spacing is saved with the diagram, like positions, but it isn't written in schema code. Both work the same in every kind. See Layout and spacing.

On this page