Přepsání na sqlite

This commit is contained in:
Matěj Kubíček
2026-09-17 20:38:45 +02:00
parent 7ba60f0e68
commit 556226b09b
9 changed files with 151 additions and 481 deletions
@@ -3,7 +3,6 @@ using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using StuzkovakWeb.Data;
#nullable disable
@@ -16,28 +15,24 @@ namespace StuzkovakWeb.Migrations
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "10.0.6")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.HasAnnotation("ProductVersion", "10.0.12");
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
{
b.Property<string>("Id")
.HasColumnType("text");
.HasColumnType("TEXT");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnType("text");
.HasColumnType("TEXT");
b.Property<string>("Name")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
.HasColumnType("TEXT");
b.Property<string>("NormalizedName")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
.HasColumnType("TEXT");
b.HasKey("Id");
@@ -52,19 +47,17 @@ namespace StuzkovakWeb.Migrations
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
.HasColumnType("INTEGER");
b.Property<string>("ClaimType")
.HasColumnType("text");
.HasColumnType("TEXT");
b.Property<string>("ClaimValue")
.HasColumnType("text");
.HasColumnType("TEXT");
b.Property<string>("RoleId")
.IsRequired()
.HasColumnType("text");
.HasColumnType("TEXT");
b.HasKey("Id");
@@ -77,19 +70,17 @@ namespace StuzkovakWeb.Migrations
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
.HasColumnType("INTEGER");
b.Property<string>("ClaimType")
.HasColumnType("text");
.HasColumnType("TEXT");
b.Property<string>("ClaimValue")
.HasColumnType("text");
.HasColumnType("TEXT");
b.Property<string>("UserId")
.IsRequired()
.HasColumnType("text");
.HasColumnType("TEXT");
b.HasKey("Id");
@@ -101,17 +92,17 @@ namespace StuzkovakWeb.Migrations
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
{
b.Property<string>("LoginProvider")
.HasColumnType("text");
.HasColumnType("TEXT");
b.Property<string>("ProviderKey")
.HasColumnType("text");
.HasColumnType("TEXT");
b.Property<string>("ProviderDisplayName")
.HasColumnType("text");
.HasColumnType("TEXT");
b.Property<string>("UserId")
.IsRequired()
.HasColumnType("text");
.HasColumnType("TEXT");
b.HasKey("LoginProvider", "ProviderKey");
@@ -123,10 +114,10 @@ namespace StuzkovakWeb.Migrations
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
{
b.Property<string>("UserId")
.HasColumnType("text");
.HasColumnType("TEXT");
b.Property<string>("RoleId")
.HasColumnType("text");
.HasColumnType("TEXT");
b.HasKey("UserId", "RoleId");
@@ -138,16 +129,16 @@ namespace StuzkovakWeb.Migrations
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
{
b.Property<string>("UserId")
.HasColumnType("text");
.HasColumnType("TEXT");
b.Property<string>("LoginProvider")
.HasColumnType("text");
.HasColumnType("TEXT");
b.Property<string>("Name")
.HasColumnType("text");
.HasColumnType("TEXT");
b.Property<string>("Value")
.HasColumnType("text");
.HasColumnType("TEXT");
b.HasKey("UserId", "LoginProvider", "Name");
@@ -158,14 +149,14 @@ namespace StuzkovakWeb.Migrations
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
.HasColumnType("TEXT");
b.Property<bool?>("IsAccepted")
.HasColumnType("boolean");
.HasColumnType("INTEGER");
b.Property<string>("TeacherName")
.IsRequired()
.HasColumnType("text");
.HasColumnType("TEXT");
b.HasKey("Id");
@@ -175,54 +166,54 @@ namespace StuzkovakWeb.Migrations
modelBuilder.Entity("StuzkovakWeb.Entities.UserEntity", b =>
{
b.Property<string>("Id")
.HasColumnType("text");
.HasColumnType("TEXT");
b.Property<int>("AccessFailedCount")
.HasColumnType("integer");
.HasColumnType("INTEGER");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnType("text");
.HasColumnType("TEXT");
b.Property<string>("Email")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
.HasColumnType("TEXT");
b.Property<bool>("EmailConfirmed")
.HasColumnType("boolean");
.HasColumnType("INTEGER");
b.Property<bool>("LockoutEnabled")
.HasColumnType("boolean");
.HasColumnType("INTEGER");
b.Property<DateTimeOffset?>("LockoutEnd")
.HasColumnType("timestamp with time zone");
.HasColumnType("TEXT");
b.Property<string>("NormalizedEmail")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
.HasColumnType("TEXT");
b.Property<string>("NormalizedUserName")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
.HasColumnType("TEXT");
b.Property<string>("PasswordHash")
.HasColumnType("text");
.HasColumnType("TEXT");
b.Property<string>("PhoneNumber")
.HasColumnType("text");
.HasColumnType("TEXT");
b.Property<bool>("PhoneNumberConfirmed")
.HasColumnType("boolean");
.HasColumnType("INTEGER");
b.Property<string>("SecurityStamp")
.HasColumnType("text");
.HasColumnType("TEXT");
b.Property<bool>("TwoFactorEnabled")
.HasColumnType("boolean");
.HasColumnType("INTEGER");
b.Property<string>("UserName")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
.HasColumnType("TEXT");
b.HasKey("Id");