Hi, I’ve just found dbdiagram, and so far I’m loving it. Nice work!
Would it be possible to include the comments when exporting a diagram to SQL? It could work like this:
// this is just a comment
table foo { // this is a table comment
id int [pk] // and this is a column comment
}
The exported SQL would be something like this for PostgreSQL:
-- this is just a comment
create table foo (id int primary key);
comment on table foo is 'this is a table comment';
comment on column foo.id is 'this is a column comment';
And like this for MySQL:
-- this is just a comment
create table foo (
id int primary key comment="this is a column comment"
) comment="this is a table comment";
Or if you want to keep it simple, just export everything as -- code comments, it would still be useful.
Hi thanks for for suggestion! Actually we just released this (haven’t updated our docs with it). Can you try the following, and then hover through the price field.
Table products {
id int [pk]
name varchar
merchant_id int [not null]
price int [note: "This is how much being listed"]
status varchar
created_at varchar
}