Dev Series 10 Table creation healp

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
7/30/2012 6:34:34 AM
Gravatar
Total Posts 40

Dev Series 10 Table creation healp

I'm building a custom module for my website. My website uses MySql as the primary database for the site. I've created my table generation script to create the required tables for my module using a scratchpad database like in the video, and have tested the SQL to ensure itl is correct. If I just run the SQL in the Query Editor window it adds the tables to the database just fine but if I use the Setup system it does not add the tables to my database when I run the setup page..

I ensured the post build event is copying the Setup folder when I build the UI project for my module and the SchemaInstallScripts\mysql folder does have the 0.0.0.1.config file with the SQL to create my tables. When I go to the Setup/Default.aspx I see the line for Configuring my module, but not the one for running scripts to create the tables as shown in the video, and so none of the tables for my module appear in the database.

I've also tried running the config to create my tables as an SchemUpgradeScript and no luck there.

Do Ineed to have both an MSSQL and a MySql installation script for this to work?

 

7/30/2012 1:00:51 PM
Gravatar
Total Posts 18439

Re: Dev Series 10 Table creation healp

No, you don't need MS SQL.

Your first script should be at

/Setup/applications/[yourappname]/SchemaInstallScripts/mysql/0.0.0.1.config

Note that if it ever ran that script it will reocrd it in the mp_SchemaVersion table, and then it will never run any more scripts from the SchemaInsallScripts/mysql folder so you can't update it later.

any subsequent scripts with higher version numbers need to be in:

/Setup/applications/[yourappname]SchemaUpgradeScripts/mysql

it will update the row in mp_SchemVersion after running any upgrade scripts so it will never run a script with a version that is not higher than the one in mp_SchemaVersion

Other than that I would look and make sure your files are actually getting copied by post build so they land under Web/Setup/applications/[yourappname]

Hope that helps,

Joe

You must sign in to post in the forums. This thread is closed to new posts.