107 lines
3.5 KiB
C#
107 lines
3.5 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace Moonlight.Api.Database.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class AdjustedLenghtsOfRoleAndApiKeyStrings : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "Name",
|
|
schema: "core",
|
|
table: "Roles",
|
|
type: "character varying(30)",
|
|
maxLength: 30,
|
|
nullable: false,
|
|
oldClrType: typeof(string),
|
|
oldType: "character varying(15)",
|
|
oldMaxLength: 15);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "Description",
|
|
schema: "core",
|
|
table: "Roles",
|
|
type: "character varying(300)",
|
|
maxLength: 300,
|
|
nullable: false,
|
|
oldClrType: typeof(string),
|
|
oldType: "character varying(100)",
|
|
oldMaxLength: 100);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "Name",
|
|
schema: "core",
|
|
table: "ApiKeys",
|
|
type: "character varying(30)",
|
|
maxLength: 30,
|
|
nullable: false,
|
|
oldClrType: typeof(string),
|
|
oldType: "character varying(15)",
|
|
oldMaxLength: 15);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "Description",
|
|
schema: "core",
|
|
table: "ApiKeys",
|
|
type: "character varying(300)",
|
|
maxLength: 300,
|
|
nullable: false,
|
|
oldClrType: typeof(string),
|
|
oldType: "character varying(100)",
|
|
oldMaxLength: 100);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "Name",
|
|
schema: "core",
|
|
table: "Roles",
|
|
type: "character varying(15)",
|
|
maxLength: 15,
|
|
nullable: false,
|
|
oldClrType: typeof(string),
|
|
oldType: "character varying(30)",
|
|
oldMaxLength: 30);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "Description",
|
|
schema: "core",
|
|
table: "Roles",
|
|
type: "character varying(100)",
|
|
maxLength: 100,
|
|
nullable: false,
|
|
oldClrType: typeof(string),
|
|
oldType: "character varying(300)",
|
|
oldMaxLength: 300);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "Name",
|
|
schema: "core",
|
|
table: "ApiKeys",
|
|
type: "character varying(15)",
|
|
maxLength: 15,
|
|
nullable: false,
|
|
oldClrType: typeof(string),
|
|
oldType: "character varying(30)",
|
|
oldMaxLength: 30);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "Description",
|
|
schema: "core",
|
|
table: "ApiKeys",
|
|
type: "character varying(100)",
|
|
maxLength: 100,
|
|
nullable: false,
|
|
oldClrType: typeof(string),
|
|
oldType: "character varying(300)",
|
|
oldMaxLength: 300);
|
|
}
|
|
}
|
|
}
|