Hello friends i have a converted table structure for Umbraco websites running MySql.
But somehow the code returns an error
MySql.Data.MySqlClient.MySqlException: Unknown column 'PARENT' in 'where clause' ???
please help
for MySql use this script:
USE `YourDatabase.Table`;
CREATE TABLE IF NOT EXISTS `CMSImportState` ( `Id` int NOT NULL AUTO_INCREMENT, `UniqueIdentifier` char(36) NOT NULL, `Name` varchar(250) NOT NULL, `ImportType` varchar(250) NOT NULL, `ImportState` varchar(4000) NOT NULL, PRIMARY KEY (`Id`) );
CREATE TABLE IF NOT EXISTS `CMSImportScheduledTask` ( `ScheduleId` int NOT NULL AUTO_INCREMENT, `ScheduleGUID` char(36) NOT NULL, `ImportStateGUID` char(36) NOT NULL, `ScheduledTaskName` varchar(50) NOT NULL, `NotifyEmailAddress` varchar(250) NOT NULL, `ExecuteEvery` varchar(50) NOT NULL, `ExecuteDays` varchar(50) NOT NULL, `ExecuteHour` int NOT NULL, `ExecuteMinute` int NOT NULL, PRIMARY KEY (`ScheduleId`) );
CREATE TABLE IF NOT EXISTS `CMSImportRelation` ( `Id` int NOT NULL AUTO_INCREMENT, `UmbracoID` int NOT NULL, `UmbracoParentId` int NOT NULL, `DataSourceKey` varchar(250) NOT NULL, PRIMARY KEY (`Id`) );
CREATE TABLE IF NOT EXISTS `CMSImportMediaRelation` ( `Id` int NOT NULL AUTO_INCREMENT, `UmbracoMediaId` int NOT NULL, `SourceUrl` varchar(500) NOT NULL, PRIMARY KEY (`Id`) );
CREATE TABLE IF NOT EXISTS `CMSImportScheduledItems` ( `ScheduledItemId` int NOT NULL AUTO_INCREMENT, `ScheduleldTaskId` int NOT NULL, `ScheduledOn` timestamp NOT NULL, `ExecutedOn` timestamp NULL, PRIMARY KEY (`ScheduledItemId`) );
CREATE TABLE IF NOT EXISTS `CMSImportCustomRelation` ( `CustomRelationId` int NOT NULL AUTO_INCREMENT, `UmbracoId` int NOT NULL, `Alias` nvarchar(250) NOT NULL, `DataSourceKey` nvarchar(250) NOT NULL, `RelatedId` nvarchar(250) NOT NULL, PRIMARY KEY (`CustomRelationId`) );
Great that you found a way to support MySql. I think I will update the execute sql packageaction to support install scripts for multiple datalayers and will include your fix in the next release if you don't mind?
MySQL support
Hello friends i have a converted table structure for Umbraco websites running MySql.
But somehow the code returns an error
MySql.Data.MySqlClient.MySqlException: Unknown column 'PARENT' in 'where clause' ???
please help
for MySql use this script:
USE `YourDatabase.Table`;
CREATE TABLE IF NOT EXISTS `CMSImportState` (
`Id` int NOT NULL AUTO_INCREMENT,
`UniqueIdentifier` char(36) NOT NULL,
`Name` varchar(250) NOT NULL,
`ImportType` varchar(250) NOT NULL,
`ImportState` varchar(4000) NOT NULL,
PRIMARY KEY (`Id`)
);
CREATE TABLE IF NOT EXISTS `CMSImportScheduledTask` (
`ScheduleId` int NOT NULL AUTO_INCREMENT,
`ScheduleGUID` char(36) NOT NULL,
`ImportStateGUID` char(36) NOT NULL,
`ScheduledTaskName` varchar(50) NOT NULL,
`NotifyEmailAddress` varchar(250) NOT NULL,
`ExecuteEvery` varchar(50) NOT NULL,
`ExecuteDays` varchar(50) NOT NULL,
`ExecuteHour` int NOT NULL,
`ExecuteMinute` int NOT NULL,
PRIMARY KEY (`ScheduleId`)
);
CREATE TABLE IF NOT EXISTS `CMSImportRelation` (
`Id` int NOT NULL AUTO_INCREMENT,
`UmbracoID` int NOT NULL,
`UmbracoParentId` int NOT NULL,
`DataSourceKey` varchar(250) NOT NULL,
PRIMARY KEY (`Id`)
);
CREATE TABLE IF NOT EXISTS `CMSImportMediaRelation` (
`Id` int NOT NULL AUTO_INCREMENT,
`UmbracoMediaId` int NOT NULL,
`SourceUrl` varchar(500) NOT NULL,
PRIMARY KEY (`Id`)
);
CREATE TABLE IF NOT EXISTS `CMSImportScheduledItems` (
`ScheduledItemId` int NOT NULL AUTO_INCREMENT,
`ScheduleldTaskId` int NOT NULL,
`ScheduledOn` timestamp NOT NULL,
`ExecutedOn` timestamp NULL,
PRIMARY KEY (`ScheduledItemId`)
);
CREATE TABLE IF NOT EXISTS `CMSImportCustomRelation` (
`CustomRelationId` int NOT NULL AUTO_INCREMENT,
`UmbracoId` int NOT NULL,
`Alias` nvarchar(250) NOT NULL,
`DataSourceKey` nvarchar(250) NOT NULL,
`RelatedId` nvarchar(250) NOT NULL,
PRIMARY KEY (`CustomRelationId`)
);
Found out i was missing the
`Recursive` bit NULL,
`Parent` char(36) NULL,
on CMSImportState table
AND
`InProgress` bit NULL,
on CMSImportScheduledItems table
Download CMSImport 2.0 Package with mysql support from here http://techhouse.dk/download/CMSImport-2.0-mysql.zip
Hi Bo,
Great that you found a way to support MySql. I think I will update the execute sql packageaction to support install scripts for multiple datalayers and will include your fix in the next release if you don't mind?
Thanks,
Richard
No problem, This is your project, only wish i have - is to be credited within your package for MySql script :-)
is working on a reply...