🛑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.

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.


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`);

🌂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:

🍯Sidebar UX improvements

Rearranged a few things in the sidebar to make it easier when creating tables & columns: 

  • Overhauled the table name edit component
  • Removed the drag handler for reordering the tables and columns. Instead, you can now just reorder by dragging anywhere within.
  • Hid secondary actions are in a Dropdown - this newfound 'space' for additional action buttons also paves way for the next upcoming features 👁️‍🗨️
  • Added a new dropdown within the top bar, especially useful for performing the common actions like adding a column or index without having to scroll to the bottom

⏫Lots of little improvements to import script for PostgreSQL

Looked through the logs top issues faced by users when importing, and made lost of improvements to the import script. 

All DBMS

  • Handle Aliases like int2, int4, int8, numeric etc.
  • Parse CREATE INDEX and CREATE UNIQUE INDEX statements
  • More instructive error logs for when the import fails

PostgreSQL

  • Added missing enum data type
  • Parse character varying data type (previously only understood varchar)
  • Differentiate timestamp and time with/without TIME ZONE
Show Previous EntriesShow Previous Entries