small migration fix for MySql
This commit is contained in:
parent
4b1f44cc2a
commit
de69bed792
@ -23,6 +23,8 @@ namespace SharedLibraryCore.Database.Models
|
||||
public virtual EFClient Client { get; set; }
|
||||
[Required]
|
||||
[MinLength(3)]
|
||||
[StringLength(32)]
|
||||
[MaxLength(32)]
|
||||
public string Key { get; set; }
|
||||
[Required]
|
||||
public string Value { get; set; }
|
||||
|
@ -6,10 +6,18 @@ namespace SharedLibraryCore.Migrations
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_EFMeta_Key",
|
||||
table: "EFMeta",
|
||||
column: "Key");
|
||||
if (migrationBuilder.ActiveProvider == "Pomelo.EntityFrameworkCore.MySql")
|
||||
{
|
||||
migrationBuilder.Sql("CREATE FULLTEXT INDEX IX_EFMeta_Key ON EFMeta ( `Key` );");
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_EFMeta_Key",
|
||||
table: "EFMeta",
|
||||
column: "Key");
|
||||
}
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
|
@ -18,6 +18,7 @@
|
||||
<Compile Remove="Migrations\20181126233300_AddEndpointToEFServer.cs" />
|
||||
<Compile Remove="Migrations\20181127143920_AddEndpointToEFServerUpdateServerIdType.cs" />
|
||||
<Compile Remove="Migrations\20190222234606_AddIndexToEFMeta-KeyAndClientId.cs" />
|
||||
<Compile Remove="Migrations\20190223012312_SetMaxLengthForMetaKey.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
Loading…
Reference in New Issue
Block a user