Jump to:

5514 Posts in 1733 Topics by 1219 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Uninstalling Module, "_obsolete" table prefix?

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

Page: 1
Go to End
Author Topic: 1422 Views
  • frodeaux
    Avatar
    Community Member
    15 Posts

    Uninstalling Module, "_obsolete" table prefix? Link to this post

    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.

  • theAlien
    Avatar
    Community Member
    131 Posts

    Re: Uninstalling Module, "_obsolete" table prefix? Link to this post

    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 ;-)

  • frodeaux
    Avatar
    Community Member
    15 Posts

    Re: Uninstalling Module, "_obsolete" table prefix? Link to this post

    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?

  • Willr
    Avatar
    Forum Moderator
    5489 Posts

    Re: Uninstalling Module, "_obsolete" table prefix? Link to this post

    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.

  • theAlien
    Avatar
    Community Member
    131 Posts

    Re: Uninstalling Module, "_obsolete" table prefix? Link to this post

    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?

  • Willr
    Avatar
    Forum Moderator
    5489 Posts

    Re: Uninstalling Module, "_obsolete" table prefix? Link to this post

    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.

  • frodeaux
    Avatar
    Community Member
    15 Posts

    Re: Uninstalling Module, "_obsolete" table prefix? Link to this post

    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.

    1422 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.