Skip to content

Commit

Permalink
Merge branch 'feature/send-form-a-mat-projects-to-complete' of https:…
Browse files Browse the repository at this point in the history
…//github.com/DFE-Digital/academies-academisation-api into feature/send-form-a-mat-projects-to-complete
  • Loading branch information
danielryannimble committed Oct 24, 2024
2 parents b7db6ed + 349fe1c commit 9cd86a1
Show file tree
Hide file tree
Showing 7 changed files with 2,423 additions and 4 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 9cd86a1

Please sign in to comment.