(migration)
| 1 | import type { MigrationFunction } from 'contentful-migration' |
| 2 | |
| 3 | const migrate: MigrationFunction = (migration) => { |
| 4 | const post = migration.createContentType('post', { |
| 5 | name: 'Blog Post', |
| 6 | description: 'Posts on our blog', |
| 7 | }) |
| 8 | |
| 9 | post.createField('title', { |
| 10 | name: 'Title', |
| 11 | type: 'Text', |
| 12 | required: true, |
| 13 | localized: true, |
| 14 | }) |
| 15 | |
| 16 | post.createField('introduction', { |
| 17 | name: 'Introduction', |
| 18 | type: 'Text', |
| 19 | // type: 'RichText', |
| 20 | required: true, |
| 21 | localized: true, |
| 22 | }) |
| 23 | |
| 24 | post.createField('body', { |
| 25 | name: 'Introduction', |
| 26 | type: 'Text', |
| 27 | // type: 'RichText', |
| 28 | required: true, |
| 29 | localized: true, |
| 30 | }) |
| 31 | |
| 32 | post.createField('background', { |
| 33 | name: 'Background Image', |
| 34 | type: 'Link', |
| 35 | linkType: 'Asset', |
| 36 | }) |
| 37 | |
| 38 | post.createField('card', { |
| 39 | name: 'Card Image', |
| 40 | type: 'Link', |
| 41 | linkType: 'Asset', |
| 42 | }) |
| 43 | |
| 44 | // const page = migration.createContentType('page', { |
| 45 | // description: 'Landing Page', |
| 46 | // name: 'A landing page', |
| 47 | // }) |
| 48 | |
| 49 | // page.createField('popular', { |
| 50 | // name: 'Whether page is popular', |
| 51 | // type: 'Boolean', |
| 52 | // required: true, |
| 53 | // }) |
| 54 | |
| 55 | // page.createField('isFurry', { |
| 56 | // name: 'Is this a furry animal', |
| 57 | // type: 'Boolean', |
| 58 | // required: false, |
| 59 | // }) |
| 60 |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…