Primary key not created in MySQL export

I tried creating a primary key like:

Table teams {
id int PK
name varchar
created_at datetime
updated_at datetime
}

But when I export to MySQL the PK is ignored:

CREATE TABLE teams
(
id int,
name varchar(255),
created_at datetime,
updated_at datetime
);

So I have to add it manually in the SQL file, and of course none of my foreign keys in the database will work until I do this.

Am I doing something wrong or is this a bug?

Hi, thank you for using dbdiagram! Yes this does look like a bug on our side. Let us work on a fix for this!

Thanks, please let me know! Loving the interface so far other than this glitch.

Thanks for your :heart:. This has been fixed, hope you’ll continue enjoy it! :v: