Skip to content

Commit

Permalink
adding tests and docs for custom templates
Browse files Browse the repository at this point in the history
  • Loading branch information
Eliran Turgeman authored and Eliran Turgeman committed Dec 20, 2024
1 parent 3405644 commit 1caf2a5
Show file tree
Hide file tree
Showing 10 changed files with 2,069 additions and 269 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace EmailCollector.Api.Migrations
{
/// <inheritdoc />
public partial class AddCustomEmailTemplates : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "CustomEmailTemplates",
columns: table => new
{
Id = table.Column<Guid>(type: "TEXT", nullable: false),
FormId = table.Column<Guid>(type: "TEXT", nullable: false),
Event = table.Column<string>(type: "TEXT", nullable: false),
TemplateSubject = table.Column<string>(type: "TEXT", nullable: false),
TemplateBodyUri = table.Column<string>(type: "TEXT", nullable: false),
IsActive = table.Column<bool>(type: "INTEGER", nullable: false),
CreatedAt = table.Column<DateTime>(type: "TEXT", nullable: false),
UpdatedAt = table.Column<DateTime>(type: "TEXT", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_CustomEmailTemplates", x => x.Id);
table.ForeignKey(
name: "FK_CustomEmailTemplates_SignupForms_FormId",
column: x => x.FormId,
principalTable: "SignupForms",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});

migrationBuilder.CreateIndex(
name: "IX_CustomEmailTemplates_FormId",
table: "CustomEmailTemplates",
column: "FormId");
}

/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "CustomEmailTemplates");
}
}
}
Loading

0 comments on commit 1caf2a5

Please sign in to comment.