0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00

Added type column to members_paid_subscription_events (#14432)

refs https://github.com/TryGhost/Team/issues/1302

This column allows us to store multiple events types in the table, which
can be differentiated by their `type`
This commit is contained in:
Fabien 'egg' O'Carroll 2022-04-07 11:29:14 +01:00 committed by GitHub
parent 88877312b5
commit 6507a0b88e
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_paid_subscription_events', 'type', {
type: 'string',
maxlength: '50',
nullable: true
});

View file

@ -510,6 +510,7 @@ module.exports = {
},
members_paid_subscription_events: {
id: {type: 'string', maxlength: 24, nullable: false, primary: true},
type: {type: 'string', maxlength: 50, nullable: true},
member_id: {type: 'string', maxlength: 24, nullable: false, references: 'members.id', cascadeDelete: true},
from_plan: {type: 'string', maxlength: 255, nullable: true},
to_plan: {type: 'string', maxlength: 255, nullable: 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 = '2611cd9a3249e2dbb3d3b02218bf06bc';
const currentSchemaHash = '136f5ea5350c26ddc5f802b2dece8ce8';
const currentFixturesHash = 'f4dd2a454e1999b6d149cc26ae52ced4';
const currentSettingsHash = '71fa38d0c805c18ceebe0fda80886230';
const currentRoutesHash = '3d180d52c663d173a6be791ef411ed01';