Username:
Password:
Search for Plugins: Advanced
Please Sign in, Register or Resend Activation Email

Forums

  e107 Coders.org :: Forums :: E107 Plugins :: Q & A
 
<< Previous thread | Next thread >>  
How can I create a new table in the plugin.php so it will update?          
Author Post
Burnsy
Sat Jan 07 2006, 11:21PM
Registered Member #12937
Joined: Wed Jul 14 2004, 05:33AM
Location: MA, USA
Posts: 139
Website
Forum is broken, will post the question in a reply so I can use the 'Quick Reply'.
Burnsy
Sat Jan 07 2006, 11:25PM
Registered Member #12937
Joined: Wed Jul 14 2004, 05:33AM
Location: MA, USA
Posts: 139
I am working on the next version of jbClan, and I need to create a new table. How can I do this so people can just update the plugin without having to uninstall/reinstall and lose all their data?

I've added the table name in $eplug_table_names in the same order as the $eplug_tables array, and I've entered it correctly in the $eplug_tables array (I've even dummied it down to only one column), but it is not working.
Back to top
Website
Burnsy
Sat Jan 07 2006, 11:37PM
Registered Member #12937
Joined: Wed Jul 14 2004, 05:33AM
Location: MA, USA
Posts: 139
Never mind, it's working, I just had some 'ALTER TABLE' statements that I had already run.
Back to top
Website
Burnsy
Sat Jan 07 2006, 11:43PM
Registered Member #12937
Joined: Wed Jul 14 2004, 05:33AM
Location: MA, USA
Posts: 139
And the correct way to do it is to have the above mentioned code (need to have the table name in $eplug_table_names and have the 'CREATE TABLE' statement in the $eplug_tables array for new installs), but to upgrade, you need to have the 'CREATE TABLE' statement in the $upgrade_alter_tables array.

[ Edited Sat Jan 07 2006, 11:45PM ]
Back to top
Website
 

Jump:     Back to top

Syndicate this thread: rss 0.92 Syndicate this thread: rss 2.0 Syndicate this thread: RDF
Powered by e107 Forum System
Render time: 0.3453 sec, 0.2343 of that for queries. DB queries: 32.