diff --git a/Dfe.Academies.Academisation.Data/Migrations/20240412110945_nullableIncomingTrustName.Designer.cs b/Dfe.Academies.Academisation.Data/Migrations/20240412110945_nullableIncomingTrustName.Designer.cs
new file mode 100644
index 00000000..e9735e69
--- /dev/null
+++ b/Dfe.Academies.Academisation.Data/Migrations/20240412110945_nullableIncomingTrustName.Designer.cs
@@ -0,0 +1,2002 @@
+//
+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("20240412110945_nullableIncomingTrustName")]
+ partial class nullableIncomingTrustName
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "8.0.3")
+ .HasAnnotation("Relational:MaxIdentifierLength", 128);
+
+ SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
+
+ modelBuilder.Entity("Dfe.Academies.Academisation.Data.ConversionAdvisoryBoardDecisionAggregate.AdvisoryBoardDecisionDeclinedReasonState", 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.AdvisoryBoardDecisionDeferredReasonState", 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.AdvisoryBoardDecisionState", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
+
+ b.Property("AcademyOrderDate")
+ .HasColumnType("datetime2");
+
+ 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.Property("TransferProjectId")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.ToTable("ConversionAdvisoryBoardDecision", "academisation");
+ });
+
+ modelBuilder.Entity("Dfe.Academies.Academisation.Data.ConversionAdvisoryBoardDecisionAggregate.AdvisoryBoardDecisionWithdrawnReasonState", 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("AdvisoryBoardDecisionWithdrawnReason", "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.Core.ProjectAggregate.ProjectNote", 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.Domain.FormAMatProjectAggregate.FormAMatProject", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
+
+ b.Property("ApplicationReference")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("CreatedOn")
+ .HasColumnType("datetime2");
+
+ b.Property("LastModifiedOn")
+ .HasColumnType("datetime2");
+
+ b.Property("ProposedTrustName")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ReferenceNumber")
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("Id");
+
+ b.ToTable("FormAMatProject", "academisation");
+ });
+
+ modelBuilder.Entity("Dfe.Academies.Academisation.Domain.ProjectAggregate.Project", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
+
+ b.Property("CreatedOn")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreatedOn");
+
+ b.Property("DeletedAt")
+ .HasColumnType("datetime2");
+
+ b.Property("FormAMatProjectId")
+ .HasColumnType("int")
+ .HasColumnName("FormAMatProjectId");
+
+ b.Property("LastModifiedOn")
+ .HasColumnType("datetime2");
+
+ b.HasKey("Id");
+
+ b.ToTable("Project", "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("IsFormAMat")
+ .HasColumnType("bit");
+
+ 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("OtherTransferTypeDescription")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("OutgoingTrustConsent")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("OutgoingTrustName")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("OutgoingTrustUkprn")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ProjectRationale")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ProjectReference")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RationaleSectionIsCompleted")
+ .HasColumnType("bit");
+
+ b.Property("RddOrEsfaIntervention")
+ .HasColumnType("bit");
+
+ b.Property("RddOrEsfaInterventionDetail")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Recommendation")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("SpecificReasonsForTransfer")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("State")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Status")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("TargetDateForTransfer")
+ .HasColumnType("datetime2");
+
+ b.Property("TransferFirstDiscussed")
+ .HasColumnType("datetime2");
+
+ b.Property("TrustSponsorRationale")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("TypeOfTransfer")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Urn")
+ .HasColumnType("int");
+
+ b.Property("WhoInitiatedTheTransfer")
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("Id");
+
+ b.ToTable("TransferProject", "academisation");
+ });
+
+ modelBuilder.Entity("Dfe.Academies.Academisation.Domain.TransferProjectAggregate.TransferringAcademy", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
+
+ b.Property("IncomingTrustName")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("IncomingTrustUkprn")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("KeyStage2PerformanceAdditionalInformation")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("KeyStage4PerformanceAdditionalInformation")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("KeyStage5PerformanceAdditionalInformation")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("LatestOfstedReportAdditionalInformation")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("OutgoingAcademyUkprn")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("PupilNumbersAdditionalInformation")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("TransferProjectId")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.HasIndex("TransferProjectId");
+
+ b.ToTable("TransferringAcademy", "academisation");
+ });
+
+ modelBuilder.Entity("Dfe.Academies.Academisation.Data.ConversionAdvisoryBoardDecisionAggregate.AdvisoryBoardDecisionDeclinedReasonState", b =>
+ {
+ b.HasOne("Dfe.Academies.Academisation.Data.ConversionAdvisoryBoardDecisionAggregate.AdvisoryBoardDecisionState", null)
+ .WithMany("DeclinedReasons")
+ .HasForeignKey("AdvisoryBoardDecisionId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+ });
+
+ modelBuilder.Entity("Dfe.Academies.Academisation.Data.ConversionAdvisoryBoardDecisionAggregate.AdvisoryBoardDecisionDeferredReasonState", b =>
+ {
+ b.HasOne("Dfe.Academies.Academisation.Data.ConversionAdvisoryBoardDecisionAggregate.AdvisoryBoardDecisionState", null)
+ .WithMany("DeferredReasons")
+ .HasForeignKey("AdvisoryBoardDecisionId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+ });
+
+ modelBuilder.Entity("Dfe.Academies.Academisation.Data.ConversionAdvisoryBoardDecisionAggregate.AdvisoryBoardDecisionWithdrawnReasonState", b =>
+ {
+ b.HasOne("Dfe.Academies.Academisation.Data.ConversionAdvisoryBoardDecisionAggregate.AdvisoryBoardDecisionState", null)
+ .WithMany("WithdrawnReasons")
+ .HasForeignKey("AdvisoryBoardDecisionId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+ });
+
+ modelBuilder.Entity("Dfe.Academies.Academisation.Domain.ApplicationAggregate.Application", b =>
+ {
+ b.HasOne("Dfe.Academies.Academisation.Domain.ApplicationAggregate.Trusts.FormTrust", "FormTrust")
+ .WithOne()
+ .HasForeignKey("Dfe.Academies.Academisation.Domain.ApplicationAggregate.Application", "FormTrustId");
+
+ b.HasOne("Dfe.Academies.Academisation.Domain.ApplicationAggregate.Trusts.JoinTrust", "JoinTrust")
+ .WithOne()
+ .HasForeignKey("Dfe.Academies.Academisation.Domain.ApplicationAggregate.Application", "JoinTrustId");
+
+ b.Navigation("FormTrust");
+
+ b.Navigation("JoinTrust");
+ });
+
+ modelBuilder.Entity("Dfe.Academies.Academisation.Domain.ApplicationAggregate.Contributor", b =>
+ {
+ b.HasOne("Dfe.Academies.Academisation.Domain.ApplicationAggregate.Application", null)
+ .WithMany("Contributors")
+ .HasForeignKey("ConversionApplicationId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.OwnsOne("Dfe.Academies.Academisation.Domain.Core.ApplicationAggregate.ContributorDetails", "Details", b1 =>
+ {
+ b1.Property("ContributorId")
+ .HasColumnType("int");
+
+ b1.Property("EmailAddress")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("EmailAddress");
+
+ b1.Property("FirstName")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("FirstName");
+
+ b1.Property("LastName")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("LastName");
+
+ b1.Property("OtherRoleName")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("OtherRoleName");
+
+ b1.Property("Role")
+ .HasColumnType("int")
+ .HasColumnName("Role");
+
+ b1.HasKey("ContributorId");
+
+ b1.ToTable("ConversionApplicationContributor", "academisation");
+
+ b1.WithOwner()
+ .HasForeignKey("ContributorId");
+ });
+
+ b.Navigation("Details")
+ .IsRequired();
+ });
+
+ modelBuilder.Entity("Dfe.Academies.Academisation.Domain.ApplicationAggregate.Schools.Lease", b =>
+ {
+ b.HasOne("Dfe.Academies.Academisation.Domain.ApplicationAggregate.Schools.School", null)
+ .WithMany("Leases")
+ .HasForeignKey("ApplicationSchoolId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+ });
+
+ modelBuilder.Entity("Dfe.Academies.Academisation.Domain.ApplicationAggregate.Schools.Loan", b =>
+ {
+ b.HasOne("Dfe.Academies.Academisation.Domain.ApplicationAggregate.Schools.School", null)
+ .WithMany("Loans")
+ .HasForeignKey("ApplicationSchoolId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+ });
+
+ modelBuilder.Entity("Dfe.Academies.Academisation.Domain.ApplicationAggregate.Schools.School", b =>
+ {
+ b.HasOne("Dfe.Academies.Academisation.Domain.ApplicationAggregate.Application", null)
+ .WithMany("Schools")
+ .HasForeignKey("ConversionApplicationId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.OwnsOne("Dfe.Academies.Academisation.Domain.Core.ApplicationAggregate.SchoolDetails", "Details", b1 =>
+ {
+ b1.Property("SchoolId")
+ .HasColumnType("int");
+
+ b1.Property("ApplicationJoinTrustReason")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("JoinTrustReason");
+
+ b1.Property("ApproverContactEmail")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ApproverContactEmail");
+
+ b1.Property("ApproverContactName")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ApproverContactName");
+
+ b1.Property("CapacityAssumptions")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("CapacityAssumptions");
+
+ b1.Property("CapacityPublishedAdmissionsNumber")
+ .HasColumnType("int")
+ .HasColumnName("CapacityPublishedAdmissionsNumber");
+
+ b1.Property("ConfirmPaySupportGrantToSchool")
+ .HasColumnType("bit")
+ .HasColumnName("ConfirmPaySupportGrantToSchool");
+
+ b1.Property("ContactChairEmail")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ContactChairEmail");
+
+ b1.Property("ContactChairName")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ContactChairName");
+
+ b1.Property("ContactHeadEmail")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ContactHeadEmail");
+
+ b1.Property("ContactHeadName")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ContactHeadName");
+
+ b1.Property("ContactRole")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ContactRole");
+
+ b1.Property("ConversionChangeNamePlanned")
+ .HasColumnType("bit")
+ .HasColumnName("ConversionChangeNamePlanned");
+
+ b1.Property("ConversionTargetDate")
+ .HasColumnType("datetime2")
+ .HasColumnName("ConversionTargetDate");
+
+ b1.Property("ConversionTargetDateExplained")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ConversionTargetDateExplained");
+
+ b1.Property("ConversionTargetDateSpecified")
+ .HasColumnType("bit")
+ .HasColumnName("ConversionTargetDateSpecified");
+
+ b1.Property("DeclarationBodyAgree")
+ .HasColumnType("bit")
+ .HasColumnName("DeclarationBodyAgree");
+
+ b1.Property("DeclarationIAmTheChairOrHeadteacher")
+ .HasColumnType("bit")
+ .HasColumnName("DeclarationIAmTheChairOrHeadteacher");
+
+ b1.Property("DeclarationSignedByName")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("DeclarationSignedByName");
+
+ b1.Property("FinanceOngoingInvestigations")
+ .HasColumnType("bit")
+ .HasColumnName("FinanceOngoingInvestigations");
+
+ b1.Property("FinancialInvestigationsExplain")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("FinancialInvestigationsExplain");
+
+ b1.Property("FinancialInvestigationsTrustAware")
+ .HasColumnType("bit")
+ .HasColumnName("FinancialInvestigationsTrustAware");
+
+ b1.Property("MainContactOtherEmail")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("MainContactOtherEmail");
+
+ b1.Property("MainContactOtherName")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("MainContactOtherName");
+
+ b1.Property("MainContactOtherRole")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("MainContactOtherRole");
+
+ b1.Property("ProjectedPupilNumbersYear1")
+ .HasColumnType("int")
+ .HasColumnName("ProjectedPupilNumbersYear1");
+
+ b1.Property("ProjectedPupilNumbersYear2")
+ .HasColumnType("int")
+ .HasColumnName("ProjectedPupilNumbersYear2");
+
+ b1.Property("ProjectedPupilNumbersYear3")
+ .HasColumnType("int")
+ .HasColumnName("ProjectedPupilNumbersYear3");
+
+ b1.Property("ProposedNewSchoolName")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ProposedNewSchoolName");
+
+ b1.Property("SchoolConversionReasonsForJoining")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("SchoolConversionReasonsForJoining");
+
+ b1.Property("SchoolHasConsultedStakeholders")
+ .HasColumnType("bit")
+ .HasColumnName("SchoolHasConsultedStakeholders");
+
+ b1.Property("SchoolName")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("SchoolName");
+
+ b1.Property("SchoolPlanToConsultStakeholders")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("SchoolPlanToConsultStakeholders");
+
+ b1.Property("SchoolSupportGrantFundsPaidTo")
+ .HasColumnType("int")
+ .HasColumnName("SupportGrantFundsPaidTo");
+
+ b1.Property("Urn")
+ .HasColumnType("int")
+ .HasColumnName("Urn");
+
+ b1.HasKey("SchoolId");
+
+ b1.ToTable("ApplicationSchool", "academisation");
+
+ b1.WithOwner()
+ .HasForeignKey("SchoolId");
+
+ b1.OwnsOne("Dfe.Academies.Academisation.Domain.Core.ApplicationAggregate.LandAndBuildings", "LandAndBuildings", b2 =>
+ {
+ b2.Property