1
fatman
How to upgrade your own custom module
  • 2004/1/21 19:25

  • fatman

  • Friend of XOOPS

  • Posts: 176

  • Since: 2003/12/13


Hi, I am currently working on a custom module and was hoping some of the more experienced XOOPS module developers could let me know how they handle version control.

Everytime I'm making changes to my module's database tables I end up uninstalling my module, uploading the new .sql and xoops_version.php and reinstalling it.

Could someone explain how to use phpmyadmin to create a 'upgrade' sql file that just creates new tables, changes fields ect, and how to add this into my xoops_version.php file so I can make upgrades to database structure without having to uninstall my module?

I'm very familiar with exporting structure and/or data from phpmyadmin. Should I be keeping track of all sql statements I make updating my database in a txt file somewhere? How are other's currently handling similar changes?

Your wisdom is appreciated.

2
Mithrandir
Re: How to upgrade your own custom module

When I need a database change, I make the change via PHPMyAdmin and then update the mysql.sql file.

Afaik there is no way to do a database change, when updating the module through the Administration menu. You'll need to write a specific script for your module and ask people to run that script, when updating the module.

So basically, my solution is to regularly update the .sql file with a complete structure dump of my tables.

Login

Who's Online

907 user(s) are online (83 user(s) are browsing Support Forums)


Members: 0


Guests: 907


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits