mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 03:25:23 +08:00
#16752: Using module instead of feature name for migration schema builder.
--HG-- branch : dev
This commit is contained in:
@@ -171,7 +171,7 @@ namespace Orchard.Tests.DataMigration {
|
||||
|
||||
public class DataMigrationWithSchemaBuilder : DataMigrationImpl {
|
||||
public override Feature Feature {
|
||||
get { return new Feature() { Descriptor = new FeatureDescriptor() { Id = "Feature1" } }; }
|
||||
get { return new Feature { Descriptor = new FeatureDescriptor { Id = "Feature1", Extension = new ExtensionDescriptor { Id = "Module1" } } }; }
|
||||
}
|
||||
|
||||
public int Create() {
|
||||
@@ -182,13 +182,13 @@ namespace Orchard.Tests.DataMigration {
|
||||
|
||||
public class DataMigrationFeatureNeedUpdate1 : IDataMigration {
|
||||
public Feature Feature {
|
||||
get { return new Feature() { Descriptor = new FeatureDescriptor() { Id = "Feature1" } }; }
|
||||
get { return new Feature() { Descriptor = new FeatureDescriptor { Id = "Feature1", Extension = new ExtensionDescriptor { Id = "Module1" } } }; }
|
||||
}
|
||||
}
|
||||
|
||||
public class DataMigrationFeatureNeedUpdate2 : IDataMigration {
|
||||
public Feature Feature {
|
||||
get { return new Feature() { Descriptor = new FeatureDescriptor() { Id = "Feature2" } }; }
|
||||
get { return new Feature() { Descriptor = new FeatureDescriptor { Id = "Feature2", Extension = new ExtensionDescriptor { Id = "Module2" } } }; }
|
||||
}
|
||||
|
||||
public int Create() {
|
||||
@@ -198,7 +198,7 @@ namespace Orchard.Tests.DataMigration {
|
||||
|
||||
public class DataMigrationFeatureNeedUpdate3 : IDataMigration {
|
||||
public Feature Feature {
|
||||
get { return new Feature() { Descriptor = new FeatureDescriptor() { Id = "Feature3" } }; }
|
||||
get { return new Feature() { Descriptor = new FeatureDescriptor { Id = "Feature3", Extension = new ExtensionDescriptor { Id = "Module3" } } }; }
|
||||
}
|
||||
|
||||
public int Create() {
|
||||
@@ -212,7 +212,7 @@ namespace Orchard.Tests.DataMigration {
|
||||
|
||||
public class DataMigrationSimpleBuilder : DataMigrationImpl {
|
||||
public override Feature Feature {
|
||||
get { return new Feature() { Descriptor = new FeatureDescriptor() { Id = "Feature1" } }; }
|
||||
get { return new Feature() { Descriptor = new FeatureDescriptor { Id = "Feature1", Extension = new ExtensionDescriptor { Id = "Module1" } } }; }
|
||||
}
|
||||
|
||||
public int Create() {
|
||||
|
@@ -17,7 +17,7 @@
|
||||
</logger>
|
||||
|
||||
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
|
||||
<file value="App_Data/logs/orchard-debug.txt" />
|
||||
<file value="App_Data/Logs/orchard-debug.txt" />
|
||||
<appendToFile value="true" />
|
||||
<immediateFlush value="true" />
|
||||
|
||||
|
@@ -166,7 +166,7 @@ namespace Orchard.Data.Migration {
|
||||
.ToList();
|
||||
|
||||
foreach (var migration in migrations.OfType<DataMigrationImpl>()) {
|
||||
migration.SchemaBuilder = new SchemaBuilder(_interpreter, migration.Feature.Descriptor.Id, s => s.Replace(".", "_") + "_");
|
||||
migration.SchemaBuilder = new SchemaBuilder(_interpreter, migration.Feature.Descriptor.Extension.Id, s => s.Replace(".", "_") + "_");
|
||||
migration.ContentDefinitionManager = _contentDefinitionManager;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user