On this code line, inside the Migrate method, it breaks:
Create.Table<BlogCommentSchema>().Do();
Here is the error message:
Create = 'Create' threw an exception of type 'Umbraco.Core.Migrations.IncompleteMigrationExpressionException'
Umbraco.Core.Migrations.IncompleteMigrationExpressionException: 'Cannot create a new expression: the previous expression has not run.'
Migration expressions such as Alter.Table(...).Do() must end with Do(), else they are not executed. When a non-executed expression is detected, an IncompleteMigrationExpressionException is thrown."
I assume this has something to do with it, but it makes no sense since the code ends with a Do();
Create.Table<BlogCommentSchema>().Do();
I have also tried some adjustments to the code, mainly following this guide, with no change:
I have tried exchanging the database sdf file in App_Data to the initial "clean" Umbraco database sdf which I had a backup of, but this made no difference either.
As I understand it there is no need to install any packages to be able to use Migrations.
Custom Database Migration 'Create.Table' Error
I am using Umbraco 8, v.8.11.1, and am trying to extend the Umbraco database with my own table. I have followed this guide here in the documentation:
https://our.umbraco.com/documentation/extending/database/
On this code line, inside the Migrate method, it breaks:
Here is the error message:
In the documentation for this error, found here:
https://our.umbraco.com/apidocs/v8/csharp/api/Umbraco.Core.Migrations.IncompleteMigrationExpressionException.html
it says:
"Remarks
Migration expressions such as Alter.Table(...).Do() must end with Do(), else they are not executed. When a non-executed expression is detected, an IncompleteMigrationExpressionException is thrown."
I assume this has something to do with it, but it makes no sense since the code ends with a Do();
I have also tried some adjustments to the code, mainly following this guide, with no change:
https://our.umbraco.com/forum/umbraco-8/98439-create-custom-database-table-in-umbraco-8
I have tried exchanging the database sdf file in App_Data to the initial "clean" Umbraco database sdf which I had a backup of, but this made no difference either.
As I understand it there is no need to install any packages to be able to use Migrations.
Solution: I had to upgrade to Umbraco version 8.13.0
is working on a reply...