Schema Upgrade Error ? while clean installation

Post here for help with installing or upgrading mojoPortal pre-compiled release packages. When posting in this forum, please provide all relevant details. You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

Post here for help with installation of mojoPortal pre-compiled release packages

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.

You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

This thread is closed to new posts. You must sign in to post in the forums.
6/29/2007 8:51:41 PM
Gravatar
Total Posts 16

Schema Upgrade Error ? while clean installation

Hi!

I downloaded mojoportal-2-2-2-8-pgsqlreleasefiles and tried to install it it, but it failes with following message.

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

No errormessages are written in mp_schemascripthistory table, and  schema upgrade scripts are in  C:\mojoportal\web\Setup\SchemaUpgradeScripts\pgsql\mojoportal-core.

I don't understand what's happened!

6/30/2007 6:01:40 AM
Gravatar
Total Posts 18439

Re: Schema Upgrade Error ? while clean installation

Is there a row in mp_shemascripthistory for 2.2.2.8? You say there is no error message there but does this row exist?

If so, you could try manually setting the version to 2.2.2.8 in mp_shemaversion.

You might also look in Data/currentlog.config file for errors that got logged, but if an error happened running the script it should be in the table.

Hope it helps.

Joe

6/30/2007 8:33:33 AM
Gravatar
Total Posts 16

Re: Schema Upgrade Error ? while clean installation

Hi, Joe! Thank you for your reply.

I'm sorry. I think I was confused, so I tried again.

Afer I cleaned the postgres database and ran the script, I install the mojoportal again. Then I got 14 errors written in the table "mp_schemascripthistory" as follows:

2007-06-30 22:14:52,281 [844] ERROR mojoPortal.Data.dbPortal [(null)] - dbPortal.RunScript failed
Npgsql.NpgsqlException:
must be owner of function monthname
Severity: ERROR
Code: 42501
at Npgsql.NpgsqlConnector.CheckErrors()
at Npgsql.NpgsqlCommand.ExecuteCommand()
at Npgsql.NpgsqlCommand.ExecuteNonQuery()
at mojoPortal.Data.NpgsqlHelper.ExecuteNonQuery(NpgsqlTransaction transaction, CommandType commandType, String commandText, NpgsqlParameter[] commandParameters)
at mojoPortal.Data.dbPortal.RunScript(String script, String overrideConnectionString)
2007-06-30 22:14:54,140 [844] ERROR mojoPortal.Data.dbPortal [(null)] - dbPortal.RunScript failed
Npgsql.NpgsqlException:
must be owner of relation mp_htmlcontent
Severity: ERROR
Code: 42501

<omitting the rest>

Kiyoshi

 

6/30/2007 9:24:28 AM
Gravatar
Total Posts 18439

Re: Schema Upgrade Error ? while clean installation

Can you try manually running the script(s) that failed as the postgres user, then manually set the version in mp_schameversion?

I will look into this further but I'm thinking the automatic upgrade may only work if the connection string user is the owner of the db.

Joe

6/30/2007 9:00:47 PM
Gravatar
Total Posts 16

Re: Schema Upgrade Error ? while clean installation

Hi, Joe! Thank you for your reply.

I ran the scripts manually from 2.2.1.5.config to 2.2.2.8.config, but the result was same.

I have a question. When I first ran install script "plpgsql.sql ", following errors occurred. Is this a reason of this trouble?

C:\mojoportal\dbscripts>psql -U postgres -d mojoportal -f plpgsql.sql
Password for user postgres:
SET
psql:plpgsql.sql:12: ERROR: function "plpgsql_call_handler" already exists with
same argument types
psql:plpgsql.sql:20: ERROR: language "plpgsql" already exists

Kiyoshi

6/30/2007 9:22:18 PM
Gravatar
Total Posts 18439

Re: Schema Upgrade Error ? while clean installation

Hi Kiyoshi,

"result was the same", you mean the version message is still there or did you get errors running the scripts. If no errors running the scripts, then change the version in mp_schemaversion to 2.2.2.8 to get rid of that message.

Hope it helps,

Joe

6/30/2007 11:25:11 PM
Gravatar
Total Posts 16

Re: Schema Upgrade Error ? while clean installation

Hi Joe,

I meant I got the same errors running the scripts, but it seems this doesn't mean any troubles.

When I restarted the install url, the site was installed successfully this time. 

Thnak you for your help.

8/8/2007 8:30:09 AM
Gravatar
Total Posts 18439

Re: Schema Upgrade Error ? while clean installation

Hi Juliano,

Why did you manually edit the version? The system needs to run upgrade scripts from version 2.2.2.8 up to 2.2.3.3 but since you edited the version it thinks it is up to date and will not run the scripts. therefore you get errors because the schema is not up to date.

Try setting it back to 2.2.2.8

Look in mp_SchemaScriptHistory if any rows have errors delete the row.

Joe

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