Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New: Create migrations scripts (fixes #88) #89

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open

Conversation

swashbuck
Copy link
Contributor

@swashbuck swashbuck commented Jan 20, 2025

Part of https://github.com/cgkineo/cgkineo/issues/3

Fixes #88

New

  • Migration scripts added to repo

Migration milestones

2.0.2

The tag for 2.0.2 is different from this version?

  • Legacy schemas created.

3.0.0

  • Item body - Added

3.1.2

  • _percentInviewVertical - Added

3.3.0

  • _columns - Added

5.2.0

  • Item _graphic object added
  • Item _imageSrc - Changed to _graphic.src
  • Item alt - Changed to _graphic.alt
  • Item _graphic.attribution - Added
  • _itemHorizontalAlignment - Added
  • _bulletAlignment - Added

5.2.1

  • ⭐️ v1 schemas added

5.2.5

  • bodyAfter - Added

Example legacy List config

You can use this for testing the migration.

{
  "_id": "c-100",
  "_parentId": "b-100",
  "_type": "component",
  "_component": "list",
  "_comment": "Supported classes = 'align-items-vert-center'. Aligns either the step number or image centrally, on the vertical axis, with the content.",
  "_classes": "",
  "_layout": "full",
  "title": "List component",
  "displayTitle": "List component",
  "body": "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa.<br/><br/>Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.",
  "instruction": "Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim.",
  "_animateList": true,
  "_items": [
      {
        "title": "Lorem ipsum dolor sit amet",
        "_imageSrc": "course/en/images/list-item.png",
        "alt": "List image 1"
      },
      {
        "title": "No list item image. Lorem ipsum dolor sit amet",
        "alt": ""
      },
      {
        "title": "Lorem ipsum dolor sit amet",
        "_imageSrc": "course/en/images/list-item.png",
        "alt": "List image 3"
      }
  ],
  "_pageLevelProgress": {
      "_isEnabled": true
  }
},

@swashbuck swashbuck self-assigned this Jan 20, 2025
@swashbuck swashbuck marked this pull request as ready for review January 27, 2025 21:44
@swashbuck
Copy link
Contributor Author

Ready for review.

@swashbuck
Copy link
Contributor Author

Going to refactor this a bit.

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

Successfully merging this pull request may close these issues.

Add migration scripts to the repo
1 participant