Several changes before queryDatabase project
This commit is contained in:
@ -0,0 +1,22 @@
|
||||
namespace CodeFirstExistingDatabase.Migrations
|
||||
{
|
||||
using System;
|
||||
using System.Data.Entity.Migrations;
|
||||
|
||||
public partial class RenameTitleColumnToNameInCoursesTable : DbMigration
|
||||
{
|
||||
public override void Up()
|
||||
{
|
||||
AddColumn("dbo.Courses", "Name", c => c.String(nullable: false));
|
||||
Sql("UPDATE Courses SET Name = Title");
|
||||
DropColumn("dbo.Courses", "Title");
|
||||
}
|
||||
|
||||
public override void Down()
|
||||
{
|
||||
AddColumn("dbo.Courses", "Title", c => c.String(nullable: false));
|
||||
Sql("UPDATE Courses SET Title = Name ");
|
||||
DropColumn("dbo.Courses", "Name");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user