1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 15:20:48 -05:00

update mysql migration to add explicit length for searchable ip

This commit is contained in:
RaidMax
2023-02-13 08:24:45 -06:00
parent 957c88970d
commit 9884be8306
4 changed files with 6 additions and 2 deletions

View File

@ -808,7 +808,8 @@ namespace Data.Migrations.MySql
b.Property<string>("SearchableIPAddress")
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("longtext")
.HasMaxLength(255)
.HasColumnType("varchar(255)")
.HasComputedColumnSql("((IPAddress & 255) || '.' || ((IPAddress >> 8) & 255)) || '.' || ((IPAddress >> 16) & 255) || '.' || ((IPAddress >> 24) & 255)", true);
b.Property<string>("SearchableName")

View File

@ -11,7 +11,8 @@ namespace Data.Migrations.MySql
migrationBuilder.AddColumn<string>(
name: "SearchableIPAddress",
table: "EFAlias",
type: "longtext",
type: "varchar(255)",
maxLength: 255,
nullable: true,
computedColumnSql: "CONCAT((IPAddress & 255), \".\", ((IPAddress >> 8) & 255), \".\", ((IPAddress >> 16) & 255), \".\", ((IPAddress >> 24) & 255))",
stored: true)

View File

@ -808,6 +808,7 @@ namespace Data.Migrations.MySql
b.Property<string>("SearchableIPAddress")
.ValueGeneratedOnAddOrUpdate()
.HasMaxLength(255)
.HasColumnType("varchar(255)")
.HasComputedColumnSql("((IPAddress & 255) || '.' || ((IPAddress >> 8) & 255)) || '.' || ((IPAddress >> 16) & 255) || '.' || ((IPAddress >> 24) & 255)", true);