ReviewR.Web.Migrations.Participants.Up C# (CSharp) Method

Up() public method

public Up ( ) : void
return void
        public override void Up()
        {
            CreateTable(
                "Participants",
                c => new
                    {
                        Id = c.Int(nullable: false, identity: true),
                        Required = c.Boolean(nullable: false),
                        ReviewId = c.Int(nullable: false),
                        UserId = c.Int(nullable: false),
                    })
                .PrimaryKey(t => t.Id)
                .ForeignKey("Reviews", t => t.ReviewId, cascadeDelete: true)
                .ForeignKey("Users", t => t.UserId, cascadeDelete: false)
                .Index(t => t.ReviewId)
                .Index(t => t.UserId);
        }
Participants