Фикс миграций (#3545)
This commit is contained in:
parent
7823c0b24f
commit
6c513a229d
10 changed files with 5065 additions and 46 deletions
2347
Content.Server.Database/Migrations/Postgres/20250926230103_GradientUpdate.Designer.cs
generated
Normal file
2347
Content.Server.Database/Migrations/Postgres/20250926230103_GradientUpdate.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,113 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Content.Server.Database.Migrations.Postgres
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class GradientUpdate : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "hair_extended_color",
|
||||
table: "profile",
|
||||
newName: "hair_gradient_secondary_color");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "hair_color_type",
|
||||
table: "profile",
|
||||
newName: "hair_gradient_direction");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "facial_hair_extended_color",
|
||||
table: "profile",
|
||||
newName: "facial_hair_gradient_secondary_color");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "facial_hair_color_type",
|
||||
table: "profile",
|
||||
newName: "facial_hair_gradient_direction");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "all_markings_gradient_direction",
|
||||
table: "profile",
|
||||
type: "integer",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "all_markings_gradient_enabled",
|
||||
table: "profile",
|
||||
type: "boolean",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "all_markings_gradient_secondary_color",
|
||||
table: "profile",
|
||||
type: "text",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "facial_hair_gradient_enabled",
|
||||
table: "profile",
|
||||
type: "boolean",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "hair_gradient_enabled",
|
||||
table: "profile",
|
||||
type: "boolean",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "all_markings_gradient_direction",
|
||||
table: "profile");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "all_markings_gradient_enabled",
|
||||
table: "profile");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "all_markings_gradient_secondary_color",
|
||||
table: "profile");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "facial_hair_gradient_enabled",
|
||||
table: "profile");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "hair_gradient_enabled",
|
||||
table: "profile");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "hair_gradient_secondary_color",
|
||||
table: "profile",
|
||||
newName: "hair_extended_color");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "hair_gradient_direction",
|
||||
table: "profile",
|
||||
newName: "hair_color_type");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "facial_hair_gradient_secondary_color",
|
||||
table: "profile",
|
||||
newName: "facial_hair_extended_color");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "facial_hair_gradient_direction",
|
||||
table: "profile",
|
||||
newName: "facial_hair_color_type");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Content.Server.Database.Migrations.Postgres
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class OldGradients : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -16,7 +16,7 @@ using NpgsqlTypes;
|
|||
namespace Content.Server.Database.Migrations.Postgres
|
||||
{
|
||||
[DbContext(typeof(PostgresServerDbContext))]
|
||||
[Migration("20251228200202_OldGradients")]
|
||||
[Migration("20251229165316_OldGradients")]
|
||||
partial class OldGradients
|
||||
{
|
||||
/// <inheritdoc />
|
||||
|
|
@ -0,0 +1,113 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Content.Server.Database.Migrations.Postgres
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class OldGradients : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "all_markings_gradient_direction",
|
||||
table: "profile");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "all_markings_gradient_enabled",
|
||||
table: "profile");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "all_markings_gradient_secondary_color",
|
||||
table: "profile");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "facial_hair_gradient_enabled",
|
||||
table: "profile");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "hair_gradient_enabled",
|
||||
table: "profile");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "hair_gradient_secondary_color",
|
||||
table: "profile",
|
||||
newName: "hair_extended_color");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "hair_gradient_direction",
|
||||
table: "profile",
|
||||
newName: "hair_color_type");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "facial_hair_gradient_secondary_color",
|
||||
table: "profile",
|
||||
newName: "facial_hair_extended_color");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "facial_hair_gradient_direction",
|
||||
table: "profile",
|
||||
newName: "facial_hair_color_type");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "hair_extended_color",
|
||||
table: "profile",
|
||||
newName: "hair_gradient_secondary_color");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "hair_color_type",
|
||||
table: "profile",
|
||||
newName: "hair_gradient_direction");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "facial_hair_extended_color",
|
||||
table: "profile",
|
||||
newName: "facial_hair_gradient_secondary_color");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "facial_hair_color_type",
|
||||
table: "profile",
|
||||
newName: "facial_hair_gradient_direction");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "all_markings_gradient_direction",
|
||||
table: "profile",
|
||||
type: "integer",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "all_markings_gradient_enabled",
|
||||
table: "profile",
|
||||
type: "boolean",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "all_markings_gradient_secondary_color",
|
||||
table: "profile",
|
||||
type: "text",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "facial_hair_gradient_enabled",
|
||||
table: "profile",
|
||||
type: "boolean",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "hair_gradient_enabled",
|
||||
table: "profile",
|
||||
type: "boolean",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
}
|
||||
}
|
||||
}
|
||||
2264
Content.Server.Database/Migrations/Sqlite/20250926230050_GradientUpdate.Designer.cs
generated
Normal file
2264
Content.Server.Database/Migrations/Sqlite/20250926230050_GradientUpdate.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,113 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Content.Server.Database.Migrations.Sqlite
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class GradientUpdate : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "hair_extended_color",
|
||||
table: "profile",
|
||||
newName: "hair_gradient_secondary_color");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "hair_color_type",
|
||||
table: "profile",
|
||||
newName: "hair_gradient_enabled");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "facial_hair_extended_color",
|
||||
table: "profile",
|
||||
newName: "facial_hair_gradient_secondary_color");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "facial_hair_color_type",
|
||||
table: "profile",
|
||||
newName: "hair_gradient_direction");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "all_markings_gradient_direction",
|
||||
table: "profile",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "all_markings_gradient_enabled",
|
||||
table: "profile",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "all_markings_gradient_secondary_color",
|
||||
table: "profile",
|
||||
type: "TEXT",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "facial_hair_gradient_direction",
|
||||
table: "profile",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "facial_hair_gradient_enabled",
|
||||
table: "profile",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "all_markings_gradient_direction",
|
||||
table: "profile");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "all_markings_gradient_enabled",
|
||||
table: "profile");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "all_markings_gradient_secondary_color",
|
||||
table: "profile");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "facial_hair_gradient_direction",
|
||||
table: "profile");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "facial_hair_gradient_enabled",
|
||||
table: "profile");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "hair_gradient_secondary_color",
|
||||
table: "profile",
|
||||
newName: "hair_extended_color");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "hair_gradient_enabled",
|
||||
table: "profile",
|
||||
newName: "hair_color_type");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "hair_gradient_direction",
|
||||
table: "profile",
|
||||
newName: "facial_hair_color_type");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "facial_hair_gradient_secondary_color",
|
||||
table: "profile",
|
||||
newName: "facial_hair_extended_color");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Content.Server.Database.Migrations.Sqlite
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class OldGradients : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -11,7 +11,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|||
namespace Content.Server.Database.Migrations.Sqlite
|
||||
{
|
||||
[DbContext(typeof(SqliteServerDbContext))]
|
||||
[Migration("20251228200141_OldGradients")]
|
||||
[Migration("20251229165249_OldGradients")]
|
||||
partial class OldGradients
|
||||
{
|
||||
/// <inheritdoc />
|
||||
|
|
@ -0,0 +1,113 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Content.Server.Database.Migrations.Sqlite
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class OldGradients : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "all_markings_gradient_direction",
|
||||
table: "profile");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "all_markings_gradient_enabled",
|
||||
table: "profile");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "all_markings_gradient_secondary_color",
|
||||
table: "profile");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "facial_hair_gradient_direction",
|
||||
table: "profile");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "facial_hair_gradient_enabled",
|
||||
table: "profile");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "hair_gradient_secondary_color",
|
||||
table: "profile",
|
||||
newName: "hair_extended_color");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "hair_gradient_enabled",
|
||||
table: "profile",
|
||||
newName: "hair_color_type");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "hair_gradient_direction",
|
||||
table: "profile",
|
||||
newName: "facial_hair_color_type");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "facial_hair_gradient_secondary_color",
|
||||
table: "profile",
|
||||
newName: "facial_hair_extended_color");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "hair_extended_color",
|
||||
table: "profile",
|
||||
newName: "hair_gradient_secondary_color");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "hair_color_type",
|
||||
table: "profile",
|
||||
newName: "hair_gradient_enabled");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "facial_hair_extended_color",
|
||||
table: "profile",
|
||||
newName: "facial_hair_gradient_secondary_color");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "facial_hair_color_type",
|
||||
table: "profile",
|
||||
newName: "hair_gradient_direction");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "all_markings_gradient_direction",
|
||||
table: "profile",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "all_markings_gradient_enabled",
|
||||
table: "profile",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "all_markings_gradient_secondary_color",
|
||||
table: "profile",
|
||||
type: "TEXT",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "facial_hair_gradient_direction",
|
||||
table: "profile",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "facial_hair_gradient_enabled",
|
||||
table: "profile",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue