Build Error on MySQL script for default value

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.
12/22/2017 1:41:36 PM
Gravatar
Total Posts 5

Build Error on MySQL script for default value

Hi,

I am a new beginner with MojoPortal. I am trying to run the build for MySQL DB. I tried it many times but always stopping by showing below error, As it is clear MySQL script should not have default value for BLOB, TEXT, GEOMETRY or JSON columns. I want to use the benefits of updating from SVN but by modifying them manually I will be in trouble afterwards, I am sure there is something that i am missing to consider, please advice.

Thanks 

 

Running script mojoportal-core - 2.5.0.0 - 00:00:15.8269202
Running script mojoportal-core - 2.6.0.0 - 00:00:15.8319083
Running script mojoportal-core - 2.6.0.1 - 00:00:16.1491163
MySql.Data.MySqlClient.MySqlException (0x80004005): BLOB, TEXT, GEOMETRY or JSON column 'Attributes' can't have a default value at MySql.Data.MySqlClient.MySqlStream.ReadPacket() at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int32& insertedId) at MySql.Data.MySqlClient.Driver.GetResult(Int32 statementId, Int32& affectedRows, Int32& insertedId) at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId) at MySql.Data.MySqlClient.MySqlDataReader.NextResult() at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery() at MySql.Data.MySqlClient.MySqlScript.Execute() at mojoPortal.Data.DBPortal.DatabaseHelperRunScript(String script, String overrideConnectionInfo) in D:\Source\mojoportal-master\mojoportal-masterClone\mojoPortal.Data.MySql\dbPortal.cs:line 839 at mojoPortal.Data.DBPortal.DatabaseHelperRunScript(FileInfo scriptFile, String overrideConnectionInfo) in D:\Source\mojoportal-master\mojoportal-masterClone\mojoPortal.Data.MySql\dbPortal.cs:line 792 at mojoPortal.Business.DatabaseHelper.RunScript(Guid applicationId, FileInfo scriptFile, String overrideConnectionInfo) in D:\Source\mojoportal-master\mojoportal-masterClone\mojoPortal.Business\DatabaseHelper.cs:line 327 - 00:00:16.1773739
Note: This page shows some information that is helpful during setup and upgrades but for security it would be best not to show any information when the system is up to date. You can disable setup and suppress all information on this page by setting DisableSetup=true in Web.config. When you need to upgrade, you can set this back to false. If you are logged in as Administrator setup will run and you will be able to see this page even if it is disabled in Web.config so you can easily leave it disabled and just login before upgrading. But if you are not logged in you will need to enable setup in Web.config. 

12/22/2017 1:59:51 PM
Gravatar
Total Posts 2239

Re: Build Error on MySQL script for default value

Hello,

Please pull the latest repo changeset. I just fixed this issue.

Thanks,
Joe

12/22/2017 2:31:21 PM
Gravatar
Total Posts 5

Re: Build Error on MySQL script for default value

Thank you. That error is fixed but now I am receiving one more error, which is saying one column is missing. would you please fix this one as well. 

Thanks,

 

Running script mojoportal-core - 2.6.0.2 - 00:00:14.6560004
Creating site with default settings... - 00:00:14.7175492
Creating roles and admin user... - 00:00:14.9067106
Configuring feature Html Content - 00:00:15.0047482

An Error Occurred:Unknown column 'SkinFileName' in 'field list'

Source:MySql.Data

