Skip to content

Conversation

@terabytesoftw
Copy link
Member

@terabytesoftw terabytesoftw commented Jul 13, 2023

Q A
Is bugfix?
New feature? ✔️
Breaks BC?

This is the first solution, this will solve immediately, the creation of the primary key auto increment from Oracle 12 to the lastest version, if we want to support the legacy version Oracle 11, then we must add the methods addSequence(), addTrigger(), dropSequence(), and dropTrigger(), so that it can work in Oracle 11.

@what-the-diff
Copy link

what-the-diff bot commented Jul 13, 2023

PR Summary

  • Updated Oracle Version Range in Documentation
    The Oracle version range indicated in the README.md was updated. The new version range is now from 12 to 21, giving an updated scope of compatibility.

  • Implementation of Updated Syntax for Primary Keys
    Changed the 'typeMap' array in the QueryBuilder.php file to utilize new 'GENERATED BY DEFAULT AS IDENTITY' syntax for primary keys, providing a modernized method for designing primary keys in databases.

  • Inclusion of 'IDENTITY_COLUMN' Attribute
    The 'findColumns' method in the Schema.php file is improved to include the 'IDENTITY_COLUMN' attribute for the columns, providing additional attribute coverage for columns.

  • AutoIncrement Property Setting Based on 'IDENTITY_COLUMN' Attribute
    The 'createColumnSchema' method present in the Schema.php file, now has the ability to adjust the 'autoIncrement' property of the 'ColumnSchemaInterface' based on the 'IDENTITY_COLUMN' attribute. This refinement enhances functionality and allows for the automatic incrementing of column values when needed.

  • Enhanced 'columns' Method for Primary Key Property
    The 'columns' method in the SchemaProvider.php file has been adjusted to set the 'autoIncrement' property to 'true' for the primary key column, providing automatic increment functionality to primary keys.

  • Inclusion of Syntax in Testing Method
    The 'testCreateTable' method in the QueryBuilderTest.php file now includes a test for the 'GENERATED BY DEFAULT AS IDENTITY' syntax for the primary key column, enhancing the comprehensiveness of the testing process.

  • Database Fixture Update
    The 'animal' table in the oci.sql fixture file now includes the 'GENERATED BY DEFAULT AS IDENTITY' syntax for the 'id' column, providing an example of how the new syntax is applied in a real-world scenario.

@codecov
Copy link

codecov bot commented Jul 13, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (c63717c) 98.16% compared to head (4ca3bd6) 98.16%.

❗ Current head 4ca3bd6 differs from pull request most recent head dcb060a. Consider uploading reports for the commit dcb060a to get more accurate results

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #226   +/-   ##
=========================================
  Coverage     98.16%   98.16%           
  Complexity      195      195           
=========================================
  Files            16       16           
  Lines           600      601    +1     
=========================================
+ Hits            589      590    +1     
  Misses           11       11           
Impacted Files Coverage Δ
src/QueryBuilder.php 100.00% <ø> (ø)
src/Schema.php 99.61% <100.00%> (+<0.01%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@terabytesoftw terabytesoftw requested review from darkdef and samdark July 13, 2023 11:48
@terabytesoftw terabytesoftw added the status:code review The pull request needs review. label Jul 13, 2023
@terabytesoftw terabytesoftw merged commit b38e1df into master Jul 13, 2023
@terabytesoftw terabytesoftw deleted the add-auto-increment-oracle branch July 13, 2023 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status:code review The pull request needs review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants