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

Improve bal persist migrate and refactor test cases #343

Merged
merged 11 commits into from
Apr 3, 2024

Conversation

hasathcharu
Copy link
Contributor

@hasathcharu hasathcharu commented Apr 2, 2024

Purpose

This PR is a partial fix for the first issue linked below. This also fixes the issue where changes to optional types are not migrated correctly.

Fixes:

Checklist

  • Linked to an issue
  • Updated the specification
  • Updated the changelog
  • Added tests

Copy link

codecov bot commented Apr 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.73%. Comparing base (336d3fe) to head (3c9e358).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #343      +/-   ##
==========================================
+ Coverage   84.26%   84.73%   +0.46%     
==========================================
  Files          63       62       -1     
  Lines        5715     5608     -107     
  Branches      750      734      -16     
==========================================
- Hits         4816     4752      -64     
+ Misses        676      640      -36     
+ Partials      223      216       -7     

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

hasathcharu and others added 8 commits April 2, 2024 10:29
Refactor migration test assertion to ensure the generated sources are correct.
Refactor test cases for more clearer intent. This commit is a WIP and more changes will be added.
This commit adds test cases for first time migration, third time migration, and addition of a new table to the model.
This commit adds support to optionality changes in fields, support for composite primary keys and related tests.
Optianality changes are not yet fully tested.
This commit improves migration tool to support more scenarios such as composite primary keys.
Some of the existing code were also refactored to improve the readability and maintainability.
Tests were added to cover the new scenarios.
Copy link

sonarqubecloud bot commented Apr 3, 2024

Quality Gate Passed Quality Gate passed

Issues
5 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
1.2% Duplication on New Code

See analysis details on SonarCloud

Copy link
Member

@daneshk daneshk left a comment

Choose a reason for hiding this comment

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

LGTM

@daneshk daneshk merged commit a487cbc into ballerina-platform:main Apr 3, 2024
6 checks passed
@hasathcharu hasathcharu deleted the refactor-migrate branch April 3, 2024 05:13
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