Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fr 4183 #460

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Data/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,6 @@
<add key="DefaultAzureStorageContainer" value="default-container-dev" />
</appSettings>
<connectionStrings>
<add name="Fr8LocalDB" connectionString="Data Source=.;Initial Catalog=DockyardDB2;Integrated Security=SSPI;Transaction Binding=Explicit Unbind;" providerName="System.Data.SqlClient" />
<add name="Fr8LocalDB" connectionString="Data Source=.;Initial Catalog=Fr8LocalDB;Integrated Security=SSPI;Transaction Binding=Explicit Unbind;" providerName="System.Data.SqlClient" />
</connectionStrings>
</configuration>
17 changes: 7 additions & 10 deletions Data/Data.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -809,6 +809,10 @@
<Compile Include="Migrations\201608102004444_LinkRolePermissionsToStandardUserRole.Designer.cs">
<DependentUpon>201608102004444_LinkRolePermissionsToStandardUserRole.cs</DependentUpon>
</Compile>
<Compile Include="Migrations\201608111500592_Remove_Kwasant_StateTemplates.cs" />
<Compile Include="Migrations\201608111500592_Remove_Kwasant_StateTemplates.Designer.cs">
<DependentUpon>201608111500592_Remove_Kwasant_StateTemplates.cs</DependentUpon>
</Compile>
<Compile Include="Migrations\MigrationConfiguration.ProcessTemplateBuilder.cs" />
<Compile Include="Migrations\SqlHelper.cs" />
<Compile Include="Repositories\ActivityCategory\ActivityCategoryRepository.cs" />
Expand Down Expand Up @@ -936,7 +940,6 @@
<Compile Include="Infrastructure\EntityExtensions.cs" />
<Compile Include="Interfaces\IBaseDO.cs" />
<Compile Include="Entities\ExpectedResponseDO.cs" />
<Compile Include="Entities\InvitationDO.cs" />
<Compile Include="Entities\LogDO.cs" />
<Compile Include="Infrastructure\StructureMap\ISecurityServices.cs" />
<Compile Include="Infrastructure\StructureMap\MockedSecurityServices.cs" />
Expand All @@ -950,7 +953,6 @@
<Compile Include="Infrastructure\StructureMap\MigrationConsoleSeedRegistry.cs" />
<Compile Include="Repositories\ActivityTemplateRepository.cs" />
<Compile Include="Repositories\Plan\Internal\ActivityRepository.cs" />
<Compile Include="Repositories\EmailStatusRepository.cs" />
<Compile Include="Repositories\Plan\Internal\SubPlanRepository.cs" />
<Compile Include="Repositories\Plan\Internal\PlansRepository.cs" />
<Compile Include="Repositories\HistoryRepository.cs" />
Expand All @@ -959,7 +961,6 @@
<Compile Include="Repositories\ExpectedResponseRepository.cs" />
<Compile Include="Repositories\LogRepository.cs" />
<Compile Include="Repositories\Authorization\Impl\SqlAuthorizationTokenRepository.cs" />
<Compile Include="Repositories\InvitationRepository.cs" />
<Compile Include="Repositories\UserStatusRepository.cs" />
<Compile Include="States\AccessLevel.cs" />
<Compile Include="States\PermissionType.cs" />
Expand All @@ -972,11 +973,8 @@
<Compile Include="States\BookingRequestAvailability.cs" />
<Compile Include="States\BookingRequestState.cs" />
<Compile Include="States\CommunicationMode.cs" />
<Compile Include="States\ConfirmationStatus.cs" />
<Compile Include="States\EventCreateType.cs" />
<Compile Include="States\EventSyncState.cs" />
<Compile Include="States\ExpectedResponseStatus.cs" />
<Compile Include="States\InvitationType.cs" />
<Compile Include="States\ParticipationStatus.cs" />
<Compile Include="States\PlanState.cs" />
<Compile Include="States\Roles.cs" />
Expand All @@ -993,11 +991,7 @@
<Compile Include="Entities\AspNetUserRolesDO.cs" />
<Compile Include="Entities\ConceptDO.cs" />
<Compile Include="States\Templates\_CommunicationTypeTemplate.cs" />
<Compile Include="States\Templates\_ConfirmationStatusTemplate.cs" />
<Compile Include="States\Templates\_EmailParticipantTypeTemplate.cs" />
<Compile Include="States\Templates\_EmailStatusTemplate.cs" />
<Compile Include="States\Templates\_ExpectedResponseStatusTemplate.cs" />
<Compile Include="States\Templates\_InvitationTypeTemplate.cs" />
<Compile Include="States\Templates\_RouteStateTemplate.cs" />
<Compile Include="States\Templates\_TrackingStatusTemplate.cs" />
<Compile Include="States\Templates\_TrackingTypeTemplate.cs" />
Expand Down Expand Up @@ -1490,6 +1484,9 @@
<EmbeddedResource Include="Migrations\201608102004444_LinkRolePermissionsToStandardUserRole.resx">
<DependentUpon>201608102004444_LinkRolePermissionsToStandardUserRole.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Migrations\201608111500592_Remove_Kwasant_StateTemplates.resx">
<DependentUpon>201608111500592_Remove_Kwasant_StateTemplates.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Fr8Infrastructure.NET\Fr8Infrastructure.NET.csproj">
Expand Down
2 changes: 0 additions & 2 deletions Data/Entities/EmailDO.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,7 @@ private void SetMessageID(string messageID)
public string PlainText { get; set; }
public DateTimeOffset DateReceived { get; set; }

