using System;
using Microsoft.EntityFrameworkCore.Migrations;

namespace nugethost.Migrations
{
    public partial class ApkiKeyCreationDate : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<DateTime>(
                name: "CreationDate",
                table: "ApiKeys",
                nullable: false,
                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));

            migrationBuilder.AddColumn<string>(
                name: "Name",
                table: "ApiKeys",
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "ValidityPeriodInDays",
                table: "ApiKeys",
                nullable: false,
                defaultValue: 0);
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "CreationDate",
                table: "ApiKeys");

            migrationBuilder.DropColumn(
                name: "Name",
                table: "ApiKeys");

            migrationBuilder.DropColumn(
                name: "ValidityPeriodInDays",
                table: "ApiKeys");
        }
    }
}
