Made description and note optional, auto added title and description from metadata if not provided

This commit is contained in:
Carl Tibule
2023-01-28 17:04:49 -06:00
parent 22f5764589
commit 3f4c32107e
12 changed files with 327 additions and 20 deletions

View File

@ -0,0 +1,49 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace YABA.Data.Migrations
{
public partial class ModifiedBookmarkTable_MakeNoteAndDescriptionOptional : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "note",
table: "bookmarks",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<string>(
name: "description",
table: "bookmarks",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "note",
table: "bookmarks",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "description",
table: "bookmarks",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
}
}
}