The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Need Help Packaging Mod - SQL tables install
Hello everyone, I am finally nearing the end of development of my first ever modification that I'll be releasing here at vb.org. (please be gentle when I do). In any case my concern at this stage is that I need to package the modification. Everything is pretty much packaged automatically with vb except I believe the SQL tables I created for the mod. Since this is my first mod I did not anticipate that I would have to have a record of the code used to create each table, to be honest some were created field by field as I went along. So now that I have to package this my question is would there be a "easy" way of getting the commands used to create them to insert them into my install script (I know that I can do this by going one by one and creating the code for each (not the most reliable way in my case))? I have over 10 db tables and I want to make sure that when someone installs the mod the tables are created correctly with the right index assigned and such. Would there be an automated way of doing this to ensure that the tables are created exactly the same as how I have them now? Also if possible if someone can also guide me as to how this table install codes should be placed within the install code of the product it would also be very helpful. If anyone can provide some information or guidance in this matter as to how to handle table creation with the product install code it would be very helpful.
Any info is good info. Best Regards. |
#2
|
|||
|
|||
If you use phpMyAdmin you can Export the table structure to SQL format. I'm not sure if there's a way to do that using the mysql command line programs.
|
#3
|
|||
|
|||
Quote:
Code:
SHOW CREATE TABLE tbl_name |
#4
|
|||
|
|||
What you really should do is have a test site in debug mode, by putting $config['Misc']['debug'] = 1; in include/config.php. Then you can go to Products & Plugins -> Manage Products in the adminCP, and "edit" the product. You'll then have text areas to put in install and uninstall code. When you've got the product the way you want it, you can export it to an xml file.
If you really want to do it by editing the product xml file, probably the best thing would be to find an existing product and see where to put xml tags for installcode and uninstallcode. It's a little complicated by the fact that you can have different sections of code for different versions, to support updating. |
#5
|
|||
|
|||
Quote:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|