Stack Traceat MySql.Data.MySqlClient.MySqlStream.ReadPacket() at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int32& insertedId) at MySql.Data.MySqlClient.Driver.GetResult(Int32 statementId, Int32& affectedRows, Int32& insertedId) at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId) at MySql.Data.MySqlClient.MySqlDataReader.NextResult() at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) at MySql.Data.MySqlClient.MySqlCommand.ExecuteScalar() at MySql.Data.MySqlClient.MySqlHelper.ExecuteScalar(MySqlConnection connection, String commandText, MySqlParameter[] commandParameters) at MySql.Data.MySqlClient.MySqlHelper.ExecuteScalar(String connectionString, String commandText, MySqlParameter[] commandParameters) at mojoPortal.Data.DBModuleDefinition.AddModuleDefinition(Guid featureGuid, Int32 siteId, String featureName, String controlSrc, Int32 sortOrder, Int32 defaultCacheTime, String icon, Boolean isAdmin, String resourceFile, Boolean isCacheable, Boolean isSearchable, String searchListName, Boolean supportsPageReuse, String deleteProvider, String partialView, String skinFileName) in D:\Source\mojoportal-master\mojoportal-master1\mojoPortal.Data.MySql\dbModuleDefinition.cs:line 168 at mojoPortal.Business.ModuleDefinition.Create() in D:\Source\mojoportal-master\mojoportal-master1\mojoPortal.Business\ModuleDefinition.cs:line 251 at mojoPortal.Business.ModuleDefinition.Save() in D:\Source\mojoportal-master\mojoportal-master1\mojoPortal.Business\ModuleDefinition.cs:line 311 at mojoPortal.Web.UI.Pages.SetupHome.SetupFeature(ContentFeature feature) in D:\Source\mojoportal-master\mojoportal-master1\Web\Setup\Default.aspx.cs:line 707 at mojoPortal.Web.UI.Pages.SetupHome.SetupFeatures(String applicationName) in D:\Source\mojoportal-master\mojoportal-master1\Web\Setup\Default.aspx.cs:line 678 at mojoPortal.Web.UI.Pages.SetupHome.RunSetup() in D:\Source\mojoportal-master\mojoportal-master1\Web\Setup\Default.aspx.cs:line 158 at mojoPortal.Web.UI.Pages.SetupHome.Page_Load(Object sender, EventArgs e) in D:\Source\mojoportal-master\mojoportal-master1\Web\Setup\Default.aspx.cs:line 88 at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

12/26/2017 5:24:46 PM
Gravatar
Total Posts 2239

Re: Build Error on MySQL script for default value

Hi,

Pull the repo again. Sorry for the trouble.

If you don't want to pull the repo, you can add the missed column by running the following against your mysql database.

ALTER TABLE `mp_ModuleDefinitions`
ADD COLUMN `SkinFileName` varchar(255) AFTER `PartialView`;

Thanks,
Joe

12/29/2017 9:04:18 AM
Gravatar
Total Posts 5

Re: Build Error on MySQL script for default value

Hi

That error is fixed but I think it is not adding correctly. It is throwing this error now :(

 

Running script mojoportal-core - 2.6.0.1 - 00:00:13.7740566
MySql.Data.MySqlClient.MySqlException (0x80004005): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '[SkinFileName] nvarchar(255)' at line 1 at MySql.Data.MySqlClient.MySqlStream.ReadPacket() at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int32& insertedId) at MySql.Data.MySqlClient.Driver.GetResult(Int32 statementId, Int32& affectedRows, Int32& insertedId) at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId) at MySql.Data.MySqlClient.MySqlDataReader.NextResult() at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery() at MySql.Data.MySqlClient.MySqlScript.Execute() at mojoPortal.Data.DBPortal.DatabaseHelperRunScript(String script, String overrideConnectionInfo) in D:\Source\MojoPortal\mojoportal\mojoPortal.Data.MySql\dbPortal.cs:line 839 at mojoPortal.Data.DBPortal.DatabaseHelperRunScript(FileInfo scriptFile, String overrideConnectionInfo) in D:\Source\MojoPortal\mojoportal\mojoPortal.Data.MySql\dbPortal.cs:line 792 at mojoPortal.Business.DatabaseHelper.RunScript(Guid applicationId, FileInfo scriptFile, String overrideConnectionInfo) in D:\Source\MojoPortal\mojoportal\mojoPortal.Business\DatabaseHelper.cs:line 327 - 00:00:13.8596482

12/29/2017 12:32:51 PM
Gravatar
Total Posts 2239

Re: Build Error on MySQL script for default value

Sorry about that. I had pasted the mssql add column statement into the file for reference but forgot to remove it before saving. I've removed it. 

Thanks,
Joe

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