cycle / database

Database Abstraction Layer, Schema Introspection, Schema Generation, Query Builders
MIT License
53 stars 22 forks source link

Add index creation property to the AbstractForeignKey class #119

Closed msmakouz closed 1 year ago

msmakouz commented 1 year ago

Issue: #113

Added the ability to disable the creation of the index. But keep in mind that MySQL creates an index automatically and it is required for foreign keys: https://dev.mysql.com/doc/refman/8.0/en/create-table-foreign-keys.html

I think this needs to be described in our documentation.

codecov[bot] commented 1 year ago

Codecov Report

Merging #119 (e7082b5) into 2.x (cf6109a) will increase coverage by 0.10%. The diff coverage is 100.00%.

:exclamation: Current head e7082b5 differs from pull request most recent head 0be3322. Consider uploading reports for the commit 0be3322 to get more accurate results

@@             Coverage Diff              @@
##                2.x     #119      +/-   ##
============================================
+ Coverage     94.57%   94.68%   +0.10%     
- Complexity     1655     1667      +12     
============================================
  Files            96       96              
  Lines          4480     4496      +16     
============================================
+ Hits           4237     4257      +20     
+ Misses          243      239       -4     
Impacted Files Coverage Δ
src/Driver/MySQL/Schema/MySQLForeignKey.php 100.00% <100.00%> (ø)
src/Schema/AbstractForeignKey.php 100.00% <100.00%> (ø)
src/Schema/AbstractTable.php 96.23% <100.00%> (ø)

... and 2 files with indirect coverage changes