U4-3778 - MySQL: 6.1.6 -> 7.0 DB Upgrade Error on macroPropertyTypeAlias Definition

Created by Brian Powell 02 Dec 2013, 19:54:02 Updated by Brian Powell 03 Dec 2013, 19:55:22

I'm running MySQL. When I try upgrading 6.1.6 to 7.0.0, I get the following error: Database configuration failed with the following error and stack trace: 'System.Dynamic.ExpandoObject' does not contain a definition for 'macroPropertyTypeAlias'

Here's the pertinent section of the trace log. 2013-12-02 14:42:51,750 [5] INFO Umbraco.Core.ApplicationContext - [Thread 10] CurrentVersion different from configStatus: '7.0.0','6.1.6' 2013-12-02 14:42:51,750 [5] INFO Umbraco.Web.UI.Install.InstallerRestService - [Thread 10] Running 'InstallOrUpgrade' service 2013-12-02 14:42:51,750 [5] INFO Umbraco.Core.DatabaseContext - [Thread 10] Database configuration status: Started 2013-12-02 14:42:51,828 [5] INFO Umbraco.Core.Persistence.Migrations.MigrationRunner - [Thread 10] Initializing database migrations 2013-12-02 14:42:51,828 [5] INFO Umbraco.Core.PluginManager - [Thread 10] Starting resolution types of Umbraco.Core.Persistence.Migrations.IMigration 2013-12-02 14:42:51,844 [5] INFO Umbraco.Core.PluginManager - [Thread 10] Completed resolution of types of Umbraco.Core.Persistence.Migrations.IMigration, found 28 (took 17ms) 2013-12-02 14:42:51,875 [5] INFO Umbraco.Core.Persistence.Migrations.MigrationRunner - [Thread 10] Added UPGRADE migration 'AdditionalIndexesAndKeys' to context 2013-12-02 14:42:51,875 [5] INFO Umbraco.Core.Persistence.Migrations.MigrationRunner - [Thread 10] Added UPGRADE migration 'AddChangeDocumentTypePermission' to context 2013-12-02 14:42:51,890 [5] INFO Umbraco.Core.Persistence.Migrations.MigrationRunner - [Thread 10] Added UPGRADE migration 'ChangePasswordColumn' to context 2013-12-02 14:42:51,890 [5] INFO Umbraco.Core.Persistence.Migrations.MigrationRunner - [Thread 10] Added UPGRADE migration 'AddPropertyEditorAliasColumn' to context 2013-12-02 14:42:51,906 [5] INFO Umbraco.Core.Persistence.Migrations.MigrationRunner - [Thread 10] Added UPGRADE migration 'UpdateControlIdToPropertyEditorAlias' to context 2013-12-02 14:42:51,922 [5] INFO Umbraco.Core.Persistence.Migrations.MigrationRunner - [Thread 10] Added UPGRADE migration 'DropControlIdColumn' to context 2013-12-02 14:42:51,922 [5] INFO Umbraco.Core.Persistence.Migrations.MigrationRunner - [Thread 10] Added UPGRADE migration 'AlterUserTable' to context 2013-12-02 14:42:51,922 [5] INFO Umbraco.Core.Persistence.Migrations.MigrationRunner - [Thread 10] Added UPGRADE migration 'AddIndexToCmsMacroTable' to context 2013-12-02 14:42:51,922 [5] INFO Umbraco.Core.Persistence.Migrations.MigrationRunner - [Thread 10] Added UPGRADE migration 'AddIndexToCmsMacroPropertyTable' to context 2013-12-02 14:42:52,046 [5] INFO Umbraco.Core.DatabaseContext - [Thread 10] Database configuration failed with the following error and stack trace: 'System.Dynamic.ExpandoObject' does not contain a definition for 'macroPropertyTypeAlias' at CallSite.Target(Closure , CallSite , Object ) at System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet](CallSite site, T0 arg0) at Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSeven.AlterCmsMacroPropertyTable.Up() at Umbraco.Core.Persistence.Migrations.MigrationBase.GetUpExpressions(IMigrationContext context) at Umbraco.Core.Persistence.Migrations.MigrationRunner.Execute(Database database, DatabaseProviders databaseProvider, Boolean isUpgrade) at Umbraco.Core.DatabaseContext.CreateDatabaseSchemaAndDataOrUpgrade() 2013-12-02 14:42:52,046 [5] INFO Umbraco.Core.DatabaseContext - [Thread 10] The database schema validation produced the following summary: The following tables were found in the database, but are not in the current schema: cmscontent,cmscontenttype,cmscontenttype2contenttype,cmscontenttypeallowedcontenttype,cmscontentversion,cmscontentxml,cmsdatatype,cmsdatatypeprevalues,cmsdictionary,cmsdocument,cmsdocumenttype,cmslanguagetext,cmsmacro,cmsmacroproperty,cmsmacropropertytype,cmsmember,cmsmember2membergroup,cmsmembertype,cmspreviewxml,cmspropertydata,cmspropertytype,cmspropertytypegroup,cmsstylesheet,cmsstylesheetproperty,cmstagrelationship,cmstags,cmstask,cmstasktype,cmstemplate,umbracodomains,umbracolanguage,umbracolog,umbraconode,umbracorelation,umbracorelationtype,umbracoserver,umbracouser,umbracouser2app,umbracouser2nodenotify,umbracouser2nodepermission,umbracouserlogins,umbracousertype,umbracoNode,cmsTemplate,cmsContent,cmsContentVersion,cmsDocument,cmsContentType,cmsDocumentType,cmsDataType,cmsDataTypePreValues,cmsDictionary,cmsLanguageText,umbracoLanguage,umbracoDomains,umbracoLog,cmsMacro,cmsMacroProperty,cmsMemberType,cmsMember,cmsMember2MemberGroup,cmsContentXml,cmsPreviewXml,cmsPropertyTypeGroup,cmsPropertyType,cmsPropertyData,umbracoRelationType,umbracoRelation,cmsStylesheet,cmsStylesheetProperty,cmsTags,cmsTagRelationship,umbracoUserLogins,umbracoUserType,umbracoUser,cmsTaskType,cmsTask,cmsContentType2ContentType,cmsContentTypeAllowedContentType,umbracoUser2app,umbracoUser2NodeNotify,umbracoUser2NodePermission,umbracoServer

