Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manage foreign keys on archivable behavior #1935

Conversation

mringler
Copy link
Contributor

@mringler mringler commented Dec 28, 2022

Allows better management of foreign keys in archivable behavior.

Basically implements #1484 with tests, where FKs can be copied from the source table to an automatically generated archive table.
Also, it adds the possibility to declare new FKs as part of the behavior declaration.
Finally, it adds a parameter sync, which, if enabled, copies columns, indexes and optionally fks to an archive table that is not automatically generated, allowing for flexible overriding of archive table properties.

I have added documentation for these options along with the different use cases they cover at propelorm/propelorm.github.com#433

@codecov-commenter
Copy link

codecov-commenter commented Dec 28, 2022

Codecov Report

Base: 73.25% // Head: 88.30% // Increases project coverage by +15.05% 🎉

Coverage data is based on head (09473c8) compared to base (b542279).
Patch coverage: 95.09% of modified lines in pull request are covered.

Additional details and impacted files
@@              Coverage Diff              @@
##             master    #1935       +/-   ##
=============================================
+ Coverage     73.25%   88.30%   +15.05%     
- Complexity     7917     7969       +52     
=============================================
  Files           227      242       +15     
  Lines         21133    24256     +3123     
=============================================
+ Hits          15480    21420     +5940     
+ Misses         5653     2836     -2817     
Flag Coverage Δ
5-max 88.30% <95.09%> (+15.05%) ⬆️
7.4 88.30% <95.09%> (+15.05%) ⬆️
agnostic 67.65% <95.09%> (?)
mysql 68.86% <11.76%> (-0.09%) ⬇️
pgsql 68.86% <11.76%> (-0.19%) ⬇️
sqlite 66.82% <11.76%> (-0.14%) ⬇️

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

Impacted Files Coverage Δ
...nerator/Behavior/Archivable/ArchivableBehavior.php 93.89% <94.04%> (+93.89%) ⬆️
src/Propel/Generator/Model/Behavior.php 86.02% <100.00%> (-0.19%) ⬇️
src/Propel/Generator/Model/Index.php 97.84% <100.00%> (+14.33%) ⬆️
src/Propel/Generator/Model/Table.php 90.54% <100.00%> (+17.06%) ⬆️
src/Propel/Generator/Builder/Om/ClassTools.php 45.94% <0.00%> (-16.56%) ⬇️
...el/Generator/Builder/Om/ExtensionObjectBuilder.php 81.48% <0.00%> (-7.41%) ⬇️
src/Propel/Generator/Model/BehaviorableTrait.php 76.92% <0.00%> (-5.94%) ⬇️
...or/Builder/Om/ExtensionQueryInheritanceBuilder.php 83.33% <0.00%> (-5.13%) ⬇️
...l/Generator/Behavior/Validate/ValidateBehavior.php 91.80% <0.00%> (-4.12%) ⬇️
.../Propel/Generator/Command/Helper/ConsoleHelper.php 80.76% <0.00%> (-4.02%) ⬇️
... and 190 more

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

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

@dereuromark dereuromark merged commit f0ad945 into propelorm:master Jan 4, 2023
@mringler mringler deleted the feature/manage_foreign_keys_on_archivable_behavior branch January 4, 2023 18:32
@mringler
Copy link
Contributor Author

mringler commented Jan 4, 2023

@dereuromark Thank you for merging. Documentation is at propelorm/propelorm.github.com#433

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants