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

Support DateTime instances #298

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Tigrov
Copy link
Member

@Tigrov Tigrov commented Aug 5, 2023

Q A
Is bugfix?
New feature? ✔️
Breaks BC? ✔️
Fixed issues #725

@what-the-diff
Copy link

what-the-diff bot commented Aug 5, 2023

PR Summary

  • Enhanced ColumnSchemaInterface with a dateTimeFormat method
    The ColumnSchemaInterface class in Schema.php now includes a new method dateTimeFormat for better handling of date and time formats.

  • Revised default value handling in normalizeDefaultValue method
    The normalizeDefaultValue method in Schema.php has been tweaked to support varied default values for date and time, assisted by the newly introduced dateTimeFormat.

  • Improved testing for new date and time PHP typecasting
    New tests have been added to ColumnSchemaTest.php to ensure the effective functioning of PHP typecasting for date and time.

  • Advanced column additions in SchemaProvider.php
    The columns method in Provider/SchemaProvider.php has been updated to add columns featuring unique default values for date and time.

  • Improved assertions in testing
    Assertions in the testAlternativeDisplayOfDefaultCurrentTimestampInMariaDB method of SchemaTest.php file have been revised to make comparisons against an Expression object.

  • Modified testing methodology for new date and time default values
    The testDefaultValueDatetimeColumn method in SchemaTest.php has been tweaked to test the newly added date and time default values.

  • Updated default values in mysql.sql
    The default values of the timestamp_col, datetime_col, date_col and time_col columns, contained in tests/Support/Fixture/mysql.sql, have been updated.

@codecov
Copy link

codecov bot commented Aug 5, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (463bab4) 99.11% compared to head (45fab61) 99.11%.
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #298   +/-   ##
=========================================
  Coverage     99.11%   99.11%           
+ Complexity      191      190    -1     
=========================================
  Files            13       13           
  Lines           565      566    +1     
=========================================
+ Hits            560      561    +1     
  Misses            5        5           
Files Changed Coverage Δ
src/Schema.php 99.63% <100.00%> (+<0.01%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Tigrov Tigrov marked this pull request as ready for review August 5, 2023 16:18
@Tigrov Tigrov marked this pull request as draft August 17, 2023 13:51
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.

1 participant