0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-25 02:31:59 -05:00

Added cancellation_reason column to stripe subscriptions (#12405)

refs #12403 

This will allow us to store the reason for each individual subscription
cancellation.
This commit is contained in:
Fabien 'egg' O'Carroll 2020-11-23 15:36:14 +00:00 committed by GitHub
parent bf9820f97d
commit 47e266e6d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 1 deletions

View file

@ -0,0 +1,7 @@
const {createAddColumnMigration} = require('../../utils');
module.exports = createAddColumnMigration('members_stripe_customers_subscriptions', 'cancellation_reason', {
type: 'string',
maxlength: 500,
nullable: true
});

View file

@ -416,6 +416,7 @@ module.exports = {
plan_id: {type: 'string', maxlength: 255, nullable: false, unique: false},
status: {type: 'string', maxlength: 50, nullable: false},
cancel_at_period_end: {type: 'bool', nullable: false, defaultTo: false},
cancellation_reason: {type: 'string', maxlength: 500, nullable: true},
current_period_end: {type: 'dateTime', nullable: false},
start_date: {type: 'dateTime', nullable: false},
default_payment_card_last4: {type: 'string', maxlength: 4, nullable: true},

View file

@ -32,7 +32,7 @@ const defaultSettings = require('../../../../core/server/data/schema/default-set
*/
describe('DB version integrity', function () {
// Only these variables should need updating
const currentSchemaHash = '6a5b00d987f045f364c6581082cd0b03';
const currentSchemaHash = 'ce6d902fd2b0e3921ffb76d61a35e285';
const currentFixturesHash = 'd46d696c94d03e41a5903500547fea77';
const currentSettingsHash = 'b7c0c2c6a4c61561dfefe642470d30f8';
const currentRoutesHash = '3d180d52c663d173a6be791ef411ed01';