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

feat: scaffold DB migration script for new app projects #2094

Merged
merged 1 commit into from Nov 30, 2018

Conversation

Projects
None yet
4 participants
@bajtos
Member

bajtos commented Nov 29, 2018

As a follow-up for #2059:

  • Add a template of migrate.ts to lb4 app generator. All new app project will be created with src/migrate.ts now.

  • Further extend lb4 app generator to include the following npm/package script:

    "migrate": "node ./dist/src/migrate"
    
  • Apply these changes to examples/todo and examples/todo-list

  • Update Database migrations documentation page accordingly.

Checklist

  • npm test passes on your machine
  • New tests added or existing tests modified to cover all changes
  • Code conforms with the style guide
  • API Documentation in code was updated
  • Documentation in /docs/site was updated
  • Affected artifact templates in packages/cli were updated
  • Affected example projects in examples/* were updated

@bajtos bajtos self-assigned this Nov 29, 2018

@bajtos bajtos requested review from raymondfeng and strongloop/loopback-maintainers Nov 29, 2018

@bajtos bajtos requested a review from hacksparrow as a code owner Nov 29, 2018

@jannyHou

👍 LGTM

@jannyHou

This comment has been minimized.

Contributor

jannyHou commented Nov 30, 2018

Do we have any plan to update other example repos like todo-list?

@b-admike

b-admike approved these changes Nov 30, 2018 edited

LGTM 🎉. On a side note, should we have the migrate script on other example projects besides todo? Janny already mentioned it :)

@bajtos

This comment has been minimized.

Member

bajtos commented Nov 30, 2018

Do we have any plan to update other example repos like todo-list?

  • I am adding src/migrate.ts and npm run migrate to examples/todo-list as part of this PR.
  • examples/todo already contains src/migrate.ts, I added it as part of the previous PR. In this PR, I am adding npm run migrate script.

Did I miss anything?

@bajtos bajtos merged commit f783f07 into master Nov 30, 2018

5 of 6 checks passed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
clahub All contributors have signed the Contributor License Agreement.
Details
continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
coverage/coveralls Coverage remained the same at 90.225%
Details
security/snyk - package.json (dhmlau) No manifest changes detected

@bajtos bajtos deleted the feat/cli-db-migration branch Nov 30, 2018

@jannyHou

This comment has been minimized.

Contributor

jannyHou commented Nov 30, 2018

sorry I found my comment was confusing, what I meant is

Do we have any plan to update other example repos like what's been added in this PR

I thought other examples in examples/* also needs the migration file but actually not. We are good 👍

@raymondfeng raymondfeng referenced this pull request Dec 3, 2018

Open

Boot scripts #2034

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