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

Support table view constraints #316

Merged
merged 10 commits into from
Jan 9, 2024

Conversation

Tigrov
Copy link
Member

@Tigrov Tigrov commented Sep 13, 2023

Q A
Is bugfix? ✔️
New feature?
Breaks BC?
Fixed issues #6

@what-the-diff
Copy link

what-the-diff bot commented Sep 13, 2023

PR Summary

  • Improved Data Loading Methods in Schema
    Modifications have been made to loadTableIndexes, findColumns and loadTableConstraints methods in the Schema.php file to enhance how data is loaded. This was achieved by adding dimensions (left joins) and conditions, enabling much more precise and efficient data retrieving.

  • Enhanced Testing Provisions
    Added test cases in ColumnSchemaTest.php, QueryBuilderProvider.php and SchemaTest.php files. These tests will ensure data integrity by checking things like the primary key of a view, the ability to upsert data into a table view, and the correctness of view names.

  • Added 'constraintsOfView' Method
    The SchemaProvider.php file now has a new method called constraintsOfView which helps identify constraints in a given view. This serves to tighten data security and integrity by understanding the restrictions in place at the view level.

  • SQL file Update
    The pgsql.sql file was updated with new view statements and several view removal statements. This means our database is tweaked, it's more streamlined now with unnecessary views removed and new ones added.

@codecov
Copy link

codecov bot commented Sep 13, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (c003f9c) 100.00% compared to head (0f8275f) 100.00%.

Additional details and impacted files
@@             Coverage Diff             @@
##              master      #316   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
  Complexity       187       187           
===========================================
  Files             13        13           
  Lines            566       566           
===========================================
  Hits             566       566           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Tigrov Tigrov marked this pull request as ready for review October 1, 2023 03:24
Copy link
Member

@vjik vjik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but need add line to changelog

@Tigrov Tigrov merged commit c4f1271 into yiisoft:master Jan 9, 2024
32 of 35 checks passed
@Tigrov Tigrov deleted the support_table_view_constrains branch January 9, 2024 07:03
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.

3 participants