diff --git a/core/server/data/schema/schema.js b/core/server/data/schema/schema.js index 7f0cf495aa..cef108104b 100644 --- a/core/server/data/schema/schema.js +++ b/core/server/data/schema/schema.js @@ -20,6 +20,7 @@ module.exports = { feature_image: {type: 'string', maxlength: 2000, nullable: true}, featured: {type: 'bool', nullable: false, defaultTo: false}, page: {type: 'bool', nullable: false, defaultTo: false}, + type: {type: 'string', maxlength: 50, nullable: false, defaultTo: 'post', validations: {isIn: [['post', 'page']]}}, status: {type: 'string', maxlength: 50, nullable: false, defaultTo: 'draft'}, locale: {type: 'string', maxlength: 6, nullable: true}, visibility: { diff --git a/core/test/acceptance/old/admin/utils.js b/core/test/acceptance/old/admin/utils.js index 3d122e157b..79b3ed38ea 100644 --- a/core/test/acceptance/old/admin/utils.js +++ b/core/test/acceptance/old/admin/utils.js @@ -31,6 +31,8 @@ const expectedProperties = { .without('visibility') .without('locale') .without('page') + // v2 API doesn't return new type field + .without('type') // deprecated .without('author_id') // always returns computed properties @@ -46,6 +48,8 @@ const expectedProperties = { .without('visibility') .without('locale') .without('page') + // v2 API doesn't return new type field + .without('type') // deprecated .without('author_id') // always returns computed properties diff --git a/core/test/acceptance/old/content/utils.js b/core/test/acceptance/old/content/utils.js index 0b741533b5..d873f37e86 100644 --- a/core/test/acceptance/old/content/utils.js +++ b/core/test/acceptance/old/content/utils.js @@ -23,6 +23,8 @@ const expectedProperties = { .without('locale', 'visibility') // These fields aren't useful as they always have known values .without('status') + // v2 API doesn't return new type field + .without('type') // @TODO: https://github.com/TryGhost/Ghost/issues/10335 // .without('page') // v2 returns a calculated excerpt field