Check Tables [Deleted]

  • Thread starter Thread starter Deleted member 232995
  • Start date Start date
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 have daily updated backups of the last 7 days and can always go back to their status quickly;)
Everyone does that as he likes it best, but a "smart admin" doesn't have to mention that separately either ...

And who wants to tell a developer what useful things he can build into his tool just because someone thinks "other users" are not able to use software correctly?

If I enter
Code:
rm -rf /*
on the console as root, the server is "down" very quickly. Should you not be allowed to have these commands in linux or isn't everyone better responsible for their own actions?
 
Last edited:
No, just no. This is a very bad idea, most users shouldn’t have access to such things.
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.
Hmm ... I somewhat disagree.

An admin that has permission to manage Add-ons can uninstall any Add-on and if the Add-on adheres to Resource Standards Rule 11.4 (which it definitly should!), this would wipe all data that the Add-on added to custom fields and tables - via an action that can be performed through XenForo itself.

So that would not be different to cleaning up orphaned data.
Yes, there is a risk of accidently wiping data that should not be removed, but that can always happen - like accidently deleting a forum.

If it is made clear that a cleanup action is irreversible and that deleting the wrong data will cause damage, I don't see a reason why it should not be available via GUI - after all one could just install PMA and drop fields/tables via a GUI.

With great power comes great responsibility.

Smart admins have daily updated backups of the last 7 days and can always go back to their status quickly;)
Even smarter admins would have a backup strategy to allow exact point in time recovery ;)
 
Last edited:
Smart admins have daily updated backups of the last 7 days and can always go back to their status quickly;)
Everyone does that as he likes it best, but a "smart admin" doesn't have to mention that separately either ...
Don't be ridiculous. Purposefully delete data from your DB at your own peril. Relying on backups in this scenario is a mugs game
 
Thank you for your discussion on the topic of "renaming/deleting". When I started with the add-on, it was clear to me that only a read function was sufficient.

But you are right, it makes sense to set a flag in front of a table/column. Therefore I decided to implement this accordingly.
 
Hello,

I think it is not a good thing to allow anyone to delete a table rename a table from his panel (so an administrator), as he could say if an admin is not experienced in the field of the database it may generate errors, moreover if the table has a name it must keep this name. Apart from that there is also the security of the site that comes into play, if an administrator is hacked his account, the hacker can delete or rename the database!

I think that the drop of table the renaming of table must remain between hands that know the domain, and in a domain more secure.

Apart from that it is a very good addon!!! And also a very good idea!

Regards, CRUEL-MODZ
 
I see you can’t delete from the ACP. There should be a way to undo the rename from within the ACP since you allow renaming in the first place.

Also I think it would be a good idea to restrict this to super admins or have permissions on who can rename things.
 
Why? Are there problems?
I am getting an error saying that the xenforo version is not found:

InvalidArgumentException: No basic data was found for the current XF version!
src/addons/X0815/ChkTables/ChkTable.php:198

#0 src/addons/X0815/ChkTables/ChkTable.php(32): X0815\ChkTables\ChkTable->createCleanTableData()
#1 src/addons/X0815/ChkTables/XF/Admin/Controller/Tools.php(41): X0815\ChkTables\ChkTable->loadTableDataSystem()
#2 src/XF/Mvc/Dispatcher.php(350): X0815\ChkTables\XF\Admin\Controller\Tools->actionChkTables(Object(XF\Mvc\ParameterBag))
#3 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'ChkTables', Object(XF\Mvc\RouteMatch), Object(X0815\ChkTables\XF\Admin\Controller\Tools), NULL)
#4 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(X0815\ChkTables\XF\Admin\Controller\Tools), NULL)
#5 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#6 src/XF/App.php(2337): XF\Mvc\Dispatcher->run()
#7 src/XF.php(488): XF\App->run()
#8 admin.php(13): XF::runApp('XF\\Admin\\App')
#9 {main}

array(4) {
["url"] => string(27) "/admin.php?tools/chk-tables"
["referrer"] => string(35) "https://xxxx.com/admin.php?tools/"
["_GET"] => array(1) {
["tools/chk-tables"] => string(0) ""
}
["_POST"] => array(0) {
}
}
 
I am getting an error saying that the xenforo version is not found:

InvalidArgumentException: No basic data was found for the current XF version!
src/addons/X0815/ChkTables/ChkTable.php:198

Thanks for the info ;)
I totally forgot about it... I thought you had found a bug in connection with XF 2.2.5.

SORRY!
 
Top Bottom