-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMigration_AsarCommittee.cs
36 lines (30 loc) · 1.18 KB
/
Migration_AsarCommittee.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
namespace KhelaGharAMS.Migrations
{
using System;
using System.Data.Entity.Migrations;
public partial class AsarCommittee : DbMigration
{
public override void Up()
{
CreateTable(
"dbo.AsarCommittees",
c => new
{
AsarCommitteeId = c.Int(nullable: false, identity: true),
Asar_Id = c.Int(),
Committee_CommitteeId = c.Int(nullable: false),
})
.PrimaryKey(t => t.AsarCommitteeId);
CreateIndex("dbo.AsarCommittees", "Asar_Id");
CreateIndex("dbo.AsarCommittees", "Committee_CommitteeId");
AddForeignKey("dbo.AsarCommittees", "Asar_Id", "dbo.Asars", "Id", cascadeDelete: true);
AddForeignKey("dbo.AsarCommittees", "Committee_CommitteeId", "dbo.Committees", "CommitteeId", cascadeDelete: true);
DropForeignKey("dbo.Committees", "Asar_Id", "dbo.Asars");
DropIndex("dbo.Committees", new[] { "Asar_Id" });
DropColumn("dbo.Committees", "Asar_Id");
}
public override void Down()
{
}
}
}