53 lines
2.5 KiB
C#
53 lines
2.5 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace IM_API.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class adduploadtask : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.CreateTable(
|
|
name: "UploadTasks",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
FileName = table.Column<string>(type: "longtext", nullable: false, collation: "latin1_swedish_ci")
|
|
.Annotation("MySql:CharSet", "latin1"),
|
|
FileSize = table.Column<long>(type: "bigint", nullable: false),
|
|
FileHash = table.Column<string>(type: "longtext", nullable: false, collation: "latin1_swedish_ci")
|
|
.Annotation("MySql:CharSet", "latin1"),
|
|
ContentType = table.Column<string>(type: "longtext", nullable: false, collation: "latin1_swedish_ci")
|
|
.Annotation("MySql:CharSet", "latin1"),
|
|
ChunkSize = table.Column<int>(type: "int", nullable: false),
|
|
TotalChunks = table.Column<int>(type: "int", nullable: false),
|
|
Status = table.Column<int>(type: "int", nullable: false),
|
|
StorageProvider = table.Column<string>(type: "longtext", nullable: false, collation: "latin1_swedish_ci")
|
|
.Annotation("MySql:CharSet", "latin1"),
|
|
ObjectName = table.Column<string>(type: "longtext", nullable: false, collation: "latin1_swedish_ci")
|
|
.Annotation("MySql:CharSet", "latin1"),
|
|
ProviderUploadId = table.Column<string>(type: "longtext", nullable: true, collation: "latin1_swedish_ci")
|
|
.Annotation("MySql:CharSet", "latin1"),
|
|
CreatedAt = table.Column<DateTimeOffset>(type: "datetime(6)", nullable: false)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PRIMARY", x => x.Id);
|
|
})
|
|
.Annotation("MySql:CharSet", "latin1")
|
|
.Annotation("Relational:Collation", "latin1_swedish_ci");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "UploadTasks");
|
|
}
|
|
}
|
|
}
|