Dump migrations
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
|
using Microsoft.EntityFrameworkCore.Metadata;
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
using TwilioSMSReceiver.Data;
|
using TwilioSMSReceiver.Data;
|
||||||
@@ -11,25 +12,31 @@ using TwilioSMSReceiver.Data;
|
|||||||
namespace TwilioSMSReceiver.Data.Migrations
|
namespace TwilioSMSReceiver.Data.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(SMSDbCtx))]
|
[DbContext(typeof(SMSDbCtx))]
|
||||||
[Migration("20211229034231_InitialMigrationSQLite")]
|
[Migration("20211231074942_InitialMigration")]
|
||||||
partial class InitialMigrationSQLite
|
partial class InitialMigration
|
||||||
{
|
{
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||||
{
|
{
|
||||||
#pragma warning disable 612, 618
|
#pragma warning disable 612, 618
|
||||||
modelBuilder.HasAnnotation("ProductVersion", "6.0.1");
|
modelBuilder
|
||||||
|
.HasAnnotation("ProductVersion", "6.0.1")
|
||||||
|
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||||
|
|
||||||
|
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
|
||||||
|
|
||||||
modelBuilder.Entity("TwilioSMSReceiver.Data.Models.MMSModel", b =>
|
modelBuilder.Entity("TwilioSMSReceiver.Data.Models.MMSModel", b =>
|
||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
|
||||||
|
|
||||||
b.Property<string>("OriginalMMSData")
|
b.Property<string>("OriginalMMSData")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<int>("SMSModelId")
|
b.Property<int>("SMSModelId")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
@@ -42,10 +49,12 @@ namespace TwilioSMSReceiver.Data.Migrations
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
|
||||||
|
|
||||||
b.Property<string>("WebHookUri")
|
b.Property<string>("WebHookUri")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
@@ -56,24 +65,26 @@ namespace TwilioSMSReceiver.Data.Migrations
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
|
||||||
|
|
||||||
b.Property<bool>("IsForwardedYet")
|
b.Property<bool>("IsForwardedYet")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bit");
|
||||||
|
|
||||||
b.Property<string>("MessageContents")
|
b.Property<string>("MessageContents")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("ReceivedNumber")
|
b.Property<string>("ReceivedNumber")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("SenderNumber")
|
b.Property<string>("SenderNumber")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<DateTime>("TimeReceived")
|
b.Property<DateTime>("TimeReceived")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
@@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
|||||||
|
|
||||||
namespace TwilioSMSReceiver.Data.Migrations
|
namespace TwilioSMSReceiver.Data.Migrations
|
||||||
{
|
{
|
||||||
public partial class InitialMigrationSQLite : Migration
|
public partial class InitialMigration : Migration
|
||||||
{
|
{
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
{
|
{
|
||||||
@@ -13,9 +13,9 @@ namespace TwilioSMSReceiver.Data.Migrations
|
|||||||
name: "MSTeamsWebHooks",
|
name: "MSTeamsWebHooks",
|
||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
Id = table.Column<int>(type: "int", nullable: false)
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||||||
WebHookUri = table.Column<string>(type: "TEXT", nullable: true)
|
WebHookUri = table.Column<string>(type: "nvarchar(max)", nullable: true)
|
||||||
},
|
},
|
||||||
constraints: table =>
|
constraints: table =>
|
||||||
{
|
{
|
||||||
@@ -26,13 +26,13 @@ namespace TwilioSMSReceiver.Data.Migrations
|
|||||||
name: "SMSMessages",
|
name: "SMSMessages",
|
||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
Id = table.Column<int>(type: "int", nullable: false)
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||||||
ReceivedNumber = table.Column<string>(type: "TEXT", nullable: false),
|
ReceivedNumber = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
SenderNumber = table.Column<string>(type: "TEXT", nullable: false),
|
SenderNumber = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
TimeReceived = table.Column<DateTime>(type: "TEXT", nullable: false),
|
TimeReceived = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
MessageContents = table.Column<string>(type: "TEXT", nullable: true),
|
MessageContents = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
IsForwardedYet = table.Column<bool>(type: "INTEGER", nullable: false)
|
IsForwardedYet = table.Column<bool>(type: "bit", nullable: false)
|
||||||
},
|
},
|
||||||
constraints: table =>
|
constraints: table =>
|
||||||
{
|
{
|
||||||
@@ -43,10 +43,10 @@ namespace TwilioSMSReceiver.Data.Migrations
|
|||||||
name: "MMSMessages",
|
name: "MMSMessages",
|
||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
Id = table.Column<int>(type: "int", nullable: false)
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||||||
SMSModelId = table.Column<int>(type: "INTEGER", nullable: false),
|
SMSModelId = table.Column<int>(type: "int", nullable: false),
|
||||||
OriginalMMSData = table.Column<string>(type: "TEXT", nullable: true)
|
OriginalMMSData = table.Column<string>(type: "nvarchar(max)", nullable: true)
|
||||||
},
|
},
|
||||||
constraints: table =>
|
constraints: table =>
|
||||||
{
|
{
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
|
using Microsoft.EntityFrameworkCore.Metadata;
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
using TwilioSMSReceiver.Data;
|
using TwilioSMSReceiver.Data;
|
||||||
|
|
||||||
@@ -15,19 +16,25 @@ namespace TwilioSMSReceiver.Data.Migrations
|
|||||||
protected override void BuildModel(ModelBuilder modelBuilder)
|
protected override void BuildModel(ModelBuilder modelBuilder)
|
||||||
{
|
{
|
||||||
#pragma warning disable 612, 618
|
#pragma warning disable 612, 618
|
||||||
modelBuilder.HasAnnotation("ProductVersion", "6.0.1");
|
modelBuilder
|
||||||
|
.HasAnnotation("ProductVersion", "6.0.1")
|
||||||
|
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||||
|
|
||||||
|
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
|
||||||
|
|
||||||
modelBuilder.Entity("TwilioSMSReceiver.Data.Models.MMSModel", b =>
|
modelBuilder.Entity("TwilioSMSReceiver.Data.Models.MMSModel", b =>
|
||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
|
||||||
|
|
||||||
b.Property<string>("OriginalMMSData")
|
b.Property<string>("OriginalMMSData")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<int>("SMSModelId")
|
b.Property<int>("SMSModelId")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
@@ -40,10 +47,12 @@ namespace TwilioSMSReceiver.Data.Migrations
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
|
||||||
|
|
||||||
b.Property<string>("WebHookUri")
|
b.Property<string>("WebHookUri")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
@@ -54,24 +63,26 @@ namespace TwilioSMSReceiver.Data.Migrations
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
|
||||||
|
|
||||||
b.Property<bool>("IsForwardedYet")
|
b.Property<bool>("IsForwardedYet")
|
||||||
.HasColumnType("INTEGER");
|
.HasColumnType("bit");
|
||||||
|
|
||||||
b.Property<string>("MessageContents")
|
b.Property<string>("MessageContents")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("ReceivedNumber")
|
b.Property<string>("ReceivedNumber")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("SenderNumber")
|
b.Property<string>("SenderNumber")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<DateTime>("TimeReceived")
|
b.Property<DateTime>("TimeReceived")
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,11 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.1" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.1" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="6.0.1" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="6.0.1" />
|
||||||
|
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.1" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Folder Include="Migrations\" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -15,4 +15,9 @@
|
|||||||
<PackageReference Include="Microsoft.Identity.Web.UI" Version="1.16.0" />
|
<PackageReference Include="Microsoft.Identity.Web.UI" Version="1.16.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\TwilioSMSReceiver.Common\TwilioSMSReceiver.Common.csproj" />
|
||||||
|
<ProjectReference Include="..\TwilioSMSReceiver.Data\TwilioSMSReceiver.Data.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
Reference in New Issue
Block a user