41 lines
1.1 KiB
C#
41 lines
1.1 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace DatabaseImplement.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class image : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "Location",
|
|
table: "MediaFiles");
|
|
|
|
migrationBuilder.AddColumn<byte[]>(
|
|
name: "Image",
|
|
table: "MediaFiles",
|
|
type: "bytea",
|
|
nullable: false,
|
|
defaultValue: new byte[0]);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "Image",
|
|
table: "MediaFiles");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "Location",
|
|
table: "MediaFiles",
|
|
type: "text",
|
|
nullable: false,
|
|
defaultValue: "");
|
|
}
|
|
}
|
|
}
|