Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 11-04-2017, 02:09 PM
romaine's Avatar
romaine romaine is offline
 
Join Date: Jan 2015
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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!
Reply With Quote
  #2  
Old 11-04-2017, 02:10 PM
Dave Dave is offline
 
Join Date: May 2010
Posts: 2,583
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Благодарность от:
romaine
  #3  
Old 11-04-2017, 03:18 PM
aycan555 aycan555 is offline
 
Join Date: Dec 2005
Location: www.ultrapaylasim.com
Posts: 142
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you dont want any conflicts, just install fresh one, and export only members from old database and import it to new one ..
Reply With Quote
Благодарность от:
romaine
  #4  
Old 11-04-2017, 03:26 PM
romaine's Avatar
romaine romaine is offline
 
Join Date: Jan 2015
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dave View Post
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 View Post
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.
Reply With Quote
  #5  
Old 11-04-2017, 03:58 PM
Dave Dave is offline
 
Join Date: May 2010
Posts: 2,583
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is it that big of a problem to see numbers like that?
At some point it will reach that number again anyway.
Reply With Quote
  #6  
Old 11-04-2017, 04:13 PM
final kaoss final kaoss is offline
 
Join Date: Apr 2006
Posts: 1,314
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by romaine View Post
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.
Reply With Quote
  #7  
Old 11-05-2017, 12:23 AM
romaine's Avatar
romaine romaine is offline
 
Join Date: Jan 2015
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dave View Post
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 View Post
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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:43 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05126 seconds
  • Memory Usage 2,230KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_html
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (2)post_thanks_box_bit
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete