Newsbot.Collector/Newsbot.Collector.Database/Migrations/20230805060324_add author t...

52 lines
1.4 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Newsbot.Collector.Database.Migrations
{
/// <inheritdoc />
public partial class addauthortable : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "AuthorImage",
table: "Articles");
migrationBuilder.DropColumn(
name: "AuthorName",
table: "Articles");
migrationBuilder.AddColumn<Guid>(
name: "AuthorId",
table: "Articles",
type: "uuid",
nullable: false,
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"));
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "AuthorId",
table: "Articles");
migrationBuilder.AddColumn<string>(
name: "AuthorImage",
table: "Articles",
type: "text",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "AuthorName",
table: "Articles",
type: "text",
nullable: false,
defaultValue: "");
}
}
}