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.
 
 
 
 

53 lines
2.0 KiB

namespace Sevomin.Models.Migrations
{
using System;
using System.Data.Entity.Migrations;
public partial class Avalin_Dovomin_New_Tables : DbMigration
{
public override void Up()
{
CreateTable(
"dbo.Avalin",
c => new
{
Id = c.String(nullable: false, maxLength: 128),
CompanyName = c.String(),
})
.PrimaryKey(t => t.Id)
.ForeignKey("dbo.AspNetUsers", t => t.Id)
.Index(t => t.Id);
CreateTable(
"dbo.Dovomin",
c => new
{
Id = c.String(nullable: false, maxLength: 128),
FirstName = c.String(),
LastName = c.String(),
})
.PrimaryKey(t => t.Id)
.ForeignKey("dbo.AspNetUsers", t => t.Id)
.Index(t => t.Id);
DropColumn("dbo.AspNetUsers", "CompanyName");
DropColumn("dbo.AspNetUsers", "FirstName");
DropColumn("dbo.AspNetUsers", "LastName");
DropColumn("dbo.AspNetUsers", "Discriminator");
}
public override void Down()
{
AddColumn("dbo.AspNetUsers", "Discriminator", c => c.String(nullable: false, maxLength: 128));
AddColumn("dbo.AspNetUsers", "LastName", c => c.String());
AddColumn("dbo.AspNetUsers", "FirstName", c => c.String());
AddColumn("dbo.AspNetUsers", "CompanyName", c => c.String());
DropForeignKey("dbo.Dovomin", "Id", "dbo.AspNetUsers");
DropForeignKey("dbo.Avalin", "Id", "dbo.AspNetUsers");
DropIndex("dbo.Dovomin", new[] { "Id" });
DropIndex("dbo.Avalin", new[] { "Id" });
DropTable("dbo.Dovomin");
DropTable("dbo.Avalin");
}
}
}