Skip to content

Commit eca3de4

Browse files
committed
removed unused indexes
1 parent f986df4 commit eca3de4

9 files changed

+446
-36
lines changed
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
dotnet ef migrations remove `
22
--project $PSScriptRoot/../../src/CocApi.Test `
3-
--context CocApi.Cache.CacheDbContext
3+
--context CocApi.Cache.CacheDbContext

docs/scripts/cocapi-ef-migration.ps1

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ $count=(Get-ChildItem -File -Path $PSScriptRoot/../../src/CocApi.Test/Migrations
22

33
dotnet ef migrations add Migration$count `
44
--project $PSScriptRoot/../../src/CocApi.Test `
5-
--context CocApi.Cache.CacheDbContext
5+
--context CocApi.Cache.CacheDbContext `
6+
--verbose
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
dotnet tool update --global dotnet-ef # --version 3.1.0
1+
dotnet tool update --global dotnet-ef # --version 3.1.0

docs/scripts/publish.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ dotnet publish $PSScriptRoot/../../src/CocApi.Test/CocApi.Test.csproj `
33
-o $PSScriptRoot/../../src/CocApi.Test/bin/Release/net5.0/win-x64/publish `
44
-r win-x64 `
55
-p:PublishReadyToRun=true `
6-
-p:PublishSingleFile=true
6+
-p:PublishSingleFile=true

src/CocApi.Cache/Context/CacheDbContext.cs

-10
Original file line numberDiff line numberDiff line change
@@ -35,35 +35,25 @@ protected override void OnModelCreating(ModelBuilder builder)
3535
builder.Entity<CachedClan>().OwnsOne(p => p.WarLog, log =>
3636
{
3737
log.ToTable(Library.TableNames.WarLog);
38-
log.HasIndex(w => w.KeepUntil);
39-
log.HasIndex(w => w.ExpiresAt);
4038
});
4139

4240
// Group
4341
builder.Entity<CachedClan>().OwnsOne(p => p.Group, group => {
4442
group.ToTable(Library.TableNames.Group);
45-
group.HasIndex(w => w.KeepUntil);
46-
group.HasIndex(w => w.ExpiresAt);
4743
});
4844

4945
// Player
5046
var player = builder.Entity<CachedPlayer>().ToTable(Library.TableNames.Player);
5147
player.HasIndex(p => p.Id).IsUnique();
52-
player.HasIndex(p => p.KeepUntil);
53-
player.HasIndex(p => p.ExpiresAt);
5448
player.HasIndex(p => p.Tag).IsUnique();
5549
player.HasIndex(p => p.ClanTag);
5650

5751
// War
5852
var war = builder.Entity<CachedWar>().ToTable(Library.TableNames.War);
5953
war.HasIndex(p => p.Id).IsUnique();
6054
war.HasIndex(p => new { p.PreparationStartTime, p.ClanTag, p.OpponentTag }).IsUnique();
61-
war.HasIndex(p => p.KeepUntil);
62-
war.HasIndex(p => p.ExpiresAt);
6355
war.HasIndex(p => p.ClanTag);
6456
war.HasIndex(p => p.OpponentTag);
6557
war.HasIndex(p => p.IsFinal);
66-
war.HasIndex(p => p.WarTag);
67-
war.HasIndex(p => p.Season);
6858
}
6959
}

src/CocApi.Rest/CocApi.Rest.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
<Description>A wrapper for the Clash of Clans API</Description>
1313
<Copyright>No Copyright</Copyright>
1414
<RootNamespace>CocApi.Rest</RootNamespace>
15-
<Version>2.11.5</Version>
15+
<Version>2.11.6</Version>
1616
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\CocApi.Rest.xml</DocumentationFile>
1717
<RepositoryUrl>https://github.com/devhl-labs/CocApi.git</RepositoryUrl>
1818
<RepositoryType>git</RepositoryType>
19-
<PackageReleaseNotes>Upgraded OpenApi with new token instantiation</PackageReleaseNotes>
19+
<PackageReleaseNotes>Removed unused indexes</PackageReleaseNotes>
2020
<PackageTags>ClashOfClans SuperCell devhl</PackageTags>
2121
<Nullable>enable</Nullable>
2222
</PropertyGroup>

0 commit comments

Comments
 (0)