forked from ddrilling/AsbCloudServer
37 lines
1.1 KiB
C#
37 lines
1.1 KiB
C#
|
using AsbCloudDb.Model;
|
|||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|||
|
|
|||
|
namespace AsbCloudDb.Migrations
|
|||
|
{
|
|||
|
public partial class Add_PublishInfo_To_FileInfo : Migration
|
|||
|
{
|
|||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|||
|
{
|
|||
|
migrationBuilder.DropColumn(
|
|||
|
name: "web_storage_url",
|
|||
|
table: "t_file_info");
|
|||
|
|
|||
|
migrationBuilder.AddColumn<FilePublishInfo>(
|
|||
|
name: "publish_info",
|
|||
|
table: "t_file_info",
|
|||
|
type: "jsonb",
|
|||
|
nullable: true,
|
|||
|
comment: "Информация о файле в облаке");
|
|||
|
}
|
|||
|
|
|||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|||
|
{
|
|||
|
migrationBuilder.DropColumn(
|
|||
|
name: "publish_info",
|
|||
|
table: "t_file_info");
|
|||
|
|
|||
|
migrationBuilder.AddColumn<string>(
|
|||
|
name: "web_storage_url",
|
|||
|
table: "t_file_info",
|
|||
|
type: "text",
|
|||
|
nullable: true,
|
|||
|
comment: "Ссылка для просмотра файла в облаке");
|
|||
|
}
|
|||
|
}
|
|||
|
}
|