Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I have a Umbraco 4.0.3 installation on a MySQL Database. When installing this package i got the following error message, and apparently no tables were created in the database.
Thanks for the bug report. I haven't tried out the package with Umbraco running on MySQL.
The app inserts should be pretty standard sql, please feel free to try them out (manually):
"INSERT INTO umbracoAppTree ([appAlias], [treeAlias], [treeSilent], [treeInitialize], [treeSortOrder], [treeTitle], [treeIconClosed], [treeIconOpen], [treeHandlerAssembly], [treeHandlerType]) VALUES (N'settings', N'standardValues', 0, 1, 7, N'Standard Values', N'.sprTreeFolder', N'.sprTreeFolder_o', N'Sitereactor.StandardValues', N'Trees.LoadStandardValues')""CREATE TABLE cmsStandardValues ([docTypeId] [int] NOT NULL, [nodeId] [int] NOT NULL, CONSTRAINT [PK_cmsStandardValues] PRIMARY KEY CLUSTERED ([docTypeId] ASC))"
I'm not sure when I will have time to look into MySQL support, but I will put it on my todo-list. If you see anything that might not work with MySQL in the above, please let me know and I'll change it.
MySQL Version, a bit different =)
INSERT INTO `umbracoapptree`( `APPALIAS`, `TREEALIAS`, `TREESILENT`, `TREEINITIALIZE`, `TREESORTORDER`, `TREETITLE`, `TREEICONCLOSED`, `TREEICONOPEN`, `TREEHANDLERASSEMBLY`, `TREEHANDLERTYPE`) VALUE ( 'settings', 'standardValues', 0, 1, 7, 'Standard Values', '.sprTreeFolder', '.sprTreeFolder_o', 'Sitereactor.StandardValues', 'Trees.LoadStandardValues');
CREATE TABLE `cmsstandardvalues` ( `docTypeId` INT(11) NOT NULL, `nodeId` INT(11) NOT NULL, PRIMARY KEY (`docTypeId`));
This will cause trouble also:
IF OBJECT_ID('cmsStandardValues', 'U') IS NOT NULL SELECT 'true' ELSE SELECT 'false'
For MySQL (5+) :
SELECT IF(COUNT(*)!=0, 'true', 'false') FROM information_schema.TABLES WHERE (Table_Name='cmsstandardvalues' AND TABLE_SCHEMA=(SELECT DATABASE()));
aren't you using the datalayer? The ExecuteNonQuery in the datalayer should take care of that insert and create table definition.
@Peter I do use SqlHelper.ExecuteNonQuery(sql); when creating the table, but as Nalle noted the IF OBJECT_ID('cmsStandardValues', 'U') IS NOT NULL SELECT 'true' ELSE
SELECT 'false' will probably be a problem for MySQL. But I can implement both queries to test for both MSSQL and MySQL.
Here is the Sql I use for creating the table:
string sql = "CREATE TABLE cmsStandardValues ([docTypeId] [int] NOT NULL, [nodeId] [int] NOT NULL, CONSTRAINT [PK_cmsStandardValues] PRIMARY KEY CLUSTERED ([docTypeId] ASC))";
Just another one to add to your to-do list Morten... support for SQL CE4?
I got an error installing one Umbraco 4.6.1 with SQL CE4. (No biggie for me at the moment ... was just a local dev site - for testing my packages)
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted