Skip to content

Commit a321b87

Browse files
committed
Added fallback sending domain option for email batches
closes [GVA-587](https://linear.app/ghost/issue/GVA-587/create-a-migration-for-the-email-batches-table-to-say-whether-its-sent) We need to know whether an email batch should be sent from the fallback domain or the primary configured domain. See [spike PR](#25303) for our test implementation.
1 parent 99bc502 commit a321b87

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
const {createAddColumnMigration} = require('../../utils');
2+
3+
module.exports = createAddColumnMigration('email_batches', 'fallback_sending_domain', {
4+
type: 'boolean',
5+
nullable: false,
6+
defaultTo: false
7+
});

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -867,6 +867,7 @@ module.exports = {
867867
id: {type: 'string', maxlength: 24, nullable: false, primary: true},
868868
email_id: {type: 'string', maxlength: 24, nullable: false, references: 'emails.id'},
869869
provider_id: {type: 'string', maxlength: 255, nullable: true},
870+
fallback_sending_domain: {type: 'boolean', nullable: false, defaultTo: false},
870871
status: {
871872
type: 'string',
872873
maxlength: 50,

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 = '5d90909b1b8232b45f0174dfa720a051';
38+
const currentSchemaHash = '4e68fd06f63aab5fef99dddd8dc866bb';
3939
const currentFixturesHash = '0877727032b8beddbaedc086a8acf1a2';
4040
const currentSettingsHash = 'bb8be7d83407f2b4fa2ad68c19610579';
4141
const currentRoutesHash = '3d180d52c663d173a6be791ef411ed01';

0 commit comments

Comments
 (0)