This repository has been archived by the owner on Jan 17, 2024. It is now read-only.
forked from 18F/dol-whd-14c
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tighter validation and model updates
Updates to validation to validate correct values for Response fields. Also moved around and removed some fields from the model to reflect UI changes.
- Loading branch information
Kyle Linden
committed
Nov 1, 2016
1 parent
f22e2b9
commit 7250dda
Showing
22 changed files
with
387 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
...Section14c.DataAccess/Migrations/201611011606064_MoveProvidingFacilitiesField.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
68 changes: 68 additions & 0 deletions
68
DOL.WHD.Section14c.DataAccess/Migrations/201611011606064_MoveProvidingFacilitiesField.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
namespace DOL.WHD.Section14c.DataAccess.Migrations | ||
{ | ||
using System; | ||
using System.Data.Entity.Migrations; | ||
|
||
public partial class MoveProvidingFacilitiesField : DbMigration | ||
{ | ||
public override void Up() | ||
{ | ||
DropForeignKey("dbo.AppSubmissionFacilitiesDeductionType", "ApplicationSubmissionId", "dbo.ApplicationSubmissions"); | ||
DropForeignKey("dbo.AppSubmissionFacilitiesDeductionType", "ProvidingFacilitiesDeductionTypeId", "dbo.Responses"); | ||
DropForeignKey("dbo.EmployerInfoes", "ProvidingFacilitiesDeductionTypeId", "dbo.Responses"); | ||
DropIndex("dbo.EmployerInfoes", new[] { "ProvidingFacilitiesDeductionTypeId" }); | ||
DropIndex("dbo.AppSubmissionFacilitiesDeductionType", new[] { "ApplicationSubmissionId" }); | ||
DropIndex("dbo.AppSubmissionFacilitiesDeductionType", new[] { "ProvidingFacilitiesDeductionTypeId" }); | ||
CreateTable( | ||
"dbo.EmployerInfoFacilitiesDeductionType", | ||
c => new | ||
{ | ||
EmployerInfoId = c.Guid(nullable: false), | ||
ProvidingFacilitiesDeductionTypeId = c.Int(nullable: false), | ||
}) | ||
.PrimaryKey(t => new { t.EmployerInfoId, t.ProvidingFacilitiesDeductionTypeId }) | ||
.ForeignKey("dbo.Responses", t => t.ProvidingFacilitiesDeductionTypeId, cascadeDelete: true) | ||
.ForeignKey("dbo.EmployerInfoes", t => t.EmployerInfoId, cascadeDelete: true) | ||
.Index(t => t.EmployerInfoId) | ||
.Index(t => t.ProvidingFacilitiesDeductionTypeId); | ||
|
||
DropColumn("dbo.ApplicationSubmissions", "RepresentativePayeeSocialSecurityBenefits"); | ||
DropColumn("dbo.ApplicationSubmissions", "NumEmployeesRepresentativePayee"); | ||
DropColumn("dbo.ApplicationSubmissions", "ProvidingFacilities"); | ||
DropColumn("dbo.ApplicationSubmissions", "ProvidingFacilitiesDeductionTypeOther"); | ||
DropColumn("dbo.ApplicationSubmissions", "ReviewedDocumentation"); | ||
DropColumn("dbo.EmployerInfoes", "ProvidingFacilitiesDeductionTypeId"); | ||
DropTable("dbo.AppSubmissionFacilitiesDeductionType"); | ||
} | ||
|
||
public override void Down() | ||
{ | ||
CreateTable( | ||
"dbo.AppSubmissionFacilitiesDeductionType", | ||
c => new | ||
{ | ||
ApplicationSubmissionId = c.Guid(nullable: false), | ||
ProvidingFacilitiesDeductionTypeId = c.Int(nullable: false), | ||
}) | ||
.PrimaryKey(t => new { t.ApplicationSubmissionId, t.ProvidingFacilitiesDeductionTypeId }); | ||
|
||
AddColumn("dbo.EmployerInfoes", "ProvidingFacilitiesDeductionTypeId", c => c.Int(nullable: false)); | ||
AddColumn("dbo.ApplicationSubmissions", "ReviewedDocumentation", c => c.Boolean(nullable: false)); | ||
AddColumn("dbo.ApplicationSubmissions", "ProvidingFacilitiesDeductionTypeOther", c => c.String()); | ||
AddColumn("dbo.ApplicationSubmissions", "ProvidingFacilities", c => c.Boolean(nullable: false)); | ||
AddColumn("dbo.ApplicationSubmissions", "NumEmployeesRepresentativePayee", c => c.Int()); | ||
AddColumn("dbo.ApplicationSubmissions", "RepresentativePayeeSocialSecurityBenefits", c => c.Boolean(nullable: false)); | ||
DropForeignKey("dbo.EmployerInfoFacilitiesDeductionType", "EmployerInfoId", "dbo.EmployerInfoes"); | ||
DropForeignKey("dbo.EmployerInfoFacilitiesDeductionType", "ProvidingFacilitiesDeductionTypeId", "dbo.Responses"); | ||
DropIndex("dbo.EmployerInfoFacilitiesDeductionType", new[] { "ProvidingFacilitiesDeductionTypeId" }); | ||
DropIndex("dbo.EmployerInfoFacilitiesDeductionType", new[] { "EmployerInfoId" }); | ||
DropTable("dbo.EmployerInfoFacilitiesDeductionType"); | ||
CreateIndex("dbo.AppSubmissionFacilitiesDeductionType", "ProvidingFacilitiesDeductionTypeId"); | ||
CreateIndex("dbo.AppSubmissionFacilitiesDeductionType", "ApplicationSubmissionId"); | ||
CreateIndex("dbo.EmployerInfoes", "ProvidingFacilitiesDeductionTypeId"); | ||
AddForeignKey("dbo.EmployerInfoes", "ProvidingFacilitiesDeductionTypeId", "dbo.Responses", "Id", cascadeDelete: true); | ||
AddForeignKey("dbo.AppSubmissionFacilitiesDeductionType", "ProvidingFacilitiesDeductionTypeId", "dbo.Responses", "Id", cascadeDelete: true); | ||
AddForeignKey("dbo.AppSubmissionFacilitiesDeductionType", "ApplicationSubmissionId", "dbo.ApplicationSubmissions", "Id", cascadeDelete: true); | ||
} | ||
} | ||
} |
Oops, something went wrong.