Skip to content

Commit f65d37e

Browse files
committed
Added gift subscription notification columns to users table
ref https://linear.app/ghost/issue/BER-3523 Added gift subscription notification columns to the `users` table so a user can configure if they want to recieve these notifications
1 parent 46c23fb commit f65d37e

4 files changed

Lines changed: 17 additions & 1 deletion

File tree

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
const {createAddColumnMigration} = require('../../utils');
2+
3+
module.exports = createAddColumnMigration('users', 'gift_subscription_purchase_notification', {
4+
type: 'boolean',
5+
nullable: false,
6+
defaultTo: true
7+
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
const {createAddColumnMigration} = require('../../utils');
2+
3+
module.exports = createAddColumnMigration('users', 'gift_subscription_redemption_notification', {
4+
type: 'boolean',
5+
nullable: false,
6+
defaultTo: true
7+
});

ghost/core/core/server/data/schema/schema.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,8 @@ module.exports = {
182182
recommendation_notifications: {type: 'boolean', nullable: false, defaultTo: true},
183183
milestone_notifications: {type: 'boolean', nullable: false, defaultTo: true},
184184
donation_notifications: {type: 'boolean', nullable: false, defaultTo: true},
185+
gift_subscription_purchase_notification: {type: 'boolean', nullable: false, defaultTo: true},
186+
gift_subscription_redemption_notification: {type: 'boolean', nullable: false, defaultTo: true},
185187
created_at: {type: 'dateTime', nullable: false},
186188
updated_at: {type: 'dateTime', nullable: true}
187189
},

ghost/core/test/unit/server/data/schema/integrity.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const validateRouteSettings = require('../../../../../core/server/services/route
3535
*/
3636
describe('DB version integrity', function () {
3737
// Only these variables should need updating
38-
const currentSchemaHash = '6186d5aa5b62b6689ee8786efd5daccc';
38+
const currentSchemaHash = '313436f7a6e23ddef156aff2cd53d5d8';
3939
const currentFixturesHash = '2f86ab1e3820e86465f9ad738dd0ee93';
4040
const currentSettingsHash = 'a102b80d2ab0cd92325ed007c94d7da6';
4141
const currentRoutesHash = '3d180d52c663d173a6be791ef411ed01';

0 commit comments

Comments
 (0)