Skip to content

Commit 6b3e937

Browse files
committed
Added enable_updates_and_announcements column to members table
1 parent 3957988 commit 6b3e937

4 files changed

Lines changed: 14 additions & 1 deletion

File tree

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

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,7 @@ module.exports = {
448448
note: {type: 'string', maxlength: 2000, nullable: true},
449449
geolocation: {type: 'string', maxlength: 2000, nullable: true},
450450
enable_comment_notifications: {type: 'boolean', nullable: false, defaultTo: true},
451+
enable_updates_and_announcements: {type: 'boolean', nullable: true},
451452
email_count: {type: 'integer', unsigned: true, nullable: false, defaultTo: 0},
452453
email_opened_count: {type: 'integer', unsigned: true, nullable: false, defaultTo: 0},
453454
email_open_rate: {type: 'integer', unsigned: true, nullable: true, index: true},

ghost/core/test/e2e-api/admin/__snapshots__/comments.test.js.snap

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -998,6 +998,7 @@ Object {
998998
"email_open_rate": 50,
999999
"email_opened_count": 0,
10001000
"enable_comment_notifications": true,
1001+
"enable_updates_and_announcements": false,
10011002
"expertise": null,
10021003
"geolocation": null,
10031004
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
@@ -1032,6 +1033,7 @@ Object {
10321033
"email_open_rate": 80,
10331034
"email_opened_count": 0,
10341035
"enable_comment_notifications": true,
1036+
"enable_updates_and_announcements": false,
10351037
"expertise": null,
10361038
"geolocation": null,
10371039
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
@@ -1083,6 +1085,7 @@ Object {
10831085
"email_open_rate": 50,
10841086
"email_opened_count": 0,
10851087
"enable_comment_notifications": true,
1088+
"enable_updates_and_announcements": false,
10861089
"expertise": null,
10871090
"geolocation": null,
10881091
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
@@ -1117,6 +1120,7 @@ Object {
11171120
"email_open_rate": 80,
11181121
"email_opened_count": 0,
11191122
"enable_comment_notifications": true,
1123+
"enable_updates_and_announcements": false,
11201124
"expertise": null,
11211125
"geolocation": null,
11221126
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
@@ -1202,6 +1206,7 @@ Object {
12021206
"email_open_rate": 50,
12031207
"email_opened_count": 0,
12041208
"enable_comment_notifications": true,
1209+
"enable_updates_and_announcements": false,
12051210
"expertise": null,
12061211
"geolocation": null,
12071212
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
@@ -1236,6 +1241,7 @@ Object {
12361241
"email_open_rate": 80,
12371242
"email_opened_count": 0,
12381243
"enable_comment_notifications": true,
1244+
"enable_updates_and_announcements": false,
12391245
"expertise": null,
12401246
"geolocation": null,
12411247
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,

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 = 'd13d76b072adfe28a355834180b013aa';
38+
const currentSchemaHash = '0aa8f53f1df03b6fe6f8a8a1f44af8f0';
3939
const currentFixturesHash = '353da9c0389256cfae495bbf05350911';
4040
const currentSettingsHash = '397be8628c753b1959b8954d5610f83f';
4141
const currentRoutesHash = '3d180d52c663d173a6be791ef411ed01';

0 commit comments

Comments
 (0)