61 lines
1.7 KiB
C#
61 lines
1.7 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace mws.backend.dotnet.infrastructure.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class DropDocumentContent_AddStorageFields : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "Content",
|
|
table: "documents");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "ContentHash",
|
|
table: "documents",
|
|
type: "character varying(64)",
|
|
maxLength: 64,
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<long>(
|
|
name: "ContentSize",
|
|
table: "documents",
|
|
type: "bigint",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<DateTime>(
|
|
name: "UpdatedContentAt",
|
|
table: "documents",
|
|
type: "timestamp with time zone",
|
|
nullable: true);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "ContentHash",
|
|
table: "documents");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "ContentSize",
|
|
table: "documents");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "UpdatedContentAt",
|
|
table: "documents");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "Content",
|
|
table: "documents",
|
|
type: "text",
|
|
nullable: true);
|
|
}
|
|
}
|
|
}
|