45 lines
1.4 KiB
C#
45 lines
1.4 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
|
|
#nullable disable
|
|
|
|
namespace Demo001.Migrations
|
|
{
|
|
[DbContext(typeof(Demo001.Data.AppDbContext))]
|
|
[Migration("20260514000000_InitialCreate")]
|
|
partial class InitialCreate
|
|
{
|
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
{
|
|
modelBuilder
|
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn)
|
|
.HasAnnotation("ProductVersion", "8.0.0");
|
|
|
|
modelBuilder.Entity("Demo001.Models.TodoItem", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<string>("Description")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<bool>("IsComplete")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<string>("Title")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("TodoItems");
|
|
});
|
|
}
|
|
}
|
|
}
|