You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

46 lines
1.7 KiB

namespace Sevomin.Models.Migrations
{
using System.Data.Entity.Migrations;
public partial class Paramvalues : DbMigration
{
public override void Up()
{
CreateTable(
"dbo.Parameters",
c => new
{
Id = c.Int(nullable: false, identity: true),
Name = c.String(nullable: false),
Moscow = c.Boolean(nullable: false),
DisplayMethod = c.Byte(nullable: false),
GroupName = c.String(nullable: false),
CommentAvalin = c.String(maxLength: 140),
CommentDovomin = c.String(maxLength: 140),
ParameterValueId = c.String(maxLength: 50),
})
.PrimaryKey(t => t.Id)
.Index(t=>t.ParameterValueId);
CreateTable(
"dbo.ParameterValues",
c => new
{
GroupKey = c.String(nullable: false, maxLength: 50),
Value = c.String(nullable: false, maxLength: 50),
})
.PrimaryKey(t => new { t.GroupKey, t.Value })
.Index(t => t.GroupKey);
}
public override void Down()
{
DropForeignKey("dbo.ParameterValues", "Parameter_Id", "dbo.Parameters");
DropIndex("dbo.ParameterValues", new[] { "Parameter_Id" });
DropIndex("dbo.ParameterValues", new[] { "GroupKey" });
DropTable("dbo.ParameterValues");
DropTable("dbo.Parameters");
}
}
}