[ForeignKey("EmailStatusTemplate")]
public int? EmailStatus { get; set; }
public _EmailStatusTemplate EmailStatusTemplate { get; set; }

[ForeignKey("From"), Required]
public int? FromID { get; set; }
Expand Down
4 changes: 0 additions & 4 deletions Data/Entities/ExpectedResponseDO.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,5 @@ public class ExpectedResponseDO : BaseObject
[ForeignKey("User")]
public String UserID { get; set; }
public Fr8AccountDO User { get; set; }

[ForeignKey("StatusTemplate")]
public int Status { get; set; }
public _ExpectedResponseStatusTemplate StatusTemplate { get; set; }
}
}
17 changes: 0 additions & 17 deletions Data/Entities/InvitationDO.cs

This file was deleted.

1 change: 0 additions & 1 deletion Data/Infrastructure/DockyardDbContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,6 @@ protected override void OnModelCreating(DbModelBuilder modelBuilder)
modelBuilder.Entity<EmailAddressDO>().ToTable("EmailAddresses");
modelBuilder.Entity<EmailDO>().ToTable("Emails");
modelBuilder.Entity<InstructionDO>().ToTable("Instructions");
modelBuilder.Entity<InvitationDO>().ToTable("Invitations");
modelBuilder.Entity<StoredFileDO>().ToTable("StoredFiles");
modelBuilder.Entity<TrackingStatusDO>().ToTable("TrackingStatuses");
modelBuilder.Entity<IdentityUser>().ToTable("IdentityUsers");
Expand Down
23 changes: 1 addition & 22 deletions Data/Infrastructure/UnitOfWork.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,15 +129,6 @@ public IContainerRepository ContainerRepository
return _containerRepository ?? (_containerRepository = new ContainerRepository(this));
}
}
private EmailStatusRepository _emailStatusRepository;

public EmailStatusRepository EmailStatusRepository
{
get
{
return _emailStatusRepository ?? (_emailStatusRepository = new EmailStatusRepository(this));
}
}

private InstructionRepository _instructionRepository;

Expand All @@ -147,19 +138,7 @@ public InstructionRepository InstructionRepository
{
return _instructionRepository ?? (_instructionRepository = new InstructionRepository(this));
}
}

private InvitationRepository _invitationRepository;

public InvitationRepository InvitationRepository
{
get
{
return _invitationRepository ?? (_invitationRepository = new InvitationRepository(this));
}
}


}

private StoredFileRepository _storedFileRepository;

