This commit is contained in:
maja
2026-10-14 18:25:42 +02:00
9 changed files with 273 additions and 312 deletions

View File

@@ -1,10 +1,9 @@
// <auto-generated />
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using System;
using Web_Jarmark.Data;
#nullable disable
@@ -12,108 +11,37 @@ using Web_Jarmark.Data;
namespace Web_Jarmark.Migrations
{
[DbContext(typeof(ApplicationDbContext))]
[Migration("00000000000000_CreateIdentitySchema")]
partial class CreateIdentitySchema
[Migration("20261014161412_InitialIdentity")]
partial class InitialIdentity
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "10.0.0")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("Web_Jarmark.Data.ApplicationUser", b =>
{
b.Property<string>("Id")
.HasColumnType("nvarchar(450)");
b.Property<int>("AccessFailedCount")
.HasColumnType("int");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnType("nvarchar(max)");
b.Property<string>("Email")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
b.Property<bool>("EmailConfirmed")
.HasColumnType("bit");
b.Property<bool>("LockoutEnabled")
.HasColumnType("bit");
b.Property<DateTimeOffset?>("LockoutEnd")
.HasColumnType("datetimeoffset");
b.Property<string>("NormalizedEmail")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
b.Property<string>("NormalizedUserName")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
b.Property<string>("PasswordHash")
.HasColumnType("nvarchar(max)");
b.Property<string>("PhoneNumber")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
b.Property<bool>("PhoneNumberConfirmed")
.HasColumnType("bit");
b.Property<string>("SecurityStamp")
.HasColumnType("nvarchar(max)");
b.Property<bool>("TwoFactorEnabled")
.HasColumnType("bit");
b.Property<string>("UserName")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
b.HasKey("Id");
b.HasIndex("NormalizedEmail")
.HasDatabaseName("EmailIndex");
b.HasIndex("NormalizedUserName")
.IsUnique()
.HasDatabaseName("UserNameIndex")
.HasFilter("[NormalizedUserName] IS NOT NULL");
b.ToTable("AspNetUsers", (string)null);
});
modelBuilder.HasAnnotation("ProductVersion", "10.0.13");
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
{
b.Property<string>("Id")
.HasColumnType("nvarchar(450)");
.HasColumnType("TEXT");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnType("nvarchar(max)");
.HasColumnType("TEXT");
b.Property<string>("Name")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
.HasColumnType("TEXT");
b.Property<string>("NormalizedName")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("NormalizedName")
.IsUnique()
.HasDatabaseName("RoleNameIndex")
.HasFilter("[NormalizedName] IS NOT NULL");
.HasDatabaseName("RoleNameIndex");
b.ToTable("AspNetRoles", (string)null);
});
@@ -122,19 +50,17 @@ namespace Web_Jarmark.Migrations
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
.HasColumnType("INTEGER");
b.Property<string>("ClaimType")
.HasColumnType("nvarchar(max)");
.HasColumnType("TEXT");
b.Property<string>("ClaimValue")
.HasColumnType("nvarchar(max)");
.HasColumnType("TEXT");
b.Property<string>("RoleId")
.IsRequired()
.HasColumnType("nvarchar(450)");
.HasColumnType("TEXT");
b.HasKey("Id");
@@ -147,19 +73,17 @@ namespace Web_Jarmark.Migrations
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
.HasColumnType("INTEGER");
b.Property<string>("ClaimType")
.HasColumnType("nvarchar(max)");
.HasColumnType("TEXT");
b.Property<string>("ClaimValue")
.HasColumnType("nvarchar(max)");
.HasColumnType("TEXT");
b.Property<string>("UserId")
.IsRequired()
.HasColumnType("nvarchar(450)");
.HasColumnType("TEXT");
b.HasKey("Id");
@@ -172,18 +96,18 @@ namespace Web_Jarmark.Migrations
{
b.Property<string>("LoginProvider")
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
.HasColumnType("TEXT");
b.Property<string>("ProviderKey")
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
.HasColumnType("TEXT");
b.Property<string>("ProviderDisplayName")
.HasColumnType("nvarchar(max)");
.HasColumnType("TEXT");
b.Property<string>("UserId")
.IsRequired()
.HasColumnType("nvarchar(450)");
.HasColumnType("TEXT");
b.HasKey("LoginProvider", "ProviderKey");
@@ -196,11 +120,11 @@ namespace Web_Jarmark.Migrations
{
b.Property<byte[]>("CredentialId")
.HasMaxLength(1024)
.HasColumnType("varbinary(1024)");
.HasColumnType("BLOB");
b.Property<string>("UserId")
.IsRequired()
.HasColumnType("nvarchar(450)");
.HasColumnType("TEXT");
b.HasKey("CredentialId");
@@ -212,10 +136,10 @@ namespace Web_Jarmark.Migrations
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
{
b.Property<string>("UserId")
.HasColumnType("nvarchar(450)");
.HasColumnType("TEXT");
b.Property<string>("RoleId")
.HasColumnType("nvarchar(450)");
.HasColumnType("TEXT");
b.HasKey("UserId", "RoleId");
@@ -227,24 +151,89 @@ namespace Web_Jarmark.Migrations
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
{
b.Property<string>("UserId")
.HasColumnType("nvarchar(450)");
.HasColumnType("TEXT");
b.Property<string>("LoginProvider")
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
.HasColumnType("TEXT");
b.Property<string>("Name")
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
.HasColumnType("TEXT");
b.Property<string>("Value")
.HasColumnType("nvarchar(max)");
.HasColumnType("TEXT");
b.HasKey("UserId", "LoginProvider", "Name");
b.ToTable("AspNetUserTokens", (string)null);
});
modelBuilder.Entity("Web_Jarmark.Data.ApplicationUser", b =>
{
b.Property<string>("Id")
.HasColumnType("TEXT");
b.Property<int>("AccessFailedCount")
.HasColumnType("INTEGER");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnType("TEXT");
b.Property<string>("Email")
.HasMaxLength(256)
.HasColumnType("TEXT");
b.Property<bool>("EmailConfirmed")
.HasColumnType("INTEGER");
b.Property<bool>("LockoutEnabled")
.HasColumnType("INTEGER");
b.Property<DateTimeOffset?>("LockoutEnd")
.HasColumnType("TEXT");
b.Property<string>("NormalizedEmail")
.HasMaxLength(256)
.HasColumnType("TEXT");
b.Property<string>("NormalizedUserName")
.HasMaxLength(256)
.HasColumnType("TEXT");
b.Property<string>("PasswordHash")
.HasColumnType("TEXT");
b.Property<string>("PhoneNumber")
.HasMaxLength(256)
.HasColumnType("TEXT");
b.Property<bool>("PhoneNumberConfirmed")
.HasColumnType("INTEGER");
b.Property<string>("SecurityStamp")
.HasColumnType("TEXT");
b.Property<bool>("TwoFactorEnabled")
.HasColumnType("INTEGER");
b.Property<string>("UserName")
.HasMaxLength(256)
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("NormalizedEmail")
.HasDatabaseName("EmailIndex");
b.HasIndex("NormalizedUserName")
.IsUnique()
.HasDatabaseName("UserNameIndex");
b.ToTable("AspNetUsers", (string)null);
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
{
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
@@ -282,47 +271,38 @@ namespace Web_Jarmark.Migrations
b.OwnsOne("Microsoft.AspNetCore.Identity.IdentityPasskeyData", "Data", b1 =>
{
b1.Property<byte[]>("IdentityUserPasskeyCredentialId")
.HasColumnType("varbinary(1024)");
b1.Property<byte[]>("IdentityUserPasskeyCredentialId");
b1.Property<byte[]>("AttestationObject")
.IsRequired()
.HasColumnType("varbinary(max)");
.IsRequired();
b1.Property<byte[]>("ClientDataJson")
.IsRequired()
.HasColumnType("varbinary(max)");
.IsRequired();
b1.Property<DateTimeOffset>("CreatedAt")
.HasColumnType("datetimeoffset");
b1.Property<DateTimeOffset>("CreatedAt");
b1.Property<bool>("IsBackedUp")
.HasColumnType("bit");
b1.Property<bool>("IsBackedUp");
b1.Property<bool>("IsBackupEligible")
.HasColumnType("bit");
b1.Property<bool>("IsBackupEligible");
b1.Property<bool>("IsUserVerified")
.HasColumnType("bit");
b1.Property<bool>("IsUserVerified");
b1.Property<string>("Name")
.HasColumnType("nvarchar(max)");
b1.Property<string>("Name");
b1.Property<byte[]>("PublicKey")
.IsRequired()
.HasColumnType("varbinary(max)");
.IsRequired();
b1.Property<long>("SignCount")
.HasColumnType("bigint");
b1.Property<uint>("SignCount");
b1.PrimitiveCollection<string>("Transports")
.HasColumnType("nvarchar(max)");
b1.PrimitiveCollection<string>("Transports");
b1.HasKey("IdentityUserPasskeyCredentialId");
b1.ToTable("AspNetUserPasskeys");
b1.ToJson("Data");
b1
.ToJson("Data")
.HasColumnType("TEXT");
b1.WithOwner()
.HasForeignKey("IdentityUserPasskeyCredentialId");

View File

@@ -1,12 +1,12 @@
using Microsoft.EntityFrameworkCore.Migrations;
using System;
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Web_Jarmark.Migrations
{
/// <inheritdoc />
public partial class CreateIdentitySchema : Migration
public partial class InitialIdentity : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
@@ -15,10 +15,10 @@ namespace Web_Jarmark.Migrations
name: "AspNetRoles",
columns: table => new
{
Id = table.Column<string>(type: "nvarchar(450)", nullable: false),
Name = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
NormalizedName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(max)", nullable: true)
Id = table.Column<string>(type: "TEXT", nullable: false),
Name = table.Column<string>(type: "TEXT", maxLength: 256, nullable: true),
NormalizedName = table.Column<string>(type: "TEXT", maxLength: 256, nullable: true),
ConcurrencyStamp = table.Column<string>(type: "TEXT", nullable: true)
},
constraints: table =>
{
@@ -29,21 +29,21 @@ namespace Web_Jarmark.Migrations
name: "AspNetUsers",
columns: table => new
{
Id = table.Column<string>(type: "nvarchar(450)", nullable: false),
UserName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
NormalizedUserName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
Email = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
NormalizedEmail = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
EmailConfirmed = table.Column<bool>(type: "bit", nullable: false),
PasswordHash = table.Column<string>(type: "nvarchar(max)", nullable: true),
SecurityStamp = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(max)", nullable: true),
PhoneNumber = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
PhoneNumberConfirmed = table.Column<bool>(type: "bit", nullable: false),
TwoFactorEnabled = table.Column<bool>(type: "bit", nullable: false),
LockoutEnd = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true),
LockoutEnabled = table.Column<bool>(type: "bit", nullable: false),
AccessFailedCount = table.Column<int>(type: "int", nullable: false)
Id = table.Column<string>(type: "TEXT", nullable: false),
UserName = table.Column<string>(type: "TEXT", maxLength: 256, nullable: true),
NormalizedUserName = table.Column<string>(type: "TEXT", maxLength: 256, nullable: true),
Email = table.Column<string>(type: "TEXT", maxLength: 256, nullable: true),
NormalizedEmail = table.Column<string>(type: "TEXT", maxLength: 256, nullable: true),
EmailConfirmed = table.Column<bool>(type: "INTEGER", nullable: false),
PasswordHash = table.Column<string>(type: "TEXT", nullable: true),
SecurityStamp = table.Column<string>(type: "TEXT", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "TEXT", nullable: true),
PhoneNumber = table.Column<string>(type: "TEXT", maxLength: 256, nullable: true),
PhoneNumberConfirmed = table.Column<bool>(type: "INTEGER", nullable: false),
TwoFactorEnabled = table.Column<bool>(type: "INTEGER", nullable: false),
LockoutEnd = table.Column<DateTimeOffset>(type: "TEXT", nullable: true),
LockoutEnabled = table.Column<bool>(type: "INTEGER", nullable: false),
AccessFailedCount = table.Column<int>(type: "INTEGER", nullable: false)
},
constraints: table =>
{
@@ -54,11 +54,11 @@ namespace Web_Jarmark.Migrations
name: "AspNetRoleClaims",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
RoleId = table.Column<string>(type: "nvarchar(450)", nullable: false),
ClaimType = table.Column<string>(type: "nvarchar(max)", nullable: true),
ClaimValue = table.Column<string>(type: "nvarchar(max)", nullable: true)
Id = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
RoleId = table.Column<string>(type: "TEXT", nullable: false),
ClaimType = table.Column<string>(type: "TEXT", nullable: true),
ClaimValue = table.Column<string>(type: "TEXT", nullable: true)
},
constraints: table =>
{
@@ -75,11 +75,11 @@ namespace Web_Jarmark.Migrations
name: "AspNetUserClaims",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
UserId = table.Column<string>(type: "nvarchar(450)", nullable: false),
ClaimType = table.Column<string>(type: "nvarchar(max)", nullable: true),
ClaimValue = table.Column<string>(type: "nvarchar(max)", nullable: true)
Id = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
UserId = table.Column<string>(type: "TEXT", nullable: false),
ClaimType = table.Column<string>(type: "TEXT", nullable: true),
ClaimValue = table.Column<string>(type: "TEXT", nullable: true)
},
constraints: table =>
{
@@ -96,10 +96,10 @@ namespace Web_Jarmark.Migrations
name: "AspNetUserLogins",
columns: table => new
{
LoginProvider = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
ProviderKey = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
ProviderDisplayName = table.Column<string>(type: "nvarchar(max)", nullable: true),
UserId = table.Column<string>(type: "nvarchar(450)", nullable: false)
LoginProvider = table.Column<string>(type: "TEXT", maxLength: 128, nullable: false),
ProviderKey = table.Column<string>(type: "TEXT", maxLength: 128, nullable: false),
ProviderDisplayName = table.Column<string>(type: "TEXT", nullable: true),
UserId = table.Column<string>(type: "TEXT", nullable: false)
},
constraints: table =>
{
@@ -116,9 +116,9 @@ namespace Web_Jarmark.Migrations
name: "AspNetUserPasskeys",
columns: table => new
{
CredentialId = table.Column<byte[]>(type: "varbinary(1024)", maxLength: 1024, nullable: false),
UserId = table.Column<string>(type: "nvarchar(450)", nullable: false),
Data = table.Column<string>(type: "nvarchar(max)", nullable: false)
CredentialId = table.Column<byte[]>(type: "BLOB", maxLength: 1024, nullable: false),
UserId = table.Column<string>(type: "TEXT", nullable: false),
Data = table.Column<string>(type: "TEXT", nullable: false)
},
constraints: table =>
{
@@ -135,8 +135,8 @@ namespace Web_Jarmark.Migrations
name: "AspNetUserRoles",
columns: table => new
{
UserId = table.Column<string>(type: "nvarchar(450)", nullable: false),
RoleId = table.Column<string>(type: "nvarchar(450)", nullable: false)
UserId = table.Column<string>(type: "TEXT", nullable: false),
RoleId = table.Column<string>(type: "TEXT", nullable: false)
},
constraints: table =>
{
@@ -159,10 +159,10 @@ namespace Web_Jarmark.Migrations
name: "AspNetUserTokens",
columns: table => new
{
UserId = table.Column<string>(type: "nvarchar(450)", nullable: false),
LoginProvider = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
Value = table.Column<string>(type: "nvarchar(max)", nullable: true)
UserId = table.Column<string>(type: "TEXT", nullable: false),
LoginProvider = table.Column<string>(type: "TEXT", maxLength: 128, nullable: false),
Name = table.Column<string>(type: "TEXT", maxLength: 128, nullable: false),
Value = table.Column<string>(type: "TEXT", nullable: true)
},
constraints: table =>
{
@@ -184,8 +184,7 @@ namespace Web_Jarmark.Migrations
name: "RoleNameIndex",
table: "AspNetRoles",
column: "NormalizedName",
unique: true,
filter: "[NormalizedName] IS NOT NULL");
unique: true);
migrationBuilder.CreateIndex(
name: "IX_AspNetUserClaims_UserId",
@@ -216,8 +215,7 @@ namespace Web_Jarmark.Migrations
name: "UserNameIndex",
table: "AspNetUsers",
column: "NormalizedUserName",
unique: true,
filter: "[NormalizedUserName] IS NOT NULL");
unique: true);
}
/// <inheritdoc />

View File

@@ -1,9 +1,8 @@
// <auto-generated />
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using System;
using Web_Jarmark.Data;
#nullable disable
@@ -16,101 +15,30 @@ namespace Web_Jarmark.Migrations
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "10.0.0")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("Web_Jarmark.Data.ApplicationUser", b =>
{
b.Property<string>("Id")
.HasColumnType("nvarchar(450)");
b.Property<int>("AccessFailedCount")
.HasColumnType("int");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnType("nvarchar(max)");
b.Property<string>("Email")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
b.Property<bool>("EmailConfirmed")
.HasColumnType("bit");
b.Property<bool>("LockoutEnabled")
.HasColumnType("bit");
b.Property<DateTimeOffset?>("LockoutEnd")
.HasColumnType("datetimeoffset");
b.Property<string>("NormalizedEmail")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
b.Property<string>("NormalizedUserName")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
b.Property<string>("PasswordHash")
.HasColumnType("nvarchar(max)");
b.Property<string>("PhoneNumber")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
b.Property<bool>("PhoneNumberConfirmed")
.HasColumnType("bit");
b.Property<string>("SecurityStamp")
.HasColumnType("nvarchar(max)");
b.Property<bool>("TwoFactorEnabled")
.HasColumnType("bit");
b.Property<string>("UserName")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
b.HasKey("Id");
b.HasIndex("NormalizedEmail")
.HasDatabaseName("EmailIndex");
b.HasIndex("NormalizedUserName")
.IsUnique()
.HasDatabaseName("UserNameIndex")
.HasFilter("[NormalizedUserName] IS NOT NULL");
b.ToTable("AspNetUsers", (string)null);
});
modelBuilder.HasAnnotation("ProductVersion", "10.0.13");
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
{
b.Property<string>("Id")
.HasColumnType("nvarchar(450)");
.HasColumnType("TEXT");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnType("nvarchar(max)");
.HasColumnType("TEXT");
b.Property<string>("Name")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
.HasColumnType("TEXT");
b.Property<string>("NormalizedName")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("NormalizedName")
.IsUnique()
.HasDatabaseName("RoleNameIndex")
.HasFilter("[NormalizedName] IS NOT NULL");
.HasDatabaseName("RoleNameIndex");
b.ToTable("AspNetRoles", (string)null);
});
@@ -119,19 +47,17 @@ namespace Web_Jarmark.Migrations
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
.HasColumnType("INTEGER");
b.Property<string>("ClaimType")
.HasColumnType("nvarchar(max)");
.HasColumnType("TEXT");
b.Property<string>("ClaimValue")
.HasColumnType("nvarchar(max)");
.HasColumnType("TEXT");
b.Property<string>("RoleId")
.IsRequired()
.HasColumnType("nvarchar(450)");
.HasColumnType("TEXT");
b.HasKey("Id");
@@ -144,19 +70,17 @@ namespace Web_Jarmark.Migrations
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
.HasColumnType("INTEGER");
b.Property<string>("ClaimType")
.HasColumnType("nvarchar(max)");
.HasColumnType("TEXT");
b.Property<string>("ClaimValue")
.HasColumnType("nvarchar(max)");
.HasColumnType("TEXT");
b.Property<string>("UserId")
.IsRequired()
.HasColumnType("nvarchar(450)");
.HasColumnType("TEXT");
b.HasKey("Id");
@@ -169,18 +93,18 @@ namespace Web_Jarmark.Migrations
{
b.Property<string>("LoginProvider")
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
.HasColumnType("TEXT");
b.Property<string>("ProviderKey")
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
.HasColumnType("TEXT");
b.Property<string>("ProviderDisplayName")
.HasColumnType("nvarchar(max)");
.HasColumnType("TEXT");
b.Property<string>("UserId")
.IsRequired()
.HasColumnType("nvarchar(450)");
.HasColumnType("TEXT");
b.HasKey("LoginProvider", "ProviderKey");
@@ -193,11 +117,11 @@ namespace Web_Jarmark.Migrations
{
b.Property<byte[]>("CredentialId")
.HasMaxLength(1024)
.HasColumnType("varbinary(1024)");
.HasColumnType("BLOB");
b.Property<string>("UserId")
.IsRequired()
.HasColumnType("nvarchar(450)");
.HasColumnType("TEXT");
b.HasKey("CredentialId");
@@ -209,10 +133,10 @@ namespace Web_Jarmark.Migrations
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
{
b.Property<string>("UserId")
.HasColumnType("nvarchar(450)");
.HasColumnType("TEXT");
b.Property<string>("RoleId")
.HasColumnType("nvarchar(450)");
.HasColumnType("TEXT");
b.HasKey("UserId", "RoleId");
@@ -224,24 +148,89 @@ namespace Web_Jarmark.Migrations
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
{
b.Property<string>("UserId")
.HasColumnType("nvarchar(450)");
.HasColumnType("TEXT");
b.Property<string>("LoginProvider")
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
.HasColumnType("TEXT");
b.Property<string>("Name")
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
.HasColumnType("TEXT");
b.Property<string>("Value")
.HasColumnType("nvarchar(max)");
.HasColumnType("TEXT");
b.HasKey("UserId", "LoginProvider", "Name");
b.ToTable("AspNetUserTokens", (string)null);
});
modelBuilder.Entity("Web_Jarmark.Data.ApplicationUser", b =>
{
b.Property<string>("Id")
.HasColumnType("TEXT");
b.Property<int>("AccessFailedCount")
.HasColumnType("INTEGER");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnType("TEXT");
b.Property<string>("Email")
.HasMaxLength(256)
.HasColumnType("TEXT");
b.Property<bool>("EmailConfirmed")
.HasColumnType("INTEGER");
b.Property<bool>("LockoutEnabled")
.HasColumnType("INTEGER");
b.Property<DateTimeOffset?>("LockoutEnd")
.HasColumnType("TEXT");
b.Property<string>("NormalizedEmail")
.HasMaxLength(256)
.HasColumnType("TEXT");
b.Property<string>("NormalizedUserName")
.HasMaxLength(256)
.HasColumnType("TEXT");
b.Property<string>("PasswordHash")
.HasColumnType("TEXT");
b.Property<string>("PhoneNumber")
.HasMaxLength(256)
.HasColumnType("TEXT");
b.Property<bool>("PhoneNumberConfirmed")
.HasColumnType("INTEGER");
b.Property<string>("SecurityStamp")
.HasColumnType("TEXT");
b.Property<bool>("TwoFactorEnabled")
.HasColumnType("INTEGER");
b.Property<string>("UserName")
.HasMaxLength(256)
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("NormalizedEmail")
.HasDatabaseName("EmailIndex");
b.HasIndex("NormalizedUserName")
.IsUnique()
.HasDatabaseName("UserNameIndex");
b.ToTable("AspNetUsers", (string)null);
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
{
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
@@ -279,47 +268,38 @@ namespace Web_Jarmark.Migrations
b.OwnsOne("Microsoft.AspNetCore.Identity.IdentityPasskeyData", "Data", b1 =>
{
b1.Property<byte[]>("IdentityUserPasskeyCredentialId")
.HasColumnType("varbinary(1024)");
b1.Property<byte[]>("IdentityUserPasskeyCredentialId");
b1.Property<byte[]>("AttestationObject")
.IsRequired()
.HasColumnType("varbinary(max)");
.IsRequired();
b1.Property<byte[]>("ClientDataJson")
.IsRequired()
.HasColumnType("varbinary(max)");
.IsRequired();
b1.Property<DateTimeOffset>("CreatedAt")
.HasColumnType("datetimeoffset");
b1.Property<DateTimeOffset>("CreatedAt");
b1.Property<bool>("IsBackedUp")
.HasColumnType("bit");
b1.Property<bool>("IsBackedUp");
b1.Property<bool>("IsBackupEligible")
.HasColumnType("bit");
b1.Property<bool>("IsBackupEligible");
b1.Property<bool>("IsUserVerified")
.HasColumnType("bit");
b1.Property<bool>("IsUserVerified");
b1.Property<string>("Name")
.HasColumnType("nvarchar(max)");
b1.Property<string>("Name");
b1.Property<byte[]>("PublicKey")
.IsRequired()
.HasColumnType("varbinary(max)");
.IsRequired();
b1.Property<long>("SignCount")
.HasColumnType("bigint");
b1.Property<uint>("SignCount");
b1.PrimitiveCollection<string>("Transports")
.HasColumnType("nvarchar(max)");
b1.PrimitiveCollection<string>("Transports");
b1.HasKey("IdentityUserPasskeyCredentialId");
b1.ToTable("AspNetUserPasskeys");
b1.ToJson("Data");
b1
.ToJson("Data")
.HasColumnType("TEXT");
b1.WithOwner()
.HasForeignKey("IdentityUserPasskeyCredentialId");

View File

@@ -24,7 +24,7 @@ builder.Services.AddAuthentication(options =>
var connectionString = builder.Configuration.GetConnectionString("DefaultConnection") ?? throw new InvalidOperationException("Connection string 'DefaultConnection' not found.");
builder.Services.AddDbContext<ApplicationDbContext>(options =>
options.UseSqlServer(connectionString));
options.UseSqlite(connectionString));
builder.Services.AddDatabaseDeveloperPageExceptionFilter();
builder.Services.AddIdentityCore<ApplicationUser>(options =>

View File

@@ -11,11 +11,14 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="10.0.12" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="10.0.12" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="10.0.12" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.12" PrivateAssets="all" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="10.0.12" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="10.0.13" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="10.0.13" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="10.0.13" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.13" PrivateAssets="all" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="10.0.13">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>

View File

@@ -1,6 +1,6 @@
{
"ConnectionStrings": {
"DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=aspnet-Web_Jarmark-55b8bf19-aa16-438e-aa20-26e3a86f98ae;Trusted_Connection=True;MultipleActiveResultSets=true"
"DefaultConnection": "Data Source=jarmark.db"
},
"Logging": {
"LogLevel": {

Binary file not shown.

Binary file not shown.

Binary file not shown.