// using System; using BudgetApp.Storage; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; #nullable disable namespace BudgetApp.Storage.Migrations { [DbContext(typeof(BudgetContext))] [Migration("20260301000000_AddUpdateStatusSingleton")] partial class AddUpdateStatusSingleton { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "8.0.10") .HasAnnotation("Relational:MaxIdentifierLength", 64); MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); modelBuilder.Entity("BudgetApp.Storage.Transaction", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("Amount") .HasColumnType("decimal(65,30)"); b.Property("Balance") .HasColumnType("decimal(65,30)"); b.Property("Category") .IsRequired() .HasColumnType("longtext"); b.Property("Created") .HasColumnType("datetime(6)"); b.Property("Date") .HasColumnType("date"); b.Property("Deleted") .HasColumnType("datetime(6)"); b.Property("Note") .IsRequired() .HasColumnType("longtext"); b.Property("OperationDescription") .IsRequired() .HasColumnType("longtext"); b.Property("TransactionId") .IsRequired() .HasColumnType("longtext"); b.Property("Updated") .HasColumnType("datetime(6)"); b.HasKey("Id"); b.ToTable("Transactions"); }); modelBuilder.Entity("BudgetApp.Storage.UpdateStatus", b => { b.Property("Id") .HasColumnType("int"); b.Property("Created") .HasColumnType("datetime(6)"); b.Property("Deleted") .HasColumnType("datetime(6)"); b.Property("State") .HasColumnType("int"); b.Property("Updated") .HasColumnType("datetime(6)"); b.HasKey("Id"); b.ToTable("UpdateStatus", t => { t.HasCheckConstraint("CK_UpdateStatus_SingletonId", "`Id` = 1"); }); b.HasData( new { Id = 1, Created = new DateTime(2026, 1, 1, 0, 0, 0, DateTimeKind.Utc), Deleted = (DateTime?)null, State = 1, Updated = new DateTime(2026, 1, 1, 0, 0, 0, DateTimeKind.Utc) }); }); #pragma warning restore 612, 618 } } }