Check Tables [Deleted]

  • Thread starter Thread starter Deleted member 232995
  • Start date Start date
D

Deleted member 232995

Guest
0815 submitted a new resource:

Check Tables - Checks the database for tables/fields that are no longer used.

ChkTable can support you in finding out which tables or fields are no longer used in the XF installation.

This version is still at an early stage. The first extensive tests were stable and satisfactory. So we are now looking forward to ideas/opinions.


This add-on does not change data, it only reads data.

If changes are made to the DB, a backup should always be made and the use and final control is the responsibility of the user.

Read more about this resource...
 
I am curious, how does this addon detect which tables are no longer in use anymore? How can it assure it?

This addon seems really useful but I don't want to receive false positives, so just asking to be sure.
 
How can it assure it?
the description says "ChkTable can support you in finding out which tables or fields are no longer used in the XF installation. [...]If changes are made to the DB, a backup should always be made and the use and final control is the responsibility of the user.".


In the end, there is no 100% guarantee. Never for anything... So also here...
Every add-on that uses a table is very likely to also use an entity. The tables that are not found via this are tried to be found via a filescan.

Therefore, this add-on has no write property. Ultimately, it is only intended to support. But this was very reliable in all tests.
 
Sure, I know there is no guarantee, I just wanted to understand the method how it detects those things. Obviously always take a backup first if we want to alter database tables (I also use my localhost first to test things).

Thanks for this addon.
 
I look forward to reading your experiences. Also any other ideas you might have for this add-on...
 
  • Like
Reactions: sbj
Can you add to the description the meaning of the colors?

I ran the addon on my localhost and from the outcome half of them look like false positives due to some developers not using XF standards I believe.

I love being able to see which table takes how much space. This is very useful and helpful to determine problems in addons.

Feature suggestion: being able to sort the list by size to see which tables take the most space.
 
some developers not using XF standards I believe.
This is a weak point of my add-on! Only those who strictly adhere to the XF rules....


Can you add to the description the meaning of the colors?
Red = table that is probably no longer used.
Yellow = an XF table that has been extended by fields that may no longer be used.

I will add a legend to the add-on for the upcoming version.


Feature suggestion: being able to sort the list by size to see which tables take the most space.
I noted it down.
 
Great Idea to solve chaos at the Database. :)

As Idea, I think it would be good to move this tool to the addon category at acp menu.

Color description would be nice and a clear warning above the checked tables that it can give false positiv and thats better to make a backup just bevor delete any tables at database.
 
Color description would be nice and a clear warning above the checked tables that it can give false positiv and thats better to make a backup just bevor delete any tables at database.
You are very right about both! And I will deliver both!


As Idea, I think it would be good to move this tool to the addon category at acp menu.
yes and no! It's hard to say whether it belongs there or under Tools. But let's see what others have to say. May the majority "win".
 
The add-on is a very good idea. Too many add-ons do/did not keep their database entries deleted when the associated add-on was uninstalled. With the help of your add-on, I was able to delete numerous entries/columns, which is very beneficial to the performance.

I would like to have a button to conveniently delete such entries, directly from the add-on.
Admins should already know what can and cannot be deleted.

But admins should also ALTER TABLE table_name
DROP COLUMN column_name1,
DROP COLUMN column_name2; can use ;)

So thank you again for creating the add-on and offering it for free download.
 
I would like to have a button to conveniently delete such entries, directly from the add-on.
Admins should already know what can and cannot be deleted.
No, please not. Its better to take a look at database directly bevor you delete anything. The only point I see sense in a one-klick solution will be this way:
1-klick makes first a Snapshot of the database and delete then after a notice that things can go wrong...
But that makes it complicated and its easy to go to Database to delete the tables and fields not deeded anymore.

What can be helpful, will be a print-button, so I can print out a compact complete list of the check result and go than with it to my database to make a backup and delete than some tables/fields I want to delete.

Its a free addon and its now a realy good helper I wont miss anymore as a addon junkie. ;)
 
But admins should also ALTER TABLE table_name
DROP COLUMN column_name1,
DROP COLUMN column_name2; can use ;)

Smart admins will instead RENAME TABLE old_table_name TO xx_old_table_name; and ALTER TABLE table_name RENAME COLUMN old_col_name TO xx_old_col_name; and leave them there for a few days to ensure no impact or errors, before then coming back and removing them :)
 
Smart admins will instead RENAME TABLE old_table_name TO xx_old_table_name; and ALTER TABLE table_name RENAME COLUMN old_col_name TO xx_old_col_name; and leave them there for a few days to ensure no impact or errors, before then coming back and removing them :)
This! (y)
 
only an idea:

Extend the add-on with a kind of quarantine function so that the administrator can easily rename tables and fields. These are then shown in a 2nd table as out of date and in quarantine.
Only from there, after displaying a security notice and the instruction to create a backup if you are unsure, the table or the field can then be deleted.

1. 1. Button = mark as obsolete and rename it
2. Visually mark the table / field as quarantined
3. Only then show the 2nd button (delete)
4. When you click on delete: Show information (You sure? Risk notice) + 2 buttons at the end: "cancel" (default) and "delete permanently"
5. Only now would the table or the field be real deleted

That should provide enough security and also help inexperienced admins to keep their system clean.

If you want to take it to the extreme, you could have a snapshot of the database created between the 4th and 5th.


Personally, I don't need this triple-click solution, but I can imagine that there are enough admins out there who are rather unfamiliar with SQL and possibly cause more damage in the database with inexperienced attempts, even if it is through typing errors.
 
No. If an admin is inexperienced they shouldn’t be doing anything with removing/renaming random tables/columns in the DB even through an addon. That should be left to experienced system admins.
 
Perhaps that is the ideal. But it doesn't correspond to reality. ;)

And one could also argue that an admin should be able to find outdated tables and fields himself, without this add-on here.

In an ideal world, add-ons would themselves offer an option to delete themselves completely if desired, i.e. also from the database. But the world is neither black and white nor ideal.

Nobody would be forced to use the convenient solution, it would be an option.

You could also think about proposing a solution to the inexperienced admin instead of the simple button solution via text message, i.e. showing an example of how he can or should deal with the result of check tables.
That would also be a conceivable way to make it even better, and at the same time teach the inclined admin something if necessary.

There are many hobby forums. These admins often do not have the technical background or do not speak English (there should be;)) and at some point everyone starts and not everyone has what it takes to become an IT specialist. And also not every hobby admin has the money to hire an IT specialist.

So why not approach the potential user?
Everyone started at some point. Nobody is born an admin.
 
This is a tool to identify, and it should be left at that.

If you want people to learn as you say, then they should take the information from the tool and then learn how to manipulate the DB directly.
 
... cool down. :)

I have made my own solution over the last weekend, so I have no need for a ready to use extension out of the box and no need to fight this out here. ;)
It was only an Idea based on the question of @Masetrix. The idea its not welcome, no problem.
 
Top Bottom