mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-27 18:52:14 +03:00
Added type column to posts table
refs #10922 This column is limited to the two values 'post' and 'page'
This commit is contained in:
parent
c713847718
commit
9b85fc6a69
@ -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: {
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user