0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-04-15 03:01:37 -05:00

Moved posts_meta.hide_title_and_feature_image to posts.show_title_and_feature_image (#17239)

no issue

`show_title_and_feature_image` leads to more intuitive logic in themes and we can use `posts` rather than `posts_meta` as there are no longer row-length issues with MySQL 8.

- removed original add-column migration that was never in a release
- added new add-column migration that puts
`show_title_and_feature_image` column with a default of `true` on the `posts` table
- renamed property and default value everywhere
- bumped `@tryghost/admin-api-schema` to allow the new property through at the API level
This commit is contained in:
Kevin Ansfield 2023-07-07 17:40:22 +02:00 committed by GitHub
parent b433686944
commit d8d0bc8bd9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 167 additions and 61 deletions

View file

@ -15,11 +15,11 @@
@caption={{@featureImageCaption}}
@updateCaption={{@setFeatureImageCaption}}
@forceButtonDisplay={{or (not @title) (eq @title "(Untitled)") this.titleIsHovered this.titleIsFocused}}
@isHidden={{and (feature 'pageImprovements') @cardOptions.post.hideTitleAndFeatureImage}}
@isHidden={{and (feature 'pageImprovements') (not @cardOptions.post.showTitleAndFeatureImage)}}
/>
<div class="gh-editor-title-container {{if (feature "pageImprovements") "page-improvements"}}">
{{#if (and @cardOptions.post.hideTitleAndFeatureImage (feature 'pageImprovements'))}}
{{#if (and (feature 'pageImprovements') (not @cardOptions.post.showTitleAndFeatureImage))}}
<span class="gh-editor-hidden-indicator" data-tooltip="Feature image and post title are hidden">
{{svg-jar "eye-closed"}}
</span>

View file

@ -154,15 +154,15 @@
<div class="for-switch x-small">
<label class="switch">
<span>
<Icons::EyeOpenClose class="feature" @closed={{this.post.hideTitleAndFeatureImage}} />
Hide title and feature image
<Icons::EyeOpenClose class="feature" @closed={{not this.post.showTitleAndFeatureImage}} />
Show title and feature image
</span>
<div class="gh-toggle-featured">
<input
type="checkbox"
checked={{this.post.hideTitleAndFeatureImage}}
checked={{this.post.showTitleAndFeatureImage}}
class="gh-input post-settings-featured"
{{on "change" this.toggleHideTitleAndFeatureImage}}
{{on "change" this.toggleShowTitleAndFeatureImage}}
data-test-checkbox="hide-title-and-feature-image"
>
<span class="input-toggle-component"></span>

View file

@ -212,8 +212,8 @@ export default class GhPostSettingsMenu extends Component {
}
@action
toggleHideTitleAndFeatureImage(event) {
this.post.hideTitleAndFeatureImage = event.target.checked;
toggleShowTitleAndFeatureImage(event) {
this.post.showTitleAndFeatureImage = event.target.checked;
// If this is a new post. Don't save the post. Defer the save
// to the user pressing the save button

View file

@ -131,7 +131,7 @@ export default Model.extend(Comparable, ValidationEngine, {
featureImage: attr('string'),
featureImageAlt: attr('string'),
featureImageCaption: attr('string'),
hideTitleAndFeatureImage: attr('boolean', {defaultValue: false}),
showTitleAndFeatureImage: attr('boolean', {defaultValue: true}),
authors: hasMany('user', {embedded: 'always', async: false}),
createdBy: belongsTo('user', {async: true}),

View file

@ -31,7 +31,7 @@ export default class PostSerializer extends ApplicationSerializer.extend(Embedde
delete json.author;
// Page-only properties
if (snapshot.modelName !== 'page') {
delete json.hide_title_and_feature_image;
delete json.show_title_and_feature_image;
}
if (json.visibility === null) {

View file

@ -105,7 +105,7 @@ module.exports = async (model, frame, options = {}) => {
// NOTE: the default of `email_only` is `false` which is why we default to `false` instead of `null`
// The undefined value is possible because `posts_meta` table is lazily created only one of the
// values is assigned.
const defaultValue = (attr === 'email_only' || attr === 'hide_title_and_feature_image') ? false : null;
const defaultValue = (attr === 'email_only') ? false : null;
jsonModel[attr] = _.get(jsonModel.posts_meta, attr) || defaultValue;
});
delete jsonModel.posts_meta;

View file

@ -127,7 +127,7 @@ const post = (attrs, frame) => {
}
if (attrs.type !== 'page') {
delete attrs.hide_title_and_feature_image;
delete attrs.show_title_and_feature_image;
}
delete attrs.locale;

View file

@ -1,7 +0,0 @@
const {createAddColumnMigration} = require('../../utils');
module.exports = createAddColumnMigration('posts_meta', 'hide_title_and_feature_image', {
type: 'boolean',
nullable: false,
defaultTo: false
});

View file

@ -0,0 +1,7 @@
const {createAddColumnMigration} = require('../../utils');
module.exports = createAddColumnMigration('posts', 'show_title_and_feature_image', {
type: 'boolean',
nullable: false,
defaultTo: true
});

View file

@ -91,6 +91,7 @@ module.exports = {
custom_template: {type: 'string', maxlength: 100, nullable: true},
canonical_url: {type: 'text', maxlength: 2000, nullable: true},
newsletter_id: {type: 'string', maxlength: 24, nullable: true, references: 'newsletters.id'},
show_title_and_feature_image: {type: 'boolean', nullable: false, defaultTo: true},
'@@UNIQUE_CONSTRAINTS@@': [
['slug', 'type']
]
@ -110,8 +111,7 @@ module.exports = {
frontmatter: {type: 'text', maxlength: 65535, nullable: true},
feature_image_alt: {type: 'string', maxlength: 191, nullable: true, validations: {isLength: {max: 125}}},
feature_image_caption: {type: 'text', maxlength: 65535, nullable: true},
email_only: {type: 'boolean', nullable: false, defaultTo: false},
hide_title_and_feature_image: {type: 'boolean', nullable: false, defaultTo: false}
email_only: {type: 'boolean', nullable: false, defaultTo: false}
},
// NOTE: this is the staff table
users: {

View file

@ -94,7 +94,8 @@ Post = ghostBookshelf.Model.extend({
type: 'post',
tiers,
visibility: visibility,
email_recipient_filter: 'all'
email_recipient_filter: 'all',
show_title_and_feature_image: true
};
},

View file

@ -6,8 +6,7 @@ const PostsMeta = ghostBookshelf.Model.extend({
defaults: function defaults() {
return {
email_only: false,
hide_title_and_feature_image: false
email_only: false
};
},

View file

@ -66,7 +66,7 @@
"@tryghost/adapter-base-cache": "0.1.5",
"@tryghost/adapter-cache-redis": "0.0.0",
"@tryghost/adapter-manager": "0.0.0",
"@tryghost/admin-api-schema": "4.5.0",
"@tryghost/admin-api-schema": "4.5.1",
"@tryghost/announcement-bar-settings": "0.0.0",
"@tryghost/api-framework": "0.0.0",
"@tryghost/api-version-compatibility-service": "0.0.0",

View file

@ -24,7 +24,6 @@ Object {
"feature_image_caption": null,
"featured": false,
"frontmatter": null,
"hide_title_and_feature_image": Any<Boolean>,
"html": null,
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
"lexical": null,
@ -38,6 +37,7 @@ Object {
"primary_author": Any<Object>,
"primary_tag": Any<Object>,
"published_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
"show_title_and_feature_image": Any<Boolean>,
"slug": "test-page-2",
"status": "published",
"tags": Any<Array>,
@ -116,7 +116,6 @@ Object {
"feature_image_caption": null,
"featured": false,
"frontmatter": null,
"hide_title_and_feature_image": Any<Boolean>,
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
"lexical": null,
"meta_description": null,
@ -129,6 +128,7 @@ Object {
"primary_author": Any<Object>,
"primary_tag": Any<Object>,
"published_at": null,
"show_title_and_feature_image": Any<Boolean>,
"slug": "test-page-copy",
"status": "draft",
"tags": Any<Array>,
@ -187,7 +187,7 @@ exports[`Pages API Copy Can copy a page 3: [headers] 1`] = `
Object {
"access-control-allow-origin": "http://127.0.0.1:2369",
"cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0",
"content-length": "3668",
"content-length": "3667",
"content-type": "application/json; charset=utf-8",
"content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/,
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
@ -302,3 +302,109 @@ Object {
"x-powered-by": "Express",
}
`;
exports[`Pages API Update Can modify show_title_and_feature_image property 1: [body] 1`] = `
Object {
"pages": Array [
Object {
"authors": Any<Array>,
"canonical_url": null,
"codeinjection_foot": null,
"codeinjection_head": null,
"comment_id": Any<String>,
"count": Object {
"negative_feedback": 0,
"paid_conversions": 0,
"positive_feedback": 0,
"signups": 0,
},
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
"custom_excerpt": null,
"custom_template": null,
"excerpt": null,
"feature_image": null,
"feature_image_alt": null,
"feature_image_caption": null,
"featured": false,
"frontmatter": null,
"html": null,
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
"lexical": null,
"meta_description": null,
"meta_title": null,
"mobiledoc": "{\\"version\\":\\"0.3.1\\",\\"ghostVersion\\":\\"4.0\\",\\"markups\\":[],\\"atoms\\":[],\\"cards\\":[],\\"sections\\":[[1,\\"p\\",[[0,[],0,\\"\\"]]]]}",
"og_description": null,
"og_image": null,
"og_title": null,
"post_revisions": Any<Array>,
"primary_author": Any<Object>,
"primary_tag": Any<Object>,
"published_at": null,
"show_title_and_feature_image": false,
"slug": "test-page",
"status": "draft",
"tags": Any<Array>,
"tiers": Array [
Object {
"active": true,
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
"currency": null,
"description": null,
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
"monthly_price": null,
"monthly_price_id": null,
"name": "Free",
"slug": "free",
"trial_days": 0,
"type": "free",
"updated_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
"visibility": "public",
"welcome_page_url": null,
"yearly_price": null,
"yearly_price_id": null,
},
Object {
"active": true,
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
"currency": "usd",
"description": null,
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
"monthly_price": 500,
"monthly_price_id": null,
"name": "Default Product",
"slug": "default-product",
"trial_days": 0,
"type": "paid",
"updated_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
"visibility": "public",
"welcome_page_url": null,
"yearly_price": 5000,
"yearly_price_id": null,
},
],
"title": "Test Page",
"twitter_description": null,
"twitter_image": null,
"twitter_title": null,
"updated_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
"url": Any<String>,
"uuid": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/,
"visibility": "public",
},
],
}
`;
exports[`Pages API Update Can modify show_title_and_feature_image property 2: [headers] 1`] = `
Object {
"access-control-allow-origin": "http://127.0.0.1:2369",
"cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0",
"content-length": "3668",
"content-type": "application/json; charset=utf-8",
"content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/,
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
"vary": "Accept-Version, Origin, Accept-Encoding",
"x-cache-invalidate": "/p/5e60ceb9-7ead-4cdb-86f9-edc851ddb780/",
"x-powered-by": "Express",
}
`;

View file

@ -21,7 +21,7 @@ const matchPageShallowIncludes = {
updated_at: anyISODateTime,
published_at: anyISODateTime,
post_revisions: anyArray,
hide_title_and_feature_image: anyBoolean
show_title_and_feature_image: anyBoolean
};
describe('Pages API', function () {
@ -38,7 +38,7 @@ describe('Pages API', function () {
});
describe('Update', function () {
it('Can modify hide_title_and_feature_image property', async function () {
it('Can modify show_title_and_feature_image property', async function () {
const page = {
title: 'Test Page',
status: 'draft'
@ -60,7 +60,7 @@ describe('Pages API', function () {
.body({
pages: [{
id: pageResponse.id,
hide_title_and_feature_image: true,
show_title_and_feature_image: false, // default is true
updated_at: pageResponse.updated_at // satisfy collision detection
}]
})
@ -68,7 +68,7 @@ describe('Pages API', function () {
.matchBodySnapshot({
pages: [Object.assign({}, matchPageShallowIncludes, {
published_at: null,
hide_title_and_feature_image: true
show_title_and_feature_image: false
})]
})
.matchHeaderSnapshot({

View file

@ -132,7 +132,7 @@ const expectedProperties = {
'tiers',
'count',
'post_revisions',
'hide_title_and_feature_image'
'show_title_and_feature_image'
],
user: _(schema.users)

View file

@ -21,7 +21,6 @@ Hopefully you don't find it a bore.",
"feature_image_caption": null,
"featured": false,
"frontmatter": null,
"hide_title_and_feature_image": false,
"html": "<!--kg-card-begin: markdown--><h1>Static page test is what this is for.</h1><p>Hopefully you don't find it a bore.</p><!--kg-card-end: markdown-->",
"id": "618ba1ffbe2896088840a6e9",
"meta_description": null,
@ -31,6 +30,7 @@ Hopefully you don't find it a bore.",
"og_title": null,
"published_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000\\\\\\+\\\\d\\{2\\}:\\\\d\\{2\\}/,
"reading_time": 0,
"show_title_and_feature_image": true,
"slug": "static-page-test",
"title": "This is a static page",
"twitter_description": null,
@ -49,7 +49,7 @@ exports[`Pages Content API Can request page 2: [headers] 1`] = `
Object {
"access-control-allow-origin": "*",
"cache-control": "public, max-age=0",
"content-length": "1120",
"content-length": "1119",
"content-type": "application/json; charset=utf-8",
"content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/,
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
@ -91,7 +91,6 @@ Tip: If you're reading any post or page on your site and you notice something yo
"feature_image_caption": null,
"featured": false,
"frontmatter": null,
"hide_title_and_feature_image": false,
"html": "<p>Unlike posts, pages in Ghost don't appear in the main feed. They're separate, individual pages which only show up when you link to them. Great for content which is important, but separate from your usual posts.</p><p>An about page is a great example of one you might want to set up early on so people can find out more about you, and what you do. Why should people subscribe to your site and become a member? Details help!</p><blockquote><strong>Tip: </strong>If you're reading any post or page on your site and you notice something you want to edit, you can add <code>/edit</code> to the end of the URL and you'll be taken directly to the Ghost editor.</blockquote><p>Now tell the world what your site is all about.</p>",
"id": "6194d3ce51e2700162531a78",
"meta_description": null,
@ -101,6 +100,7 @@ Tip: If you're reading any post or page on your site and you notice something yo
"og_title": null,
"published_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000\\\\\\+\\\\d\\{2\\}:\\\\d\\{2\\}/,
"reading_time": 0,
"show_title_and_feature_image": true,
"slug": "about",
"title": "About this site",
"twitter_description": null,
@ -136,7 +136,6 @@ If you prefer to use a contact form, almost all of the great embedded form servi
"feature_image_caption": null,
"featured": false,
"frontmatter": null,
"hide_title_and_feature_image": false,
"html": "<p>If you want to set up a contact page for people to be able to reach out to you, the simplest way is to set up a simple page like this and list the different ways people can reach out to you.</p><h3 id=\\"for-example-heres-how-to-reach-us\\">For example, here's how to reach us!</h3><ul><li><a href=\\"https://twitter.com/ghost?ref=127.0.0.1\\">@Ghost</a> on Twitter</li><li><a href=\\"https://www.facebook.com/ghost\\">@Ghost</a> on Facebook</li><li><a href=\\"https://instagram.com/ghost?ref=127.0.0.1\\">@Ghost</a> on Instagram</li></ul><p>If you prefer to use a contact form, almost all of the great embedded form services work great with Ghost and are easy to set up:</p><figure class=\\"kg-card kg-image-card\\"><a href=\\"https://ghost.org/integrations/?tag=forms&ref=127.0.0.1\\"><img src=\\"https://static.ghost.org/v4.0.0/images/integrations.png\\" class=\\"kg-image\\" alt loading=\\"lazy\\" width=\\"2944\\" height=\\"1716\\"></a></figure>",
"id": "6194d3ce51e2700162531a79",
"meta_description": null,
@ -146,6 +145,7 @@ If you prefer to use a contact form, almost all of the great embedded form servi
"og_title": null,
"published_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000\\\\\\+\\\\d\\{2\\}:\\\\d\\{2\\}/,
"reading_time": 1,
"show_title_and_feature_image": true,
"slug": "contact",
"title": "Contact",
"twitter_description": null,
@ -177,7 +177,6 @@ Ghost is a non-profit organization, and we give away all our intellectual proper
"feature_image_caption": null,
"featured": false,
"frontmatter": null,
"hide_title_and_feature_image": false,
"html": "<p>Oh hey, you clicked every link of our starter content and even clicked this small link in the footer! If you like Ghost and you're enjoying the product so far, we'd hugely appreciate your support in any way you care to show it.</p><p>Ghost is a non-profit organization, and we give away all our intellectual property as open source software. If you believe in what we do, there are a number of ways you can give us a hand, and we hugely appreciate all of them:</p><ul><li>Contribute code via <a href=\\"https://github.com/tryghost?ref=127.0.0.1\\">GitHub</a></li><li>Contribute financially via <a href=\\"https://github.com/sponsors/TryGhost?ref=127.0.0.1\\">GitHub Sponsors</a></li><li>Contribute financially via <a href=\\"https://opencollective.com/ghost?ref=127.0.0.1\\">Open Collective</a></li><li>Contribute reviews via <strong>writing a blog post</strong></li><li>Contribute good vibes via <strong>telling your friends</strong> about us</li></ul><p>Thanks for checking us out!</p>",
"id": "6194d3ce51e2700162531a7b",
"meta_description": null,
@ -187,6 +186,7 @@ Ghost is a non-profit organization, and we give away all our intellectual proper
"og_title": null,
"published_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000\\\\\\+\\\\d\\{2\\}:\\\\d\\{2\\}/,
"reading_time": 0,
"show_title_and_feature_image": true,
"slug": "contribute",
"title": "Contribute",
"twitter_description": null,
@ -215,7 +215,6 @@ You can integrate any products, services, ads or integrations with Ghost yoursel
"feature_image_caption": null,
"featured": false,
"frontmatter": null,
"hide_title_and_feature_image": false,
"html": "<p>Wondering how Ghost fares when it comes to privacy and GDPR rules? Good news: Ghost does not use any tracking cookies of any kind.</p><p>You can integrate any products, services, ads or integrations with Ghost yourself if you want to, but it's always a good idea to disclose how subscriber data will be used by putting together a privacy page.</p>",
"id": "6194d3ce51e2700162531a7a",
"meta_description": null,
@ -225,6 +224,7 @@ You can integrate any products, services, ads or integrations with Ghost yoursel
"og_title": null,
"published_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000\\\\\\+\\\\d\\{2\\}:\\\\d\\{2\\}/,
"reading_time": 0,
"show_title_and_feature_image": true,
"slug": "privacy",
"title": "Privacy",
"twitter_description": null,
@ -253,7 +253,6 @@ Hopefully you don't find it a bore.",
"feature_image_caption": null,
"featured": false,
"frontmatter": null,
"hide_title_and_feature_image": false,
"html": "<!--kg-card-begin: markdown--><h1>Static page test is what this is for.</h1><p>Hopefully you don't find it a bore.</p><!--kg-card-end: markdown-->",
"id": "618ba1ffbe2896088840a6e9",
"meta_description": null,
@ -263,6 +262,7 @@ Hopefully you don't find it a bore.",
"og_title": null,
"published_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000\\\\\\+\\\\d\\{2\\}:\\\\d\\{2\\}/,
"reading_time": 0,
"show_title_and_feature_image": true,
"slug": "static-page-test",
"title": "This is a static page",
"twitter_description": null,
@ -281,7 +281,7 @@ exports[`Pages Content API Can request pages 2: [headers] 1`] = `
Object {
"access-control-allow-origin": "*",
"cache-control": "public, max-age=0",
"content-length": "9418",
"content-length": "9413",
"content-type": "application/json; charset=utf-8",
"content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/,
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
@ -323,7 +323,6 @@ Tip: If you're reading any post or page on your site and you notice something yo
"feature_image_caption": null,
"featured": false,
"frontmatter": null,
"hide_title_and_feature_image": false,
"id": "6194d3ce51e2700162531a78",
"meta_description": null,
"meta_title": null,
@ -332,6 +331,7 @@ Tip: If you're reading any post or page on your site and you notice something yo
"og_title": null,
"published_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000\\\\\\+\\\\d\\{2\\}:\\\\d\\{2\\}/,
"reading_time": 0,
"show_title_and_feature_image": true,
"slug": "about",
"title": "About this site",
"twitter_description": null,
@ -367,7 +367,6 @@ If you prefer to use a contact form, almost all of the great embedded form servi
"feature_image_caption": null,
"featured": false,
"frontmatter": null,
"hide_title_and_feature_image": false,
"id": "6194d3ce51e2700162531a79",
"meta_description": null,
"meta_title": null,
@ -376,6 +375,7 @@ If you prefer to use a contact form, almost all of the great embedded form servi
"og_title": null,
"published_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000\\\\\\+\\\\d\\{2\\}:\\\\d\\{2\\}/,
"reading_time": 1,
"show_title_and_feature_image": true,
"slug": "contact",
"title": "Contact",
"twitter_description": null,
@ -407,7 +407,6 @@ Ghost is a non-profit organization, and we give away all our intellectual proper
"feature_image_caption": null,
"featured": false,
"frontmatter": null,
"hide_title_and_feature_image": false,
"id": "6194d3ce51e2700162531a7b",
"meta_description": null,
"meta_title": null,
@ -416,6 +415,7 @@ Ghost is a non-profit organization, and we give away all our intellectual proper
"og_title": null,
"published_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000\\\\\\+\\\\d\\{2\\}:\\\\d\\{2\\}/,
"reading_time": 0,
"show_title_and_feature_image": true,
"slug": "contribute",
"title": "Contribute",
"twitter_description": null,
@ -444,7 +444,6 @@ You can integrate any products, services, ads or integrations with Ghost yoursel
"feature_image_caption": null,
"featured": false,
"frontmatter": null,
"hide_title_and_feature_image": false,
"id": "6194d3ce51e2700162531a7a",
"meta_description": null,
"meta_title": null,
@ -453,6 +452,7 @@ You can integrate any products, services, ads or integrations with Ghost yoursel
"og_title": null,
"published_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000\\\\\\+\\\\d\\{2\\}:\\\\d\\{2\\}/,
"reading_time": 0,
"show_title_and_feature_image": true,
"slug": "privacy",
"title": "Privacy",
"twitter_description": null,
@ -481,7 +481,6 @@ Hopefully you don't find it a bore.",
"feature_image_caption": null,
"featured": false,
"frontmatter": null,
"hide_title_and_feature_image": false,
"id": "618ba1ffbe2896088840a6e9",
"meta_description": null,
"meta_title": null,
@ -490,6 +489,7 @@ Hopefully you don't find it a bore.",
"og_title": null,
"published_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000\\\\\\+\\\\d\\{2\\}:\\\\d\\{2\\}/,
"reading_time": 0,
"show_title_and_feature_image": true,
"slug": "static-page-test",
"title": "This is a static page",
"twitter_description": null,

View file

@ -57,7 +57,6 @@ Object {
"feature_image_caption": null,
"featured": false,
"frontmatter": null,
"hide_title_and_feature_image": false,
"html": null,
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
"meta_description": null,
@ -96,6 +95,7 @@ Object {
},
"primary_tag": null,
"published_at": null,
"show_title_and_feature_image": true,
"slug": "testing-page-added-webhook",
"status": "draft",
"tags": Array [],
@ -301,7 +301,6 @@ Object {
"feature_image_caption": null,
"featured": false,
"frontmatter": null,
"hide_title_and_feature_image": false,
"html": null,
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
"meta_description": null,
@ -350,6 +349,7 @@ Object {
},
"primary_tag": null,
"published_at": null,
"show_title_and_feature_image": true,
"slug": "updated-test-page",
"status": "draft",
"tags": Array [],
@ -519,7 +519,6 @@ Object {
"feature_image_caption": null,
"featured": false,
"frontmatter": null,
"hide_title_and_feature_image": false,
"html": null,
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
"meta_description": null,
@ -568,6 +567,7 @@ Object {
},
"primary_tag": null,
"published_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
"show_title_and_feature_image": true,
"slug": "testing-page-published-webhook",
"status": "published",
"tags": Array [],
@ -737,7 +737,6 @@ Object {
"feature_image_caption": null,
"featured": false,
"frontmatter": null,
"hide_title_and_feature_image": false,
"html": null,
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
"meta_description": null,
@ -786,6 +785,7 @@ Object {
},
"primary_tag": null,
"published_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
"show_title_and_feature_image": true,
"slug": "testing-page-published-edited-webhook",
"status": "published",
"tags": Array [],
@ -954,7 +954,6 @@ Object {
"feature_image_caption": null,
"featured": false,
"frontmatter": null,
"hide_title_and_feature_image": false,
"html": null,
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
"meta_description": null,
@ -1003,6 +1002,7 @@ Object {
},
"primary_tag": null,
"published_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
"show_title_and_feature_image": true,
"slug": "testing-page-rescheduled-webhook",
"status": "scheduled",
"tags": Array [],
@ -1171,7 +1171,6 @@ Object {
"feature_image_caption": null,
"featured": false,
"frontmatter": null,
"hide_title_and_feature_image": false,
"html": null,
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
"meta_description": null,
@ -1220,6 +1219,7 @@ Object {
},
"primary_tag": null,
"published_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
"show_title_and_feature_image": true,
"slug": "testing-page-scheduled-webhook",
"status": "scheduled",
"tags": Array [],
@ -1389,7 +1389,6 @@ Object {
"feature_image_caption": null,
"featured": false,
"frontmatter": null,
"hide_title_and_feature_image": false,
"html": null,
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
"meta_description": null,
@ -1460,6 +1459,7 @@ Object {
"visibility": "public",
},
"published_at": null,
"show_title_and_feature_image": true,
"slug": "testing-page-tag-attached-webhook",
"status": "draft",
"tags": Array [
@ -1651,7 +1651,6 @@ Object {
"feature_image_caption": null,
"featured": false,
"frontmatter": null,
"hide_title_and_feature_image": false,
"html": null,
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
"meta_description": null,
@ -1700,6 +1699,7 @@ Object {
},
"primary_tag": null,
"published_at": null,
"show_title_and_feature_image": true,
"slug": "test-page-tag-detached-webhook",
"status": "draft",
"tags": Array [],
@ -1853,7 +1853,6 @@ Object {
"feature_image_caption": null,
"featured": false,
"frontmatter": null,
"hide_title_and_feature_image": false,
"html": null,
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
"meta_description": null,
@ -1902,6 +1901,7 @@ Object {
},
"primary_tag": null,
"published_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
"show_title_and_feature_image": true,
"slug": "testing-page-unpublished-webhook",
"status": "draft",
"tags": Array [],
@ -2070,7 +2070,6 @@ Object {
"feature_image_caption": null,
"featured": false,
"frontmatter": null,
"hide_title_and_feature_image": false,
"html": null,
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
"meta_description": null,
@ -2119,6 +2118,7 @@ Object {
},
"primary_tag": null,
"published_at": null,
"show_title_and_feature_image": true,
"slug": "testing-page-unscheduled-webhook",
"status": "draft",
"tags": Array [],

View file

@ -35,7 +35,7 @@ const validateRouteSettings = require('../../../../../core/server/services/route
*/
describe('DB version integrity', function () {
// Only these variables should need updating
const currentSchemaHash = 'ffd6d6cc850ffa0f69c6a08014e51bf9';
const currentSchemaHash = '8e299caf33efbcf8a12c9cefaf8f6500';
const currentFixturesHash = '93c3b3cb8bca34a733634e74ee514172';
const currentSettingsHash = '4f23a583335dcb4cb3fae553122ea200';
const currentRoutesHash = '3d180d52c663d173a6be791ef411ed01';

View file

@ -6772,10 +6772,10 @@
resolved "https://registry.yarnpkg.com/@tryghost/adapter-base-cache/-/adapter-base-cache-0.1.5.tgz#66021c4e3e92bc623c82728ab50ca497ac41f7ae"
integrity sha512-ZAG7Qzn0RioU6yde67T9cneRtoD1ZxGcjwH81DdbL8ZqiPi66bmPw5TVOiEiFnny2XSDsPuUgc4/PxFO/RfV0g==
"@tryghost/admin-api-schema@4.5.0":
version "4.5.0"
resolved "https://registry.yarnpkg.com/@tryghost/admin-api-schema/-/admin-api-schema-4.5.0.tgz#d4ac7122a3ae1d6468ee1cbfbd234f5474c28d8c"
integrity sha512-Bt+uQsDWUr/uk+E3ifZ7UmcgxJTVgwk+qHetYX1UF+dXGzrVFvflsfpatjJYBMORZ/rqtLvMm8HjPbnA3Fbkzg==
"@tryghost/admin-api-schema@4.5.1":
version "4.5.1"
resolved "https://registry.yarnpkg.com/@tryghost/admin-api-schema/-/admin-api-schema-4.5.1.tgz#0c82194b0f0634e8ea12b146f92e994eebd3b89b"
integrity sha512-LjDnpQSpc6ZmCd4pwoWl6iVorgh7kmbl68tJW5QagZZJorOGfV6y8LiRJssUxXWKKguP7Hxqq6TCfuxeCW7mtw==
dependencies:
"@tryghost/errors" "^1.0.0"
ajv "^6.12.6"