Current /trunk version problem

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/16/2007 3:55:29 AM
Gravatar
Total Posts 488

Current /trunk version problem

Under pgsql version accessing the site gives redirect to /Setup/Upgrade.aspx that says:

mojoPortal Setup
Database Platform pgsql
Database Code Version 2.2.3.0
Database Schema Version 2.2.2.9
Status You need to upgrade the Database Schema to make it the same version as the code.

The most strange thing is that the first child site redirects to the same page, but the second one (site ID 3) works! Is that a bug by the way?

7/16/2007 7:20:30 AM
Gravatar
Total Posts 18439

Re: Current /trunk version problem

Can you look in the mp_schemascripthistory table, there should be a row for 2.2.3.0 with an error in it. I need the error message to help figure out the problem.

This script worked on my installation so I'm suspecting a problem with different collation or charset.

The script is adding a column named guid to the mp_moduledefinitions table, then it tries to update the guids for existing features with code like this:

_controlsrc := ''Modules/Links.ascx'';
_guid := ''74bdbcc2-0e79-47ff-bcd4-a159270bf36e'';
UPDATE mp_moduledefinitions SET guid = _guid WHERE controlsrc = _controlsrc;

and so on for other features.

Another possible cause of the error is if you have some custom modules installed, I don't know a way to populate the guid column easily for those. In MS SQL I can do it with newid() function which generates a guid but in pgsql there is no such function.

So if you have custom features the script might be erroring on this line:

ALTER TABLE mp_moduledefinitions ALTER COLUMN guid SET NOT NULL;

You could try commenting out that line and this line:

ALTER TABLE mp_moduledefinitionsettings ALTER COLUMN featureguid SET NOT NULL;

Then delete the row with the error from mp_schemascripthistory, it will not run the script again if it has a row with the same version.

Then it would be desireable after the script runs to populate the guid field where they are empty for your custom features as well as the featureguid field in mp_moduledefinitionsettings, then run the script fragments that you commented out to make the columns not allow null.

The purpose of these new guid fields is to make the installation more configurable and also to be able to add settings to existing features during upgrades. The existing integer ids aren't reliable to be the same on all installations, but by using specific guids we will have a clean way to find the existing feature.

7/16/2007 7:23:51 AM
Gravatar
Total Posts 488

Re: Current /trunk version problem

You are right, I do have some custom features installed. I shall try to fix it as you suggested.

 

7/17/2007 3:28:45 AM
Gravatar
Total Posts 488

Re: Current /trunk version problem

Creating GUIDs with MSSQL Query Analyser and inserting to the tables before applying "not null" helped.

Thanks.

7/17/2007 6:18:53 AM
Gravatar
Total Posts 18439

Re: Current /trunk version problem

Glad it worked.

I'm going to try and write some hack today to make this smoother, I don't really want there to be difficulties upgrading when there are custom modules. I need to tackle the same issue for MySQL.

Thanks,

Joe

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