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 remove Table in Repair / Optimize Tables (https://vborg.vbsupport.ru/showthread.php?t=319757)

webmastersun 08-06-2015 03:35 PM

How to remove Table in Repair / Optimize Tables
 
Hello,

As title mentioned, I want to remove some tables in Repair / Optimize Tables in Admincp

tables came from removed plugins but they are showing in Repair / Optimize Tables

Can I remove them from admin page or from database manually?

Thanks

MarkFL 08-06-2015 03:49 PM

I think your best bet is to (make a backup first) and then manually remove the tables that are associated with products you no longer have installed from your database.

Obviously, a well-coded product will include "Uninstall Code" that removes any database structure changes that were made when installed.

webmastersun 08-06-2015 03:55 PM

Quote:

Originally Posted by MarkFL (Post 2552259)
I think your best bet is to (make a backup first) and then manually remove the tables that are associated with products you no longer have installed from your database.

Where to find these tables?

Quote:

Originally Posted by MarkFL (Post 2552259)
Obviously, a well-coded product will include "Uninstall Code" that removes any database structure changes that were made when installed.

Of course I uninstalled plugins (products) from admincp but I don't know why some tables still existed in Repair / Optimize Tables

MarkFL 08-06-2015 04:13 PM

If you don't know how to access your database on your server, it may be simpler to use manual SQL queries to drop the unneeded table(s).

For each table you want to remove, run the following manual SQL query:

DROP TABLE 'table_name'

where table_name is the name of the table you wish to remove.

Note: Of course, make a backup of your database first before performing these queries in case something goes wrong.

What I meant by my second comment was directed towards the authors of the products themselves (not you)...there should be uninstall code that removes created tables and added columns, etc. when a product is uninstalled. This way when a user uninstalls a product there are no database changes left behind that are no longer needed. :D

TheLastSuperman 08-06-2015 06:06 PM

OR simply rename the table - https://dev.mysql.com/doc/refman/5.0...ame-table.html

This way its never deleted until you're 100% sure its not required, this also alleviates the need to re-import any single tables or for those not as experienced forgo the complete database restoration.

I always try to remember now-a-days to let others know to change first before deleting, same with old folders and files when cleaning up your server/ftp etc you CHMOD them to 000 instead of deleting, refresh the forum then navigate and check if no issues then delete the folders/files - if an error redo CHMOD and everything is back to normal. By simply changing first instead of deleting, it can save those not up to par on the process a mighty big migraine! So as we can see, for those who don't run backups on a normal basis or who might be frequenting this thread about to delete something before backing it up (database and/or files as well) that you could change it first to ensure its not needed, then delete if not required :cool:.


All times are GMT. The time now is 12:27 PM.

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.01427 seconds
  • Memory Usage 1,724KB
  • 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_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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