New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Postgres Default Values #550
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm 👍
// range_tsrange tsrange, | ||
// range_tstzrange tstzrange, | ||
// range_daterange daterange | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I can finish some of these today, I'll send you the PR for review when it's in a mergeable state (it will need quaint changes too).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, then I'll continue the test with those later on. Most of them are turned into Strings atm anyways, that is why I did not test them.
@@ -205,16 +205,20 @@ impl SqlSchemaDescriber { | |||
}; | |||
let tpe = get_column_type(data_type.as_ref(), &full_data_type, arity, enums); | |||
|
|||
//todo we might want to use regexes here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes we could use a regex, but part of it is variable, so they would have to be compiled for every field or (I think I already did that somewhere in the sql-schema-describer) capture the type, then match for the regex and the type capture, which is probably best for performance but also more complicated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And sql-schema-describer performance is already good enough™
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, then we'll leave it as is for now.
test them and ensure that we remove the
::type
annotationsFixes prisma/prisma#1704