-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding tests and docs for custom templates
- Loading branch information
Eliran Turgeman
authored and
Eliran Turgeman
committed
Dec 20, 2024
1 parent
3405644
commit 1caf2a5
Showing
10 changed files
with
2,069 additions
and
269 deletions.
There are no files selected for viewing
535 changes: 535 additions & 0 deletions
535
EmailCollector.Api/Migrations/20241212054047_AddCustomEmailTemplates.Designer.cs
Large diffs are not rendered by default.
Oops, something went wrong.
51 changes: 51 additions & 0 deletions
51
EmailCollector.Api/Migrations/20241212054047_AddCustomEmailTemplates.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"); | ||
} | ||
} | ||
} |
Oops, something went wrong.