🎉 Support auto-increment
We heard you! dbdiagram.io now supports auto-increment!
Our DBML sample code:
Table users {
id integer [pk, increment]
name varchar [not null]
}
When in PostgreSQL:
CREATE TABLE "users" (
"id" SERIAL PRIMARY KEY,
"name" varchar NOT NULL
)
When in MySQL:
CREATE TABLE `users`
(
`id` integer PRIMARY KEY AUTO_INCREMENT,
`name` varchar(255) NOT NULL
)
Also, do check out our new community forum on https://community.dbdiagram.io/!