110 lines
3.7 KiB
C#
110 lines
3.7 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace Yavsc.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class notificationNulls : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "tag",
|
|
table: "Notification",
|
|
type: "character varying(512)",
|
|
maxLength: 512,
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "character varying(512)",
|
|
oldMaxLength: 512);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "sound",
|
|
table: "Notification",
|
|
type: "character varying(512)",
|
|
maxLength: 512,
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "character varying(512)",
|
|
oldMaxLength: 512);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "icon",
|
|
table: "Notification",
|
|
type: "character varying(512)",
|
|
maxLength: 512,
|
|
nullable: true,
|
|
defaultValue: "exclam",
|
|
oldClrType: typeof(string),
|
|
oldType: "character varying(512)",
|
|
oldMaxLength: 512,
|
|
oldDefaultValue: "exclam");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "color",
|
|
table: "Notification",
|
|
type: "character varying(512)",
|
|
maxLength: 512,
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "character varying(512)",
|
|
oldMaxLength: 512);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "tag",
|
|
table: "Notification",
|
|
type: "character varying(512)",
|
|
maxLength: 512,
|
|
nullable: false,
|
|
defaultValue: "",
|
|
oldClrType: typeof(string),
|
|
oldType: "character varying(512)",
|
|
oldMaxLength: 512,
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "sound",
|
|
table: "Notification",
|
|
type: "character varying(512)",
|
|
maxLength: 512,
|
|
nullable: false,
|
|
defaultValue: "",
|
|
oldClrType: typeof(string),
|
|
oldType: "character varying(512)",
|
|
oldMaxLength: 512,
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "icon",
|
|
table: "Notification",
|
|
type: "character varying(512)",
|
|
maxLength: 512,
|
|
nullable: false,
|
|
defaultValue: "exclam",
|
|
oldClrType: typeof(string),
|
|
oldType: "character varying(512)",
|
|
oldMaxLength: 512,
|
|
oldNullable: true,
|
|
oldDefaultValue: "exclam");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "color",
|
|
table: "Notification",
|
|
type: "character varying(512)",
|
|
maxLength: 512,
|
|
nullable: false,
|
|
defaultValue: "",
|
|
oldClrType: typeof(string),
|
|
oldType: "character varying(512)",
|
|
oldMaxLength: 512,
|
|
oldNullable: true);
|
|
}
|
|
}
|
|
}
|