Skip to content

Commit

Permalink
Codegen compact-format generate unique attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
billy1624 committed Sep 24, 2021
1 parent 37b36eb commit 360436c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sea-orm-codegen/src/entity/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,9 @@ impl EntityWriter {
attrs.push(quote! { nullable });
}
};
if col.unique {
attrs.push(quote! { unique });
}
if !attrs.is_empty() {
let mut ts = TokenStream::new();
for (i, attr) in attrs.into_iter().enumerate() {
Expand Down

0 comments on commit 360436c

Please sign in to comment.