What is the mysql equivalent to heroku pg:reset DATABASE?

18 Aufrufe
Direkt zur ersten ungelesenen Nachricht

braini...@gmail.com

ungelesen,
23.02.2019, 18:18:4323.02.19
an Ruby on Rails: Talk
Hey Everyone,

I was just wondering if anyone knew the mysql equivalent to $ heroku pg:reset DATABASE.

Thank you

Walter Lee Davis

ungelesen,
23.02.2019, 19:21:3623.02.19
an rubyonra...@googlegroups.com
You can use rake db:reset in your Rails root, with the correct RAILS_ENV= set in the same line. Your database user (as configured in the database.yml file) will have to have the authority to drop the database.

Walter
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/80629938-6c4d-435e-8e3a-ea0077a8dad0%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

braini...@gmail.com

ungelesen,
23.02.2019, 19:30:2023.02.19
an Ruby on Rails: Talk
Thank you Walter. What if I am performing the task from a command line?

Walter Lee Davis

ungelesen,
23.02.2019, 20:28:0423.02.19
an rubyonra...@googlegroups.com
That is the command-line:

cd /path/to/your/app
rake db:reset RAILS_ENV=production (or whatever)

That will do the whole job. It will drop the database, re-create it, and build up all the tables from the schema.rb.

Walter
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/face91e8-6313-41f7-9209-09db2bd9652c%40googlegroups.com.

David Merrick

ungelesen,
23.02.2019, 20:29:0823.02.19
an Ruby on Rails: Talk
Do what Walter said

David Merrick

ungelesen,
23.02.2019, 20:30:0123.02.19
an Ruby on Rails: Talk
in terms of Rails the two are interchangeable.

On Sun, 24 Feb 2019 12:18 PM <braini...@gmail.com> wrote:
Allen antworten
Antwort an Autor
Weiterleiten
0 neue Nachrichten