diff --git a/TwilioSMSReceiver/Migrations/20211227010718_InitialMigration.Designer.cs b/TwilioSMSReceiver/Migrations/20211227010718_InitialMigration.Designer.cs
deleted file mode 100644
index 497e4f4..0000000
--- a/TwilioSMSReceiver/Migrations/20211227010718_InitialMigration.Designer.cs
+++ /dev/null
@@ -1,52 +0,0 @@
-//
-using System;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-using TwilioSMSReceiver;
-
-#nullable disable
-
-namespace TwilioSMSReceiver.Migrations
-{
- [DbContext(typeof(SMSDbCtx))]
- [Migration("20211227010718_InitialMigration")]
- partial class InitialMigration
- {
- protected override void BuildTargetModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder.HasAnnotation("ProductVersion", "6.0.1");
-
- modelBuilder.Entity("TwilioSMSReceiver.Models.SMSModel", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
-
- b.Property("MMSContentPath")
- .HasColumnType("TEXT");
-
- b.Property("MessageContents")
- .HasColumnType("TEXT");
-
- b.Property("ReceivedNumber")
- .IsRequired()
- .HasColumnType("TEXT");
-
- b.Property("SenderNumber")
- .IsRequired()
- .HasColumnType("TEXT");
-
- b.Property("TimeReceived")
- .HasColumnType("TEXT");
-
- b.HasKey("Id");
-
- b.ToTable("SMSMessages");
- });
-#pragma warning restore 612, 618
- }
- }
-}
diff --git a/TwilioSMSReceiver/Migrations/20211227010718_InitialMigration.cs b/TwilioSMSReceiver/Migrations/20211227010718_InitialMigration.cs
deleted file mode 100644
index 08d718d..0000000
--- a/TwilioSMSReceiver/Migrations/20211227010718_InitialMigration.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-using System;
-using Microsoft.EntityFrameworkCore.Migrations;
-
-#nullable disable
-
-namespace TwilioSMSReceiver.Migrations
-{
- public partial class InitialMigration : Migration
- {
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.CreateTable(
- name: "SMSMessages",
- columns: table => new
- {
- Id = table.Column(type: "INTEGER", nullable: false)
- .Annotation("Sqlite:Autoincrement", true),
- ReceivedNumber = table.Column(type: "TEXT", nullable: false),
- SenderNumber = table.Column(type: "TEXT", nullable: false),
- TimeReceived = table.Column(type: "TEXT", nullable: false),
- MessageContents = table.Column(type: "TEXT", nullable: true),
- MMSContentPath = table.Column(type: "TEXT", nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_SMSMessages", x => x.Id);
- });
- }
-
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropTable(
- name: "SMSMessages");
- }
- }
-}
diff --git a/TwilioSMSReceiver/Migrations/20211227015928_AddMMSData.Designer.cs b/TwilioSMSReceiver/Migrations/20211227015928_AddMMSData.Designer.cs
deleted file mode 100644
index 337cf84..0000000
--- a/TwilioSMSReceiver/Migrations/20211227015928_AddMMSData.Designer.cs
+++ /dev/null
@@ -1,85 +0,0 @@
-//
-using System;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-using TwilioSMSReceiver;
-
-#nullable disable
-
-namespace TwilioSMSReceiver.Migrations
-{
- [DbContext(typeof(SMSDbCtx))]
- [Migration("20211227015928_AddMMSData")]
- partial class AddMMSData
- {
- protected override void BuildTargetModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder.HasAnnotation("ProductVersion", "6.0.1");
-
- modelBuilder.Entity("TwilioSMSReceiver.Models.MMSModel", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
-
- b.Property("OriginalMMSData")
- .IsRequired()
- .HasColumnType("TEXT");
-
- b.Property("SMSModelId")
- .HasColumnType("INTEGER");
-
- b.HasKey("Id");
-
- b.HasIndex("SMSModelId");
-
- b.ToTable("MMSModel");
- });
-
- modelBuilder.Entity("TwilioSMSReceiver.Models.SMSModel", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
-
- b.Property("MessageContents")
- .HasColumnType("TEXT");
-
- b.Property("ReceivedNumber")
- .IsRequired()
- .HasColumnType("TEXT");
-
- b.Property("SenderNumber")
- .IsRequired()
- .HasColumnType("TEXT");
-
- b.Property("TimeReceived")
- .HasColumnType("TEXT");
-
- b.HasKey("Id");
-
- b.ToTable("SMSMessages");
- });
-
- modelBuilder.Entity("TwilioSMSReceiver.Models.MMSModel", b =>
- {
- b.HasOne("TwilioSMSReceiver.Models.SMSModel", "ParentSMSMessage")
- .WithMany("MMSContent")
- .HasForeignKey("SMSModelId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("ParentSMSMessage");
- });
-
- modelBuilder.Entity("TwilioSMSReceiver.Models.SMSModel", b =>
- {
- b.Navigation("MMSContent");
- });
-#pragma warning restore 612, 618
- }
- }
-}
diff --git a/TwilioSMSReceiver/Migrations/20211227015928_AddMMSData.cs b/TwilioSMSReceiver/Migrations/20211227015928_AddMMSData.cs
deleted file mode 100644
index c9ea355..0000000
--- a/TwilioSMSReceiver/Migrations/20211227015928_AddMMSData.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-using Microsoft.EntityFrameworkCore.Migrations;
-
-#nullable disable
-
-namespace TwilioSMSReceiver.Migrations
-{
- public partial class AddMMSData : Migration
- {
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropColumn(
- name: "MMSContentPath",
- table: "SMSMessages");
-
- migrationBuilder.CreateTable(
- name: "MMSModel",
- columns: table => new
- {
- Id = table.Column(type: "INTEGER", nullable: false)
- .Annotation("Sqlite:Autoincrement", true),
- SMSModelId = table.Column(type: "INTEGER", nullable: false),
- OriginalMMSData = table.Column(type: "TEXT", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_MMSModel", x => x.Id);
- table.ForeignKey(
- name: "FK_MMSModel_SMSMessages_SMSModelId",
- column: x => x.SMSModelId,
- principalTable: "SMSMessages",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- });
-
- migrationBuilder.CreateIndex(
- name: "IX_MMSModel_SMSModelId",
- table: "MMSModel",
- column: "SMSModelId");
- }
-
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropTable(
- name: "MMSModel");
-
- migrationBuilder.AddColumn(
- name: "MMSContentPath",
- table: "SMSMessages",
- type: "TEXT",
- nullable: true);
- }
- }
-}
diff --git a/TwilioSMSReceiver/Migrations/20211227022011_AddIsBroadcastedFlag.Designer.cs b/TwilioSMSReceiver/Migrations/20211227022011_AddIsBroadcastedFlag.Designer.cs
deleted file mode 100644
index bc5b656..0000000
--- a/TwilioSMSReceiver/Migrations/20211227022011_AddIsBroadcastedFlag.Designer.cs
+++ /dev/null
@@ -1,87 +0,0 @@
-//
-using System;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-using TwilioSMSReceiver;
-
-#nullable disable
-
-namespace TwilioSMSReceiver.Migrations
-{
- [DbContext(typeof(SMSDbCtx))]
- [Migration("20211227022011_AddIsBroadcastedFlag")]
- partial class AddIsBroadcastedFlag
- {
- protected override void BuildTargetModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder.HasAnnotation("ProductVersion", "6.0.1");
-
- modelBuilder.Entity("TwilioSMSReceiver.Models.MMSModel", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
-
- b.Property("OriginalMMSData")
- .HasColumnType("TEXT");
-
- b.Property("SMSModelId")
- .HasColumnType("INTEGER");
-
- b.HasKey("Id");
-
- b.HasIndex("SMSModelId");
-
- b.ToTable("MMSModel");
- });
-
- modelBuilder.Entity("TwilioSMSReceiver.Models.SMSModel", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
-
- b.Property("IsForwardedYet")
- .HasColumnType("INTEGER");
-
- b.Property("MessageContents")
- .HasColumnType("TEXT");
-
- b.Property("ReceivedNumber")
- .IsRequired()
- .HasColumnType("TEXT");
-
- b.Property("SenderNumber")
- .IsRequired()
- .HasColumnType("TEXT");
-
- b.Property("TimeReceived")
- .HasColumnType("TEXT");
-
- b.HasKey("Id");
-
- b.ToTable("SMSMessages");
- });
-
- modelBuilder.Entity("TwilioSMSReceiver.Models.MMSModel", b =>
- {
- b.HasOne("TwilioSMSReceiver.Models.SMSModel", "ParentSMSMessage")
- .WithMany("MMSContent")
- .HasForeignKey("SMSModelId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("ParentSMSMessage");
- });
-
- modelBuilder.Entity("TwilioSMSReceiver.Models.SMSModel", b =>
- {
- b.Navigation("MMSContent");
- });
-#pragma warning restore 612, 618
- }
- }
-}
diff --git a/TwilioSMSReceiver/Migrations/20211227022011_AddIsBroadcastedFlag.cs b/TwilioSMSReceiver/Migrations/20211227022011_AddIsBroadcastedFlag.cs
deleted file mode 100644
index 53ef876..0000000
--- a/TwilioSMSReceiver/Migrations/20211227022011_AddIsBroadcastedFlag.cs
+++ /dev/null
@@ -1,44 +0,0 @@
-using Microsoft.EntityFrameworkCore.Migrations;
-
-#nullable disable
-
-namespace TwilioSMSReceiver.Migrations
-{
- public partial class AddIsBroadcastedFlag : Migration
- {
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.AddColumn(
- name: "IsForwardedYet",
- table: "SMSMessages",
- type: "INTEGER",
- nullable: false,
- defaultValue: false);
-
- migrationBuilder.AlterColumn(
- name: "OriginalMMSData",
- table: "MMSModel",
- type: "TEXT",
- nullable: true,
- oldClrType: typeof(string),
- oldType: "TEXT");
- }
-
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropColumn(
- name: "IsForwardedYet",
- table: "SMSMessages");
-
- migrationBuilder.AlterColumn(
- name: "OriginalMMSData",
- table: "MMSModel",
- type: "TEXT",
- nullable: false,
- defaultValue: "",
- oldClrType: typeof(string),
- oldType: "TEXT",
- oldNullable: true);
- }
- }
-}
diff --git a/TwilioSMSReceiver/Migrations/20211227034115_AddMSTeams.Designer.cs b/TwilioSMSReceiver/Migrations/20211227034115_AddMSTeams.Designer.cs
deleted file mode 100644
index 1e7c01b..0000000
--- a/TwilioSMSReceiver/Migrations/20211227034115_AddMSTeams.Designer.cs
+++ /dev/null
@@ -1,101 +0,0 @@
-//
-using System;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-using TwilioSMSReceiver;
-
-#nullable disable
-
-namespace TwilioSMSReceiver.Migrations
-{
- [DbContext(typeof(SMSDbCtx))]
- [Migration("20211227034115_AddMSTeams")]
- partial class AddMSTeams
- {
- protected override void BuildTargetModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder.HasAnnotation("ProductVersion", "6.0.1");
-
- modelBuilder.Entity("TwilioSMSReceiver.Models.MMSModel", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
-
- b.Property("OriginalMMSData")
- .HasColumnType("TEXT");
-
- b.Property("SMSModelId")
- .HasColumnType("INTEGER");
-
- b.HasKey("Id");
-
- b.HasIndex("SMSModelId");
-
- b.ToTable("MMSMessages");
- });
-
- modelBuilder.Entity("TwilioSMSReceiver.Models.MSTeamsWebHook", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
-
- b.Property("WebHookUri")
- .HasColumnType("TEXT");
-
- b.HasKey("Id");
-
- b.ToTable("MSTeamsWebHooks");
- });
-
- modelBuilder.Entity("TwilioSMSReceiver.Models.SMSModel", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
-
- b.Property("IsForwardedYet")
- .HasColumnType("INTEGER");
-
- b.Property("MessageContents")
- .HasColumnType("TEXT");
-
- b.Property("ReceivedNumber")
- .IsRequired()
- .HasColumnType("TEXT");
-
- b.Property("SenderNumber")
- .IsRequired()
- .HasColumnType("TEXT");
-
- b.Property("TimeReceived")
- .HasColumnType("TEXT");
-
- b.HasKey("Id");
-
- b.ToTable("SMSMessages");
- });
-
- modelBuilder.Entity("TwilioSMSReceiver.Models.MMSModel", b =>
- {
- b.HasOne("TwilioSMSReceiver.Models.SMSModel", "ParentSMSMessage")
- .WithMany("MMSContent")
- .HasForeignKey("SMSModelId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("ParentSMSMessage");
- });
-
- modelBuilder.Entity("TwilioSMSReceiver.Models.SMSModel", b =>
- {
- b.Navigation("MMSContent");
- });
-#pragma warning restore 612, 618
- }
- }
-}
diff --git a/TwilioSMSReceiver/Migrations/20211227034115_AddMSTeams.cs b/TwilioSMSReceiver/Migrations/20211227034115_AddMSTeams.cs
deleted file mode 100644
index 6a6eab1..0000000
--- a/TwilioSMSReceiver/Migrations/20211227034115_AddMSTeams.cs
+++ /dev/null
@@ -1,91 +0,0 @@
-using Microsoft.EntityFrameworkCore.Migrations;
-
-#nullable disable
-
-namespace TwilioSMSReceiver.Migrations
-{
- public partial class AddMSTeams : Migration
- {
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropForeignKey(
- name: "FK_MMSModel_SMSMessages_SMSModelId",
- table: "MMSModel");
-
- migrationBuilder.DropPrimaryKey(
- name: "PK_MMSModel",
- table: "MMSModel");
-
- migrationBuilder.RenameTable(
- name: "MMSModel",
- newName: "MMSMessages");
-
- migrationBuilder.RenameIndex(
- name: "IX_MMSModel_SMSModelId",
- table: "MMSMessages",
- newName: "IX_MMSMessages_SMSModelId");
-
- migrationBuilder.AddPrimaryKey(
- name: "PK_MMSMessages",
- table: "MMSMessages",
- column: "Id");
-
- migrationBuilder.CreateTable(
- name: "MSTeamsWebHooks",
- columns: table => new
- {
- Id = table.Column(type: "INTEGER", nullable: false)
- .Annotation("Sqlite:Autoincrement", true),
- WebHookUri = table.Column(type: "TEXT", nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_MSTeamsWebHooks", x => x.Id);
- });
-
- migrationBuilder.AddForeignKey(
- name: "FK_MMSMessages_SMSMessages_SMSModelId",
- table: "MMSMessages",
- column: "SMSModelId",
- principalTable: "SMSMessages",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- }
-
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropForeignKey(
- name: "FK_MMSMessages_SMSMessages_SMSModelId",
- table: "MMSMessages");
-
- migrationBuilder.DropTable(
- name: "MSTeamsWebHooks");
-
- migrationBuilder.DropPrimaryKey(
- name: "PK_MMSMessages",
- table: "MMSMessages");
-
- migrationBuilder.RenameTable(
- name: "MMSMessages",
- newName: "MMSModel");
-
- migrationBuilder.RenameIndex(
- name: "IX_MMSMessages_SMSModelId",
- table: "MMSModel",
- newName: "IX_MMSModel_SMSModelId");
-
- migrationBuilder.AddPrimaryKey(
- name: "PK_MMSModel",
- table: "MMSModel",
- column: "Id");
-
- migrationBuilder.AddForeignKey(
- name: "FK_MMSModel_SMSMessages_SMSModelId",
- table: "MMSModel",
- column: "SMSModelId",
- principalTable: "SMSMessages",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- }
- }
-}
diff --git a/TwilioSMSReceiver/Migrations/SMSDbCtxModelSnapshot.cs b/TwilioSMSReceiver/Migrations/SMSDbCtxModelSnapshot.cs
deleted file mode 100644
index 244ae07..0000000
--- a/TwilioSMSReceiver/Migrations/SMSDbCtxModelSnapshot.cs
+++ /dev/null
@@ -1,99 +0,0 @@
-//
-using System;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-using TwilioSMSReceiver;
-
-#nullable disable
-
-namespace TwilioSMSReceiver.Migrations
-{
- [DbContext(typeof(SMSDbCtx))]
- partial class SMSDbCtxModelSnapshot : ModelSnapshot
- {
- protected override void BuildModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder.HasAnnotation("ProductVersion", "6.0.1");
-
- modelBuilder.Entity("TwilioSMSReceiver.Models.MMSModel", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
-
- b.Property("OriginalMMSData")
- .HasColumnType("TEXT");
-
- b.Property("SMSModelId")
- .HasColumnType("INTEGER");
-
- b.HasKey("Id");
-
- b.HasIndex("SMSModelId");
-
- b.ToTable("MMSMessages");
- });
-
- modelBuilder.Entity("TwilioSMSReceiver.Models.MSTeamsWebHook", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
-
- b.Property("WebHookUri")
- .HasColumnType("TEXT");
-
- b.HasKey("Id");
-
- b.ToTable("MSTeamsWebHooks");
- });
-
- modelBuilder.Entity("TwilioSMSReceiver.Models.SMSModel", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
-
- b.Property("IsForwardedYet")
- .HasColumnType("INTEGER");
-
- b.Property("MessageContents")
- .HasColumnType("TEXT");
-
- b.Property("ReceivedNumber")
- .IsRequired()
- .HasColumnType("TEXT");
-
- b.Property("SenderNumber")
- .IsRequired()
- .HasColumnType("TEXT");
-
- b.Property("TimeReceived")
- .HasColumnType("TEXT");
-
- b.HasKey("Id");
-
- b.ToTable("SMSMessages");
- });
-
- modelBuilder.Entity("TwilioSMSReceiver.Models.MMSModel", b =>
- {
- b.HasOne("TwilioSMSReceiver.Models.SMSModel", "ParentSMSMessage")
- .WithMany("MMSContent")
- .HasForeignKey("SMSModelId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("ParentSMSMessage");
- });
-
- modelBuilder.Entity("TwilioSMSReceiver.Models.SMSModel", b =>
- {
- b.Navigation("MMSContent");
- });
-#pragma warning restore 612, 618
- }
- }
-}
diff --git a/TwilioSMSReceiver/TwilioSMSReceiver.csproj b/TwilioSMSReceiver/TwilioSMSReceiver.csproj
index 4307b43..d2b0211 100644
--- a/TwilioSMSReceiver/TwilioSMSReceiver.csproj
+++ b/TwilioSMSReceiver/TwilioSMSReceiver.csproj
@@ -25,6 +25,7 @@
+