mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Added {monthly,yearly}_price columns to products
refs https://github.com/TryGhost/Team/issues/710 refs https://github.com/TryGhost/Team/issues/725 Products will now have a single monthly and yearly price which will be used throughout Themes, Portal & Admin. These columns will be used to track the current prices for each of them, and will update anytime we change the pricing of a product. Due to a circular table dependency we have not added a foreign key constraint to the new columns, this will be handled at a later date. It is tracked in issue 725 references above
This commit is contained in:
parent
0f2c586659
commit
bdd7c0f821
4 changed files with 17 additions and 1 deletions
|
@ -0,0 +1,7 @@
|
|||
const {createAddColumnMigration} = require('../../utils');
|
||||
|
||||
module.exports = createAddColumnMigration('products', 'monthly_price_id', {
|
||||
type: 'string',
|
||||
maxlength: 24,
|
||||
nullable: true
|
||||
});
|
|
@ -0,0 +1,7 @@
|
|||
const {createAddColumnMigration} = require('../../utils');
|
||||
|
||||
module.exports = createAddColumnMigration('products', 'yearly_price_id', {
|
||||
type: 'string',
|
||||
maxlength: 24,
|
||||
nullable: true
|
||||
});
|
|
@ -364,6 +364,8 @@ module.exports = {
|
|||
id: {type: 'string', maxlength: 24, nullable: false, primary: true},
|
||||
name: {type: 'string', maxlength: 191, nullable: false},
|
||||
slug: {type: 'string', maxlength: 191, nullable: false, unique: true},
|
||||
monthly_price_id: {type: 'string', maxlength: 24, nullable: true},
|
||||
yearly_price_id: {type: 'string', maxlength: 24, nullable: true},
|
||||
description: {type: 'string', maxlength: 191, nullable: true},
|
||||
created_at: {type: 'dateTime', nullable: false},
|
||||
updated_at: {type: 'dateTime', nullable: true}
|
||||
|
|
|
@ -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 = 'ffa4eec4208614b93b6b8fb68b55f126';
|
||||
const currentSchemaHash = '2099a4ba6b9462c5a0aa36a434139e8b';
|
||||
const currentFixturesHash = '8671672598d2a62e53418c4b91aa79a3';
|
||||
const currentSettingsHash = '8a3f69dfa11d56a6c630456a67f3a59a';
|
||||
const currentRoutesHash = '3d180d52c663d173a6be791ef411ed01';
|
||||
|
|
Loading…
Add table
Reference in a new issue