Skip to content

Commit

Permalink
Merge pull request #255 from rudcode/main
Browse files Browse the repository at this point in the history
Fix postgres auto increment primary key
  • Loading branch information
1ilit authored Oct 8, 2024
2 parents 257209c + c78245c commit 6314f98
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/utils/exportSQL/postgres.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ export function toPostgres(diagram) {
`${exportFieldComment(field.comment)}\t"${
field.name
}" ${field.type}${field.isArray ? " ARRAY" : ""}${field.notNull ? " NOT NULL" : ""}${field.unique ? " UNIQUE" : ""}${
field.increment ? " GENERATED BY DEFAULT AS IDENTITY" : ""
}${
field.default.trim() !== ""
? ` DEFAULT ${parseDefault(field, diagram.database)}`
: ""
Expand Down

0 comments on commit 6314f98

Please sign in to comment.