From 900bb5e845c3ad44defbd427cae3d44a4a43321f Mon Sep 17 00:00:00 2001 From: ivarlovlie Date: Sat, 25 Feb 2023 13:15:44 +0100 Subject: feat: Initial commit --- .../20221209043806_ValidationEmailQueue.cs | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 code/api/src/Migrations/20221209043806_ValidationEmailQueue.cs (limited to 'code/api/src/Migrations/20221209043806_ValidationEmailQueue.cs') diff --git a/code/api/src/Migrations/20221209043806_ValidationEmailQueue.cs b/code/api/src/Migrations/20221209043806_ValidationEmailQueue.cs new file mode 100644 index 0000000..3599a37 --- /dev/null +++ b/code/api/src/Migrations/20221209043806_ValidationEmailQueue.cs @@ -0,0 +1,46 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace IOL.GreatOffice.Api.Migrations +{ + /// + public partial class ValidationEmailQueue : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "email_last_validated", + table: "users", + type: "timestamp with time zone", + nullable: false, + defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); + + migrationBuilder.CreateTable( + name: "validation_emails", + columns: table => new + { + id = table.Column(type: "uuid", nullable: false), + emailsentat = table.Column(name: "email_sent_at", type: "timestamp with time zone", nullable: false), + userid = table.Column(name: "user_id", type: "uuid", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("pk_validation_emails", x => x.id); + }); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "validation_emails"); + + migrationBuilder.DropColumn( + name: "email_last_validated", + table: "users"); + } + } +} -- cgit v1.3