Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed EF Migration issues (VERY IMPORTANT: please downgrade your EF m…
…igration to "V211" BEFORE pulling this commit)
- Loading branch information
1 parent
018c5be
commit a3382aa
Showing
12 changed files
with
423 additions
and
441 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
106 changes: 0 additions & 106 deletions
106
src/Libraries/SmartStore.Data/Migrations/201501291135374_QuantityUnits.cs
This file was deleted.
Oops, something went wrong.
126 changes: 0 additions & 126 deletions
126
src/Libraries/SmartStore.Data/Migrations/201501291135374_QuantityUnits.resx
This file was deleted.
Oops, something went wrong.
66 changes: 0 additions & 66 deletions
66
src/Libraries/SmartStore.Data/Migrations/201501291549546_OrderItemTaxRate.cs
This file was deleted.
Oops, something went wrong.
126 changes: 0 additions & 126 deletions
126
src/Libraries/SmartStore.Data/Migrations/201501291549546_OrderItemTaxRate.resx
This file was deleted.
Oops, something went wrong.
6 changes: 3 additions & 3 deletions
6
...501291549546_OrderItemTaxRate.Designer.cs → ...6_QtyUnitsAndOrderItemTaxRate.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
137 changes: 137 additions & 0 deletions
137
src/Libraries/SmartStore.Data/Migrations/201502191643156_QtyUnitsAndOrderItemTaxRate.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
namespace SmartStore.Data.Migrations | ||
{ | ||
using System; | ||
using System.Data.Entity.Migrations; | ||
using SmartStore.Data.Setup; | ||
|
||
public partial class QtyUnitsAndOrderItemTaxRate : DbMigration, ILocaleResourcesProvider, IDataSeeder<SmartObjectContext> | ||
{ | ||
public override void Up() | ||
{ | ||
CreateTable( | ||
"dbo.QuantityUnit", | ||
c => new | ||
{ | ||
Id = c.Int(nullable: false, identity: true), | ||
Name = c.String(nullable: false, maxLength: 50), | ||
Description = c.String(maxLength: 50), | ||
DisplayLocale = c.String(maxLength: 50), | ||
DisplayOrder = c.Int(nullable: false), | ||
IsDefault = c.Boolean(nullable: false), | ||
}) | ||
.PrimaryKey(t => t.Id); | ||
|
||
AddColumn("dbo.Product", "QuantityUnitId", c => c.Int()); | ||
AddColumn("dbo.Order", "OrderShippingTaxRate", c => c.Decimal(nullable: false, precision: 18, scale: 4)); | ||
AddColumn("dbo.Order", "PaymentMethodAdditionalFeeTaxRate", c => c.Decimal(nullable: false, precision: 18, scale: 4)); | ||
AddColumn("dbo.OrderItem", "TaxRate", c => c.Decimal(nullable: false, precision: 18, scale: 4)); | ||
AddColumn("dbo.ProductVariantAttributeCombination", "QuantityUnitId", c => c.Int()); | ||
AddColumn("dbo.Topic", "TitleTag", c => c.String()); | ||
CreateIndex("dbo.Product", "QuantityUnitId"); | ||
CreateIndex("dbo.ProductVariantAttributeCombination", "QuantityUnitId"); | ||
AddForeignKey("dbo.ProductVariantAttributeCombination", "QuantityUnitId", "dbo.QuantityUnit", "Id"); | ||
AddForeignKey("dbo.Product", "QuantityUnitId", "dbo.QuantityUnit", "Id"); | ||
} | ||
|
||
public override void Down() | ||
{ | ||
DropForeignKey("dbo.Product", "QuantityUnitId", "dbo.QuantityUnit"); | ||
DropForeignKey("dbo.ProductVariantAttributeCombination", "QuantityUnitId", "dbo.QuantityUnit"); | ||
DropIndex("dbo.ProductVariantAttributeCombination", new[] { "QuantityUnitId" }); | ||
DropIndex("dbo.Product", new[] { "QuantityUnitId" }); | ||
DropColumn("dbo.Topic", "TitleTag"); | ||
DropColumn("dbo.ProductVariantAttributeCombination", "QuantityUnitId"); | ||
DropColumn("dbo.OrderItem", "TaxRate"); | ||
DropColumn("dbo.Order", "PaymentMethodAdditionalFeeTaxRate"); | ||
DropColumn("dbo.Order", "OrderShippingTaxRate"); | ||
DropColumn("dbo.Product", "QuantityUnitId"); | ||
DropTable("dbo.QuantityUnit"); | ||
} | ||
|
||
public void Seed(SmartObjectContext context) | ||
{ | ||
context.MigrateLocaleResources(MigrateLocaleResources); | ||
} | ||
|
||
public bool RollbackOnFailure | ||
{ | ||
get { return false; } | ||
} | ||
|
||
public void MigrateLocaleResources(LocaleResourcesBuilder builder) | ||
{ | ||
// QtyUnits | ||
builder.AddOrUpdate("Admin.Configuration.AddNew", | ||
"Add new", | ||
"Hinzufügen"); | ||
builder.AddOrUpdate("Admin.Configuration.BackToList", | ||
"Back", | ||
"Zurück"); | ||
builder.AddOrUpdate("Admin.Configuration.QuantityUnit.EditQuantityUnitDetails", | ||
"Edit details", | ||
"Details bearbeiten"); | ||
builder.AddOrUpdate("Admin.Configuration.QuantityUnit", | ||
"Quantity units", | ||
"Verpackungseinheiten"); | ||
|
||
builder.AddOrUpdate("Admin.Configuration.QuantityUnit.Fields.Name", | ||
"Name", | ||
"Name"); | ||
builder.AddOrUpdate("Admin.Configuration.QuantityUnit.Fields.Name.Hint", | ||
"Set the name of quantity unit", | ||
"Legt den Namen der Verpackungseinheit fest"); | ||
builder.AddOrUpdate("Admin.Configuration.QuantityUnit.Fields.IsDefault", | ||
"Default quantity unit", | ||
"Standard-Verpackungseinheit"); | ||
builder.AddOrUpdate("Admin.Configuration.QuantityUnit.Fields.IsDefault.Hint", | ||
"Sets the default quantity unit", | ||
"Legt die Standard-Verpackungseinheit fest"); | ||
|
||
|
||
builder.AddOrUpdate("Admin.Configuration.QuantityUnit.Added", | ||
"Quantity unit successfully added", | ||
"Verpackungseinheit wurde erfolgreich zugefügt"); | ||
builder.AddOrUpdate("Admin.Configuration.Quantityunits.Updated", | ||
"Quantity unit successfully updated", | ||
"Verpackungseinheit wurde erfolgreich aktualisiert"); | ||
builder.AddOrUpdate("Admin.Catalog.Products.Fields.QuantityUnit", | ||
"Quantity unit", | ||
"Verpackungseinheit"); | ||
|
||
builder.AddOrUpdate("Admin.Configuration.Settings.Catalog.ShowDefaultQuantityUnit", | ||
"Show default quantity unit", | ||
"Zeige die Standard-Verpackungseinheit", | ||
"Show default quantity unit if the product has no quantity unit set.", | ||
"Zeige die Standard-Verpackungseinheit, falls für das Produkt keine Verpackungseinheit festgelegt ist."); | ||
|
||
|
||
// OrderItemTaxRate | ||
builder.AddOrUpdate("Admin.Orders.Products.AddNew.TaxRate", | ||
"Tax rate", | ||
"Steuersatz", | ||
"The tax rate for the product", | ||
"Die Steuerrate des Produktes"); | ||
|
||
builder.AddOrUpdate("Admin.Configuration.Settings.Catalog.MaxFilterItemsToDisplay", | ||
"Maximum filter items", | ||
"Maximale Anzahl Filtereinträge", | ||
"Determines the maximum amount of filter items to display", | ||
"Bestimmt die maximale Anzahl angezeigter Filtereinträge"); | ||
builder.AddOrUpdate("Admin.Configuration.Settings.Catalog.ExpandAllFilterCriteria", | ||
"Expand all filter groups", | ||
"Alle Filtergruppen aufklappen", | ||
"Determines whether all filter groups should be displayed expanded", | ||
"Legt fest, ob alle Filtergruppen aufgeklappt angezeigt werden sollen"); | ||
|
||
builder.AddOrUpdate("Admin.Common.Export.Wait", | ||
"Please wait while the export is being executed", | ||
"Bitte haben Sie einen Augenblick Geduld, während der Export durchgeführt wird"); | ||
|
||
builder.AddOrUpdate("Admin.ContentManagement.Topics.Fields.TitleTag", | ||
"Title tag", | ||
"Titel-Tag", | ||
"Determines the title tag of the topic", | ||
"Legt das Tag fest, welches für die Überschrift des Topics ausgegeben wird"); | ||
} | ||
} | ||
} |
Oops, something went wrong.