Skip to content

Commit

Permalink
Migration to add donation_message to table
Browse files Browse the repository at this point in the history
ref PLG-197

- DB migration to add `donation_message` to `donation_payment_events`
  table
  • Loading branch information
ronaldlangeveld committed Aug 28, 2024
1 parent a79ab03 commit fa7cc26
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// For information on writing migrations, see https://www.notion.so/ghost/Database-migrations-eb5b78c435d741d2b34a582d57c24253

const {createAddColumnMigration} = require('../../utils');

module.exports = createAddColumnMigration('donation_payment_events', 'donation_message', {
type: 'string',
maxlength: 255, // as per stripe limitation for custom fields https://docs.stripe.com/payments/checkout/custom-fields
nullable: true
});
3 changes: 2 additions & 1 deletion ghost/core/core/server/data/schema/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,8 @@ module.exports = {
referrer_source: {type: 'string', maxlength: 191, nullable: true},
referrer_medium: {type: 'string', maxlength: 191, nullable: true},
referrer_url: {type: 'string', maxlength: 2000, nullable: true},
created_at: {type: 'dateTime', nullable: false}
created_at: {type: 'dateTime', nullable: false},
donation_message: {type: 'string', maxlength: 255, nullable: true} // https://docs.stripe.com/payments/checkout/custom-fields
},
stripe_products: {
id: {type: 'string', maxlength: 24, nullable: false, primary: true},
Expand Down

0 comments on commit fa7cc26

Please sign in to comment.