cycle / database

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

Adding methods beforeSync and afterSync #105

Closed msmakouz closed 1 year ago

msmakouz commented 1 year ago

And fixed a bug with changing a field that has a foreign key in MySQL:

PDOException: SQLSTATE[HY000]: General error: 3780 Referencing column 'b_id' and referenced column 'id' in foreign key constraint 'a_foreign_b_id_6409dc0c5edbb' are incompatible.
codecov[bot] commented 1 year ago

Codecov Report

Merging #105 (2a0131d) into 2.x (6ef38a4) will increase coverage by 0.07%. The diff coverage is 93.10%.

@@             Coverage Diff              @@
##                2.x     #105      +/-   ##
============================================
+ Coverage     94.48%   94.55%   +0.07%     
- Complexity     1646     1660      +14     
============================================
  Files            96       96              
  Lines          4462     4484      +22     
============================================
+ Hits           4216     4240      +24     
+ Misses          246      244       -2     
Impacted Files Coverage Δ
src/Driver/MySQL/MySQLHandler.php 96.82% <89.47%> (+2.70%) :arrow_up:
src/Driver/Handler.php 96.96% <100.00%> (+0.04%) :arrow_up:
src/Schema/Reflector.php 92.77% <100.00%> (+2.10%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.