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

Added description to Products & Prices (#12916)

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

The `products` and `stripe_prices` tables are missing a description
column which will be used by Portal to display information about the
products and prices
This commit is contained in:
Fabien 'egg' O'Carroll 2021-05-04 13:41:48 +01:00 committed by GitHub
parent 6ccd2251b3
commit b4d9ee0b4e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 1 deletions

View file

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

View file

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

View file

@ -366,6 +366,7 @@ module.exports = {
id: {type: 'string', maxlength: 24, nullable: false, primary: true},
name: {type: 'string', maxlength: 191, nullable: false, unique: true},
slug: {type: 'string', maxlength: 191, nullable: false, unique: true},
description: {type: 'string', maxlength: 191, nullable: true},
created_at: {type: 'dateTime', nullable: false},
updated_at: {type: 'dateTime', nullable: true}
},
@ -496,6 +497,7 @@ module.exports = {
amount: {type: 'integer', nullable: false},
type: {type: 'string', maxlength: 50, nullable: false, defaultTo: 'recurring', validations: {isIn: [['recurring', 'one_time']]}},
interval: {type: 'string', maxlength: 50, nullable: true},
description: {type: 'string', maxlength: 191, nullable: true},
created_at: {type: 'dateTime', nullable: false},
updated_at: {type: 'dateTime', 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 = 'c31e5e88461bbc015a9e50561d07f6f7';
const currentSchemaHash = 'b7bca80554f3946cd2f83e0e99ff3532';
const currentFixturesHash = 'b24801cf9f819e4c127316021877ad70';
const currentSettingsHash = 'b943cc3956eee3dd042f8394b2701d21';
const currentRoutesHash = '3d180d52c663d173a6be791ef411ed01';