Permalink
Browse files

fixing entity navigation on diningoption_day

  • Loading branch information...
1 parent e5a9577 commit d831d7fa671f172ddeec45a79b1e208e94b8b478 @omockler committed Mar 26, 2012
@@ -82,6 +82,10 @@
<Compile Include="Migrations\201203222011151_Fix_DiningOption_Location_FK.Designer.cs">
<DependentUpon>201203222011151_Fix_DiningOption_Location_FK.cs</DependentUpon>
</Compile>
+ <Compile Include="Migrations\201203261757536_Fix_DiningOption_Day_navigation_fk.cs" />
+ <Compile Include="Migrations\201203261757536_Fix_DiningOption_Day_navigation_fk.Designer.cs">
+ <DependentUpon>201203261757536_Fix_DiningOption_Day_navigation_fk.cs</DependentUpon>
+ </Compile>
<Compile Include="Migrations\Configuration.cs" />
<Compile Include="Models\AccountModels.cs" />
<Compile Include="Models\Day.cs" />
@@ -0,0 +1,24 @@
+// <auto-generated />
+namespace LunchVote.Migrations
+{
+ using System.Data.Entity.Migrations;
+ using System.Data.Entity.Migrations.Infrastructure;
+
+ public sealed partial class Fix_DiningOption_Day_navigation_fk : IMigrationMetadata
+ {
+ string IMigrationMetadata.Id
+ {
+ get { return "201203261757536_Fix_DiningOption_Day_navigation_fk"; }
+ }
+
+ string IMigrationMetadata.Source
+ {
+ get { return null; }
+ }
+
+ string IMigrationMetadata.Target
+ {
+ get { return "H4sIAAAAAAAEAOy9B2AcSZYlJi9tynt/SvVK1+B0oQiAYBMk2JBAEOzBiM3mkuwdaUcjKasqgcplVmVdZhZAzO2dvPfee++999577733ujudTif33/8/XGZkAWz2zkrayZ4hgKrIHz9+fB8/Iv7Hv/cffPx7vFuU6WVeN0W1/Oyj3fHOR2m+nFazYnnx2Ufr9nz74KPf4+g3Th6fzhbv0p807fbQjt5cNp99NG/b1aO7d5vpPF9kzXhRTOuqqc7b8bRa3M1m1d29nZ2Du7s7d3MC8RHBStPHr9bLtljk/Af9eVItp/mqXWflF9UsLxv9nL55zVDTF9kib1bZNP/so+fr5XT+k1Wbf5Qel0VGCLzOy/P3xGbnIbD5yPZDPZ0SRu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mnyUEmkuixk0++vrps0XYzQYv/5F5UlZ0Hhdgy+yZXGeN+2b6m2ODCsZn6+f4Xx4d2cPGc67TTMr/9+c5lwvi1+0zgt40sV5kdc3Jy02pTwLEPQ9AfQTnh+MU5D8fE9ot05OfXhe7+dszkQVC7DlZVZP51m9tcje3fn/ct7ug6ni5/Bm9DsWSL4ms3xo4syFWz/sHFY8svph5yg2ODq3YRuM7PaZic3O9/93E14/Vxmun0O+iXtmP/cs83OdxurHvt3ZUycu5pPclMwST4t05qSi+RZd6bfo5yC63TnN1uvKfRXrZjip0xsR+L8/EHwaxT+Sffnm02Qb02RdooRh3MbMUGT2+omC2yeGBof+DaXBunmvH+rg3iPr1Q9GSFDXS/gJ8tfTvCkuHIjHBHOZsyp1QE2bs+V5ZRRFByPTpOOffJG3Gfkl2XFNDk42benrad40BVZofzIr19TkdDHJZ2fLL9ftat3SkPPFpAzICY2zqX9O7YU4P9Y5/CaGQGgWcK2+XD5ZF+XM4v0s4loNgIAq+zynz2UuSTO2+cW1hfSiWt4SkJLvqdHAb/LFihZb8+bL5evsMh/G7WYahhR7/LTILups4VNQPlFMXmfUs9cFdeC/4fqjP4ldZ4t3R/9PAAAA///85yjTOiQAAA=="; }
+ }
+ }
+}
@@ -0,0 +1,25 @@
+namespace LunchVote.Migrations
+{
+ using System.Data.Entity.Migrations;
+
+ public partial class Fix_DiningOption_Day_navigation_fk : DbMigration
+ {
+ public override void Up()
+ {
+ DropForeignKey("DiningOptions", "Day_Id", "Days");
+ DropIndex("DiningOptions", new[] { "Day_Id" });
+ RenameColumn(table: "DiningOptions", name: "Day_Id", newName: "DayId");
+ AddForeignKey("DiningOptions", "DayId", "Days", "Id", cascadeDelete: true);
+ CreateIndex("DiningOptions", "DayId");
+ }
+
+ public override void Down()
+ {
+ DropIndex("DiningOptions", new[] { "DayId" });
+ DropForeignKey("DiningOptions", "DayId", "Days");
+ RenameColumn(table: "DiningOptions", name: "DayId", newName: "Day_Id");
+ CreateIndex("DiningOptions", "Day_Id");
+ AddForeignKey("DiningOptions", "Day_Id", "Days", "Id");
+ }
+ }
+}
@@ -8,7 +8,11 @@ public class DiningOption
[Key]
public Guid Id { get; set; }
public int Votes { get; set; }
+
public Guid LocationId { get; set; }
public virtual Location Location { get; set; }
+
+ public Guid DayId { get; set; }
+ public virtual Day Day { get; set; }
}
}

0 comments on commit d831d7f

Please sign in to comment.