diff --git a/src/Application/Infrastructure/Persistance/Migrations/20231028150009_init.Designer.cs b/src/Application/Infrastructure/Persistance/Migrations/20231028150009_init.Designer.cs
deleted file mode 100644
index f4b9c4f..0000000
--- a/src/Application/Infrastructure/Persistance/Migrations/20231028150009_init.Designer.cs
+++ /dev/null
@@ -1,145 +0,0 @@
-//
-using System;
-using Application.Infrastructure.Persistance;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Metadata;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-
-#nullable disable
-
-namespace Application.Infrastructure.Persistance.Migrations
-{
- [DbContext(typeof(ApplicationDbContext))]
- [Migration("20231028150009_init")]
- partial class init
- {
- ///
- protected override void BuildTargetModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder
- .HasAnnotation("ProductVersion", "7.0.5")
- .HasAnnotation("Relational:MaxIdentifierLength", 128);
-
- SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
-
- modelBuilder.Entity("Application.Domain.Entities.TodoItem", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("Created")
- .HasColumnType("datetime2");
-
- b.Property("CreatedBy")
- .HasColumnType("nvarchar(max)");
-
- b.Property("Done")
- .HasColumnType("bit");
-
- b.Property("LastModified")
- .HasColumnType("datetime2");
-
- b.Property("LastModifiedBy")
- .HasColumnType("nvarchar(max)");
-
- b.Property("Note")
- .HasColumnType("nvarchar(max)");
-
- b.Property("PriorityLevel")
- .HasColumnType("int");
-
- b.Property("Reminder")
- .HasColumnType("datetime2");
-
- b.Property("Title")
- .IsRequired()
- .HasMaxLength(200)
- .HasColumnType("nvarchar(200)");
-
- b.Property("TodoListId")
- .HasColumnType("int");
-
- b.HasKey("Id");
-
- b.HasIndex("TodoListId");
-
- b.ToTable("TodoItems");
- });
-
- modelBuilder.Entity("Application.Domain.Entities.TodoList", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("Created")
- .HasColumnType("datetime2");
-
- b.Property("CreatedBy")
- .HasColumnType("nvarchar(max)");
-
- b.Property("LastModified")
- .HasColumnType("datetime2");
-
- b.Property("LastModifiedBy")
- .HasColumnType("nvarchar(max)");
-
- b.Property("Title")
- .IsRequired()
- .HasMaxLength(200)
- .HasColumnType("nvarchar(200)");
-
- b.HasKey("Id");
-
- b.ToTable("TodoLists");
- });
-
- modelBuilder.Entity("Application.Domain.Entities.TodoItem", b =>
- {
- b.HasOne("Application.Domain.Entities.TodoList", "TodoList")
- .WithMany("Items")
- .HasForeignKey("TodoListId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("TodoList");
- });
-
- modelBuilder.Entity("Application.Domain.Entities.TodoList", b =>
- {
- b.OwnsOne("Application.Domain.ValueObjects.Colour", "Colour", b1 =>
- {
- b1.Property("TodoListId")
- .HasColumnType("int");
-
- b1.Property("Code")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b1.HasKey("TodoListId");
-
- b1.ToTable("TodoLists");
-
- b1.WithOwner()
- .HasForeignKey("TodoListId");
- });
-
- b.Navigation("Colour");
- });
-
- modelBuilder.Entity("Application.Domain.Entities.TodoList", b =>
- {
- b.Navigation("Items");
- });
-#pragma warning restore 612, 618
- }
- }
-}
diff --git a/src/Application/Infrastructure/Persistance/Migrations/20231029190749_SoftDeleteTodoItem.cs b/src/Application/Infrastructure/Persistance/Migrations/20231029190749_SoftDeleteTodoItem.cs
deleted file mode 100644
index 7412b6e..0000000
--- a/src/Application/Infrastructure/Persistance/Migrations/20231029190749_SoftDeleteTodoItem.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-using Microsoft.EntityFrameworkCore.Migrations;
-
-#nullable disable
-
-namespace Application.Infrastructure.Persistance.Migrations
-{
- ///
- public partial class SoftDeleteTodoItem : Migration
- {
- ///
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.AddColumn(
- name: "IsDeleted",
- table: "TodoItems",
- type: "bit",
- nullable: false,
- defaultValue: false);
- }
-
- ///
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropColumn(
- name: "IsDeleted",
- table: "TodoItems");
- }
- }
-}
\ No newline at end of file
diff --git a/src/Application/Infrastructure/Persistance/Migrations/20231029190749_SoftDeleteTodoItem.Designer.cs b/src/Application/Infrastructure/Persistance/Migrations/20231101065756_Init.Designer.cs
similarity index 98%
rename from src/Application/Infrastructure/Persistance/Migrations/20231029190749_SoftDeleteTodoItem.Designer.cs
rename to src/Application/Infrastructure/Persistance/Migrations/20231101065756_Init.Designer.cs
index 3e3dbf1..4436045 100644
--- a/src/Application/Infrastructure/Persistance/Migrations/20231029190749_SoftDeleteTodoItem.Designer.cs
+++ b/src/Application/Infrastructure/Persistance/Migrations/20231101065756_Init.Designer.cs
@@ -12,8 +12,8 @@
namespace Application.Infrastructure.Persistance.Migrations
{
[DbContext(typeof(ApplicationDbContext))]
- [Migration("20231029190749_SoftDeleteTodoItem")]
- partial class SoftDeleteTodoItem
+ [Migration("20231101065756_Init")]
+ partial class Init
{
///
protected override void BuildTargetModel(ModelBuilder modelBuilder)
diff --git a/src/Application/Infrastructure/Persistance/Migrations/20231028150009_init.cs b/src/Application/Infrastructure/Persistance/Migrations/20231101065756_Init.cs
similarity index 90%
rename from src/Application/Infrastructure/Persistance/Migrations/20231028150009_init.cs
rename to src/Application/Infrastructure/Persistance/Migrations/20231101065756_Init.cs
index 6dc454f..5872062 100644
--- a/src/Application/Infrastructure/Persistance/Migrations/20231028150009_init.cs
+++ b/src/Application/Infrastructure/Persistance/Migrations/20231101065756_Init.cs
@@ -1,11 +1,12 @@
-using Microsoft.EntityFrameworkCore.Migrations;
+using System;
+using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Application.Infrastructure.Persistance.Migrations
{
///
- public partial class init : Migration
+ public partial class Init : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
@@ -23,7 +24,10 @@ protected override void Up(MigrationBuilder migrationBuilder)
LastModified = table.Column(type: "datetime2", nullable: true),
LastModifiedBy = table.Column(type: "nvarchar(max)", nullable: true)
},
- constraints: table => table.PrimaryKey("PK_TodoLists", x => x.Id));
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_TodoLists", x => x.Id);
+ });
migrationBuilder.CreateTable(
name: "TodoItems",
@@ -36,6 +40,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
PriorityLevel = table.Column(type: "int", nullable: false),
Done = table.Column(type: "bit", nullable: false),
Reminder = table.Column(type: "datetime2", nullable: true),
+ IsDeleted = table.Column(type: "bit", nullable: false),
TodoListId = table.Column(type: "int", nullable: false),
Created = table.Column(type: "datetime2", nullable: false),
CreatedBy = table.Column(type: "nvarchar(max)", nullable: true),
@@ -69,4 +74,4 @@ protected override void Down(MigrationBuilder migrationBuilder)
name: "TodoLists");
}
}
-}
\ No newline at end of file
+}