vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   How to delete all posts and forums? (https://vborg.vbsupport.ru/showthread.php?t=325745)

romaine 11-04-2017 02:09 PM

How to delete all posts and forums?
 
I restored a vB 4 on a different hosting to test and I want to delete all posts and forums there but keeping members but the problem is I want to have new posts or forums that like a clean forum does, i.e

forum id starts from 1
post id starts from 1

I am thinking about empty forums and posts table in Phpmyadmin but I don't know that's possible or not because I think vBulletin table has relationships together so If I delete them, maybe cause some conflicts on forum?

Please advise me. Thanks!

Dave 11-04-2017 02:10 PM

I don't see why you would want to start from 1 again but the only way to achieve this is to execute
HTML Code:

TRUNCATE TABLE tablename;
queries against all tables that have relationships with the post, thread and forum tables.
This will clear the data and reset the seed.

aycan555 11-04-2017 03:18 PM

If you dont want any conflicts, just install fresh one, and export only members from old database and import it to new one ..

romaine 11-04-2017 03:26 PM

Quote:

Originally Posted by Dave (Post 2590959)
I don't see why you would want to start from 1 again but the only way to achieve this is to execute
HTML Code:

TRUNCATE TABLE tablename;
queries against all tables that have relationships with the post, thread and forum tables.
This will clear the data and reset the seed.

It is just an example for what I want like a fresh forum because id of posts and forums on my forum are pretty big, like 85323 or 93232...etc If members continue posting then it will generate big numbers like that.

Quote:

Originally Posted by aycan555 (Post 2590963)
If you dont want any conflicts, just install fresh one, and export only members from old database and import it to new one ..

That's why I asked this question, I am using vB 4.25 and PHP 7 thus I could not use Impex to import members on a fresh forum.

Dave 11-04-2017 03:58 PM

Is it that big of a problem to see numbers like that?
At some point it will reach that number again anyway.

final kaoss 11-04-2017 04:13 PM

Quote:

Originally Posted by romaine (Post 2590964)
It is just an example for what I want like a fresh forum because id of posts and forums on my forum are pretty big, like 85323 or 93232...etc If members continue posting then it will generate big numbers like that.



That's why I asked this question, I am using vB 4.25 and PHP 7 thus I could not use Impex to import members on a fresh forum.

If you're worried about this affecting performance, don't worry, it will do no such thing. To truncate them just because you see the numbers getting larger is just paranoia. As stated, those numbers will keep growing with each post, so there's no real point in worrying about it.

Oh and I forgot to mention that by truncating them, you also run the risk of breaking internal links that your members may have linked to in threads.

romaine 11-05-2017 12:23 AM

Quote:

Originally Posted by Dave (Post 2590965)
Is it that big of a problem to see numbers like that?
At some point it will reach that number again anyway.

It is not a big problem to see numbers like that but it is my requirement to have new ids on a new forum.

Yeh I think even truncate a table can not solve the problem because it has relations between tables

Quote:

Originally Posted by final kaoss (Post 2590966)
If you're worried about this affecting performance, don't worry, it will do no such thing. To truncate them just because you see the numbers getting larger is just paranoia. As stated, those numbers will keep growing with each post, so there's no real point in worrying about it.

Oh and I forgot to mention that by truncating them, you also run the risk of breaking internal links that your members may have linked to in threads.

You are right, truncate a table can not help to posts or forums have new ids like on a fresh forum.


All times are GMT. The time now is 05:06 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01595 seconds
  • Memory Usage 1,732KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_html_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete