mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-01 05:50:35 +03:00
b447a26832
closes https://linear.app/tryghost/issue/MOM-170 When the subtitle field is included in the editor it creates a disconnect with post revisions if the underlying custom excerpt data is not included so we'd like to both preview and restore the subtitle when the in-editor subtitle field is enabled. - added `post_revisions.custom_excerpt` column to schema - added migration to add `post_revisions.custom_excerpt` to existing databases - added migration to populate `post_revisions.custom_excerpt` with the current `post.custom_excerpt` value from the associated record - ensures no data is inadvertently lost when restoring an old version - using current data matches what would have happened previously where custom_excerpt was never overwritten when restoring an old version - updated post revisions handling to accept the `custom_excerpt` field - updated Admin's revision preview and restoration to display and set the `custom_excerpt` field
15 lines
425 B
JavaScript
15 lines
425 B
JavaScript
import Model, {attr, belongsTo} from '@ember-data/model';
|
|
|
|
export default class PostRevisionModel extends Model {
|
|
@attr('string') lexical;
|
|
@attr('string') title;
|
|
@attr('string') customExcerpt;
|
|
@attr('string') featureImage;
|
|
@attr('string') featureImageAlt;
|
|
@attr('string') featureImageCaption;
|
|
@attr('string') reason;
|
|
@attr('moment-utc') createdAt;
|
|
@belongsTo('user') author;
|
|
@attr('string') postStatus;
|
|
}
|