Expand Down
4 changes: 2 additions & 2 deletions Data/Interfaces/IUnitOfWork.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ public interface IUnitOfWork : IDisposable
CommunicationConfigurationRepository CommunicationConfigurationRepository { get; }
EmailRepository EmailRepository { get; }
IContainerRepository ContainerRepository { get; }
EmailStatusRepository EmailStatusRepository { get; }
//EmailStatusRepository EmailStatusRepository { get; }
//EnvelopeRepository EnvelopeRepository { get; }
//EventRepository EventRepository { get; }
InstructionRepository InstructionRepository { get; }
InvitationRepository InvitationRepository { get; }
//InvitationRepository InvitationRepository { get; }
//InvitationResponseRepository InvitationResponseRepository { get; }
StoredFileRepository StoredFileRepository { get; }
TrackingStatusRepository TrackingStatusRepository { get; }
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

89 changes: 89 additions & 0 deletions Data/Migrations/201608111500592_Remove_Kwasant_StateTemplates.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
namespace Data.Migrations
{
using System;
using System.Data.Entity.Migrations;

public partial class Remove_Kwasant_StateTemplates : DbMigration
{
public override void Up()
{
DropForeignKey("dbo.Emails", "EmailStatus", "dbo._EmailStatusTemplate");
DropForeignKey("dbo.ExpectedResponses", "Status", "dbo._ExpectedResponseStatusTemplate");
DropForeignKey("dbo.Invitations", "Id", "dbo.Emails");
DropForeignKey("dbo.Invitations", "InvitationType", "dbo._InvitationTypeTemplate");
DropForeignKey("dbo.Invitations", "ConfirmationStatus", "dbo._ConfirmationStatusTemplate");
DropIndex("dbo.Emails", new[] { "EmailStatus" });
DropIndex("dbo.ExpectedResponses", new[] { "Status" });
DropIndex("dbo.Invitations", new[] { "Id" });
DropIndex("dbo.Invitations", new[] { "InvitationType" });
DropIndex("dbo.Invitations", new[] { "ConfirmationStatus" });
DropColumn("dbo.ExpectedResponses", "Status");
DropTable("dbo._EmailStatusTemplate");
DropTable("dbo._ConfirmationStatusTemplate");
DropTable("dbo._InvitationTypeTemplate");
DropTable("dbo._ExpectedResponseStatusTemplate");
DropTable("dbo.Invitations");
}

public override void Down()
{
CreateTable(
"dbo.Invitations",
c => new
{
Id = c.Int(nullable: false),
InvitationType = c.Int(),
ConfirmationStatus = c.Int(nullable: false),
})
.PrimaryKey(t => t.Id);

CreateTable(
"dbo._ExpectedResponseStatusTemplate",
c => new
{
Id = c.Int(nullable: false),
Name = c.String(),
})
.PrimaryKey(t => t.Id);

CreateTable(
"dbo._InvitationTypeTemplate",
c => new
{
Id = c.Int(nullable: false),
Name = c.String(),
})
.PrimaryKey(t => t.Id);

CreateTable(
"dbo._ConfirmationStatusTemplate",
c => new
{
Id = c.Int(nullable: false),
Name = c.String(),
})
.PrimaryKey(t => t.Id);

CreateTable(
"dbo._EmailStatusTemplate",
c => new
{
Id = c.Int(nullable: false),
Name = c.String(),
})
.PrimaryKey(t => t.Id);

AddColumn("dbo.ExpectedResponses", "Status", c => c.Int(nullable: false));
CreateIndex("dbo.Invitations", "ConfirmationStatus");
CreateIndex("dbo.Invitations", "InvitationType");
CreateIndex("dbo.Invitations", "Id");
CreateIndex("dbo.ExpectedResponses", "Status");
CreateIndex("dbo.Emails", "EmailStatus");
AddForeignKey("dbo.Invitations", "ConfirmationStatus", "dbo._ConfirmationStatusTemplate", "Id", cascadeDelete: true);
AddForeignKey("dbo.Invitations", "InvitationType", "dbo._InvitationTypeTemplate", "Id");
AddForeignKey("dbo.Invitations", "Id", "dbo.Emails", "Id");
AddForeignKey("dbo.ExpectedResponses", "Status", "dbo._ExpectedResponseStatusTemplate", "Id", cascadeDelete: true);
AddForeignKey("dbo.Emails", "EmailStatus", "dbo._EmailStatusTemplate", "Id");
}
}
}
Loading