ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Custom tables in EE database

May 26, 2011 2:57pm

Subscribe [2]
  • #1 / May 26, 2011 2:57pm

    DEA

    257 posts

    I am debating creating some custom tables in the EE database that I need for different searching functions, and writing to them via triggers. My question is, will I need to be careful when updating EE in the future? For example, will any updates potentially blow away any tables not starting with the ee_ prefix in there?

  • #2 / May 26, 2011 3:18pm

    vosSavant

    380 posts

    DEA,

    afaik EE updates do not drop tables, they just update existing ones, so you should be good to go. I’ve built custom tables before and not had an issue with this, but you should test just in case, especially if you are upgrading from 1.x to 2.x.

  • #3 / May 26, 2011 3:18pm

    DEA

    257 posts

    Terrific, thanks for the reply. Just noticed that my sig is woefully out of date too…

  • #4 / May 26, 2011 3:22pm

    DEA

    257 posts

    Actually, maybe you can further clarify something then? The reason I’m doing this is I need to do some data conversions for Sphinx to index for geo-searches on posts. That part is fine for the most part. But the real thing I’m looking at now is to have a Codeigniter app, with a RESTful interface, pointing to the same DB that EE is using.

    I don’t *think* there should be any issues, as long as I’m not writing to to the EE tables via the REST API/CI app…

  • #5 / May 26, 2011 3:41pm

    vosSavant

    380 posts

    I’m not familiar with your setup, but you’re still asking about an EE update, right? The EE devs would have to weigh in on this one, but I don’t believe the EE upgrade script actually drops any tables—just updates the stock EE tables that it needs to. Even if an EE upgrade does drop tables, I doubt it drops the entire DB, just the standard EE tables; this would leave any custom tables intact. Hope that helps…it’s a good Q, and one I’d ask too before blowing away all my hard work 😉

  • #6 / May 26, 2011 5:51pm

    Sue Crocker

    26054 posts

    Thanks for the assist, vosSavant.

    DEA, the install won’t mess with your extra tables. It only works with tables that it recognizes. But you’ll need to make sure that you back them up just in case before any updates. (Just being extra cautious, you understand.

    Does that help?

  • #7 / May 31, 2011 12:23pm

    DEA

    257 posts

    Seems my notifications are turned off, so apologies for the delay in responding! This does help, thanks much! 😊

  • #8 / May 31, 2011 12:27pm

    Sue Crocker

    26054 posts

    Sounds good! If anything else comes up, please do let us know in a new thread..

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases