Is there a way to clear out my database?

(Ben M) #1

I’m trying to initialise Discourse by importing from a phpbb database (using the Discourse-provided scripts, which are very useful indeed). I’ve had to run the import several times to get it right and now that I have I’d like to import once more into an empty database.

I can’t see an obvious way to do this (e.g. with a provided rake task). Is there a way?

Clear, empty, delete database for another import (development)
(Sander Datema) #2

Searching for delete database revealed this recent topic:

(Ben M) #3

I have a shared/standalone folder which contains a bunch of postgres and upload stuff. Seeing this I’m thinking I do actually want to clear all this out. If I delete the contents of this directory what is the best way to re-create the database?

(Ben M) #4

Also, what would I need to do to trigger a new empty database to be built? I’m having problems running rake db: commands from inside the docker container so I’m guessing that’s not intended usage?

(Khoa Nguyen) #5

Swipe out everything in shared/standalone and rebuild your app. It simple like that. Or just bootstrap a new instance (copy app.yml to another file)

(Ben M) #6

Wow, that is nice. I’ll give it a go. :slight_smile:

(Ben M) #7

And I can report that it worked a treat! Thanks everyone.

(Sam Saffron) #8