using FluentMigrator;

namespace FastBlog.Core.Db.Migrations;

[Migration(202409212014, "Initial migration")]
public class Init : Migration
{
    public override void Up()
    {
        Create.Table("Blogs")
            .WithColumn("Id").AsInt32().PrimaryKey().Unique().Identity()
            .WithColumn("Title").AsString()
            .WithColumn("SourceLocation").AsString()
            .WithColumn("Slug").AsString().Unique().Nullable()
            .WithColumn("ShowDetails").AsBoolean()     
            .WithColumn("ImageUrl").AsString().Nullable()
            .WithColumn("CreatedAt").AsDateTime()
            .WithColumn("ModifiedAt").AsDateTime()
            .WithColumn("Signature").AsString().Nullable()
            .WithColumn("FullWidth").AsBoolean()
            .WithColumn("Visible").AsBoolean();
    }

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