The following columns were found in the database, but are not in the current schema: cmscontent,PK,cmscontent,NODEID,cmscontent,CONTENTTYPE,cmscontenttype,PK,cmscontenttype,NODEID,cmscontenttype,ALIAS,cmscontenttype,ICON,cmscontenttype,THUMBNAIL,cmscontenttype,DESCRIPTION,cmscontenttype,isContainer,cmscontenttype,allowAtRoot,cmscontenttype2contenttype,parentContentTypeId,cmscontenttype2contenttype,childContentTypeId,cmscontenttypeallowedcontenttype,ID,cmscontenttypeallowedcontenttype,ALLOWEDID,cmscontenttypeallowedcontenttype,sortOrder,cmscontentversion,ID,cmscontentversion,CONTENTID,cmscontentversion,VERSIONID,cmscontentversion,VERSIONDATE,cmscontentversion,LanguageLocale,cmscontentxml,NODEID,cmscontentxml,XML,cmsdatatype,PK,cmsdatatype,NODEID,cmsdatatype,CONTROLID,cmsdatatype,DBTYPE,cmsdatatypeprevalues,ID,cmsdatatypeprevalues,DATATYPENODEID,cmsdatatypeprevalues,VALUE,cmsdatatypeprevalues,SORTORDER,cmsdatatypeprevalues,ALIAS,cmsdictionary,PK,cmsdictionary,ID,cmsdictionary,PARENT,cmsdictionary,KEY,cmsdocument,NODEID,cmsdocument,PUBLISHED,cmsdocument,DOCUMENTUSER,cmsdocument,VERSIONID,cmsdocument,TEXT,cmsdocument,RELEASEDATE,cmsdocument,EXPIREDATE,cmsdocument,UPDATEDATE,cmsdocument,TEMPLATEID,cmsdocument,ALIAS,cmsdocument,NEWEST,cmsdocumenttype,CONTENTTYPENODEID,cmsdocumenttype,TEMPLATENODEID,cmsdocumenttype,ISDEFAULT,cmslanguagetext,PK,cmslanguagetext,LANGUAGEID,cmslanguagetext,UNIQUEID,cmslanguagetext,VALUE,cmsmacro,ID,cmsmacro,MACROUSEINEDITOR,cmsmacro,MACROREFRESHRATE,cmsmacro,MACROALIAS,cmsmacro,MACRONAME,cmsmacro,MACROSCRIPTTYPE,cmsmacro,MACROSCRIPTASSEMBLY,cmsmacro,MACROXSLT,cmsmacro,MACROCACHEBYPAGE,cmsmacro,MACROCACHEPERSONALIZED,cmsmacro,MACRODONTRENDER,cmsmacro,MACROPYTHON,cmsmacroproperty,ID,cmsmacroproperty,MACROPROPERTYHIDDEN,cmsmacroproperty,MACROPROPERTYTYPE,cmsmacroproperty,MACRO,cmsmacroproperty,MACROPROPERTYSORTORDER,cmsmacroproperty,MACROPROPERTYALIAS,cmsmacroproperty,MACROPROPERTYNAME,cmsmacropropertytype,ID,cmsmacropropertytype,MACROPROPERTYTYPEALIAS,cmsmacropropertytype,MACROPROPERTYTYPERENDERASSEMBLY,cmsmacropropertytype,MACROPROPERTYTYPERENDERTYPE,cmsmacropropertytype,MACROPROPERTYTYPEBASETYPE,cmsmember,NODEID,cmsmember,EMAIL,cmsmember,LOGINNAME,cmsmember,PASSWORD,cmsmember2membergroup,MEMBER,cmsmember2membergroup,MEMBERGROUP,cmsmembertype,PK,cmsmembertype,NODEID,cmsmembertype,PROPERTYTYPEID,cmsmembertype,MEMBERCANEDIT,cmsmembertype,VIEWONPROFILE,cmspreviewxml,NODEID,cmspreviewxml,VERSIONID,cmspreviewxml,TIMESTAMP,cmspreviewxml,XML,cmspropertydata,ID,cmspropertydata,CONTENTNODEID,cmspropertydata,VERSIONID,cmspropertydata,PROPERTYTYPEID,cmspropertydata,DATAINT,cmspropertydata,DATADATE,cmspropertydata,DATANVARCHAR,cmspropertydata,DATANTEXT,cmspropertytype,ID,cmspropertytype,DATATYPEID,cmspropertytype,CONTENTTYPEID,cmspropertytype,propertyTypeGroupId,cmspropertytype,ALIAS,cmspropertytype,NAME,cmspropertytype,HELPTEXT,cmspropertytype,SORTORDER,cmspropertytype,MANDATORY,cmspropertytype,VALIDATIONREGEXP,cmspropertytype,DESCRIPTION,cmspropertytypegroup,ID,cmspropertytypegroup,CONTENTTYPENODEID,cmspropertytypegroup,TEXT,cmspropertytypegroup,SORTORDER,cmspropertytypegroup,parentGroupId,cmsstylesheet,NODEID,cmsstylesheet,FILENAME,cmsstylesheet,CONTENT,cmsstylesheetproperty,NODEID,cmsstylesheetproperty,STYLESHEETPROPERTYEDITOR,cmsstylesheetproperty,STYLESHEETPROPERTYALIAS,cmsstylesheetproperty,STYLESHEETPROPERTYVALUE,cmstagrelationship,NODEID,cmstagrelationship,TAGID,cmstags,ID,cmstags,TAG,cmstags,PARENTID,cmstags,GROUP,cmstask,CLOSED,cmstask,ID,cmstask,TASKTYPEID,cmstask,NODEID,cmstask,PARENTUSERID,cmstask,USERID,cmstask,DATETIME,cmstask,COMMENT,cmstasktype,ID,cmstasktype,ALIAS,cmstemplate,PK,cmstemplate,NODEID,cmstemplate,MASTER,cmstemplate,ALIAS,cmstemplate,DESIGN,umbracodomains,ID,umbracodomains,DOMAINDEFAULTLANGUAGE,umbracodomains,DOMAINROOTSTRUCTUREID,umbracodomains,DOMAINNAME,umbracolanguage,ID,umbracolanguage,LANGUAGEISOCODE,umbracolanguage,LANGUAGECULTURENAME,umbracolog,ID,umbracolog,USERID,umbracolog,NODEID,umbracolog,DATESTAMP,umbracolog,LOGHEADER,umbracolog,LOGCOMMENT,umbraconode,ID,umbraconode,TRASHED,umbraconode,PARENTID,umbraconode,NODEUSER,umbraconode,LEVEL,umbraconode,PATH,umbraconode,SORTORDER,umbraconode,UNIQUEID,umbraconode,TEXT,umbraconode,NODEOBJECTTYPE,umbraconode,CREATEDATE,umbracorelation,ID,umbracorelation,PARENTID,umbracorelation,CHILDID,umbracorelation,RELTYPE,umbracorelation,DATETIME,umbracorelation,COMMENT,umbracorelationtype,ID,umbracorelationtype,DUAL,umbracorelationtype,PARENTOBJECTTYPE,umbracorelationtype,CHILDOBJECTTYPE,umbracorelationtype,NAME,umbracorelationtype,ALIAS,umbracoserver,id,umbracoserver,address,umbracoserver,computerName,umbracoserver,registeredDate,umbracoserver,lastNotifiedDate,umbracoserver,isActive,umbracouser,ID,umbracouser,USERDISABLED,umbracouser,USERNOCONSOLE,umbracouser,USERTYPE,umbracouser,STARTSTRUCTUREID,umbracouser,STARTMEDIAID,umbracouser,USERNAME,umbracouser,USERLOGIN,umbracouser,USERPASSWORD,umbracouser,USEREMAIL,umbracouser,USERDEFAULTPERMISSIONS,umbracouser,USERLANGUAGE,umbracouser,DEFAULTTOLIVEEDITING,umbracouser2app,USER,umbracouser2app,APP,umbracouser2nodenotify,USERID,umbracouser2nodenotify,NODEID,umbracouser2nodenotify,ACTION,umbracouser2nodepermission,USERID,umbracouser2nodepermission,NODEID,umbracouser2nodepermission,PERMISSION,umbracouserlogins,CONTEXTID,umbracouserlogins,USERID,umbracouserlogins,TIMEOUT,umbracousertype,ID,umbracousertype,USERTYPEALIAS,umbracousertype,USERTYPENAME,umbracousertype,USERTYPEDEFAULTPERMISSIONS

Please note that the constraints could not be validated because the current dataprovider is MySql.

I checked and my cmsMacroPropertyType table does have a macroPropertyTypeAlias column.

Comments

Brian Powell 02 Dec 2013, 20:20:44

I originally thought this was something with the dynamic typing, but it wasn't so I've deleted this comment.


Brian Powell 03 Dec 2013, 00:12:20

I figured out the issue. My old DB was originally from ~v4.6 and upgraded numerous times along the way as new versions came out. All of the field names in the cmsmacropropertytype table were in all caps, while the property name in C# was in camelcase. Renaming the field to change the capitalization fixed the problem.

For users who've upgraded from previous versions along the way, it might be easiest to do the upgrade if you get an empty v6.1.6 schema and import your data into that before trying the upgrade to v7.0.0.


Priority: Normal

Type: Bug

State: Closed

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions: 7.0.0

Due in version:

Sprint:

Story Points:

Cycle: