// using System; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Start.Server.Data; namespace Start.Server.Data.Migrations { [DbContext(typeof(ApplicationDbContext))] [Migration("20211112204617_AddBookmarks")] partial class AddBookmarks { protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "5.0.11"); modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.DeviceFlowCodes", b => { b.Property("UserCode") .HasMaxLength(200) .HasColumnType("TEXT"); b.Property("ClientId") .IsRequired() .HasMaxLength(200) .HasColumnType("TEXT"); b.Property("CreationTime") .HasColumnType("TEXT"); b.Property("Data") .IsRequired() .HasMaxLength(50000) .HasColumnType("TEXT"); b.Property("Description") .HasMaxLength(200) .HasColumnType("TEXT"); b.Property("DeviceCode") .IsRequired() .HasMaxLength(200) .HasColumnType("TEXT"); b.Property("Expiration") .IsRequired() .HasColumnType("TEXT"); b.Property("SessionId") .HasMaxLength(100) .HasColumnType("TEXT"); b.Property("SubjectId") .HasMaxLength(200) .HasColumnType("TEXT"); b.HasKey("UserCode"); b.HasIndex("DeviceCode") .IsUnique(); b.HasIndex("Expiration"); b.ToTable("DeviceCodes"); }); modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.PersistedGrant", b => { b.Property("Key") .HasMaxLength(200) .HasColumnType("TEXT"); b.Property("ClientId") .IsRequired() .HasMaxLength(200) .HasColumnType("TEXT"); b.Property("ConsumedTime") .HasColumnType("TEXT"); b.Property("CreationTime") .HasColumnType("TEXT"); b.Property("Data") .IsRequired() .HasMaxLength(50000) .HasColumnType("TEXT"); b.Property("Description") .HasMaxLength(200) .HasColumnType("TEXT"); b.Property("Expiration") .HasColumnType("TEXT"); b.Property("SessionId") .HasMaxLength(100) .HasColumnType("TEXT"); b.Property("SubjectId") .HasMaxLength(200) .HasColumnType("TEXT"); b.Property("Type") .IsRequired() .HasMaxLength(50) .HasColumnType("TEXT"); b.HasKey("Key"); b.HasIndex("Expiration"); b.HasIndex("SubjectId", "ClientId", "Type"); b.HasIndex("SubjectId", "SessionId", "Type"); b.ToTable("PersistedGrants"); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => { b.Property("Id") .HasColumnType("TEXT"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasColumnType("TEXT"); b.Property("Name") .HasMaxLength(256) .HasColumnType("TEXT"); b.Property("NormalizedName") .HasMaxLength(256) .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("NormalizedName") .IsUnique() .HasDatabaseName("RoleNameIndex"); b.ToTable("AspNetRoles"); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("ClaimType") .HasColumnType("TEXT"); b.Property("ClaimValue") .HasColumnType("TEXT"); b.Property("RoleId") .IsRequired() .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("RoleId"); b.ToTable("AspNetRoleClaims"); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("ClaimType") .HasColumnType("TEXT"); b.Property("ClaimValue") .HasColumnType("TEXT"); b.Property("UserId") .IsRequired() .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("UserId"); b.ToTable("AspNetUserClaims"); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => { b.Property("LoginProvider") .HasMaxLength(128) .HasColumnType("TEXT"); b.Property("ProviderKey") .HasMaxLength(128) .HasColumnType("TEXT"); b.Property("ProviderDisplayName") .HasColumnType("TEXT"); b.Property("UserId") .IsRequired() .HasColumnType("TEXT"); b.HasKey("LoginProvider", "ProviderKey"); b.HasIndex("UserId"); b.ToTable("AspNetUserLogins"); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => { b.Property("UserId") .HasColumnType("TEXT"); b.Property("RoleId") .HasColumnType("TEXT"); b.HasKey("UserId", "RoleId"); b.HasIndex("RoleId"); b.ToTable("AspNetUserRoles"); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => { b.Property("UserId") .HasColumnType("TEXT"); b.Property("LoginProvider") .HasMaxLength(128) .HasColumnType("TEXT"); b.Property("Name") .HasMaxLength(128) .HasColumnType("TEXT"); b.Property("Value") .HasColumnType("TEXT"); b.HasKey("UserId", "LoginProvider", "Name"); b.ToTable("AspNetUserTokens"); }); modelBuilder.Entity("Start.Server.Models.ApplicationUser", b => { b.Property("Id") .HasColumnType("TEXT"); b.Property("AccessFailedCount") .HasColumnType("INTEGER"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasColumnType("TEXT"); b.Property("Email") .HasMaxLength(256) .HasColumnType("TEXT"); b.Property("EmailConfirmed") .HasColumnType("INTEGER"); b.Property("LockoutEnabled") .HasColumnType("INTEGER"); b.Property("LockoutEnd") .HasColumnType("TEXT"); b.Property("NormalizedEmail") .HasMaxLength(256) .HasColumnType("TEXT"); b.Property("NormalizedUserName") .HasMaxLength(256) .HasColumnType("TEXT"); b.Property("PasswordHash") .HasColumnType("TEXT"); b.Property("PhoneNumber") .HasColumnType("TEXT"); b.Property("PhoneNumberConfirmed") .HasColumnType("INTEGER"); b.Property("SecurityStamp") .HasColumnType("TEXT"); b.Property("TwoFactorEnabled") .HasColumnType("INTEGER"); b.Property("UserName") .HasMaxLength(256) .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("NormalizedEmail") .HasDatabaseName("EmailIndex"); b.HasIndex("NormalizedUserName") .IsUnique() .HasDatabaseName("UserNameIndex"); b.ToTable("AspNetUsers"); }); modelBuilder.Entity("Start.Server.Models.Bookmark", b => { b.Property("BookmarkId") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("BookmarkGroupId") .HasColumnType("INTEGER"); b.Property("Notes") .HasMaxLength(5000) .HasColumnType("TEXT"); b.Property("Title") .IsRequired() .HasMaxLength(300) .HasColumnType("TEXT"); b.Property("Url") .IsRequired() .HasMaxLength(2000) .HasColumnType("TEXT"); b.HasKey("BookmarkId"); b.HasIndex("BookmarkGroupId"); b.ToTable("Bookmarks"); }); modelBuilder.Entity("Start.Server.Models.BookmarkContainer", b => { b.Property("BookmarkContainerId") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("ApplicationUserId") .IsRequired() .HasColumnType("TEXT"); b.Property("Title") .IsRequired() .HasColumnType("TEXT"); b.HasKey("BookmarkContainerId"); b.HasIndex("ApplicationUserId"); b.ToTable("BookmarkContainers"); }); modelBuilder.Entity("Start.Server.Models.BookmarkGroup", b => { b.Property("BookmarkGroupId") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("BookmarkContainerId") .HasColumnType("INTEGER"); b.Property("Color") .IsRequired() .HasMaxLength(6) .HasColumnType("TEXT"); b.Property("Title") .IsRequired() .HasMaxLength(300) .HasColumnType("TEXT"); b.HasKey("BookmarkGroupId"); b.HasIndex("BookmarkContainerId"); b.ToTable("BookmarkGroups"); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => { b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) .WithMany() .HasForeignKey("RoleId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => { b.HasOne("Start.Server.Models.ApplicationUser", null) .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => { b.HasOne("Start.Server.Models.ApplicationUser", null) .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => { b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) .WithMany() .HasForeignKey("RoleId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("Start.Server.Models.ApplicationUser", null) .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => { b.HasOne("Start.Server.Models.ApplicationUser", null) .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("Start.Server.Models.Bookmark", b => { b.HasOne("Start.Server.Models.BookmarkGroup", "BookmarkGroup") .WithMany("Bookmarks") .HasForeignKey("BookmarkGroupId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("BookmarkGroup"); }); modelBuilder.Entity("Start.Server.Models.BookmarkContainer", b => { b.HasOne("Start.Server.Models.ApplicationUser", "ApplicationUser") .WithMany("BookmarkContainers") .HasForeignKey("ApplicationUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("ApplicationUser"); }); modelBuilder.Entity("Start.Server.Models.BookmarkGroup", b => { b.HasOne("Start.Server.Models.BookmarkContainer", "BookmarkContainer") .WithMany("BookmarkGroups") .HasForeignKey("BookmarkContainerId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("BookmarkContainer"); }); modelBuilder.Entity("Start.Server.Models.ApplicationUser", b => { b.Navigation("BookmarkContainers"); }); modelBuilder.Entity("Start.Server.Models.BookmarkContainer", b => { b.Navigation("BookmarkGroups"); }); modelBuilder.Entity("Start.Server.Models.BookmarkGroup", b => { b.Navigation("Bookmarks"); }); #pragma warning restore 612, 618 } } }