Page 1 of 1

How to manage database modifications ("ALTER TABLE")

Posted: Tue Nov 04, 2008 6:25 pm
by Hirschi
Hi all,

I am developing a module which also uses databases.

During the development of the new subrelease, I noticed, that I want to add a database field to a table. So, how can I use the update-process of a module to insert a new database field?
I know, there is the default function "Install()" which can be used for creating tables (using ADODB), but is there also an "Update()"-function where I can use "ALTER TABLE" - commands?

br and thanks in advance
Michael

Re: How to manage database modifications ("ALTER TABLE")

Posted: Tue Nov 04, 2008 6:28 pm
by calguy1000
Upgrade()

You have to look at lib/classes/class.module.inc.php
and I encourage you to look at other modules for reference
like News, Search, CompanyDirectory, Questions....

Re: How to manage database modifications ("ALTER TABLE")

Posted: Tue Nov 04, 2008 6:55 pm
by Hirschi
I see, *thx*