53 lines
1.4 KiB
C#
53 lines
1.4 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace pet_companion_api.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class AddActions : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<DateTime>(
|
|
name: "ActionSince",
|
|
table: "Pets",
|
|
type: "TEXT",
|
|
nullable: false,
|
|
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
|
|
|
|
migrationBuilder.AddColumn<bool>(
|
|
name: "IsDead",
|
|
table: "Pets",
|
|
type: "INTEGER",
|
|
nullable: false,
|
|
defaultValue: false);
|
|
|
|
migrationBuilder.AddColumn<int>(
|
|
name: "PetAction",
|
|
table: "Pets",
|
|
type: "INTEGER",
|
|
nullable: false,
|
|
defaultValue: 0);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "ActionSince",
|
|
table: "Pets");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "IsDead",
|
|
table: "Pets");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "PetAction",
|
|
table: "Pets");
|
|
}
|
|
}
|
|
}
|