PDA

View Full Version : Administrative and Maintenance Tools - Quick Database Check


Andreas
11-23-2005, 10:00 PM
Quick Database Check

Description
Many Hacks add data (tables, fields) to your database, and not all of them do hav e uninstall functions.
So after some time you may end up with a total mess, as you don't know what is standard and what not.

Then this tool is for you - it shows you which tables are non-standard, which fields have been added to standard tables.

Maybe planned features

Exact check of column definition
Check indexes
Check for non-standard settings, settinggroups, templates, phrase & phrasegroups
Please note: If you currently do have Hacks installed, it will report all their tables/fields as non-standard, as there is no way to determine which belong to installed Hacks.

Usage
Just "import" the product XML (import will not complete, so nothing is ever added to your DB or filesystem).

Version History
1.0.0
Initial Version

1.1.0
Added proper support for table prefixes
Changed field detaction a bit

Marco van Herwaarden
11-24-2005, 09:47 PM
Very nice and clean Kirby. Just a few questions that pop into my mind when i look at the xml:
- Will this not give a false positive if i for example activated full text search?
- Will it also detect missing tables/columns

Andreas
11-24-2005, 09:55 PM
No, as it currently does not check for missing tables/fields, only for added.
And if you enable FT, two tables will be dropped (postindex, word)

As said, this was just a quick shot as I was annoyed having to cleanup a DB manually ;)

michaelbenson
11-24-2005, 10:01 PM
Thanks for this hack, i have been getting aggrevated at the current state of my database.

Mike Gaidin
11-24-2005, 10:10 PM
THANK YOU!!!!

/me clicks install.

Jenta
11-24-2005, 11:03 PM
Might want to alert people that they need to have install/mysql-schema.php uploaded. Many delete their install folder.

Andreas
11-24-2005, 11:08 PM
PHP alert's you if it is not there ;)

Jenta
11-24-2005, 11:16 PM
True. Just trying to have people not asking you about the error they will get.

Btw, nice. Found a couple of importid's I had missed.

RE: Maybe planned features.
Please do! :)

dieselpowered
11-25-2005, 03:22 AM
This is great...I do not mean to sound like a total fool, however, once you know what changes have been made, how do you revert them?

Thank you!!

BoYagoob
11-25-2005, 04:08 AM
I think it is useful

Thanks :)

Marco van Herwaarden
11-25-2005, 07:08 AM
Could it please be uploaded as a zip-file. XML-files tend to open in the browser, and will lead to many questions on how to save it. ;)

theArchitect
11-25-2005, 07:33 AM
Sensational work.

My database had ended up in such a mess that some major new hacks could not be installed, even though they worked fine on my unhacked test forum.

Alas, I had to use Impex and rebuild everything to fix it. But still glad you have released this.

Jenta
11-25-2005, 07:45 AM
Tip: Rename the file to product.xml. Upload it to includes/xml/.
Now you dont need to browse for the file each time. Just click Import in the Import Product page without having to type the filename.

OR import the XML file from your server ./includes/xml/product.xml

gothicuser
11-25-2005, 07:56 AM
Really nice one, many thanks

sensimilla
11-25-2005, 08:09 AM
Thanks Andreas it might be very usefull

reteep
11-25-2005, 08:13 AM
Very nice!

uae
11-25-2005, 09:07 AM
Thanks for sharing Andreas.

Flow Fusion
11-25-2005, 10:46 AM
thanks.

Snake
11-25-2005, 11:49 AM
Thank you! :)

MThornback
11-25-2005, 11:50 AM
This is absolutly fantastic :) I has so many tables carry over from my upgrade that I can finally sort through easily! Thanks so much!

*Clicks Install

Boofo
11-25-2005, 12:28 PM
Is there like an "install but it really doesn't install" button I should click? ;)

Marco van Herwaarden
11-25-2005, 02:07 PM
Is there like an "install but it really doesn't install" button I should click? ;)It is in the bottom of his post. :D

Andreas
11-25-2005, 02:09 PM
LOL :D

Man1c M0g
11-25-2005, 07:44 PM
Extremely useful! Many thanks for this hack! :)

Ben5150
11-25-2005, 07:56 PM
great item but when does this stop working :) the ] keeps moving lol

