Files
relspecgo/tests/postgres/issue21/spec.dbml
T

29 lines
559 B
Plaintext

Table users {
id integer [pk, not null]
username varchar(255) [not null]
email varchar(255) [not null]
created_at timestamptz [not null]
profile_id integer
}
Table profiles {
id integer [pk, not null]
bio text
created_at timestamptz [not null]
}
Table posts {
id integer [pk, not null]
user_id integer [not null]
title varchar(255) [not null]
body text
published_at timestamptz
view_count integer default 0
Indexes {
(user_id, title) [unique]
}
}
Ref: users.profile_id > profiles.id