Replies: 2 comments 1 reply
-
I agree with you. It would be better to add a |
Beta Was this translation helpful? Give feedback.
1 reply
-
Hey @laojianzi, thanks for the report! I believe this is a special case for MySQL 5.7, https://dba.stackexchange.com/a/314900. However, it's always good to have a explicit |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
sea-orm/sea-orm-migration/src/schema.rs
Line 320 in 987cb38
timestamp_null
looks like it's telling me to declare that NULL is allowed, whereas the SQL provided by sea-orm doesn't have NULL and doesn't have NOT NULL, and leaves it up to the default behavior of the database's type.When I tested MySQL 5.7, the database returned an error:
Using
null
solves the problem, but I think most people assume thattimestamp_null
already includes this behaviorSo when the semantics of
timestamp_null
is null, should we show that declaring the field is allowed to be NULL instead of leaving it to the default behavior of the database?Beta Was this translation helpful? Give feedback.
All reactions