using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace TodoList.Application.Migrations
{
///
public partial class InitialCreate : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Tasks",
columns: table => new
{
Id = table.Column(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
Title = table.Column(type: "TEXT", maxLength: 200, nullable: false),
Priority = table.Column(type: "INTEGER", nullable: false, defaultValue: 1),
IsCompleted = table.Column(type: "INTEGER", nullable: false, defaultValue: false),
CreatedAt = table.Column(type: "TEXT", nullable: false, defaultValueSql: "datetime('now')"),
UpdatedAt = table.Column(type: "TEXT", nullable: false, defaultValueSql: "datetime('now')")
},
constraints: table =>
{
table.PrimaryKey("PK_Tasks", x => x.Id);
});
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Tasks");
}
}
}