mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 14:03:48 +03:00
Updated members_email_change_events
to store previous email (#12641)
refs https://github.com/TryGhost/Ghost/issues/12602 As we only want to add events for when an email is changed, we need to store the previous email if we want a complete log of all emails for a member
This commit is contained in:
parent
2f547b2974
commit
1d281581eb
@ -3,6 +3,7 @@ const {addTable} = require('../../utils');
|
||||
module.exports = addTable('members_email_change_events', {
|
||||
id: {type: 'string', maxlength: 24, nullable: false, primary: true},
|
||||
member_id: {type: 'string', maxlength: 24, nullable: false, references: 'members.id', cascadeDelete: true},
|
||||
email: {type: 'string', maxlength: 191, nullable: false, unique: false, validations: {isEmail: true}},
|
||||
to_email: {type: 'string', maxlength: 191, nullable: false, unique: false, validations: {isEmail: true}},
|
||||
from_email: {type: 'string', maxlength: 191, nullable: false, unique: false, validations: {isEmail: true}},
|
||||
created_at: {type: 'dateTime', nullable: false}
|
||||
});
|
||||
|
@ -372,7 +372,8 @@ module.exports = {
|
||||
members_email_change_events: {
|
||||
id: {type: 'string', maxlength: 24, nullable: false, primary: true},
|
||||
member_id: {type: 'string', maxlength: 24, nullable: false, references: 'members.id', cascadeDelete: true},
|
||||
email: {type: 'string', maxlength: 191, nullable: false, unique: false, validations: {isEmail: true}},
|
||||
to_email: {type: 'string', maxlength: 191, nullable: false, unique: false, validations: {isEmail: true}},
|
||||
from_email: {type: 'string', maxlength: 191, nullable: false, unique: false, validations: {isEmail: true}},
|
||||
created_at: {type: 'dateTime', nullable: false}
|
||||
},
|
||||
members_status_events: {
|
||||
|
@ -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 = '860fafa2fc5f78df158ddd8254d4993b';
|
||||
const currentSchemaHash = '3f88f2c34001cc34d74d945dbf4f0bb5';
|
||||
const currentFixturesHash = '370d0da0ab7c45050b2ff30bce8896ba';
|
||||
const currentSettingsHash = '162f9294cc427eb32bc0577006c385ce';
|
||||
const currentRoutesHash = '3d180d52c663d173a6be791ef411ed01';
|
||||
|
Loading…
Reference in New Issue
Block a user