added automatic deletion of polls
This commit is contained in:
parent
b6dd3ff9c4
commit
ac3cc69b68
7 changed files with 846 additions and 7 deletions
38
Lieb/Migrations/20230213220614_PollsCreatedAt.cs
Normal file
38
Lieb/Migrations/20230213220614_PollsCreatedAt.cs
Normal 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");
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue