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

Lotus DB migration migrate runner #137

Closed
runlevel5 opened this issue Jan 15, 2015 · 9 comments
Closed

Lotus DB migration migrate runner #137

runlevel5 opened this issue Jan 15, 2015 · 9 comments
Assignees
Labels

Comments

@runlevel5
Copy link
Member

@runlevel5 runlevel5 commented Jan 15, 2015

Assigned to @vinioliveira

Prerequisites: #136 and DB Migration applier in model component

What: Add CLI for run migration for

bundle exec lotus db migrate

Please look at my Migrator branch at hanami/model#144 (it is not merged, so please based your work on top of it for now)

NOTE: For the time being, we only support migrating files in db/migrations. Support for migrating files in slice's apps/<slice>/db/migrations is to be discussed

@runlevel5 runlevel5 added this to the v0.3.0 milestone Jan 15, 2015
@runlevel5 runlevel5 self-assigned this Jan 15, 2015
@midas
Copy link

@midas midas commented Jan 16, 2015

I would suggest staying away from the Rake-ish syntax on this. Rails overuses (misuses) Rake in my opinion, especially considering the existence of Thor. Suggested:

bundle exec lotus db migrate

@thecatwasnot
Copy link

@thecatwasnot thecatwasnot commented Jan 16, 2015

Agreed.

@runlevel5
Copy link
Member Author

@runlevel5 runlevel5 commented Jan 17, 2015

@midas I deliberately want the syntax to be db:migrate instead of db migrate because I want to support following syntax in the future:

bundle exec lotus db:migrate #migrate lib/app/db/migrate
bundle exec lotus db:migrate web #migrate apps/web/db/migrate

@midas
Copy link

@midas midas commented Jan 17, 2015

@joneslee85 I am sure you already realize this, but just in case, Thor can support the following syntax using sub commands which will give you the desired API and behavior without the Rake-ish syntax.

bundle exec lotus db migrate #migrate lib/app/db/migrate
bundle exec lotus db migrate web #migrate apps/web/db/migrate

Just seems a little cleaner to me. No using the shift key when typing, prettier to look at, etc.

@runlevel5
Copy link
Member Author

@runlevel5 runlevel5 commented Jan 17, 2015

@midas if so, then I am okay with ^

@AlfonsoUceda
Copy link
Contributor

@AlfonsoUceda AlfonsoUceda commented Jan 17, 2015

👍 if thor can, we can ;)

@vinioliveira
Copy link

@vinioliveira vinioliveira commented Feb 24, 2015

@joneslee85 I've started work on this, it's related to db rollback that I also working on.
I'll send a PR shortly.

@runlevel5 runlevel5 changed the title Lotus DB migration runner Lotus DB migration migrate runner Feb 24, 2015
@vinioliveira
Copy link

@vinioliveira vinioliveira commented Feb 26, 2015

I am wondering if is a good idea create a path option, then, user could define location of migrations.

@runlevel5
Copy link
Member Author

@runlevel5 runlevel5 commented Feb 26, 2015

@vinioliveira I don't think it is a good idea, for we try to be conventional as much as we could

@jodosha jodosha removed this from the v0.3.0 milestone Mar 20, 2015
@jodosha jodosha removed this from the v0.3.0 milestone Mar 20, 2015
@jodosha jodosha closed this in #256 Jun 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
6 participants