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
There is a major change in the databases when moving from v7 to v8.
The migrations fail to complete the conversion of the databases for at the moment.
I have concluded that at the moment the code will only make a new database and not be able to migrate a database.
Is that correct?
Should I be waiting for v8.0.1?
Should I be trying something different?
Has anyone upgraded an MSSQL Database yet?
Here is why I think that:
The tables seem to be being updated from having a prefix of cms to umbraco. For example cmsPropertyData to umbracoPropertyData and cmsContentType to umbracoContentType.
I cannot find the code that changes the cmsContentType table to umbracoContentType and have a couple of spots that execute sql statements that work on sqlce and not on mssql.
I'm not sure how to proceed but I have been building a sql script that gets me through but i think i a must be missing something or this is just not yet complete. I still have a bunch of cms prefixed tables and the migration is trying to update the umbraco tables.
Create a new working v8.0.0 site on a new mssql 2014 db.
Checkout UmbracoCms repo at tag release-8.0.0 and update VariantsMigration.cs on line 52 by removing the word COLUMN from the sql statement as shown below
Compile UmbracoCms repo.
Copy Umbraco.Core dll over to the new v8 running site.
Restore a copy of a working and fully populated 7.13.1 db over the newly created v8.0.0 db
Update the cms version in the web.config to 7.13.1
delete the log file
run the upgrade by visiting the v8 site
I have had to recompile v8 Umbraco.Core to fix up some of the SQLCE commands to be more MSSQL.
Below is the sql statement that I have to run to reset the database which includes removing the audit trail but removes a couple of constraints which fail along the way. I have removed the password update so make sure you replace the password hash with your own.
ALTER DATABASE [inspirecmsv8] SET SINGLE_USER WITH ROLLBACK IMMEDIATE
RESTORE DATABASE [inspirecmsv8] FROM DISK = N'C:\Database\SQL2014DEV\Backup\inspirecms (6)\inspirecms.bak' WITH FILE = 1, MOVE N'inspirecms_data' TO N'C:\Database\SQL2014DEV\Data\inspirecmsv8_data.mdf', MOVE N'inspirecms_log' TO N'C:\Database\SQL2014DEV\Data\inspirecmsv8_log.ldf', NOUNLOAD, REPLACE, STATS = 5
ALTER DATABASE [inspirecmsv8] SET MULTI_USER
SET [userDisabled] = 0
,[userNoConsole] = 0
,[userPassword] = '## Hashed Password ##'
WHERE [userEmail] = 'email@example.com'
ALTER TABLE [dbo].[cmsDocument] DROP CONSTRAINT [DF_cmsDocument_updateDate]
ALTER TABLE [dbo].[cmsDocument] DROP CONSTRAINT [DF_cmsDocument_newest]
TRUNCATE TABLE umbracoLog
--TRUNCATE TABLE umbracoUser2NodePermission
--TRUNCATE TABLE umbracoUserLogins
-- Create a temporary table for all documents which are published and not in the recycle bin
CREATE TABLE #Nodes (id int)
-- Delete all rows if the table exists before
TRUNCATE TABLE #Nodes
-- Insert all nodeIds from all documents which are published and not in the recycle bin
INSERT INTO #Nodes
FROM umbracoNode N
INNER JOIN cmsDocument D ON N.ID = D.NodeId
WHERE nodeObjectType = 'C66BA18E-EAF3-4CFF-8A22-41B16D66A972'
AND [path] NOT LIKE '%-20%'
AND D.Published = 1
-- Create a temporary table for all versionId's to delete
CREATE TABLE #Versions (id UniqueIdentifier)
-- Delete all rows if it exists before
TRUNCATE TABLE #Versions
-- Insert all versionId's from all nodeIds in the #Nodes table
-- and where published is set to false and newest is set to false
INSERT INTO #Versions
WHERE nodeId IN (SELECT id FROM #Nodes) AND published = 0 AND newest = 0
-- DELETE all versions from cmsPreviewXml, cmsPropertyData, cmsContentVersion, cmsDocument
-- from the nodes which are published and which are not in the recycle bin
-- and which are not published and which are not the newest
DELETE FROM cmsPreviewXml WHERE versionId IN (SELECT id FROM #Versions)
DELETE FROM cmsPropertyData WHERE VersionId IN (SELECT id FROM #Versions)
DELETE FROM cmsContentVersion WHERE VersionId IN (SELECT id FROM #Versions)
DELETE FROM cmsDocument WHERE VersionId IN (SELECT id FROM #Versions)
-- Drop temp tables
DROP TABLE #Versions
DROP TABLE #Nodes
-- Reindex tables
DBCC DBREINDEX (cmsPropertyData)
DBCC DBREINDEX (cmsPreviewXml)
DBCC DBREINDEX (cmsContentVersion)
DBCC DBREINDEX (cmsDocument)
DBCC DBREINDEX (cmsContentXml)
DBCC DBREINDEX (umbracoDomains)
--DBCC DBREINDEX (umbracoUser2NodePermission)
DBCC DBREINDEX (umbracoNode)
DBCC DBREINDEX (cmsContent)
CREATE TABLE [dbo].[umbracoMediaVersion](
[id] [int] NOT NULL,
[path] [nvarchar](255) NULL,
CONSTRAINT [PK_umbracoMediaVersion] PRIMARY KEY CLUSTERED
) ON [PRIMARY]
) ON [PRIMARY]
In their blog post introducing Umbraco 8, HQ mentioned that automatic upgrades from v7 to v8 were not currently supported, but "very soon it will be possible to migrate your content". I've seen nothing saying they have released the ability to migrate content yet, so I think until that comes out, there isn't a supported path. That said, it looks like you've done a lot of work, maybe someone at HQ will see it and collaborate!
Hi Ben, I'm sorry but this will definitely not be sufficient to migrate your db to v8.
There is currently not an upgrade path to go from v7 to v8, there will be a migration path in the future: https://our.umbraco.com/documentation/Umbraco8FAQ#will-it-be-possible-to-upgrade-automatically-from-umbraco-7-to-umbraco-8
We're working on it for v8.1.0 and ask for a little patience until then 👍
oh ok, no problem.
thanks for getting back to me.
If there is any update on this, please post it in this thread..
I've migrated a v7.15 of the starter kit to v8.1.2 using umbraco migrations - excluding the app_plugins. The db migration went fine. Had to regenerate the code models which are now in a different namespace and global changes to the razor templates to reflect new v8 code base.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted