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 loopback-cli command: update/migrate the database #3422

Closed
bajtos opened this issue May 26, 2017 · 2 comments
Closed

New loopback-cli command: update/migrate the database #3422

bajtos opened this issue May 26, 2017 · 2 comments

Comments

@bajtos
Copy link
Member

bajtos commented May 26, 2017

As a follow-up to the discussion in #3395, we should implement a new loopback-cli command that will allow users to auto-update their databases and more importantly, to print (SQL) scripts needed to perform auto-update, so that users can run these scripts themselves.

Related reading: https://www.martinfowler.com/articles/evodb.html#AllDatabaseChangesAreMigrations

A possible implementation:

$ lb autoupdate db --dry
ALTER TABLE AccessTokens
ADD COLUMN scopes VARCHAR(255);
@shaheero
Copy link

shaheero commented May 28, 2017

Another column is needed if you follow the steps in the docs. i.e. if several models are extending the built-in User model.
"principalType" with type VARCHAR and length 255

@bajtos
Copy link
Member Author

bajtos commented Nov 12, 2019

LoopBack version 3 is in LTS, we won't be adding any new features.

@bajtos bajtos closed this as completed Nov 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants