using FluentMigrator;

namespace FastBlog.Core.Db.Migrations;

[Migration(202409252200, "Add file meta table")]
public class AddFileMeta : Migration
{
    public override void Up()
    {
        Create.Table("Files")
            .WithColumn("Id").AsInt32().PrimaryKey().Unique().Identity()
            .WithColumn("SourceLocation").AsString().Unique()
            .WithColumn("MimeType").AsString()
            .WithColumn("CreatedAt").AsDateTime();
    }

    public override void Down()
    {
        Delete.Table("Files");
    }
}