🛑Unsigned column option for MySQL

Closing following the previous update, another column option is available for these MySQL integer types: 

  • BIGINT
  • INT
  • MEDIUMINT
  • SMALLINT
  • TINYINT

This can be used to specify that a column will only take non-negative numbers, thus increasing the upper numeric range. This is not part of the SQL standard, hence is only available for MySQL.

🔺Auto-increment option for MySQL columns

For MySQL diagrams, you can now specify columns as Auto-Increment. This column option will appear for these MySQL integer types: 

  • BIGINT
  • INT
  • MEDIUMINT
  • SMALLINT
  • TINYINT

AUTO_INCREMENT support for FLOAT or DOUBLE columns has intentionally been left out, since these can cause weird behaviours, and they've been deprecated in the latest MySQL versions.



BINARY datatype for MySQL

The missing BINARY datatype has been added for MySQL diagrams now. 

👩‍💻 Bit of tech background: The default set of datatypes was dependant on what's supported in Laravel migration's blueprint schema. By default, Laravel converts the -'binary()' definition to BLOB in it's MySQL driver, hence the missing BINARY datatype. We've now added custom logic to support additional data types (outside of Laravel defaults), and this is one of the first ones added.


🏗️ Export to Laravel Blueprint

New export format so you can export your diagrams to Laravel Blueprint drafts. Laravel Blueprint is a package by Jason McCreary that helps with quick scaffolding of Laravel apps.

You can find this new option within the export modal:

Hope this would be helpful for some of you!

If you have a specific export type you'd like to see, let us know in the roadmap here. Would love to add them as well if it's popular among users.

🔲 Multi-select mode: Select multiple tables, bulk move or delete

It's a common thing - you've finished mapping out the diagram of your complex app, tables and all. Looks pretty! But now you're looking to just move these group of tables further apart to create some space to indicate the different sections of the app.

Dang it, it's such a pain to have to do one table at a time!

That's the motivation for this new multi-select mode. You can now perform bulk actions like moving a bunch of tables, or mass deleting multiple tables easily.


The multi-selection mode can be activated in two ways:

  1. Click on the 'Multi-selection mode' button in the lower right:
  2. Use the keyboard shortcut M when on the canvas.

✊Pan-only mode: Move around the board easily

Sometimes, you want to easily navigate around your database diagram without accidentally moving any tables or relationships.

The new pan-only mode allows just that:

Pan-mode can be activated in two ways:

  1. Click on the 'Pan-only mode' button in the lower right:
  2. Use the keyboard shortcut Space. Pan-only mode is activated when the key is held down.


Improved Formating for SQL Exports

Small updates to the SQL exporter:

  1. SQL Keywords are now uppercased
  2. Line breaks now occur at more sensible points so that the output is more readable

Before:

create table "participations" (
  "user_id" bigint not null,
  "project_id" bigint not null,
  "start_date" datetime not null,
  "team_id" bigint not null,
  "department" varchar(255) not null,
  "employee_id" bigint not null
);
alter table
  `participations`
add
  primary key `participations_project_id_user_id_primary`(`project_id`, `user_id`);
alter table
  `participations`
add
  unique `participations_team_id_user_id_unique`(`team_id`, `user_id`);
alter table
  `participations`
add
  index `participations_department_employee_id_index`(`department`, `employee_id`)

Now:

CREATE TABLE `participations`(
    `user_id` BIGINT NOT NULL,
    `project_id` BIGINT NOT NULL,
    `start_date` DATETIME NOT NULL,
    `team_id` BIGINT NOT NULL,
    `department` VARCHAR(255) NOT NULL,
    `employee_id` BIGINT NOT NULL
);
ALTER TABLE
    `participations` ADD PRIMARY KEY `participations_project_id_user_id_primary`(`project_id`, `user_id`);
ALTER TABLE
    `participations` ADD UNIQUE `participations_team_id_user_id_unique`(`team_id`, `user_id`);
ALTER TABLE
    `participations` ADD INDEX `participations_department_employee_id_index`(`department`, `employee_id`);

🚚 Export to Laravel Migrations

You can now export your database schema directly as Laravel migration files. Each table will be self-contained within its own migration class, and its file name automatically set to match Laravel's convention. Behind the scenes, this is powered by Jason's awesome Laravel Shift Blueprint package.

Kickstart that next app feature even quicker now. It's even easier now to transition from designing your database models in DrawSQL to your scaffolding your Laravel codebase, without having to recreate those table and columns again.

You'll find this in the revamped export modal:

We're keen to support exports to other frameworks as well, prioritized based on its popularity among DrawSQL users. Have an export format in mind? Suggest or add your vote in the roadmap here: https://drawsql.app/roadmap 


🌂Option to collapse Table Comments

You now have a new option for a more condensed view of your table comments.

Option 1: Collapsed

Some teams prefer to include extensive/longer-form notes for each of their tables. In this case, the collapsed option provides a more compact view in the diagram. The table comment will only show an icon by default which can be expanded on click.

Option 2: Always show

Always show the full table comment, useful if the included notes are usually brief and succinct. This is the default.

You can toggle this preference in file > diagram settings, as shown below:

Show Previous EntriesShow Previous Entries