Jenta
11-25-2005, 08:12 PM
never, it doesnt really install
Usage
Just "import" the product XML (import will not complete, so nothing is ever added to your DB or filesystem).

Moparx
11-26-2005, 01:05 AM
Great work as always Andreas :)
It will be even greater when you get around to including the additional planned features

bigmonay2k
11-26-2005, 01:10 AM
damn, it sound good

David_R
02-14-2006, 10:55 AM
I get following results:

The following tables seem to be non-standard
All the tables of my forum

The following tables seem to be modified
O_customavatar
avatardata
O_customprofilepic
profilepicdata
O_post
isusenetpost
msgid
ref
editlevel

vBulletin v3.5.3, Copyright ?2000-2006

bashy
03-11-2007, 04:28 PM
a long shot but, any chance this could be made to work on 3.6 please?
When i try to install it just says please wait and hangs there :(

Andreas
01-26-2008, 05:37 PM
Time for an update ^. ^

@bashy
It works just fine with all 3.5.X, 3.6.X and current 3.7 betas as well.
If you don't get any output, no changes were detected.

Chicago_VLNU_4s
01-27-2008, 03:54 PM
could be useful, I'll check it out later

Stoebi
01-27-2008, 06:15 PM
Hi

The progress indicator never ends (tested with 3.7.0ß4). Is that correct?

Regards,

Stoebi

Andreas
01-28-2008, 05:12 PM
Yeah - if your DB is unmodifed.
I'll add a message for that case when time permits.

Stoebi
01-29-2008, 05:42 AM
Sorry Andreas,

my db is modified. Thanks for your answer :)


Regards,

Stoebi

Andreas
02-18-2008, 09:12 AM
I guess a print_dots_stop() wouldn't hurt ...

red_head
05-05-2008, 06:55 PM
When i import the product i become the follow error:

Warnung: require_once([path]/install/mysql-schema.php) [function.require-once]: failed to open stream: Permission denied in [path]/admincp/plugin.php(1977) : eval()'d code (Zeile 1)

Fatal error: require_once() [function.require]: Failed opening required '/home/arynar/html/install/mysql-schema.php' (include_path='.:/usr/share/php:/usr/share/pear') in /home/arynar/html/admincp/plugin.php(1977) : eval()'d code on line 1

i have controlled the file permissions.
installed vB is 3.7.0

Andreas
06-14-2009, 02:22 PM
The schema (install/mysql-schema.php) is not in place - this file is needed.

need2fart
10-26-2009, 01:52 AM
So like, this will remove unwanted lines inside my DB? And is it safe to use on a vB 3.8.3 forum?

I have uninstalled a few products and stuff off my forum, and I was wondering if this would clean it up a bit. =)

Also nice hack by the read so far.

Reinn
01-10-2010, 03:33 PM
Will this work in vB 4? I'd really like something like this, thanks!

adivor
01-12-2010, 06:08 AM
I see this error...

Warning: require_once([path]/install/mysql-schema.php) [function.require-once]: failed to open stream: No such file or directory in [path]/advadmincp/plugin.php(1995) : eval()'d code on line 1

Fatal error: require_once() [function.require]: Failed opening required '/var/www/virtual/adivor.it/htdocs/forum/install/mysql-schema.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/virtual/adivor.it/htdocs/forum/advadmincp/plugin.php(1995) : eval()'d code on line 1

cellarius
01-14-2010, 12:56 PM
I see this error...

Warning: require_once([path]/install/mysql-schema.php) [function.require-once]: failed to open stream: No such file or directory in [path]/advadmincp/plugin.php(1995) : eval()'d code on line 1

Fatal error: require_once() [function.require]: Failed opening required '/var/www/virtual/adivor.it/htdocs/forum/install/mysql-schema.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/virtual/adivor.it/htdocs/forum/advadmincp/plugin.php(1995) : eval()'d code on line 1
Read post #38.

Mutt
05-22-2010, 04:06 PM
i'd also like something like this for 4. I'm doing an upgrade to 4 but there's so much custom shit in my old DB. I need to clean that thing up

Mutt
05-22-2010, 04:08 PM
found it here for vb4
https://vborg.vbsupport.ru/showthread.php?t=235476&highlight=Database