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

fix(applicaiton-system): Payment migration for definition to text from string #16529

Merged
merged 2 commits into from
Oct 23, 2024

Conversation

obmagnusson
Copy link
Member

Update definition Column Type to TEXT in Payment Table

Description

This PR introduces a migration to update the definition column in the payment table from STRING to TEXT. This change is necessary to accommodate larger JSON schema data that exceeds the previous character limit imposed by the STRING type.

What

  • Migration:
    • Altered the definition column type from Sequelize.STRING to Sequelize.TEXT in the payment table.
    • the up method to change the column type to TEXT.
    • the down method to revert the column type back to STRING if needed.

Why

  • Increased Capacity: The TEXT type allows for storing larger strings, which is essential for handling JSON data that can exceed the default STRING length limit.
  • Seamless Integration: The change is expected to be seamless in PostgreSQL, with no significant side effects on storage or performance.

Testing

  • Ensure that the migration runs successfully in both development and production environments.
  • Verify that JSON data exceeding the previous limit can now be stored without issues.

Notes

  • This change is backward-compatible with existing data, as TEXT can store all data types previously stored in STRING.
  • No changes are required in the application logic, as Sequelize handles TEXT and STRING similarly in Node.js.

Screenshots / Gifs

Attach Screenshots / Gifs to help reviewers understand the scope of the pull request

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • Formatting passes locally with my changes
  • I have rebased against main before asking for a review

@obmagnusson obmagnusson requested a review from a team as a code owner October 23, 2024 10:43
Copy link

codecov bot commented Oct 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 36.77%. Comparing base (4402e3b) to head (9c42092).
Report is 1 commits behind head on release/32.2.0.

Additional details and impacted files

Impacted file tree graph

@@               Coverage Diff               @@
##           release/32.2.0   #16529   +/-   ##
===============================================
  Coverage           36.77%   36.77%           
===============================================
  Files                6847     6847           
  Lines              141872   141872           
  Branches            40423    40423           
===============================================
  Hits                52167    52167           
  Misses              89705    89705           
Flag Coverage Δ
api 3.37% <ø> (ø)
application-system-api 41.34% <ø> (ø)

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


Continue to review full report in Codecov by Sentry.

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

@datadog-island-is
Copy link

datadog-island-is bot commented Oct 23, 2024

Datadog Report

All test runs 2639572 🔗

2 Total Test Services: 0 Failed, 2 Passed
➡️ Test Sessions change in coverage: 3 no change

Test Services
Service Name Failed Known Flaky New Flaky Passed Skipped Total Time Code Coverage Change Test Service View
api 0 0 0 4 0 2.89s 1 no change Link
application-system-api 0 0 0 120 2 3m 32.59s 1 no change Link

@obmagnusson obmagnusson added the automerge Merge this PR as soon as all checks pass label Oct 23, 2024
@kodiakhq kodiakhq bot merged commit d041e76 into release/32.2.0 Oct 23, 2024
53 checks passed
@kodiakhq kodiakhq bot deleted the as-payment-definition-string-to-text branch October 23, 2024 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Merge this PR as soon as all checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants