2.3.3.9 to 2.3.6.5

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.
5/18/2011 12:58:30 PM
Gravatar
Total Posts 30
www.CSBA.org

Information Technologies, Resources and Services

California School Boards Association

2.3.3.9 to 2.3.6.5

I'm trying to upgrade from 2.3.3.9 to 2.3.6.5 and I'm getting an error I am unsure about.

 

Running script mojoportal-core - 2.3.4.2 - 00:00:00.1400028

An Error Occurred:Cannot insert the value NULL into column 'ID', table 'mojo.dbo.mp_SchemaScriptHistory'; column does not allow nulls. INSERT fails. The statement has been terminated.
Source:.Net SqlClient Data Provider
Stack Trace at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlDataReader.ConsumeMetaData() at System.Data.SqlClient.SqlDataReader.get_MetaData() at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteScalar() at mojoPortal.Data.SqlHelper.ExecuteScalar(String connectionString, CommandType commandType, String commandText, Int32 commandTimeout, SqlParameter[] commandParameters) at mojoPortal.Data.SqlParameterHelper.ExecuteScalar() at mojoPortal.Data.DBPortal.SchemaScriptHistoryAddSchemaScriptHistory(Guid applicationId, String scriptFile, DateTime runTime, Boolean errorOccurred, String errorMessage, String scriptBody) at mojoPortal.Business.DatabaseHelper.AddSchemaScriptHistory(Guid applicationId, String scriptFile, DateTime runTime, Boolean errorOccurred, String errorMessage, String scriptBody) at mojoPortal.Web.UI.Pages.SetupHome.RunUpgradeScripts(Guid applicationId, String applicationName, String pathToScriptFolder, Version versionToStopAt) at mojoPortal.Web.UI.Pages.SetupHome.UpgradeSchema(String applicationName) at mojoPortal.Web.UI.Pages.SetupHome.RunSetup() at mojoPortal.Web.UI.Pages.SetupHome.Page_Load(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

I am still looking for what I assume is a mistake I made but I was hoping someone might know off hand as to what I screwed up.

Thanks,

Jeff

5/18/2011 1:08:25 PM
Gravatar
Total Posts 30
www.CSBA.org

Information Technologies, Resources and Services

California School Boards Association

Re: 2.3.3.9 to 2.3.6.5

never mind, I noticed I screwed up the DB copy and lost the identities...

knew it was just me :)

 

 

Jeff

5/18/2011 1:09:08 PM
Gravatar
Total Posts 18439

Re: 2.3.3.9 to 2.3.6.5

The ID column on that table is an autoidentity integer column. The only way you could get this error is if the table does not have the autoidentity property enabled. So the table is not in the expected state.

The most likely way this happened is that you tried to copy your database by importing all the objects. Probably you are trying to upgrade a copy of your site to be safe in case something goes wrong, which is a good idea, but you cannot copy your database like that.

Importing objects from one database to another is not the way to do it, doing that all tables will lose all their primary keys, foreign keys, autoidentity and defaults.

To do it correctly you must make a backup of the database and then restore the backup to a new database. Or use a tool that can script off all the objects and data, like the Red Gate tools or this tool on codeplex.

Hope that helps,

Joe

5/19/2011 11:16:04 AM
Gravatar
Total Posts 30
www.CSBA.org

Information Technologies, Resources and Services

California School Boards Association

Re: 2.3.3.9 to 2.3.6.5

Thanks Joe,

I wasn't paying attention and used the export feature not thinking about what I was doing.

 

Thanks again,

Jeff

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