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

What's the correct way to load the DB schema? On "setup"? Or on first "deploy"? #651

Open
jmuheim opened this issue Sep 30, 2019 · 2 comments

Comments

@jmuheim
Copy link

jmuheim commented Sep 30, 2019

Hello

I'm still unsure when to load my DB schema when setting up a new application using Mina.

I know about invoke :'rails:db_schema_load' in deploy, but I only need to run it the very first deploy. So why not move it to setup? Or at least only run it the very first time - because now I have to uncomment it manually after the first run, otherwise:

rake aborted!
       ActiveRecord::ProtectedEnvironmentError: You are attempting to run a destructive action against your 'production' database.

Thank you.

@jmuheim
Copy link
Author

jmuheim commented Oct 9, 2019

Is this an exotic question? Or why does nobody seem to care? I find my question a very basic one, and I don't find any explanation or further information about it anywhere else. Blog posts explaining how to set up a deployment using Mina seem to help themselves by manually loading the DB, or by uncommenting invoke :'rails:db_schema_load' the very first time a deployment is executed, but this all seems silly to me. There must be a fool-proof way for that?!

@jmuheim
Copy link
Author

jmuheim commented Oct 14, 2019

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

1 participant