db-sqlite icon indicating copy to clipboard operation
db-sqlite copied to clipboard

Support DateTime instances

Open Tigrov opened this issue 2 years ago • 2 comments

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

Tigrov avatar Aug 05 '23 13:08 Tigrov

PR Summary

  • Enhanced Functionality for Timezone in ColumnSchema Class The ColumnSchema class can now detect if a particular column carries timezone information or not, thanks to the newly added hasTimezone method.

  • Adjustment of Year Column Type in Schema Class We've adjusted the data type of the year column in the Schema class, moving it from TYPE_DATE to TYPE_SMALLINT, thereby increasing its efficiency.

  • Support for Additional Column Types in Schema Class The Schema class has been updated to support timetz and timestamptz column types, thus expanding the range of data types that can be used for your columns.

  • Improved Handling of Default Values in Schema Class We've made modifications to the loadColumnSchema method within the Schema class so it can handle default values for various column types more effectively.

  • Additional Testing for the ColumnSchemaTest and SchemaProvider Classes New test cases have been added to the ColumnSchemaTest and SchemaProvider classes. These tests specifically relate to the new column types and default values we've incorporated, ensuring optimal performance and avoiding potential bugs.

  • Updated SQL Fixture File The SQL fixture file has been updated to include new columns with varied types and default values. This update enhances testing conditions and ensures that our changes integrate smoothly into existing structures.

what-the-diff[bot] avatar Aug 05 '23 13:08 what-the-diff[bot]

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.01% :tada:

Comparison is base (b172ec9) 98.21% compared to head (d718b0b) 98.22%.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #269      +/-   ##
============================================
+ Coverage     98.21%   98.22%   +0.01%     
  Complexity      325      325              
============================================
  Files            17       18       +1     
  Lines          1006     1013       +7     
============================================
+ Hits            988      995       +7     
  Misses           18       18              
Files Changed Coverage Δ
src/ColumnSchema.php 100.00% <100.00%> (ø)
src/Schema.php 100.00% <100.00%> (ø)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Aug 05 '23 13:08 codecov[bot]