Skip to content

Instantly share code, notes, and snippets.

@papajuans
Created September 7, 2022 18:52
Show Gist options
  • Save papajuans/12c9b72ecc0dd742c5b0400b3a2c53d7 to your computer and use it in GitHub Desktop.
Save papajuans/12c9b72ecc0dd742c5b0400b3a2c53d7 to your computer and use it in GitHub Desktop.
// MongoDB collection
// articles
{ id: '123', revision: 1, hed: 'My Title', body: 'foo bar bat baz' }
{ id: '123', revision: 2, hed: 'My Title Updated', body: 'foo bar bat baz' }
// galleries
{ id: '444', revision: 1, hed: 'My Gallery', body: 'foo bar bat baz' }
{ id: '444', revision: 2, hed: 'My Gallery Updated', body: 'foo bar bat baz' }
// text_formats; auto-merge format
{ contentId: '123', revision: 2, fields:
@tim-evans
Copy link

tim-evans commented Sep 7, 2022

{ id: '444', modelName: 'gallery', revision: 1, hed: { text: 'My Gallery' }, body: { text: 'foo bar bat baz' } }
{ id: '444', modelName: 'gallery', revision: 2, hed: {  atjsonversion: '2.11.3', text: 'My Gallery Updated' }, body: { text:'foo bar bat baz' } }
{ id: '123', modelName: 'article', revision: 1, hed: { text: 'My Title', body: 'foo bar bat baz' } }
{ id: '123', modelName: 'article', revision: 2, hed: { text: 'My Title Updated', body: 'foo bar bat baz' } }

{ id: '444', revision: 1, hed: { text: 'My Gallery' }, body: { text: '\uFFFCfoo bar bat baz', blocks: [ObjectId()] } }
{ id: '444', revision: 2, hed: { text: 'My Gallery Updated' }, body: { text:'\uFFFCfoo bar bat baz', blocks: [ObjectId()] } }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment