Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added database indexes for (much) better performance on public bot ho…
…pefully.
- Loading branch information
1 parent
baa8ea4
commit c70f7ad
Showing
20 changed files
with
2,498 additions
and
51 deletions.
There are no files selected for viewing
2,197 changes: 2,197 additions & 0 deletions
2,197
WizBot.Core/Migrations/20180209202506_indexes.Designer.cs
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,159 @@ | ||
using Microsoft.EntityFrameworkCore.Migrations; | ||
using System; | ||
using System.Collections.Generic; | ||
|
||
namespace WizBot.Migrations | ||
{ | ||
public partial class indexes : Migration | ||
{ | ||
protected override void Up(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.CreateIndex( | ||
name: "IX_Warnings_DateAdded", | ||
table: "Warnings", | ||
column: "DateAdded"); | ||
|
||
migrationBuilder.CreateIndex( | ||
name: "IX_Warnings_GuildId", | ||
table: "Warnings", | ||
column: "GuildId"); | ||
|
||
migrationBuilder.CreateIndex( | ||
name: "IX_Warnings_UserId", | ||
table: "Warnings", | ||
column: "UserId"); | ||
|
||
migrationBuilder.CreateIndex( | ||
name: "IX_WaifuInfo_Price", | ||
table: "WaifuInfo", | ||
column: "Price"); | ||
|
||
migrationBuilder.CreateIndex( | ||
name: "IX_UserXpStats_AwardedXp", | ||
table: "UserXpStats", | ||
column: "AwardedXp"); | ||
|
||
migrationBuilder.CreateIndex( | ||
name: "IX_UserXpStats_GuildId", | ||
table: "UserXpStats", | ||
column: "GuildId"); | ||
|
||
migrationBuilder.CreateIndex( | ||
name: "IX_UserXpStats_UserId", | ||
table: "UserXpStats", | ||
column: "UserId"); | ||
|
||
migrationBuilder.CreateIndex( | ||
name: "IX_UserXpStats_Xp", | ||
table: "UserXpStats", | ||
column: "Xp"); | ||
|
||
migrationBuilder.CreateIndex( | ||
name: "IX_Reminders_DateAdded", | ||
table: "Reminders", | ||
column: "DateAdded"); | ||
|
||
migrationBuilder.CreateIndex( | ||
name: "IX_Quotes_GuildId", | ||
table: "Quotes", | ||
column: "GuildId"); | ||
|
||
migrationBuilder.CreateIndex( | ||
name: "IX_Quotes_Keyword", | ||
table: "Quotes", | ||
column: "Keyword"); | ||
|
||
migrationBuilder.CreateIndex( | ||
name: "IX_Donators_Amount", | ||
table: "Donators", | ||
column: "Amount"); | ||
|
||
migrationBuilder.CreateIndex( | ||
name: "IX_DiscordUser_CurrencyAmount", | ||
table: "DiscordUser", | ||
column: "CurrencyAmount"); | ||
|
||
migrationBuilder.CreateIndex( | ||
name: "IX_DiscordUser_TotalXp", | ||
table: "DiscordUser", | ||
column: "TotalXp"); | ||
|
||
migrationBuilder.CreateIndex( | ||
name: "IX_DiscordUser_UserId", | ||
table: "DiscordUser", | ||
column: "UserId"); | ||
|
||
migrationBuilder.CreateIndex( | ||
name: "IX_CurrencyTransactions_DateAdded", | ||
table: "CurrencyTransactions", | ||
column: "DateAdded"); | ||
} | ||
|
||
protected override void Down(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.DropIndex( | ||
name: "IX_Warnings_DateAdded", | ||
table: "Warnings"); | ||
|
||
migrationBuilder.DropIndex( | ||
name: "IX_Warnings_GuildId", | ||
table: "Warnings"); | ||
|
||
migrationBuilder.DropIndex( | ||
name: "IX_Warnings_UserId", | ||
table: "Warnings"); | ||
|
||
migrationBuilder.DropIndex( | ||
name: "IX_WaifuInfo_Price", | ||
table: "WaifuInfo"); | ||
|
||
migrationBuilder.DropIndex( | ||
name: "IX_UserXpStats_AwardedXp", | ||
table: "UserXpStats"); | ||
|
||
migrationBuilder.DropIndex( | ||
name: "IX_UserXpStats_GuildId", | ||
table: "UserXpStats"); | ||
|
||
migrationBuilder.DropIndex( | ||
name: "IX_UserXpStats_UserId", | ||
table: "UserXpStats"); | ||
|
||
migrationBuilder.DropIndex( | ||
name: "IX_UserXpStats_Xp", | ||
table: "UserXpStats"); | ||
|
||
migrationBuilder.DropIndex( | ||
name: "IX_Reminders_DateAdded", | ||
table: "Reminders"); | ||
|
||
migrationBuilder.DropIndex( | ||
name: "IX_Quotes_GuildId", | ||
table: "Quotes"); | ||
|
||
migrationBuilder.DropIndex( | ||
name: "IX_Quotes_Keyword", | ||
table: "Quotes"); | ||
|
||
migrationBuilder.DropIndex( | ||
name: "IX_Donators_Amount", | ||
table: "Donators"); | ||
|
||
migrationBuilder.DropIndex( | ||
name: "IX_DiscordUser_CurrencyAmount", | ||
table: "DiscordUser"); | ||
|
||
migrationBuilder.DropIndex( | ||
name: "IX_DiscordUser_TotalXp", | ||
table: "DiscordUser"); | ||
|
||
migrationBuilder.DropIndex( | ||
name: "IX_DiscordUser_UserId", | ||
table: "DiscordUser"); | ||
|
||
migrationBuilder.DropIndex( | ||
name: "IX_CurrencyTransactions_DateAdded", | ||
table: "CurrencyTransactions"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,6 +75,5 @@ await Context.Channel.EmbedAsync(new EmbedBuilder().WithOkColor() | |
.ConfigureAwait(false); | ||
} | ||
} | ||
|
||
} | ||
} |
Oops, something went wrong.