How to execute db:drop db:create db:migrate?

(Ricardo Viteri) #1

How do I execute the following command?

bundle exec rake db:drop db:create db:migrate

(Sam Saffron) #2

Why are you trying to destroy all the data in your database?

(Ricardo Viteri) #3


(Ricardo Viteri) #4

Hi, any pointers on how to accomplish this?


(Arpit Jalan) #5

Since we have switched to Docker based install, it’s not possible to run the commands directly on server.

To delete a database, follow the instructions under header Example: Delete a corrupted database, in this guide:

(Ricardo Viteri) #6

Hi @techAPJ, I just nuked the database as per your instructions but everthing got restored. Is there a way to delete all the data and leave everything else?


(Kane York) #7

What do you mean by that?

Was the container running when you tried to do this…?

(Ricardo Viteri) #8

@riking Yes, everything was on.

(Jens Maier) #9

The FAQ is a bit outdated:

In the default install, the correct path is shared/standalone/postgres_*, and there’s an echo left over from, I’d assume, testing the command. :slight_smile:

(Jeff Atwood) #10

Ok if that is so @techAPJ can you update it to be accurate with current versions?

(Kane York) #11

I updated it to use /var/discourse/shared/standalone.