IW4M-Admin/Data/Migrations/MySql/20220616224602_AddDescendingTimeSentIndexEFClientMessages.cs

28 lines
839 B
C#
Raw Permalink Normal View History

using System;
using Microsoft.EntityFrameworkCore.Migrations;
2022-06-16 19:03:23 -04:00
#nullable disable
namespace Data.Migrations.MySql
{
public partial class AddDescendingTimeSentIndexEFClientMessages : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
try
{
migrationBuilder.Sql(@"create index IX_EFClientMessages_TimeSentDesc on EFClientMessages (TimeSent desc);");
}
catch
{
migrationBuilder.Sql(@"create index IX_EFClientMessages_TimeSentDesc on efclientmessages (TimeSent desc);");
}
2022-06-16 19:03:23 -04:00
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.Sql(@"drop index IX_EFClientMessages_TimeSentDesc on EFClientMessages;");
2022-06-16 19:03:23 -04:00
}
}
}