diff --git a/.github/workflows/continuous-integration-terraform.yml b/.github/workflows/continuous-integration-terraform.yml
index fcd6c80b..2b7e3129 100644
--- a/.github/workflows/continuous-integration-terraform.yml
+++ b/.github/workflows/continuous-integration-terraform.yml
@@ -1,13 +1,17 @@
-name: Validate terraform
+name: Continuous Integration / Terraform
on:
push:
branches: main
+ paths:
+ - 'terraform/**.tf'
pull_request:
+ paths:
+ - 'terraform/**.tf'
jobs:
terraform-validate:
- name: Terraform Validate
+ name: Validate
runs-on: ubuntu-latest
steps:
- name: Check out code
@@ -23,41 +27,46 @@ jobs:
exit 1
fi
+ - name: Validate Terraform docs
+ uses: terraform-docs/gh-actions@v1.0.0
+ with:
+ working-dir: terraform
+ config-file: .terraform-docs.yml
+ output-file: README.md
+ output-method: inject
+ fail-on-diff: true
+
- name: Remove azure backend
run: rm ./terraform/backend.tf
- name: Run a Terraform init
- uses: docker://hashicorp/terraform:1.5.5
+ uses: docker://hashicorp/terraform:1.5.6
with:
entrypoint: terraform
args: -chdir=terraform init
- name: Run a Terraform validate
- uses: docker://hashicorp/terraform:1.5.5
+ uses: docker://hashicorp/terraform:1.5.6
with:
entrypoint: terraform
args: -chdir=terraform validate
- name: Run a Terraform format check
- uses: docker://hashicorp/terraform:1.5.5
+ uses: docker://hashicorp/terraform:1.5.6
with:
entrypoint: terraform
args: -chdir=terraform fmt -check=true -diff=true
- terraform-docs-validation:
- name: Terraform Docs validation
- needs: terraform-validate
- runs-on: ubuntu-latest
- steps:
- - name: Check out code
- uses: actions/checkout@v3
+
+ - name: Setup TFLint
+ uses: terraform-linters/setup-tflint@v3
with:
- ref: ${{ github.event.pull_request.head.ref }}
+ tflint_version: v0.44.1
- - name: Generate Terraform docs
- uses: terraform-docs/gh-actions@v1.0.0
+ - name: Run TFLint
+ working-directory: terraform
+ run: tflint -f compact
+
+ - name: Run TFSec
+ uses: aquasecurity/tfsec-pr-commenter-action@v1.3.1
with:
- working-dir: terraform
- config-file: .terraform-docs.yml
- output-file: README.md
- output-method: inject
- fail-on-diff: true
+ github_token: ${{ github.token }}
diff --git a/.github/workflows/continuous-integration-tflint.yml b/.github/workflows/continuous-integration-tflint.yml
deleted file mode 100644
index 69b2cf8a..00000000
--- a/.github/workflows/continuous-integration-tflint.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-name: Terraform Lint
-
-on:
- pull_request:
-
-jobs:
- tflint:
- name: tflint
- runs-on: ubuntu-latest
- defaults:
- run:
- working-directory: terraform
- steps:
- - name: Clone repo
- uses: actions/checkout@v3
-
- - name: Setup TFLint
- uses: terraform-linters/setup-tflint@v3
- with:
- tflint_version: v0.44.1
-
- - name: Run TFLint
- run: tflint -f compact
diff --git a/.github/workflows/continuous-integration-tfsec.yml b/.github/workflows/continuous-integration-tfsec.yml
deleted file mode 100644
index 8bee0ac7..00000000
--- a/.github/workflows/continuous-integration-tfsec.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-name: Terraform security scan
-on:
- pull_request:
-jobs:
- tfsec-pr-commenter:
- name: tfsec PR commenter
- runs-on: ubuntu-latest
- steps:
- - name: Clone repo
- uses: actions/checkout@v3
- - name: tfsec
- uses: aquasecurity/tfsec-pr-commenter-action@v1.2.0
- with:
- github_token: ${{ github.token }}
diff --git a/Dfe.Academies.Academisation.Data/Migrations/20230904135623_SponsoredGrantAmountChangedBool.Designer.cs b/Dfe.Academies.Academisation.Data/Migrations/20230904135623_SponsoredGrantAmountChangedBool.Designer.cs
new file mode 100644
index 00000000..eab16b31
--- /dev/null
+++ b/Dfe.Academies.Academisation.Data/Migrations/20230904135623_SponsoredGrantAmountChangedBool.Designer.cs
@@ -0,0 +1,1701 @@
+//
+using System;
+using Dfe.Academies.Academisation.Data;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+
+#nullable disable
+
+namespace Dfe.Academies.Academisation.Data.Migrations
+{
+ [DbContext(typeof(AcademisationContext))]
+ [Migration("20230904135623_SponsoredGrantAmountChangedBool")]
+ partial class SponsoredGrantAmountChangedBool
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "7.0.5")
+ .HasAnnotation("Relational:MaxIdentifierLength", 128);
+
+ SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
+
+ modelBuilder.Entity("Dfe.Academies.Academisation.Data.ConversionAdvisoryBoardDecisionAggregate.ConversionAdvisoryBoardDecisionDeclinedReasonState", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
+
+ b.Property("AdvisoryBoardDecisionId")
+ .HasColumnType("int");
+
+ b.Property("CreatedOn")
+ .HasColumnType("datetime2");
+
+ b.Property("Details")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("LastModifiedOn")
+ .HasColumnType("datetime2");
+
+ b.Property("Reason")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("AdvisoryBoardDecisionId");
+
+ b.ToTable("ConversionAdvisoryBoardDecisionDeclinedReason", "academisation");
+ });
+
+ modelBuilder.Entity("Dfe.Academies.Academisation.Data.ConversionAdvisoryBoardDecisionAggregate.ConversionAdvisoryBoardDecisionDeferredReasonState", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
+
+ b.Property("AdvisoryBoardDecisionId")
+ .HasColumnType("int");
+
+ b.Property("CreatedOn")
+ .HasColumnType("datetime2");
+
+ b.Property("Details")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("LastModifiedOn")
+ .HasColumnType("datetime2");
+
+ b.Property("Reason")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("AdvisoryBoardDecisionId");
+
+ b.ToTable("ConversionAdvisoryBoardDecisionDeferredReason", "academisation");
+ });
+
+ modelBuilder.Entity("Dfe.Academies.Academisation.Data.ConversionAdvisoryBoardDecisionAggregate.ConversionAdvisoryBoardDecisionState", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
+
+ b.Property("AdvisoryBoardDecisionDate")
+ .HasColumnType("datetime2");
+
+ b.Property("ApprovedConditionsDetails")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ApprovedConditionsSet")
+ .HasColumnType("bit");
+
+ b.Property("ConversionProjectId")
+ .HasColumnType("int");
+
+ b.Property("CreatedOn")
+ .HasColumnType("datetime2");
+
+ b.Property("Decision")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("DecisionMadeBy")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("LastModifiedOn")
+ .HasColumnType("datetime2");
+
+ b.HasKey("Id");
+
+ b.ToTable("ConversionAdvisoryBoardDecision", "academisation");
+ });
+
+ modelBuilder.Entity("Dfe.Academies.Academisation.Data.ProjectAggregate.ProjectNoteState", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
+
+ b.Property("Author")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Date")
+ .HasColumnType("datetime2");
+
+ b.Property("Note")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ProjectId")
+ .HasColumnType("int");
+
+ b.Property("Subject")
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ProjectId");
+
+ b.ToTable("ProjectNotes", "academisation");
+ });
+
+ modelBuilder.Entity("Dfe.Academies.Academisation.Data.ProjectAggregate.ProjectState", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
+
+ b.Property("AcademyOrderRequired")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("AcademyTypeAndRoute")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ActualPupilNumbers")
+ .HasColumnType("int");
+
+ b.Property("AgeRange")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("AnnexBFormReceived")
+ .HasColumnType("bit");
+
+ b.Property("AnnexBFormUrl")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ApplicationReceivedDate")
+ .HasColumnType("datetime2");
+
+ b.Property("ApplicationReferenceNumber")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("AssignedDate")
+ .HasColumnType("datetime2");
+
+ b.Property("AssignedUserEmailAddress")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("AssignedUserFullName")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("AssignedUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Author")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("BaselineDate")
+ .HasColumnType("datetime2");
+
+ b.Property("Capacity")
+ .HasColumnType("int");
+
+ b.Property("CapitalCarryForwardAtEndMarchCurrentYear")
+ .HasColumnType("decimal(18,2)");
+
+ b.Property("CapitalCarryForwardAtEndMarchNextYear")
+ .HasColumnType("decimal(18,2)");
+
+ b.Property("ClearedBy")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Consultation")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ConversionSupportGrantAmount")
+ .HasColumnType("decimal(18,2)");
+
+ b.Property("ConversionSupportGrantAmountChanged")
+ .HasColumnType("bit");
+
+ b.Property("ConversionSupportGrantChangeReason")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ConversionSupportGrantEnvironmentalImprovementGrant")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ConversionSupportGrantType")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("CreatedOn")
+ .HasColumnType("datetime2");
+
+ b.Property("DaoPackSentDate")
+ .HasColumnType("datetime2");
+
+ b.Property("DiocesanConsent")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("DiocesanTrust")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("DistanceFromSchoolToTrustHeadquarters")
+ .HasColumnType("decimal(18,2)");
+
+ b.Property("DistanceFromSchoolToTrustHeadquartersAdditionalInformation")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("EndOfCurrentFinancialYear")
+ .HasColumnType("datetime2");
+
+ b.Property("EndOfNextFinancialYear")
+ .HasColumnType("datetime2");
+
+ b.Property("FinancialDeficit")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Form7Received")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Form7ReceivedDate")
+ .HasColumnType("datetime2");
+
+ b.Property("FoundationConsent")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("GoverningBodyResolution")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("HeadTeacherBoardDate")
+ .HasColumnType("datetime2");
+
+ b.Property("IfdPipelineId")
+ .HasColumnType("int");
+
+ b.Property("KeyStage2PerformanceAdditionalInformation")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("KeyStage4PerformanceAdditionalInformation")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("KeyStage5PerformanceAdditionalInformation")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("LastModifiedOn")
+ .HasColumnType("datetime2");
+
+ b.Property("LegalRequirementsSectionComplete")
+ .HasColumnType("bit");
+
+ b.Property("LocalAuthority")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("LocalAuthorityInformationTemplateComments")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("LocalAuthorityInformationTemplateLink")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("LocalAuthorityInformationTemplateReturnedDate")
+ .HasColumnType("datetime2");
+
+ b.Property("LocalAuthorityInformationTemplateSectionComplete")
+ .HasColumnType("bit");
+
+ b.Property("LocalAuthorityInformationTemplateSentDate")
+ .HasColumnType("datetime2");
+
+ b.Property("MemberOfParliamentNameAndParty")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("NameOfTrust")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("PartOfPfiScheme")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("PercentageFreeSchoolMeals")
+ .HasColumnType("decimal(18,2)");
+
+ b.Property("PercentageOfGoodOrOutstandingSchoolsInTheDiocesanTrust")
+ .HasColumnType("decimal(18,2)");
+
+ b.Property("PfiSchemeDetails")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("PreviousHeadTeacherBoardDate")
+ .HasColumnType("datetime2");
+
+ b.Property("PreviousHeadTeacherBoardDateQuestion")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("PreviousHeadTeacherBoardLink")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ProjectStatus")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ProjectedRevenueBalanceAtEndMarchNextYear")
+ .HasColumnType("decimal(18,2)");
+
+ b.Property("ProposedAcademyOpeningDate")
+ .HasColumnType("datetime2");
+
+ b.Property("PublishedAdmissionNumber")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RationaleForProject")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RationaleForTrust")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RationaleSectionComplete")
+ .HasColumnType("bit");
+
+ b.Property("RecommendationForProject")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Region")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RevenueCarryForwardAtEndMarchCurrentYear")
+ .HasColumnType("decimal(18,2)");
+
+ b.Property("RisksAndIssues")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RisksAndIssuesSectionComplete")
+ .HasColumnType("bit");
+
+ b.Property("SchoolAndTrustInformationSectionComplete")
+ .HasColumnType("bit");
+
+ b.Property("SchoolBudgetInformationAdditionalInformation")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("SchoolBudgetInformationSectionComplete")
+ .HasColumnType("bit");
+
+ b.Property("SchoolName")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("SchoolOverviewSectionComplete")
+ .HasColumnType("bit");
+
+ b.Property("SchoolPerformanceAdditionalInformation")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("SchoolPhase")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("SchoolPupilForecastsAdditionalInformation")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("SchoolType")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("SponsorName")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("SponsorReferenceNumber")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("TrustReferenceNumber")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Urn")
+ .HasColumnType("int");
+
+ b.Property("Version")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ViabilityIssues")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("YearOneProjectedCapacity")
+ .HasColumnType("int");
+
+ b.Property("YearOneProjectedPupilNumbers")
+ .HasColumnType("int");
+
+ b.Property("YearThreeProjectedCapacity")
+ .HasColumnType("int");
+
+ b.Property("YearThreeProjectedPupilNumbers")
+ .HasColumnType("int");
+
+ b.Property("YearTwoProjectedCapacity")
+ .HasColumnType("int");
+
+ b.Property("YearTwoProjectedPupilNumbers")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.ToTable("Project", "academisation");
+ });
+
+ modelBuilder.Entity("Dfe.Academies.Academisation.Domain.ApplicationAggregate.Application", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
+
+ b.Property("ApplicationReference")
+ .ValueGeneratedOnAddOrUpdate()
+ .HasColumnType("nvarchar(max)")
+ .HasComputedColumnSql("'A2B_' + CAST([Id] AS NVARCHAR(255))", true);
+
+ b.Property("ApplicationStatus")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ApplicationSubmittedDate")
+ .HasColumnType("datetime2");
+
+ b.Property("ApplicationType")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("CreatedOn")
+ .HasColumnType("datetime2");
+
+ b.Property("DeletedAt")
+ .HasColumnType("datetime2");
+
+ b.Property("DynamicsApplicationId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("FormTrustId")
+ .HasColumnType("int");
+
+ b.Property("JoinTrustId")
+ .HasColumnType("int");
+
+ b.Property("LastModifiedOn")
+ .HasColumnType("datetime2");
+
+ b.HasKey("Id");
+
+ b.HasIndex("FormTrustId")
+ .IsUnique()
+ .HasFilter("[FormTrustId] IS NOT NULL");
+
+ b.HasIndex("JoinTrustId")
+ .IsUnique()
+ .HasFilter("[JoinTrustId] IS NOT NULL");
+
+ b.ToTable("ConversionApplication", "academisation");
+ });
+
+ modelBuilder.Entity("Dfe.Academies.Academisation.Domain.ApplicationAggregate.Contributor", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
+
+ b.Property("ConversionApplicationId")
+ .HasColumnType("int");
+
+ b.Property("CreatedOn")
+ .HasColumnType("datetime2");
+
+ b.Property("DynamicsApplicationId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("LastModifiedOn")
+ .HasColumnType("datetime2");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ConversionApplicationId");
+
+ b.ToTable("ConversionApplicationContributor", "academisation");
+ });
+
+ modelBuilder.Entity("Dfe.Academies.Academisation.Domain.ApplicationAggregate.Schools.Lease", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
+
+ b.Property("ApplicationSchoolId")
+ .HasColumnType("int");
+
+ b.Property("CreatedOn")
+ .HasColumnType("datetime2");
+
+ b.Property("DynamicsSchoolLeaseId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("InterestRate")
+ .HasColumnType("decimal(18,2)");
+
+ b.Property("LastModifiedOn")
+ .HasColumnType("datetime2");
+
+ b.Property("LeaseTerm")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("PaymentsToDate")
+ .HasColumnType("decimal(18,2)");
+
+ b.Property("Purpose")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RepaymentAmount")
+ .HasColumnType("decimal(18,2)");
+
+ b.Property("ResponsibleForAssets")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ValueOfAssets")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ApplicationSchoolId");
+
+ b.ToTable("ApplicationSchoolLease", "academisation");
+ });
+
+ modelBuilder.Entity("Dfe.Academies.Academisation.Domain.ApplicationAggregate.Schools.Loan", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
+
+ b.Property("Amount")
+ .HasColumnType("decimal(18,2)");
+
+ b.Property("ApplicationSchoolId")
+ .HasColumnType("int");
+
+ b.Property("CreatedOn")
+ .HasColumnType("datetime2");
+
+ b.Property("DynamicsSchoolLoanId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("InterestRate")
+ .HasColumnType("decimal(18,2)");
+
+ b.Property("LastModifiedOn")
+ .HasColumnType("datetime2");
+
+ b.Property("Provider")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Purpose")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Schedule")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ApplicationSchoolId");
+
+ b.ToTable("ApplicationSchoolLoan", "academisation");
+ });
+
+ modelBuilder.Entity("Dfe.Academies.Academisation.Domain.ApplicationAggregate.Schools.School", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
+
+ b.Property("ConversionApplicationId")
+ .HasColumnType("int");
+
+ b.Property("CreatedOn")
+ .HasColumnType("datetime2");
+
+ b.Property("DioceseFolderIdentifier")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("DioceseName")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("DynamicsApplyingSchoolId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ExemptionEndDate")
+ .HasColumnType("datetimeoffset");
+
+ b.Property("FoundationConsentFolderIdentifier")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("FoundationTrustOrBodyName")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("FurtherInformation")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("HasLeases")
+ .HasColumnType("bit");
+
+ b.Property("HasLoans")
+ .HasColumnType("bit");
+
+ b.Property("LastModifiedOn")
+ .HasColumnType("datetime2");
+
+ b.Property("LocalAuthorityClosurePlanDetails")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("LocalAuthorityReorganisationDetails")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("MainFeederSchools")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("OfstedInspectionDetails")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("PartOfFederation")
+ .HasColumnType("bit");
+
+ b.Property("ProtectedCharacteristics")
+ .HasColumnType("int");
+
+ b.Property("ResolutionConsentFolderIdentifier")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Safeguarding")
+ .HasColumnType("bit");
+
+ b.Property("TrustBenefitDetails")
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ConversionApplicationId");
+
+ b.ToTable("ApplicationSchool", "academisation");
+ });
+
+ modelBuilder.Entity("Dfe.Academies.Academisation.Domain.ApplicationAggregate.Trusts.FormTrust", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
+
+ b.Property("CreatedOn")
+ .HasColumnType("datetime2");
+
+ b.Property("DynamicsApplicationId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("LastModifiedOn")
+ .HasColumnType("datetime2");
+
+ b.HasKey("Id");
+
+ b.ToTable("ApplicationFormTrust", "academisation");
+ });
+
+ modelBuilder.Entity("Dfe.Academies.Academisation.Domain.ApplicationAggregate.Trusts.JoinTrust", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
+
+ b.Property("ChangesToLaGovernance")
+ .HasColumnType("bit");
+
+ b.Property("ChangesToLaGovernanceExplained")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ChangesToTrust")
+ .HasColumnType("int");
+
+ b.Property("ChangesToTrustExplained")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("CreatedOn")
+ .HasColumnType("datetime2");
+
+ b.Property("DynamicsApplicationId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("LastModifiedOn")
+ .HasColumnType("datetime2");
+
+ b.Property("TrustName")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("TrustReference")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("UKPRN")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.ToTable("ApplicationJoinTrust", "academisation");
+ });
+
+ modelBuilder.Entity("Dfe.Academies.Academisation.Domain.ApplicationAggregate.Trusts.TrustKeyPerson", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
+
+ b.Property("ApplicationFormTrustId")
+ .HasColumnType("int");
+
+ b.Property("Biography")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("CreatedOn")
+ .HasColumnType("datetime2");
+
+ b.Property("DateOfBirth")
+ .HasColumnType("datetime2");
+
+ b.Property("DynamicsKeyPersonId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("LastModifiedOn")
+ .HasColumnType("datetime2");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ApplicationFormTrustId");
+
+ b.ToTable("ApplicationFormTrustKeyPerson", "academisation");
+ });
+
+ modelBuilder.Entity("Dfe.Academies.Academisation.Domain.ApplicationAggregate.Trusts.TrustKeyPersonRole", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
+
+ b.Property("ApplicationFormTrustKeyPersonRoleId")
+ .HasColumnType("int");
+
+ b.Property("CreatedOn")
+ .HasColumnType("datetime2");
+
+ b.Property("LastModifiedOn")
+ .HasColumnType("datetime2");
+
+ b.Property("Role")
+ .HasColumnType("int");
+
+ b.Property("TimeInRole")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ApplicationFormTrustKeyPersonRoleId");
+
+ b.ToTable("ApplicationFormTrustKeyPersonRole", "academisation");
+ });
+
+ modelBuilder.Entity("Dfe.Academies.Academisation.Domain.TransferProjectAggregate.IntendedTransferBenefit", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
+
+ b.Property("SelectedBenefit")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("TransferProjectId")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.HasIndex("TransferProjectId");
+
+ b.ToTable("IntendedTransferBenefit", "academisation");
+ });
+
+ modelBuilder.Entity("Dfe.Academies.Academisation.Domain.TransferProjectAggregate.TransferProject", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 10003000L);
+
+ b.Property("AnyRisks")
+ .HasColumnType("bit");
+
+ b.Property("AssignedUserEmailAddress")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("AssignedUserFullName")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("AssignedUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Author")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("BenefitsSectionIsCompleted")
+ .HasColumnType("bit");
+
+ b.Property("ComplexLandAndBuildingFurtherSpecification")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ComplexLandAndBuildingShouldBeConsidered")
+ .HasColumnType("bit");
+
+ b.Property("CreatedOn")
+ .HasColumnType("datetime2");
+
+ b.Property("DiocesanConsent")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("EqualitiesImpactAssessmentConsidered")
+ .HasColumnType("bit");
+
+ b.Property("FeatureSectionIsCompleted")
+ .HasColumnType("bit");
+
+ b.Property("FinanceAndDebtFurtherSpecification")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("FinanceAndDebtShouldBeConsidered")
+ .HasColumnType("bit");
+
+ b.Property("HasHtbDate")
+ .HasColumnType("bit");
+
+ b.Property("HasTargetDateForTransfer")
+ .HasColumnType("bit");
+
+ b.Property("HasTransferFirstDiscussedDate")
+ .HasColumnType("bit");
+
+ b.Property("HighProfileFurtherSpecification")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("HighProfileShouldBeConsidered")
+ .HasColumnType("bit");
+
+ b.Property("HtbDate")
+ .HasColumnType("datetime2");
+
+ b.Property("IncomingTrustAgreement")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("LegalRequirementsSectionIsCompleted")
+ .HasColumnType("bit");
+
+ b.Property("OtherBenefitValue")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("OtherRisksFurtherSpecification")
+ .HasMaxLength(20000)
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("OtherRisksShouldBeConsidered")
+ .HasColumnType("bit");
+
+ b.Property