Skip to main content
Products -> ERDPricingDocsBlogSign in한국어Start with ERD

Copy & Paste

Copy and paste tables to quickly duplicate parts of your schema. Ainecto copies full table definitions — columns, types, indexes — and even preserves foreign key relationships between the copied tables.


Copying tables

Select one or more tables on the canvas, then copy them using either method:

  • Keyboard: Ctrl+C (Windows/Linux) or Cmd+C (Mac)
  • Context menu: right-click the selection and choose Copy

The selected tables (with all their columns, types, constraints, and indexes) are written to the clipboard.


Pasting tables

Paste the copied tables into the same diagram or a different one:

  • Keyboard: Ctrl+V (Windows/Linux) or Cmd+V (Mac)
  • Context menu: right-click on empty canvas space and choose Paste

What happens on paste

Name auto-rename

Pasted tables are automatically renamed to avoid conflicts with existing tables:

OriginalFirst pasteSecond paste
usersusers_copyusers_copy2
ordersorders_copyorders_copy2

The _copy suffix ensures every table has a unique name within the diagram.

New UUIDs

Each pasted table receives a new UUID, so the copy is fully independent from the original. Editing the copy does not affect the source table.

Position offset

Pasted tables are placed near the current viewport center, offset slightly so they don't overlap the originals. This makes it easy to see what was just pasted.


Foreign key preservation

When you copy multiple tables that have foreign key relationships between them, those relationships are included in the paste.

For example, if you select both users and orders (where orders.user_id references users.id), pasting creates:

  • users_copy and orders_copy
  • A new ref from orders_copy.user_id to users_copy.id

Foreign keys that reference tables outside the selection are not copied — only refs where both the source and target table are part of the selection.


Auto-save after paste

Pasted tables are automatically saved to the server using the batch API. You don't need to press Ctrl+S after pasting — the new tables and any copied refs are persisted immediately.


Auto-selection

After pasting, the newly created tables are automatically selected on the canvas. This lets you immediately move them to the desired position without an extra click.


Cross-tab paste

Ainecto uses the OS clipboard (navigator.clipboard API) when available. This means you can:

  1. Copy tables in one browser tab
  2. Switch to a different diagram in another tab
  3. Paste — the tables appear in the second diagram

This is useful when you want to reuse a set of tables across multiple diagrams without rebuilding them from scratch.


Tips

  • Copy + paste is fully undoable — press Ctrl+Z to remove all pasted tables in one step
  • Combine with Table Groups to copy a logical section of your schema and reorganize it elsewhere
  • For large schemas, use copy/paste to create template tables with standard columns (e.g. id, created_at, updated_at) and customize from there