Skip to content
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

replace 0000-00-00 dates by NULL #16

Closed
wants to merge 1 commit into from
Closed

replace 0000-00-00 dates by NULL #16

wants to merge 1 commit into from

Conversation

zormit
Copy link

@zormit zormit commented Aug 28, 2015

This is a proposition to solve issue #15.

It has to be discussed, if it makes more sense to replace "zero"-date by NULL or by some random value like somewhere around the start of the epoch. When there is no NOT NULL constraint, I think it's better to replace by NULL, as every other date could interfere with the regularly stored dates.

@mihailShumilov
Copy link
Owner

Null is not good way
At some case timestamp field must be required
And null value throw error

@zormit
Copy link
Author

zormit commented Oct 12, 2015

As describe in #15, postgres won't accept 0000-00-00, so something should be done, even if not using my proposed solution.

An option would be to fill it e.g. with 1900-01-01, which I find a bit random but would prevent at least the case of having a NULL value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants