Files
mws.backend.dotnet/infrastructure/Migrations/20260906043840_DropDocumentContent_AddStorageFields.cs
T

61 lines
1.7 KiB
C#
Raw Normal View History

2026-09-06 12:33:38 +07:00
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);
}
}
}