propelorm / Propel2

Propel2 is an open-source high-performance Object-Relational Mapping (ORM) for modern PHP
http://propelorm.org/
MIT License
1.26k stars 399 forks source link

Skip computing diff for modified tables that are set to skipSql #1789

Closed jbarton123 closed 3 years ago

jbarton123 commented 3 years ago

It appears that when comparing a table that has been modified (i.e. a new column has been added in a schema XML) but has skipSql added to its schema definition, the diff is still computed and a migration is generated. I would expect in the event that a table has this flag set as true, that even if I were to modify the definition in the schema file, then it should still not create a migration.

This might be useful for generating a model but still leaving the underlying table in the Database untouched. This might be necessary if another app is connected and managing that table in the Database, but I need Propel in another app to generate a model that can be used to write data to the table.

codecov-commenter commented 3 years ago

Codecov Report

Merging #1789 (a3853ac) into master (20b0098) will increase coverage by 0.00%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #1789   +/-   ##
=========================================
  Coverage     87.92%   87.92%           
- Complexity     7854     7855    +1     
=========================================
  Files           281      281           
  Lines         22666    22668    +2     
=========================================
+ Hits          19929    19931    +2     
  Misses         2737     2737           
Flag Coverage Δ
5-max 87.92% <100.00%> (+<0.01%) :arrow_up:
7.4 87.92% <100.00%> (+<0.01%) :arrow_up:
agnostic 67.37% <100.00%> (+<0.01%) :arrow_up:
mysql 70.43% <50.00%> (-0.01%) :arrow_down:
pgsql 70.38% <50.00%> (-0.01%) :arrow_down:
sqlite 68.36% <50.00%> (-0.01%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...Propel/Generator/Model/Diff/DatabaseComparator.php 94.25% <100.00%> (+0.13%) :arrow_up:
src/Propel/Runtime/ActiveQuery/ModelCriteria.php 95.67% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 20b0098...a3853ac. Read the comment docs.