Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Customising the CMS /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Uninstalling Module, "_obsolete" table prefix?


Go to End


7 Posts   2553 Views

Avatar
frodeaux

Community Member, 16 Posts

25 January 2010 at 4:46am

I'm unpublishing/deleting content created for the blog module, removing the blog module folder, and running "/dev/build?flush=1", but the blog database tables have not been renamed with the "_obsolete" prefix. Any suggestions what I might be doing wrong? Running v2.3.5.

Avatar
theAlien

Community Member, 131 Posts

26 January 2010 at 2:34pm

Edited: 26/01/2010 2:35pm

I'm not sure... I think I do remember this issue.
Does the _obsolete-suffix show up if you first empty the blog-module-files (select all > delete), run dev/build and then deleting the file itself?

I remember reading somewhere that not showing up _obsolete after deleting a module has something to do with being able to reinstall the blogmodule and reusing all previously entered data.

OK, I could be totally wrong on this, but give it a shot and post back.
Though I did run into this issue, I have never really explored it.
Just did manually the things I expected the CMS to be doing automatically ;-)

Avatar
frodeaux

Community Member, 16 Posts

26 January 2010 at 4:14pm

I've tried as many variations of installation of the (blog) module followed
by the uninstall procedure as I can think of (included the above suggestion),
but so far I can not find any variation which exhibits the documented behavior
(i.e. prepending "obsolete_" to the table name). Will keep trying.
Has anyone else seen this?

Avatar
Willr

Forum Moderator, 5523 Posts

26 January 2010 at 7:19pm

The _obsolete prefix is added to tables and or columns in table when DB::dontRequireTable(). It usually signals the SS has uninstalled a module, or some other cleanup up task has been run. Its quite common and nothing to be worried about.

SilverStripe will very rarely delete anything when you uninstall / modify anything rather it will append that prefix and leave the task of deleting those tables to the developer.

Avatar
theAlien

Community Member, 131 Posts

26 January 2010 at 9:11pm

Hi Willr,

Thanks for dropping in.
As far as I understand, frodeaux says obsolete_ isn't prepended if he is uninstalling/deleting the blog-module.

And I myself have had this issue also with uninstalling/deleting some other modules (but never documented them).

Is this a bug in SS or in the module? Or are we doing something wrong?

Avatar
Willr

Forum Moderator, 5523 Posts

26 January 2010 at 9:35pm

I believe keeping the database structure 'tidy' is up to the core rather then the modules. How it *should* work as I see it is if you remove the blog module, then run dev/build it should rename the tables to _obselete. If it doesn't do that AFAIK I would class that as a bug. It should do this with tables at least. Database columns are probably not included in that process.

Avatar
frodeaux

Community Member, 16 Posts

27 January 2010 at 3:40am

Willr,

I can confirm that at least in my environment (with ss v2.3.5 and
PHP 5.3.0) the tables created by the blog module do not get
renamed when the blog module is deleted. My expectations match
yours in terms of how it *should* work.

While this is not the end of the world, it does appear to be a bug,
and it would be better if the renaming occurred as expected, so that
obsolete tables could eventually be deleted by the administrator or
developer.