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

Port db rake tasks from Rails #191

Open
shaqq opened this issue Mar 10, 2015 · 2 comments
Open

Port db rake tasks from Rails #191

shaqq opened this issue Mar 10, 2015 · 2 comments

Comments

@shaqq
Copy link
Contributor

shaqq commented Mar 10, 2015

@bellycard/platform @darbyfrey

so far, the current database rake tasks we have get us by pretty far:

https://github.com/bellycard/napa/blob/master/lib/tasks/db.rake

but there are other niceties in ActiveRecord that we're not leveraging (such as migrating up/down a version):

https://github.com/rails/rails/blob/e46202139647b458b8c3d5eb3a0dff29474159d3/activerecord/lib/active_record/railties/databases.rake

I'm not quite sure loading the databases.rake file would be a quick and dirty solution because there's still some Rails-specific stuff there.

There also might be other rake tasks that we could use.

@ianneub
Copy link
Contributor

ianneub commented May 7, 2015

This might also fix an issue I'm having where none of the rake db:* tasks work because my DB server is not on localhost.

https://github.com/bellycard/napa/blob/master/lib/tasks/db.rake#L27

The options hash never gets the host, username, password, or database options from the database.yml.

@ianneub
Copy link
Contributor

ianneub commented May 7, 2015

I made a quick patch to fix the issue I saw. #202

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

No branches or pull requests

2 participants