mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 14:03:48 +03:00
Added validations to table creation
- These are not enforced at the DB level, so don't matter here, but adding for consistency / cleanliness
This commit is contained in:
parent
37a684c2c5
commit
61dc52972f
@ -8,7 +8,7 @@ module.exports = recreateTable('newsletters', {
|
|||||||
sender_name: {type: 'string', maxlength: 191, nullable: false},
|
sender_name: {type: 'string', maxlength: 191, nullable: false},
|
||||||
sender_email: {type: 'string', maxlength: 191, nullable: true},
|
sender_email: {type: 'string', maxlength: 191, nullable: true},
|
||||||
sender_reply_to: {type: 'string', maxlength: 191, nullable: false, defaultTo: 'newsletter', validations: {isIn: [['newsletter', 'support']]}},
|
sender_reply_to: {type: 'string', maxlength: 191, nullable: false, defaultTo: 'newsletter', validations: {isIn: [['newsletter', 'support']]}},
|
||||||
status: {type: 'string', maxlength: 50, nullable: false, defaultTo: 'active'},
|
status: {type: 'string', maxlength: 50, nullable: false, defaultTo: 'active', validations: {isIn: [['active', 'archived']]}},
|
||||||
visibility: {
|
visibility: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
maxlength: 50,
|
maxlength: 50,
|
||||||
|
Loading…
Reference in New Issue
Block a user