Updated members_paid_subscription_events table (#12636)

refs https://github.com/TryGhost/Ghost/issues/12602

This allows us to store the stripe_id of the subscription events
This commit is contained in:
Fabien 'egg' O'Carroll 2021-02-11 12:45:18 +00:00 committed by GitHub
parent 5624e14b1b
commit f745fa7621
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View File

@ -3,8 +3,8 @@ const {addTable} = require('../../utils');
module.exports = addTable('members_paid_subscription_events', {
id: {type: 'string', maxlength: 24, nullable: false, primary: true},
member_id: {type: 'string', maxlength: 24, nullable: false, references: 'members.id', cascadeDelete: true},
from_plan: {type: 'string', maxlength: 50, nullable: true},
to_plan: {type: 'string', maxlength: 50, nullable: true},
from_plan: {type: 'string', maxlength: 255, nullable: true},
to_plan: {type: 'string', maxlength: 255, nullable: true},
currency: {type: 'string', maxLength: 3, nullable: false},
source: {type: 'string', maxlength: 50, nullable: false},
mrr_delta: {type: 'integer', nullable: false},

View File

@ -387,8 +387,8 @@ module.exports = {
members_paid_subscription_events: {
id: {type: 'string', maxlength: 24, nullable: false, primary: true},
member_id: {type: 'string', maxlength: 24, nullable: false, references: 'members.id', cascadeDelete: true},
from_plan: {type: 'string', maxlength: 50, nullable: true},
to_plan: {type: 'string', maxlength: 50, nullable: true},
from_plan: {type: 'string', maxlength: 255, nullable: true},
to_plan: {type: 'string', maxlength: 255, nullable: true},
currency: {type: 'string', maxLength: 3, nullable: false},
source: {
type: 'string', maxlength: 50, nullable: false, validations: {

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 = '091a6cf44f3eb51115f0e1e422db4db6';
const currentSchemaHash = '801faa4e969102a3840191b19e339e55';
const currentFixturesHash = '370d0da0ab7c45050b2ff30bce8896ba';
const currentSettingsHash = '162f9294cc427eb32bc0577006c385ce';
const currentRoutesHash = '3d180d52c663d173a6be791ef411ed01';