DDC-118: DateTime maps to TIMESTAMP for MySQL, breaks "nullable" #149

Closed
opened 2026-01-22 12:28:46 +01:00 by admin · 3 comments
Owner

Originally created by @doctrinebot on GitHub (Nov 5, 2009).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user nicokaiser:

For the DateType type, "\Doctrine\DBAL\Platforms\MySqlPlatform::getDateTimeTypeDeclarationSql" returns "TIMESTAMP" in some cases, which leads to MySQL not allowing NULL values in DateTime fields. This breaks some models (where dates don't need to be set)... Why was that changed?

Originally created by @doctrinebot on GitHub (Nov 5, 2009). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user nicokaiser: For the DateType type, "\Doctrine\DBAL\Platforms\MySqlPlatform::getDateTimeTypeDeclarationSql" returns "TIMESTAMP" in some cases, which leads to MySQL not allowing NULL values in DateTime fields. This breaks some models (where dates don't need to be set)... Why was that changed?
admin added the Bug label 2026-01-22 12:28:46 +01:00
admin closed this issue 2026-01-22 12:28:46 +01:00
Author
Owner

@doctrinebot commented on GitHub (Nov 5, 2009):

Comment created by @beberlei:

My mistake, in introduced this regression. I'll add a test and fix it.

@doctrinebot commented on GitHub (Nov 5, 2009): Comment created by @beberlei: My mistake, in introduced this regression. I'll add a test and fix it.
Author
Owner

@doctrinebot commented on GitHub (Nov 5, 2009):

Comment created by @beberlei:

Fixed!

@doctrinebot commented on GitHub (Nov 5, 2009): Comment created by @beberlei: Fixed!
Author
Owner

@doctrinebot commented on GitHub (Nov 5, 2009):

Issue was closed with resolution "Fixed"

@doctrinebot commented on GitHub (Nov 5, 2009): Issue was closed with resolution "Fixed"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#149