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
joneslee85 opened this Issue Jan 15, 2015 · 9 comments

Comments

Projects
None yet
6 participants
@joneslee85
Copy link
Member

joneslee85 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

@joneslee85 joneslee85 added the waiting label Jan 15, 2015

@joneslee85 joneslee85 added this to the v0.3.0 milestone Jan 15, 2015

@joneslee85 joneslee85 self-assigned this Jan 15, 2015

@midas

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

thecatwasnot commented Jan 16, 2015

Agreed.

@joneslee85

This comment has been minimized.

Copy link
Member

joneslee85 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

This comment has been minimized.

Copy link

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.

@joneslee85

This comment has been minimized.

Copy link
Member

joneslee85 commented Jan 17, 2015

@midas if so, then I am okay with ^

@AlfonsoUceda

This comment has been minimized.

Copy link
Member

AlfonsoUceda commented Jan 17, 2015

👍 if thor can, we can ;)

@joneslee85 joneslee85 added help-wanted and removed waiting labels Feb 9, 2015

@vinioliveira

This comment has been minimized.

Copy link

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.

@joneslee85 joneslee85 removed the help-wanted label Feb 24, 2015

@joneslee85 joneslee85 changed the title Lotus DB migration runner Lotus DB migration migrate runner Feb 24, 2015

@joneslee85 joneslee85 added the feature label Feb 24, 2015

@vinioliveira

This comment has been minimized.

Copy link

vinioliveira commented Feb 26, 2015

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

@joneslee85

This comment has been minimized.

Copy link
Member

joneslee85 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 modified the milestone: v0.3.0 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