U4-7124 - add initial migration as part of BaseDataCreation
This commit is contained in:
@@ -80,9 +80,6 @@ namespace Umbraco.Core.Persistence
|
||||
var creation = new DatabaseSchemaCreation(_db, _logger, _syntaxProvider);
|
||||
creation.InitializeDatabaseSchema();
|
||||
|
||||
//Now ensure to cretae the tag in the db for the current migration version
|
||||
migrationEntryService.CreateEntry(GlobalSettings.UmbracoMigrationName, UmbracoVersion.GetSemanticVersion());
|
||||
|
||||
_logger.Info<Database>("Finalized database schema creation");
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using Umbraco.Core.Configuration;
|
||||
using Umbraco.Core.Logging;
|
||||
using Umbraco.Core.Models.Rdbms;
|
||||
|
||||
@@ -86,11 +87,17 @@ namespace Umbraco.Core.Persistence.Migrations.Initial
|
||||
{
|
||||
CreateUmbracoRelationTypeData();
|
||||
}
|
||||
|
||||
if (tableName.Equals("cmsTaskType"))
|
||||
{
|
||||
CreateCmsTaskTypeData();
|
||||
}
|
||||
|
||||
if (tableName.Equals("umbracoMigration"))
|
||||
{
|
||||
CreateUmbracoMigrationData();
|
||||
}
|
||||
|
||||
_logger.Info<BaseDataCreation>(string.Format("Done creating data in table {0}", tableName));
|
||||
}
|
||||
|
||||
@@ -274,5 +281,18 @@ namespace Umbraco.Core.Persistence.Migrations.Initial
|
||||
{
|
||||
_database.Insert("cmsTaskType", "id", false, new TaskTypeDto { Id = 1, Alias = "toTranslate" });
|
||||
}
|
||||
|
||||
private void CreateUmbracoMigrationData()
|
||||
{
|
||||
var dto = new MigrationDto
|
||||
{
|
||||
Id = 1,
|
||||
Name = GlobalSettings.UmbracoMigrationName,
|
||||
Version = UmbracoVersion.GetSemanticVersion().ToString(),
|
||||
CreateDate = DateTime.Now
|
||||
};
|
||||
|
||||
_database.Insert("umbracoMigration", "pk", false, dto);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user