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

🐛 Fixed Tips & Donations checkout error for sites with long titles #20913

Merged
merged 1 commit into from
Sep 3, 2024

Conversation

kevinansfield
Copy link
Member

ref https://linear.app/tryghost/issue/ONC-296

Our stripe_prices.nickname field had a length of 50 chars which meant we could error out trying to save a donation Stripe price with a generated product nickname containing a long site title.

  • updated db schema and added a migration to change column length to 255
  • added truncation to nickname generation to enforce a limit of 250 chars to match Stripe's limit

ref https://linear.app/tryghost/issue/ONC-296

Our `stripe_prices.nickname` field had a length of 50 chars which meant we could error out trying to save a donation Stripe price with a generated product nickname containing a long site title.

- updated db schema and added a migration to change column length to 255
- added truncation to nickname generation to enforce a limit of 250 chars to match Stripe's limit
@github-actions github-actions bot added the migration [pull request] Includes migration for review label Sep 3, 2024
Copy link
Contributor

github-actions bot commented Sep 3, 2024

It looks like this PR contains a migration 👀
Here's the checklist for reviewing migrations:

General requirements

  • Satisfies idempotency requirement (both up() and down())
  • Does not reference models
  • Filename is in the correct format (and correctly ordered)
  • Targets the next minor version
  • All code paths have appropriate log messages
  • Uses the correct utils
  • Contains a minimal changeset
  • Does not mix DDL/DML operations
  • Tested in MySQL and SQLite

Schema changes

  • Both schema change and related migration have been implemented
  • For index changes: has been performance tested for large tables
  • For new tables/columns: fields use the appropriate predefined field lengths
  • For new tables/columns: field names follow the appropriate conventions
  • Does not drop a non-alpha table outside of a major version

Data changes

  • Mass updates/inserts are batched appropriately
  • Does not loop over large tables/datasets
  • Defends against missing or invalid data
  • For settings updates: follows the appropriate guidelines

@kevinansfield kevinansfield merged commit 0130413 into main Sep 3, 2024
23 of 40 checks passed
@kevinansfield kevinansfield deleted the fix-stripe-prices-nickname-length branch September 3, 2024 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
browser-tests migration [pull request] Includes migration for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant