0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-04 02:01:58 -05:00

Added migration to include donation_message in donation_payment_events (#20839)

ref PLG-197

- DB migration to add `donation_message` to `donation_payment_events`
table
This commit is contained in:
Ronald Langeveld 2024-08-28 15:58:11 +09:00 committed by GitHub
parent a79ab03463
commit 41e696f00f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 12 additions and 2 deletions

View file

@ -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
});

View file

@ -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},

View file

@ -35,7 +35,7 @@ const validateRouteSettings = require('../../../../../core/server/services/route
*/
describe('DB version integrity', function () {
// Only these variables should need updating
const currentSchemaHash = 'ce97eff9bf1b3c215fed1271f9275f83';
const currentSchemaHash = 'b59d502d0e7965a837bb1dfb5c583562';
const currentFixturesHash = 'a489d615989eab1023d4b8af0ecee7fd';
const currentSettingsHash = '051ef2a50e2edb8723e89461448313cb';
const currentRoutesHash = '3d180d52c663d173a6be791ef411ed01';