mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 22:43:30 +03:00
Added benefits table
refs https://github.com/TryGhost/Team/issues/804 Benefits are tag-like resources which will be associated with Products. The first iteration just requires a name for the benefit, which will be stored as plaintext.
This commit is contained in:
parent
53b7eb227b
commit
65b2e8a0a5
@ -18,6 +18,7 @@ const BACKUP_TABLES = [
|
||||
'permissions_roles',
|
||||
'permissions_users',
|
||||
'products',
|
||||
'benefits',
|
||||
'webhooks',
|
||||
'snippets',
|
||||
'tokens',
|
||||
|
@ -0,0 +1,9 @@
|
||||
const {addTable} = require('../../utils');
|
||||
|
||||
module.exports = addTable('benefits', {
|
||||
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},
|
||||
created_at: {type: 'dateTime', nullable: false},
|
||||
updated_at: {type: 'dateTime', nullable: true}
|
||||
});
|
@ -373,6 +373,13 @@ module.exports = {
|
||||
created_at: {type: 'dateTime', nullable: false},
|
||||
updated_at: {type: 'dateTime', nullable: true}
|
||||
},
|
||||
benefits: {
|
||||
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},
|
||||
created_at: {type: 'dateTime', nullable: false},
|
||||
updated_at: {type: 'dateTime', nullable: true}
|
||||
},
|
||||
members_products: {
|
||||
id: {type: 'string', maxlength: 24, nullable: false, primary: true},
|
||||
member_id: {type: 'string', maxlength: 24, nullable: false, references: 'members.id', cascadeDelete: true},
|
||||
|
@ -53,6 +53,7 @@ describe('Exporter', function () {
|
||||
'posts_meta',
|
||||
'posts_tags',
|
||||
'products',
|
||||
'benefits',
|
||||
'stripe_products',
|
||||
'stripe_prices',
|
||||
'roles',
|
||||
|
@ -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 = 'ef13a18aee78222086ca864c16bde696';
|
||||
const currentSchemaHash = '92da283a364f19c4b3ec8ed25456e9b1';
|
||||
const currentFixturesHash = '97283c575b1f6c84c27db6e1b1be21d4';
|
||||
const currentSettingsHash = 'dd0a0a08e66b252e7704bb7e346a8c20';
|
||||
const currentRoutesHash = '3d180d52c663d173a6be791ef411ed01';
|
||||
|
Loading…
Reference in New Issue
Block a user