38 lines
1.1 KiB
C#
38 lines
1.1 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace Lieb.Migrations
|
|
{
|
|
public partial class PollsCreatedAt : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<DateTimeOffset>(
|
|
name: "CreatedAt",
|
|
table: "Poll",
|
|
type: "TEXT",
|
|
nullable: false,
|
|
defaultValue: new DateTimeOffset(new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)));
|
|
|
|
migrationBuilder.AddColumn<bool>(
|
|
name: "IsAutoPoll",
|
|
table: "Poll",
|
|
type: "INTEGER",
|
|
nullable: false,
|
|
defaultValue: false);
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "CreatedAt",
|
|
table: "Poll");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "IsAutoPoll",
|
|
table: "Poll");
|
|
}
|
|
}
|
|
}
|