Merge pull request #10603 from umbraco/v8/bugfix/creating-document-types-sqlce
Fix duplicate ID when creating document types with SQL CE
This commit is contained in:
@@ -206,6 +206,7 @@ namespace Umbraco.Core.Migrations.Upgrade
|
||||
// to 8.15.0...
|
||||
To<AddCmsContentNuByteColumn>("{8DDDCD0B-D7D5-4C97-BD6A-6B38CA65752F}");
|
||||
To<UpgradedIncludeIndexes>("{4695D0C9-0729-4976-985B-048D503665D8}");
|
||||
To<UpdateCmsPropertyGroupIdSeed>("{5C424554-A32D-4852-8ED1-A13508187901}");
|
||||
|
||||
//FINAL
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
|
||||
namespace Umbraco.Core.Migrations.Upgrade.V_8_15_0
|
||||
{
|
||||
public class UpdateCmsPropertyGroupIdSeed : MigrationBase
|
||||
{
|
||||
public UpdateCmsPropertyGroupIdSeed(IMigrationContext context) : base(context)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Migrate()
|
||||
{
|
||||
if (DatabaseType.IsSqlCe())
|
||||
{
|
||||
Database.Execute(Sql("ALTER TABLE [cmsPropertyTypeGroup] ALTER COLUMN [id] IDENTITY (56,1)"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,7 @@ namespace Umbraco.Core.Persistence.Dtos
|
||||
internal class PropertyTypeGroupDto
|
||||
{
|
||||
[Column("id")]
|
||||
[PrimaryKeyColumn(IdentitySeed = 12)]
|
||||
[PrimaryKeyColumn(IdentitySeed = 56)]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Column("contenttypeNodeId")]
|
||||
|
||||
@@ -141,6 +141,7 @@
|
||||
<Compile Include="Migrations\Upgrade\V_8_0_0\Models\PropertyDataDto80.cs" />
|
||||
<Compile Include="Migrations\Upgrade\V_8_0_0\Models\PropertyTypeDto80.cs" />
|
||||
<Compile Include="Migrations\Upgrade\V_8_15_0\AddCmsContentNuByteColumn.cs" />
|
||||
<Compile Include="Migrations\Upgrade\V_8_15_0\UpdateCmsPropertyGroupIdSeed.cs" />
|
||||
<Compile Include="Migrations\Upgrade\V_8_15_0\UpgradedIncludeIndexes.cs" />
|
||||
<Compile Include="Migrations\Upgrade\V_8_10_0\AddPropertyTypeLabelOnTopColumn.cs" />
|
||||
<Compile Include="Migrations\Upgrade\V_8_9_0\ExternalLoginTableUserData.cs" />
|
||||
|
||||
Reference in New Issue
Block a user