-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
[5.5] Add precision to dateTime and timestamp column types #18847
Conversation
@@ -544,22 +544,24 @@ protected function typeDate(Fluent $column) | |||
* Create the column definition for a date-time type. | |||
* | |||
* @param \Illuminate\Support\Fluent $column | |||
* @param int |
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.
@param int $precision
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.
Thank you, I missed that.
None of these changes appear to actually let the user change the precision? |
Sorry was my bad forgot to tweak the Blueprint Class. Now the user should be able to set the fractional seconds on the |
Is it necessary to support SQL Server versions below SQL Server 2008? |
@taylorotwell is it necessary to support SQL Server versions below SQL Server 2008 if not I would change the column type to |
Hi, I just want to ask if this update about from datetime to datetime2 will be available on the next version or will be available in 5.4? Just wanted to know so that we could think a work around while waiting for the updates. Thanks. |
Oh I see, thanks @fernandobandeira, will just wait until 5.5 is released next month. |
This breaks support for MySQL 5.5? Do we want to revert? |
I wouldn't revert it but make the precision configurable like @fernandobandeira on #20262 (comment) already proposed. |
Regarding to issues like #3506 and #11239 I would like to propose a grammar change which allows to set the precision of dateTime and timestamp fields.
The maximum granularity of the fractional seconds depends on the RDMS.