How to remove all topics and posts from database?
-
@henrywright Ye you have to still purge them afterwards.
-
@henrywright Never noticed that, think the only way would be the risky DB editing or starting from scratch.
-
I have the same issue. I am ready to launch the site but don't want to keep the silly test posts and topics. I want to erase them completely
-
@Ziggy I think there must be a way to remove posts and topics without flushing the database (wiping everything). I'd like to keep all of the config I've set up, just get rid of this test post and topic data I've been using. Any ideas?
-
I'll start playing with my test setup, see if I can find something besides the default delete -> Purge option.
Edit: Seems to be posible by a database editor but its a bit of a pain, I'll write a guide on it here later. I'm also unsure if this will cause any side effects. So I'll keep testing for now.
Edit 2: Purging seems to do the same and is basicly faster so please do that instead...
-
@Kowlin the problem with purging is it doesn't remove the topic completely. For example, after purging, go to the topic's URL. You'll see the text "This topic has been deleted and only authorised people can see it". Also, the topic ID still exists in the database.
-
@henrywright I've noticed that too, and the thing is it still starts calculating from where you left off. For example, after purging topic 4, NodeBB will still count the new topic as topic 5. Also I think you are just deleting the topics, after the topic is deleted theres another option for purging (See gif below)
http://i.imgur.com/BuX03N3.gifvEdit: Feel free to send me a chat if you want to communicate a little faster.
-
@Kowlin Thank you for the .gif, that makes things a little clearer. You can purge 2 times. The first purge results in the authorised people only message and the 2nd purge gets rid of the URL. As you say, the next topic you create will begin where you left off (topic IDs aren't recycled).
-
@Ziggy www.getsharex.com
-
ever try redis commander?
-
@Kowlin said:
after the topic is deleted theres another option for purging
In my almost-not-a-test install, the topics/comments still show after purging. @henrywright, is purging really deleting in your installation? I am running 0.8.1.
-
@Fastidious I think it did but can't fully remember. Soon after I wrote my last post on this topic I reinstalled from scratch (deleted
/path/to/nodebb
and didredis-cli flushall
) so removing unwanted topics and posts became less of a priority. -
@henrywright well, that ought to flush them all right!
-
@Fastidious hehe I did feel like I was using a sledgehammer to crack a nut at the time.