added automatic deletion of polls

This commit is contained in:
Sarah Faey 2023-02-13 23:12:05 +01:00
parent b6dd3ff9c4
commit ac3cc69b68
7 changed files with 846 additions and 7 deletions

View file

@ -0,0 +1,38 @@
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");
}
}
}