Skip to content

Commit 219a5a8

Browse files
committed
Fix UNIQUE not added in postgres
1 parent 55295a6 commit 219a5a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/toSQL.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ export function jsonToPostgreSQL(obj) {
265265
field.name
266266
}" ${getTypeString(field, "postgres")}${
267267
field.notNull ? " NOT NULL" : ""
268-
}${
268+
}${field.unique ? " UNIQUE" : ""}${
269269
field.default !== "" ? ` DEFAULT ${parseDefault(field)}` : ""
270270
}${
271271
field.check === "" || !hasCheck(field.type)

0 commit comments

Comments
 (0)