2.9 Upgrade Question

Jan 1, 2014 at 12:25 AM
Currently using BE 2.8.0.2 with SQL_CE, is there an upgrade script to use with this? Thank you.
Jan 1, 2014 at 9:05 AM
I'm also using SQL_CE. There is a upgrade script for MS SQL "MSSQLUpgradeFrom2.8to2.9.sql" but I wasn't able to execute it against my database (using Visual Studio's server explorer). It complains about the max keyword.
CREATE TABLE [be_CustomFields](
    [CustomType] [nvarchar](100) NOT NULL,
    [ObjectId] [nvarchar](250) NOT NULL,
    [BlogId] [uniqueidentifier] NOT NULL,
    [Key] [nvarchar](250) NOT NULL,
    [Value] [nvarchar](max) NOT NULL,
    [Attribute] [nvarchar](250) NULL
);
GO
There was an error parsing the query. [ Token line number = 6,Token line offset = 20,Token in error = max ]

Might be a problem with VS/tooling I'm using since the statements looks correct to me.

The script creates one table but when I look into the empty database that comes with 2.9 that table (be_CustomFields) is not there. So now I'm wondering do I need to run that script against my 2.6 version db or not?
Coordinator
Jan 1, 2014 at 7:29 PM
In SQL CE it will be ntext instead of nvarchar(max). http://stackoverflow.com/questions/6736881/sql-ce-max-length
Jan 1, 2014 at 8:13 PM
Currently using BE 2.8.0.2 with SQL_CE, is there an upgrade script to use with this? Thank you.
Coordinator
Jan 1, 2014 at 8:26 PM
No, we depend on community for providers other than XML and SQL server to be updated. Once someone updates CE script and submits a patch, we'll publish it right away.
Jan 1, 2014 at 9:14 PM
This is different from past versions, there was an upgrade for SQL_CE, I used it for my upgrade to 2.8. So you are telling me that I cannot upgrade from 2.8 using SQL_CE to 2.9?
Coordinator
Jan 1, 2014 at 11:36 PM
Usually we get updates from people using particular database and include it in project before release. We didn't get any for CE this time, but I believe all you need to update CE from 2.8 is this:

CREATE TABLE [be_CustomFields](
[CustomType] [nvarchar](100) NOT NULL,
[ObjectId] [nvarchar](250) NOT NULL,
[BlogId] [uniqueidentifier] NOT NULL,
[Key] [nvarchar](250) NOT NULL,
[Value] ntext NOT NULL,
[Attribute] [nvarchar](250) NULL
);
GO
CREATE NONCLUSTERED INDEX [idx_be_CustomType_ObjectId_BlogId_Key] ON [be_CustomFields]
(
[CustomType] ASC,
[ObjectId] ASC,
[BlogId] ASC,
[Key] ASC
);
GO
Jan 2, 2014 at 12:04 AM
Thank you very much sir, it worked nicely, I do appreciate your generous help and all the work you do for BE.
Coordinator
Jan 2, 2014 at 12:11 AM
Good, I'll include it as update script in the source code then.
Jan 3, 2014 at 4:18 AM
I tried to update another 2.8 SQL_CE database with the above code and received this error.

There was an error parsing the query. [ Token line number = 9,Token line offset = 1,Token in error = GO ]