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
How to manage database modifications ("ALTER TABLE")
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: How to manage database modifications ("ALTER TABLE")
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....
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....
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.