Skip to content

Commit

Permalink
Merge pull request #592 from DFE-Digital/feature/send-form-a-mat-proj…
Browse files Browse the repository at this point in the history
…ects-to-complete

Feature/send form a mat projects to complete
  • Loading branch information
paullocknimble authored Oct 24, 2024
2 parents 92a150b + 9cd86a1 commit b06ee6a
Show file tree
Hide file tree
Showing 38 changed files with 6,355 additions and 126 deletions.
10 changes: 9 additions & 1 deletion Dfe.Academies.Academisation.Data/AcademisationContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace Dfe.Academies.Academisation.Data;

public class AcademisationContext(DbContextOptions<AcademisationContext> options, IMediator mediator) : DbContext(options), IUnitOfWork
{
const string DEFAULT_SCHEMA = "academisation";
public const string DEFAULT_SCHEMA = "academisation";
const string Assigned_User_Id = "AssignedUserId";
const string Assigned_User_Email_Address = "AssignedUserEmailAddress";
const string Assigned_User_Full_Name = "AssignedUserFullName";
Expand Down Expand Up @@ -248,6 +248,14 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)

modelBuilder.Entity<CompleteTransmissionLog>(ConfigureCompleteTransmissionLog);

if (this.Database.ProviderName != "Microsoft.EntityFrameworkCore.Sqlite")
{
// Trust refernce number sequence
modelBuilder.HasSequence<int>("TrustReferenceNumberSeq", schema: DEFAULT_SCHEMA)
.StartsAt(1)
.IncrementsBy(1);
}

base.OnModelCreating(modelBuilder);
}

Expand Down
Loading

0 comments on commit b06ee6a

Please sign in to comment.