From ae05cbb7a9578ce93386e437b57ef186ec05ecab Mon Sep 17 00:00:00 2001 From: VyacheslavDzhus Date: Thu, 4 Mar 2021 10:46:20 +0200 Subject: [PATCH] removed migrations "'init" and "UpdateAndRenameOrganizationToProvider' --- ...ndRenameOrganizationToProvider.Designer.cs | 768 ------------------ ...9_UpdateAndRenameOrganizationToProvider.cs | 147 ---- .../20210303124137_init.Designer.cs | 717 ---------------- .../20210303124137_init.cs | 514 ------------ .../OutOfSchoolDbContextModelSnapshot.cs | 766 ----------------- 5 files changed, 2912 deletions(-) delete mode 100644 OutOfSchool/IdentityServer/Data/Migrations/OutOfSchoolMigrations/20210302182939_UpdateAndRenameOrganizationToProvider.Designer.cs delete mode 100644 OutOfSchool/IdentityServer/Data/Migrations/OutOfSchoolMigrations/20210302182939_UpdateAndRenameOrganizationToProvider.cs delete mode 100644 OutOfSchool/IdentityServer/Data/Migrations/OutOfSchoolMigrations/20210303124137_init.Designer.cs delete mode 100644 OutOfSchool/IdentityServer/Data/Migrations/OutOfSchoolMigrations/20210303124137_init.cs delete mode 100644 OutOfSchool/IdentityServer/Data/Migrations/OutOfSchoolMigrations/OutOfSchoolDbContextModelSnapshot.cs diff --git a/OutOfSchool/IdentityServer/Data/Migrations/OutOfSchoolMigrations/20210302182939_UpdateAndRenameOrganizationToProvider.Designer.cs b/OutOfSchool/IdentityServer/Data/Migrations/OutOfSchoolMigrations/20210302182939_UpdateAndRenameOrganizationToProvider.Designer.cs deleted file mode 100644 index ee8c9c9351..0000000000 --- a/OutOfSchool/IdentityServer/Data/Migrations/OutOfSchoolMigrations/20210302182939_UpdateAndRenameOrganizationToProvider.Designer.cs +++ /dev/null @@ -1,768 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using OutOfSchool.Services; - -namespace OutOfSchool.IdentityServer.Data.Migrations.OutOfSchoolMigrations -{ - [DbContext(typeof(OutOfSchoolDbContext))] - [Migration("20210302182939_UpdateAndRenameOrganizationToProvider")] - partial class UpdateAndRenameOrganizationToProvider - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .UseIdentityColumns() - .HasAnnotation("Relational:MaxIdentifierLength", 128) - .HasAnnotation("ProductVersion", "5.0.2"); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => - { - b.Property("Id") - .HasColumnType("nvarchar(450)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("nvarchar(max)"); - - b.Property("Name") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("NormalizedName") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName") - .IsUnique() - .HasDatabaseName("RoleNameIndex") - .HasFilter("[NormalizedName] IS NOT NULL"); - - b.ToTable("AspNetRoles"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .UseIdentityColumn(); - - b.Property("ClaimType") - .HasColumnType("nvarchar(max)"); - - b.Property("ClaimValue") - .HasColumnType("nvarchar(max)"); - - b.Property("RoleId") - .IsRequired() - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetRoleClaims"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .UseIdentityColumn(); - - b.Property("ClaimType") - .HasColumnType("nvarchar(max)"); - - b.Property("ClaimValue") - .HasColumnType("nvarchar(max)"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserClaims"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.Property("LoginProvider") - .HasColumnType("nvarchar(450)"); - - b.Property("ProviderKey") - .HasColumnType("nvarchar(450)"); - - b.Property("ProviderDisplayName") - .HasColumnType("nvarchar(max)"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("nvarchar(450)"); - - b.HasKey("LoginProvider", "ProviderKey"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserLogins"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("nvarchar(450)"); - - b.Property("RoleId") - .HasColumnType("nvarchar(450)"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetUserRoles"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("nvarchar(450)"); - - b.Property("LoginProvider") - .HasColumnType("nvarchar(450)"); - - b.Property("Name") - .HasColumnType("nvarchar(450)"); - - b.Property("Value") - .HasColumnType("nvarchar(max)"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AspNetUserTokens"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.Address", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .UseIdentityColumn(); - - b.Property("BuildingNumb") - .IsRequired() - .HasMaxLength(15) - .HasColumnType("nvarchar(15)"); - - b.Property("City") - .IsRequired() - .HasMaxLength(15) - .HasColumnType("nvarchar(15)"); - - b.Property("District") - .HasColumnType("nvarchar(max)"); - - b.Property("Latitude") - .HasColumnType("float"); - - b.Property("Longitude") - .HasColumnType("float"); - - b.Property("Region") - .HasColumnType("nvarchar(max)"); - - b.Property("Street") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("nvarchar(30)"); - - b.HasKey("Id"); - - b.ToTable("Address"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.Category", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .UseIdentityColumn(); - - b.Property("Title") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.ToTable("Categories"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.Child", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .UseIdentityColumn(); - - b.Property("DateOfBirth") - .HasColumnType("datetime2"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("Gender") - .HasColumnType("int"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("MiddleName") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("ParentId") - .HasColumnType("bigint"); - - b.Property("SocialGroupId") - .HasColumnType("bigint"); - - b.HasKey("Id"); - - b.HasIndex("ParentId"); - - b.HasIndex("SocialGroupId"); - - b.ToTable("Children"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.Parent", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .UseIdentityColumn(); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("UserId") - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("Parents"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.Provider", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .UseIdentityColumn(); - - b.Property("AddressId") - .HasColumnType("bigint"); - - b.Property("AttachedDocuments") - .HasColumnType("nvarchar(max)"); - - b.Property("AuthorityHolder") - .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("nvarchar(500)"); - - b.Property("Director") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.Property("DirectorBirthDay") - .HasColumnType("datetime2"); - - b.Property("DirectorPhonenumber") - .HasColumnType("nvarchar(max)"); - - b.Property("DirectorPosition") - .HasMaxLength(255) - .HasColumnType("nvarchar(255)"); - - b.Property("EDRPOU") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("Facebook") - .HasMaxLength(30) - .HasColumnType("nvarchar(30)"); - - b.Property("Form") - .HasColumnType("nvarchar(max)"); - - b.Property("INPP") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("Index") - .HasMaxLength(20) - .HasColumnType("nvarchar(20)"); - - b.Property("Instagram") - .HasMaxLength(30) - .HasColumnType("nvarchar(30)"); - - b.Property("KOATUU") - .HasColumnType("nvarchar(max)"); - - b.Property("MFO") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("ManagerialBody") - .HasColumnType("nvarchar(max)"); - - b.Property("Ownership") - .HasColumnType("int"); - - b.Property("Profile") - .HasColumnType("int"); - - b.Property("ShortTitle") - .IsRequired() - .HasMaxLength(60) - .HasColumnType("nvarchar(60)"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(60) - .HasColumnType("nvarchar(60)"); - - b.Property("Type") - .HasColumnType("int"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("nvarchar(450)"); - - b.Property("Website") - .HasMaxLength(30) - .HasColumnType("nvarchar(30)"); - - b.Property("isSubmitPZ_1") - .HasColumnType("bit"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("Providers"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.SocialGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .UseIdentityColumn(); - - b.Property("Name") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.ToTable("SocialGroup"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.Subcategory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .UseIdentityColumn(); - - b.Property("CategoryId") - .HasColumnType("bigint"); - - b.Property("Title") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("CategoryId"); - - b.ToTable("Subcategories"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.Teacher", b => - { - b.Property("TeacherId") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .UseIdentityColumn(); - - b.Property("BirthDay") - .HasColumnType("datetime2"); - - b.Property("Description") - .HasMaxLength(300) - .HasColumnType("nvarchar(300)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("nvarchar(30)"); - - b.Property("Image") - .HasColumnType("nvarchar(max)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("nvarchar(30)"); - - b.Property("MiddleName") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("nvarchar(30)"); - - b.Property("WorkshopId") - .HasColumnType("bigint"); - - b.HasKey("TeacherId"); - - b.HasIndex("WorkshopId"); - - b.ToTable("Teachers"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.User", b => - { - b.Property("Id") - .HasColumnType("nvarchar(450)"); - - b.Property("AccessFailedCount") - .HasColumnType("int"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("nvarchar(max)"); - - b.Property("CreatingTime") - .HasColumnType("datetime2"); - - b.Property("Email") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("EmailConfirmed") - .HasColumnType("bit"); - - b.Property("LastLogin") - .HasColumnType("datetime2"); - - b.Property("LockoutEnabled") - .HasColumnType("bit"); - - b.Property("LockoutEnd") - .HasColumnType("datetimeoffset"); - - b.Property("NormalizedEmail") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("NormalizedUserName") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("PasswordHash") - .HasColumnType("nvarchar(max)"); - - b.Property("PhoneNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("PhoneNumberConfirmed") - .HasColumnType("bit"); - - b.Property("SecurityStamp") - .HasColumnType("nvarchar(max)"); - - b.Property("TwoFactorEnabled") - .HasColumnType("bit"); - - b.Property("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"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.Workshop", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .UseIdentityColumn(); - - b.Property("AddressId") - .HasColumnType("bigint"); - - b.Property("CategoryId") - .HasColumnType("bigint"); - - b.Property("DaysPerWeek") - .HasColumnType("int"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("nvarchar(500)"); - - b.Property("DisabilityOptionsDesc") - .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); - - b.Property("Email") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("Facebook") - .HasMaxLength(30) - .HasColumnType("nvarchar(30)"); - - b.Property("Head") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.Property("HeadBirthDate") - .HasColumnType("datetime2"); - - b.Property("Image") - .HasColumnType("nvarchar(max)"); - - b.Property("Instagram") - .HasMaxLength(30) - .HasColumnType("nvarchar(30)"); - - b.Property("MaxAge") - .HasColumnType("int"); - - b.Property("MinAge") - .HasColumnType("int"); - - b.Property("Phone") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("Price") - .HasColumnType("decimal(18,2)"); - - b.Property("ProviderId") - .HasColumnType("bigint"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(60) - .HasColumnType("nvarchar(60)"); - - b.Property("Website") - .HasColumnType("nvarchar(max)"); - - b.Property("WithDisabilityOptions") - .HasColumnType("bit"); - - b.HasKey("Id"); - - b.HasIndex("AddressId"); - - b.HasIndex("CategoryId"); - - b.HasIndex("ProviderId"); - - b.ToTable("Workshops"); - }); - - 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("OutOfSchool.Services.Models.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.HasOne("OutOfSchool.Services.Models.User", 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("OutOfSchool.Services.Models.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.HasOne("OutOfSchool.Services.Models.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.Child", b => - { - b.HasOne("OutOfSchool.Services.Models.Parent", "Parent") - .WithMany("Children") - .HasForeignKey("ParentId"); - - b.HasOne("OutOfSchool.Services.Models.SocialGroup", "SocialGroup") - .WithMany("Children") - .HasForeignKey("SocialGroupId"); - - b.Navigation("Parent"); - - b.Navigation("SocialGroup"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.Parent", b => - { - b.HasOne("OutOfSchool.Services.Models.User", "User") - .WithMany() - .HasForeignKey("UserId"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.Provider", b => - { - b.HasOne("OutOfSchool.Services.Models.User", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("User"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.Subcategory", b => - { - b.HasOne("OutOfSchool.Services.Models.Category", "Category") - .WithMany("Subcategories") - .HasForeignKey("CategoryId"); - - b.Navigation("Category"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.Teacher", b => - { - b.HasOne("OutOfSchool.Services.Models.Workshop", "Workshop") - .WithMany("Teachers") - .HasForeignKey("WorkshopId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Workshop"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.Workshop", b => - { - b.HasOne("OutOfSchool.Services.Models.Address", "Address") - .WithMany() - .HasForeignKey("AddressId"); - - b.HasOne("OutOfSchool.Services.Models.Category", "Category") - .WithMany() - .HasForeignKey("CategoryId"); - - b.HasOne("OutOfSchool.Services.Models.Provider", "Provider") - .WithMany("Workshops") - .HasForeignKey("ProviderId"); - - b.Navigation("Address"); - - b.Navigation("Category"); - - b.Navigation("Provider"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.Category", b => - { - b.Navigation("Subcategories"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.Parent", b => - { - b.Navigation("Children"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.Provider", b => - { - b.Navigation("Workshops"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.SocialGroup", b => - { - b.Navigation("Children"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.Workshop", b => - { - b.Navigation("Teachers"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/OutOfSchool/IdentityServer/Data/Migrations/OutOfSchoolMigrations/20210302182939_UpdateAndRenameOrganizationToProvider.cs b/OutOfSchool/IdentityServer/Data/Migrations/OutOfSchoolMigrations/20210302182939_UpdateAndRenameOrganizationToProvider.cs deleted file mode 100644 index 78525ab3e2..0000000000 --- a/OutOfSchool/IdentityServer/Data/Migrations/OutOfSchoolMigrations/20210302182939_UpdateAndRenameOrganizationToProvider.cs +++ /dev/null @@ -1,147 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -namespace OutOfSchool.IdentityServer.Data.Migrations.OutOfSchoolMigrations -{ - public partial class UpdateAndRenameOrganizationToProvider : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropForeignKey( - name: "FK_Workshops_Organizations_OrganizationId", - table: "Workshops"); - - migrationBuilder.DropTable( - name: "Organizations"); - - migrationBuilder.RenameColumn( - name: "OrganizationId", - table: "Workshops", - newName: "ProviderId"); - - migrationBuilder.RenameIndex( - name: "IX_Workshops_OrganizationId", - table: "Workshops", - newName: "IX_Workshops_ProviderId"); - - migrationBuilder.CreateTable( - name: "Providers", - columns: table => new - { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - Title = table.Column(type: "nvarchar(60)", maxLength: 60, nullable: false), - ShortTitle = table.Column(type: "nvarchar(60)", maxLength: 60, nullable: false), - Website = table.Column(type: "nvarchar(30)", maxLength: 30, nullable: true), - Facebook = table.Column(type: "nvarchar(30)", maxLength: 30, nullable: true), - Instagram = table.Column(type: "nvarchar(30)", maxLength: 30, nullable: true), - Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: false), - MFO = table.Column(type: "nvarchar(max)", nullable: false), - EDRPOU = table.Column(type: "nvarchar(max)", nullable: false), - KOATUU = table.Column(type: "nvarchar(max)", nullable: true), - INPP = table.Column(type: "nvarchar(max)", nullable: false), - Director = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), - DirectorPosition = table.Column(type: "nvarchar(255)", maxLength: 255, nullable: true), - AuthorityHolder = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - DirectorBirthDay = table.Column(type: "datetime2", nullable: false), - DirectorPhonenumber = table.Column(type: "nvarchar(max)", nullable: true), - ManagerialBody = table.Column(type: "nvarchar(max)", nullable: true), - Ownership = table.Column(type: "int", nullable: false), - Type = table.Column(type: "int", nullable: false), - Form = table.Column(type: "nvarchar(max)", nullable: true), - Profile = table.Column(type: "int", nullable: false), - Index = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), - isSubmitPZ_1 = table.Column(type: "bit", nullable: false), - AttachedDocuments = table.Column(type: "nvarchar(max)", nullable: true), - AddressId = table.Column(type: "bigint", nullable: false), - UserId = table.Column(type: "nvarchar(450)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Providers", x => x.Id); - table.ForeignKey( - name: "FK_Providers_AspNetUsers_UserId", - column: x => x.UserId, - principalTable: "AspNetUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateIndex( - name: "IX_Providers_UserId", - table: "Providers", - column: "UserId"); - - migrationBuilder.AddForeignKey( - name: "FK_Workshops_Providers_ProviderId", - table: "Workshops", - column: "ProviderId", - principalTable: "Providers", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropForeignKey( - name: "FK_Workshops_Providers_ProviderId", - table: "Workshops"); - - migrationBuilder.DropTable( - name: "Providers"); - - migrationBuilder.RenameColumn( - name: "ProviderId", - table: "Workshops", - newName: "OrganizationId"); - - migrationBuilder.RenameIndex( - name: "IX_Workshops_ProviderId", - table: "Workshops", - newName: "IX_Workshops_OrganizationId"); - - migrationBuilder.CreateTable( - name: "Organizations", - columns: table => new - { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - Description = table.Column(type: "nvarchar(750)", maxLength: 750, nullable: false), - EDRPOU = table.Column(type: "nvarchar(max)", nullable: false), - Facebook = table.Column(type: "nvarchar(max)", nullable: true), - INPP = table.Column(type: "nvarchar(max)", nullable: false), - Image = table.Column(type: "nvarchar(max)", nullable: true), - Instagram = table.Column(type: "nvarchar(max)", nullable: true), - MFO = table.Column(type: "nvarchar(max)", nullable: false), - Phone = table.Column(type: "nvarchar(max)", nullable: false), - Title = table.Column(type: "nvarchar(max)", nullable: false), - Type = table.Column(type: "int", nullable: false), - UserId = table.Column(type: "nvarchar(450)", nullable: true), - Website = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Organizations", x => x.Id); - table.ForeignKey( - name: "FK_Organizations_AspNetUsers_UserId", - column: x => x.UserId, - principalTable: "AspNetUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateIndex( - name: "IX_Organizations_UserId", - table: "Organizations", - column: "UserId"); - - migrationBuilder.AddForeignKey( - name: "FK_Workshops_Organizations_OrganizationId", - table: "Workshops", - column: "OrganizationId", - principalTable: "Organizations", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - } - } -} diff --git a/OutOfSchool/IdentityServer/Data/Migrations/OutOfSchoolMigrations/20210303124137_init.Designer.cs b/OutOfSchool/IdentityServer/Data/Migrations/OutOfSchoolMigrations/20210303124137_init.Designer.cs deleted file mode 100644 index 787f6ea3c0..0000000000 --- a/OutOfSchool/IdentityServer/Data/Migrations/OutOfSchoolMigrations/20210303124137_init.Designer.cs +++ /dev/null @@ -1,717 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using OutOfSchool.Services; - -namespace OutOfSchool.IdentityServer.Data.Migrations.OutOfSchoolMigrations -{ - [DbContext(typeof(OutOfSchoolDbContext))] - [Migration("20210303124137_init")] - partial class init - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .UseIdentityColumns() - .HasAnnotation("Relational:MaxIdentifierLength", 128) - .HasAnnotation("ProductVersion", "5.0.2"); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => - { - b.Property("Id") - .HasColumnType("nvarchar(450)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("nvarchar(max)"); - - b.Property("Name") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("NormalizedName") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName") - .IsUnique() - .HasDatabaseName("RoleNameIndex") - .HasFilter("[NormalizedName] IS NOT NULL"); - - b.ToTable("AspNetRoles"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .UseIdentityColumn(); - - b.Property("ClaimType") - .HasColumnType("nvarchar(max)"); - - b.Property("ClaimValue") - .HasColumnType("nvarchar(max)"); - - b.Property("RoleId") - .IsRequired() - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetRoleClaims"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .UseIdentityColumn(); - - b.Property("ClaimType") - .HasColumnType("nvarchar(max)"); - - b.Property("ClaimValue") - .HasColumnType("nvarchar(max)"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserClaims"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.Property("LoginProvider") - .HasColumnType("nvarchar(450)"); - - b.Property("ProviderKey") - .HasColumnType("nvarchar(450)"); - - b.Property("ProviderDisplayName") - .HasColumnType("nvarchar(max)"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("nvarchar(450)"); - - b.HasKey("LoginProvider", "ProviderKey"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserLogins"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("nvarchar(450)"); - - b.Property("RoleId") - .HasColumnType("nvarchar(450)"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetUserRoles"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("nvarchar(450)"); - - b.Property("LoginProvider") - .HasColumnType("nvarchar(450)"); - - b.Property("Name") - .HasColumnType("nvarchar(450)"); - - b.Property("Value") - .HasColumnType("nvarchar(max)"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AspNetUserTokens"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.Address", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .UseIdentityColumn(); - - b.Property("BuildingNumb") - .IsRequired() - .HasMaxLength(15) - .HasColumnType("nvarchar(15)"); - - b.Property("City") - .IsRequired() - .HasMaxLength(15) - .HasColumnType("nvarchar(15)"); - - b.Property("District") - .HasColumnType("nvarchar(max)"); - - b.Property("Latitude") - .HasColumnType("float"); - - b.Property("Longitude") - .HasColumnType("float"); - - b.Property("Region") - .HasColumnType("nvarchar(max)"); - - b.Property("Street") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("nvarchar(30)"); - - b.HasKey("Id"); - - b.ToTable("Address"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.Category", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .UseIdentityColumn(); - - b.Property("Title") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.ToTable("Categories"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.Child", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .UseIdentityColumn(); - - b.Property("DateOfBirth") - .HasColumnType("datetime2"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("Gender") - .HasColumnType("int"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("MiddleName") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("ParentId") - .HasColumnType("bigint"); - - b.Property("SocialGroupId") - .HasColumnType("bigint"); - - b.HasKey("Id"); - - b.HasIndex("ParentId"); - - b.HasIndex("SocialGroupId"); - - b.ToTable("Children"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.Organization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .UseIdentityColumn(); - - b.Property("Description") - .IsRequired() - .HasMaxLength(750) - .HasColumnType("nvarchar(750)"); - - b.Property("EDRPOU") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("Facebook") - .HasColumnType("nvarchar(max)"); - - b.Property("INPP") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("Image") - .HasColumnType("nvarchar(max)"); - - b.Property("Instagram") - .HasColumnType("nvarchar(max)"); - - b.Property("MFO") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("Phone") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("Title") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("Type") - .HasColumnType("int"); - - b.Property("UserId") - .HasColumnType("nvarchar(450)"); - - b.Property("Website") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("Organizations"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.Parent", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .UseIdentityColumn(); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("UserId") - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("Parents"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.SocialGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .UseIdentityColumn(); - - b.Property("Name") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.ToTable("SocialGroup"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.Subcategory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .UseIdentityColumn(); - - b.Property("CategoryId") - .HasColumnType("bigint"); - - b.Property("Title") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("CategoryId"); - - b.ToTable("Subcategories"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.Teacher", b => - { - b.Property("TeacherId") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .UseIdentityColumn(); - - b.Property("BirthDay") - .HasColumnType("datetime2"); - - b.Property("Description") - .HasMaxLength(300) - .HasColumnType("nvarchar(300)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("nvarchar(30)"); - - b.Property("Image") - .HasColumnType("nvarchar(max)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("nvarchar(30)"); - - b.Property("MiddleName") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("nvarchar(30)"); - - b.Property("WorkshopId") - .HasColumnType("bigint"); - - b.HasKey("TeacherId"); - - b.HasIndex("WorkshopId"); - - b.ToTable("Teachers"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.User", b => - { - b.Property("Id") - .HasColumnType("nvarchar(450)"); - - b.Property("AccessFailedCount") - .HasColumnType("int"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("nvarchar(max)"); - - b.Property("CreatingTime") - .HasColumnType("datetime2"); - - b.Property("Email") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("EmailConfirmed") - .HasColumnType("bit"); - - b.Property("LastLogin") - .HasColumnType("datetime2"); - - b.Property("LockoutEnabled") - .HasColumnType("bit"); - - b.Property("LockoutEnd") - .HasColumnType("datetimeoffset"); - - b.Property("NormalizedEmail") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("NormalizedUserName") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("PasswordHash") - .HasColumnType("nvarchar(max)"); - - b.Property("PhoneNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("PhoneNumberConfirmed") - .HasColumnType("bit"); - - b.Property("SecurityStamp") - .HasColumnType("nvarchar(max)"); - - b.Property("TwoFactorEnabled") - .HasColumnType("bit"); - - b.Property("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"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.Workshop", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .UseIdentityColumn(); - - b.Property("AddressId") - .HasColumnType("bigint"); - - b.Property("CategoryId") - .HasColumnType("bigint"); - - b.Property("DaysPerWeek") - .HasColumnType("int"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("nvarchar(500)"); - - b.Property("DisabilityOptionsDesc") - .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); - - b.Property("Email") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("Facebook") - .HasMaxLength(30) - .HasColumnType("nvarchar(30)"); - - b.Property("Head") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.Property("HeadBirthDate") - .HasColumnType("datetime2"); - - b.Property("Image") - .HasColumnType("nvarchar(max)"); - - b.Property("Instagram") - .HasMaxLength(30) - .HasColumnType("nvarchar(30)"); - - b.Property("MaxAge") - .HasColumnType("int"); - - b.Property("MinAge") - .HasColumnType("int"); - - b.Property("OrganizationId") - .HasColumnType("bigint"); - - b.Property("Phone") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("Price") - .HasColumnType("decimal(18,2)"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(60) - .HasColumnType("nvarchar(60)"); - - b.Property("Website") - .HasColumnType("nvarchar(max)"); - - b.Property("WithDisabilityOptions") - .HasColumnType("bit"); - - b.HasKey("Id"); - - b.HasIndex("AddressId"); - - b.HasIndex("CategoryId"); - - b.HasIndex("OrganizationId"); - - b.ToTable("Workshops"); - }); - - 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("OutOfSchool.Services.Models.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.HasOne("OutOfSchool.Services.Models.User", 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("OutOfSchool.Services.Models.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.HasOne("OutOfSchool.Services.Models.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.Child", b => - { - b.HasOne("OutOfSchool.Services.Models.Parent", "Parent") - .WithMany("Children") - .HasForeignKey("ParentId"); - - b.HasOne("OutOfSchool.Services.Models.SocialGroup", "SocialGroup") - .WithMany("Children") - .HasForeignKey("SocialGroupId"); - - b.Navigation("Parent"); - - b.Navigation("SocialGroup"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.Organization", b => - { - b.HasOne("OutOfSchool.Services.Models.User", "User") - .WithMany() - .HasForeignKey("UserId"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.Parent", b => - { - b.HasOne("OutOfSchool.Services.Models.User", "User") - .WithMany() - .HasForeignKey("UserId"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.Subcategory", b => - { - b.HasOne("OutOfSchool.Services.Models.Category", "Category") - .WithMany("Subcategories") - .HasForeignKey("CategoryId"); - - b.Navigation("Category"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.Teacher", b => - { - b.HasOne("OutOfSchool.Services.Models.Workshop", "Workshop") - .WithMany("Teachers") - .HasForeignKey("WorkshopId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Workshop"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.Workshop", b => - { - b.HasOne("OutOfSchool.Services.Models.Address", "Address") - .WithMany() - .HasForeignKey("AddressId"); - - b.HasOne("OutOfSchool.Services.Models.Category", "Category") - .WithMany() - .HasForeignKey("CategoryId"); - - b.HasOne("OutOfSchool.Services.Models.Organization", "Organization") - .WithMany("Workshops") - .HasForeignKey("OrganizationId"); - - b.Navigation("Address"); - - b.Navigation("Category"); - - b.Navigation("Organization"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.Category", b => - { - b.Navigation("Subcategories"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.Organization", b => - { - b.Navigation("Workshops"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.Parent", b => - { - b.Navigation("Children"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.SocialGroup", b => - { - b.Navigation("Children"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.Workshop", b => - { - b.Navigation("Teachers"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/OutOfSchool/IdentityServer/Data/Migrations/OutOfSchoolMigrations/20210303124137_init.cs b/OutOfSchool/IdentityServer/Data/Migrations/OutOfSchoolMigrations/20210303124137_init.cs deleted file mode 100644 index bae837c6bb..0000000000 --- a/OutOfSchool/IdentityServer/Data/Migrations/OutOfSchoolMigrations/20210303124137_init.cs +++ /dev/null @@ -1,514 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -namespace OutOfSchool.IdentityServer.Data.Migrations.OutOfSchoolMigrations -{ - public partial class init : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "Address", - columns: table => new - { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - Region = table.Column(type: "nvarchar(max)", nullable: true), - District = table.Column(type: "nvarchar(max)", nullable: true), - City = table.Column(type: "nvarchar(15)", maxLength: 15, nullable: false), - Street = table.Column(type: "nvarchar(30)", maxLength: 30, nullable: false), - BuildingNumb = table.Column(type: "nvarchar(15)", maxLength: 15, nullable: false), - Latitude = table.Column(type: "float", nullable: false), - Longitude = table.Column(type: "float", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Address", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AspNetRoles", - columns: table => new - { - Id = table.Column(type: "nvarchar(450)", nullable: false), - Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - NormalizedName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AspNetRoles", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AspNetUsers", - columns: table => new - { - Id = table.Column(type: "nvarchar(450)", nullable: false), - CreatingTime = table.Column(type: "datetime2", nullable: false), - LastLogin = table.Column(type: "datetime2", nullable: true), - UserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - NormalizedUserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - Email = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - NormalizedEmail = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - EmailConfirmed = table.Column(type: "bit", nullable: false), - PasswordHash = table.Column(type: "nvarchar(max)", nullable: true), - SecurityStamp = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(max)", nullable: true), - PhoneNumber = table.Column(type: "nvarchar(max)", nullable: true), - PhoneNumberConfirmed = table.Column(type: "bit", nullable: false), - TwoFactorEnabled = table.Column(type: "bit", nullable: false), - LockoutEnd = table.Column(type: "datetimeoffset", nullable: true), - LockoutEnabled = table.Column(type: "bit", nullable: false), - AccessFailedCount = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AspNetUsers", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Categories", - columns: table => new - { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - Title = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Categories", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "SocialGroup", - columns: table => new - { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - Name = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_SocialGroup", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AspNetRoleClaims", - columns: table => new - { - Id = table.Column(type: "int", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - RoleId = table.Column(type: "nvarchar(450)", nullable: false), - ClaimType = table.Column(type: "nvarchar(max)", nullable: true), - ClaimValue = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AspNetRoleClaims", x => x.Id); - table.ForeignKey( - name: "FK_AspNetRoleClaims_AspNetRoles_RoleId", - column: x => x.RoleId, - principalTable: "AspNetRoles", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AspNetUserClaims", - columns: table => new - { - Id = table.Column(type: "int", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - UserId = table.Column(type: "nvarchar(450)", nullable: false), - ClaimType = table.Column(type: "nvarchar(max)", nullable: true), - ClaimValue = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AspNetUserClaims", x => x.Id); - table.ForeignKey( - name: "FK_AspNetUserClaims_AspNetUsers_UserId", - column: x => x.UserId, - principalTable: "AspNetUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AspNetUserLogins", - columns: table => new - { - LoginProvider = table.Column(type: "nvarchar(450)", nullable: false), - ProviderKey = table.Column(type: "nvarchar(450)", nullable: false), - ProviderDisplayName = table.Column(type: "nvarchar(max)", nullable: true), - UserId = table.Column(type: "nvarchar(450)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AspNetUserLogins", x => new { x.LoginProvider, x.ProviderKey }); - table.ForeignKey( - name: "FK_AspNetUserLogins_AspNetUsers_UserId", - column: x => x.UserId, - principalTable: "AspNetUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AspNetUserRoles", - columns: table => new - { - UserId = table.Column(type: "nvarchar(450)", nullable: false), - RoleId = table.Column(type: "nvarchar(450)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AspNetUserRoles", x => new { x.UserId, x.RoleId }); - table.ForeignKey( - name: "FK_AspNetUserRoles_AspNetRoles_RoleId", - column: x => x.RoleId, - principalTable: "AspNetRoles", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_AspNetUserRoles_AspNetUsers_UserId", - column: x => x.UserId, - principalTable: "AspNetUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AspNetUserTokens", - columns: table => new - { - UserId = table.Column(type: "nvarchar(450)", nullable: false), - LoginProvider = table.Column(type: "nvarchar(450)", nullable: false), - Name = table.Column(type: "nvarchar(450)", nullable: false), - Value = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AspNetUserTokens", x => new { x.UserId, x.LoginProvider, x.Name }); - table.ForeignKey( - name: "FK_AspNetUserTokens_AspNetUsers_UserId", - column: x => x.UserId, - principalTable: "AspNetUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Organizations", - columns: table => new - { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - Title = table.Column(type: "nvarchar(max)", nullable: false), - Phone = table.Column(type: "nvarchar(max)", nullable: false), - Website = table.Column(type: "nvarchar(max)", nullable: true), - Facebook = table.Column(type: "nvarchar(max)", nullable: true), - Instagram = table.Column(type: "nvarchar(max)", nullable: true), - Description = table.Column(type: "nvarchar(750)", maxLength: 750, nullable: false), - MFO = table.Column(type: "nvarchar(max)", nullable: false), - EDRPOU = table.Column(type: "nvarchar(max)", nullable: false), - INPP = table.Column(type: "nvarchar(max)", nullable: false), - Image = table.Column(type: "nvarchar(max)", nullable: true), - Type = table.Column(type: "int", nullable: false), - UserId = table.Column(type: "nvarchar(450)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Organizations", x => x.Id); - table.ForeignKey( - name: "FK_Organizations_AspNetUsers_UserId", - column: x => x.UserId, - principalTable: "AspNetUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "Parents", - columns: table => new - { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - FirstName = table.Column(type: "nvarchar(max)", nullable: false), - LastName = table.Column(type: "nvarchar(max)", nullable: false), - UserId = table.Column(type: "nvarchar(450)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Parents", x => x.Id); - table.ForeignKey( - name: "FK_Parents_AspNetUsers_UserId", - column: x => x.UserId, - principalTable: "AspNetUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "Subcategories", - columns: table => new - { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - Title = table.Column(type: "nvarchar(max)", nullable: true), - CategoryId = table.Column(type: "bigint", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Subcategories", x => x.Id); - table.ForeignKey( - name: "FK_Subcategories_Categories_CategoryId", - column: x => x.CategoryId, - principalTable: "Categories", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "Workshops", - columns: table => new - { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - Title = table.Column(type: "nvarchar(60)", maxLength: 60, nullable: false), - Phone = table.Column(type: "nvarchar(max)", nullable: false), - Email = table.Column(type: "nvarchar(max)", nullable: false), - Website = table.Column(type: "nvarchar(max)", nullable: true), - Facebook = table.Column(type: "nvarchar(30)", maxLength: 30, nullable: true), - Instagram = table.Column(type: "nvarchar(30)", maxLength: 30, nullable: true), - MinAge = table.Column(type: "int", nullable: false), - MaxAge = table.Column(type: "int", nullable: false), - DaysPerWeek = table.Column(type: "int", nullable: false), - Price = table.Column(type: "decimal(18,2)", nullable: true), - Description = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: false), - WithDisabilityOptions = table.Column(type: "bit", nullable: false), - DisabilityOptionsDesc = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), - Image = table.Column(type: "nvarchar(max)", nullable: true), - Head = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), - HeadBirthDate = table.Column(type: "datetime2", nullable: false), - OrganizationId = table.Column(type: "bigint", nullable: true), - AddressId = table.Column(type: "bigint", nullable: true), - CategoryId = table.Column(type: "bigint", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Workshops", x => x.Id); - table.ForeignKey( - name: "FK_Workshops_Address_AddressId", - column: x => x.AddressId, - principalTable: "Address", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_Workshops_Categories_CategoryId", - column: x => x.CategoryId, - principalTable: "Categories", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_Workshops_Organizations_OrganizationId", - column: x => x.OrganizationId, - principalTable: "Organizations", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "Children", - columns: table => new - { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - FirstName = table.Column(type: "nvarchar(max)", nullable: false), - LastName = table.Column(type: "nvarchar(max)", nullable: false), - MiddleName = table.Column(type: "nvarchar(max)", nullable: false), - DateOfBirth = table.Column(type: "datetime2", nullable: false), - Gender = table.Column(type: "int", nullable: false), - ParentId = table.Column(type: "bigint", nullable: true), - SocialGroupId = table.Column(type: "bigint", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Children", x => x.Id); - table.ForeignKey( - name: "FK_Children_Parents_ParentId", - column: x => x.ParentId, - principalTable: "Parents", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_Children_SocialGroup_SocialGroupId", - column: x => x.SocialGroupId, - principalTable: "SocialGroup", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "Teachers", - columns: table => new - { - TeacherId = table.Column(type: "bigint", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - FirstName = table.Column(type: "nvarchar(30)", maxLength: 30, nullable: false), - LastName = table.Column(type: "nvarchar(30)", maxLength: 30, nullable: false), - MiddleName = table.Column(type: "nvarchar(30)", maxLength: 30, nullable: false), - BirthDay = table.Column(type: "datetime2", nullable: false), - Description = table.Column(type: "nvarchar(300)", maxLength: 300, nullable: true), - Image = table.Column(type: "nvarchar(max)", nullable: true), - WorkshopId = table.Column(type: "bigint", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Teachers", x => x.TeacherId); - table.ForeignKey( - name: "FK_Teachers_Workshops_WorkshopId", - column: x => x.WorkshopId, - principalTable: "Workshops", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateIndex( - name: "IX_AspNetRoleClaims_RoleId", - table: "AspNetRoleClaims", - column: "RoleId"); - - migrationBuilder.CreateIndex( - name: "RoleNameIndex", - table: "AspNetRoles", - column: "NormalizedName", - unique: true, - filter: "[NormalizedName] IS NOT NULL"); - - migrationBuilder.CreateIndex( - name: "IX_AspNetUserClaims_UserId", - table: "AspNetUserClaims", - column: "UserId"); - - migrationBuilder.CreateIndex( - name: "IX_AspNetUserLogins_UserId", - table: "AspNetUserLogins", - column: "UserId"); - - migrationBuilder.CreateIndex( - name: "IX_AspNetUserRoles_RoleId", - table: "AspNetUserRoles", - column: "RoleId"); - - migrationBuilder.CreateIndex( - name: "EmailIndex", - table: "AspNetUsers", - column: "NormalizedEmail"); - - migrationBuilder.CreateIndex( - name: "UserNameIndex", - table: "AspNetUsers", - column: "NormalizedUserName", - unique: true, - filter: "[NormalizedUserName] IS NOT NULL"); - - migrationBuilder.CreateIndex( - name: "IX_Children_ParentId", - table: "Children", - column: "ParentId"); - - migrationBuilder.CreateIndex( - name: "IX_Children_SocialGroupId", - table: "Children", - column: "SocialGroupId"); - - migrationBuilder.CreateIndex( - name: "IX_Organizations_UserId", - table: "Organizations", - column: "UserId"); - - migrationBuilder.CreateIndex( - name: "IX_Parents_UserId", - table: "Parents", - column: "UserId"); - - migrationBuilder.CreateIndex( - name: "IX_Subcategories_CategoryId", - table: "Subcategories", - column: "CategoryId"); - - migrationBuilder.CreateIndex( - name: "IX_Teachers_WorkshopId", - table: "Teachers", - column: "WorkshopId"); - - migrationBuilder.CreateIndex( - name: "IX_Workshops_AddressId", - table: "Workshops", - column: "AddressId"); - - migrationBuilder.CreateIndex( - name: "IX_Workshops_CategoryId", - table: "Workshops", - column: "CategoryId"); - - migrationBuilder.CreateIndex( - name: "IX_Workshops_OrganizationId", - table: "Workshops", - column: "OrganizationId"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AspNetRoleClaims"); - - migrationBuilder.DropTable( - name: "AspNetUserClaims"); - - migrationBuilder.DropTable( - name: "AspNetUserLogins"); - - migrationBuilder.DropTable( - name: "AspNetUserRoles"); - - migrationBuilder.DropTable( - name: "AspNetUserTokens"); - - migrationBuilder.DropTable( - name: "Children"); - - migrationBuilder.DropTable( - name: "Subcategories"); - - migrationBuilder.DropTable( - name: "Teachers"); - - migrationBuilder.DropTable( - name: "AspNetRoles"); - - migrationBuilder.DropTable( - name: "Parents"); - - migrationBuilder.DropTable( - name: "SocialGroup"); - - migrationBuilder.DropTable( - name: "Workshops"); - - migrationBuilder.DropTable( - name: "Address"); - - migrationBuilder.DropTable( - name: "Categories"); - - migrationBuilder.DropTable( - name: "Organizations"); - - migrationBuilder.DropTable( - name: "AspNetUsers"); - } - } -} diff --git a/OutOfSchool/IdentityServer/Data/Migrations/OutOfSchoolMigrations/OutOfSchoolDbContextModelSnapshot.cs b/OutOfSchool/IdentityServer/Data/Migrations/OutOfSchoolMigrations/OutOfSchoolDbContextModelSnapshot.cs deleted file mode 100644 index edfe773c6a..0000000000 --- a/OutOfSchool/IdentityServer/Data/Migrations/OutOfSchoolMigrations/OutOfSchoolDbContextModelSnapshot.cs +++ /dev/null @@ -1,766 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using OutOfSchool.Services; - -namespace OutOfSchool.IdentityServer.Data.Migrations.OutOfSchoolMigrations -{ - [DbContext(typeof(OutOfSchoolDbContext))] - partial class OutOfSchoolDbContextModelSnapshot : ModelSnapshot - { - protected override void BuildModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .UseIdentityColumns() - .HasAnnotation("Relational:MaxIdentifierLength", 128) - .HasAnnotation("ProductVersion", "5.0.2"); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => - { - b.Property("Id") - .HasColumnType("nvarchar(450)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("nvarchar(max)"); - - b.Property("Name") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("NormalizedName") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName") - .IsUnique() - .HasDatabaseName("RoleNameIndex") - .HasFilter("[NormalizedName] IS NOT NULL"); - - b.ToTable("AspNetRoles"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .UseIdentityColumn(); - - b.Property("ClaimType") - .HasColumnType("nvarchar(max)"); - - b.Property("ClaimValue") - .HasColumnType("nvarchar(max)"); - - b.Property("RoleId") - .IsRequired() - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetRoleClaims"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .UseIdentityColumn(); - - b.Property("ClaimType") - .HasColumnType("nvarchar(max)"); - - b.Property("ClaimValue") - .HasColumnType("nvarchar(max)"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserClaims"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.Property("LoginProvider") - .HasColumnType("nvarchar(450)"); - - b.Property("ProviderKey") - .HasColumnType("nvarchar(450)"); - - b.Property("ProviderDisplayName") - .HasColumnType("nvarchar(max)"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("nvarchar(450)"); - - b.HasKey("LoginProvider", "ProviderKey"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserLogins"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("nvarchar(450)"); - - b.Property("RoleId") - .HasColumnType("nvarchar(450)"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetUserRoles"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("nvarchar(450)"); - - b.Property("LoginProvider") - .HasColumnType("nvarchar(450)"); - - b.Property("Name") - .HasColumnType("nvarchar(450)"); - - b.Property("Value") - .HasColumnType("nvarchar(max)"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AspNetUserTokens"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.Address", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .UseIdentityColumn(); - - b.Property("BuildingNumb") - .IsRequired() - .HasMaxLength(15) - .HasColumnType("nvarchar(15)"); - - b.Property("City") - .IsRequired() - .HasMaxLength(15) - .HasColumnType("nvarchar(15)"); - - b.Property("District") - .HasColumnType("nvarchar(max)"); - - b.Property("Latitude") - .HasColumnType("float"); - - b.Property("Longitude") - .HasColumnType("float"); - - b.Property("Region") - .HasColumnType("nvarchar(max)"); - - b.Property("Street") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("nvarchar(30)"); - - b.HasKey("Id"); - - b.ToTable("Address"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.Category", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .UseIdentityColumn(); - - b.Property("Title") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.ToTable("Categories"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.Child", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .UseIdentityColumn(); - - b.Property("DateOfBirth") - .HasColumnType("datetime2"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("Gender") - .HasColumnType("int"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("MiddleName") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("ParentId") - .HasColumnType("bigint"); - - b.Property("SocialGroupId") - .HasColumnType("bigint"); - - b.HasKey("Id"); - - b.HasIndex("ParentId"); - - b.HasIndex("SocialGroupId"); - - b.ToTable("Children"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.Parent", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .UseIdentityColumn(); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("UserId") - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("Parents"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.Provider", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .UseIdentityColumn(); - - b.Property("AddressId") - .HasColumnType("bigint"); - - b.Property("AttachedDocuments") - .HasColumnType("nvarchar(max)"); - - b.Property("AuthorityHolder") - .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("nvarchar(500)"); - - b.Property("Director") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.Property("DirectorBirthDay") - .HasColumnType("datetime2"); - - b.Property("DirectorPhonenumber") - .HasColumnType("nvarchar(max)"); - - b.Property("DirectorPosition") - .HasMaxLength(255) - .HasColumnType("nvarchar(255)"); - - b.Property("EDRPOU") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("Facebook") - .HasMaxLength(30) - .HasColumnType("nvarchar(30)"); - - b.Property("Form") - .HasColumnType("nvarchar(max)"); - - b.Property("INPP") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("Index") - .HasMaxLength(20) - .HasColumnType("nvarchar(20)"); - - b.Property("Instagram") - .HasMaxLength(30) - .HasColumnType("nvarchar(30)"); - - b.Property("KOATUU") - .HasColumnType("nvarchar(max)"); - - b.Property("MFO") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("ManagerialBody") - .HasColumnType("nvarchar(max)"); - - b.Property("Ownership") - .HasColumnType("int"); - - b.Property("Profile") - .HasColumnType("int"); - - b.Property("ShortTitle") - .IsRequired() - .HasMaxLength(60) - .HasColumnType("nvarchar(60)"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(60) - .HasColumnType("nvarchar(60)"); - - b.Property("Type") - .HasColumnType("int"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("nvarchar(450)"); - - b.Property("Website") - .HasMaxLength(30) - .HasColumnType("nvarchar(30)"); - - b.Property("isSubmitPZ_1") - .HasColumnType("bit"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("Providers"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.SocialGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .UseIdentityColumn(); - - b.Property("Name") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.ToTable("SocialGroup"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.Subcategory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .UseIdentityColumn(); - - b.Property("CategoryId") - .HasColumnType("bigint"); - - b.Property("Title") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("CategoryId"); - - b.ToTable("Subcategories"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.Teacher", b => - { - b.Property("TeacherId") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .UseIdentityColumn(); - - b.Property("BirthDay") - .HasColumnType("datetime2"); - - b.Property("Description") - .HasMaxLength(300) - .HasColumnType("nvarchar(300)"); - - b.Property("FirstName") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("nvarchar(30)"); - - b.Property("Image") - .HasColumnType("nvarchar(max)"); - - b.Property("LastName") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("nvarchar(30)"); - - b.Property("MiddleName") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("nvarchar(30)"); - - b.Property("WorkshopId") - .HasColumnType("bigint"); - - b.HasKey("TeacherId"); - - b.HasIndex("WorkshopId"); - - b.ToTable("Teachers"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.User", b => - { - b.Property("Id") - .HasColumnType("nvarchar(450)"); - - b.Property("AccessFailedCount") - .HasColumnType("int"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("nvarchar(max)"); - - b.Property("CreatingTime") - .HasColumnType("datetime2"); - - b.Property("Email") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("EmailConfirmed") - .HasColumnType("bit"); - - b.Property("LastLogin") - .HasColumnType("datetime2"); - - b.Property("LockoutEnabled") - .HasColumnType("bit"); - - b.Property("LockoutEnd") - .HasColumnType("datetimeoffset"); - - b.Property("NormalizedEmail") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("NormalizedUserName") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("PasswordHash") - .HasColumnType("nvarchar(max)"); - - b.Property("PhoneNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("PhoneNumberConfirmed") - .HasColumnType("bit"); - - b.Property("SecurityStamp") - .HasColumnType("nvarchar(max)"); - - b.Property("TwoFactorEnabled") - .HasColumnType("bit"); - - b.Property("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"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.Workshop", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .UseIdentityColumn(); - - b.Property("AddressId") - .HasColumnType("bigint"); - - b.Property("CategoryId") - .HasColumnType("bigint"); - - b.Property("DaysPerWeek") - .HasColumnType("int"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("nvarchar(500)"); - - b.Property("DisabilityOptionsDesc") - .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); - - b.Property("Email") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("Facebook") - .HasMaxLength(30) - .HasColumnType("nvarchar(30)"); - - b.Property("Head") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.Property("HeadBirthDate") - .HasColumnType("datetime2"); - - b.Property("Image") - .HasColumnType("nvarchar(max)"); - - b.Property("Instagram") - .HasMaxLength(30) - .HasColumnType("nvarchar(30)"); - - b.Property("MaxAge") - .HasColumnType("int"); - - b.Property("MinAge") - .HasColumnType("int"); - - b.Property("Phone") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("Price") - .HasColumnType("decimal(18,2)"); - - b.Property("ProviderId") - .HasColumnType("bigint"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(60) - .HasColumnType("nvarchar(60)"); - - b.Property("Website") - .HasColumnType("nvarchar(max)"); - - b.Property("WithDisabilityOptions") - .HasColumnType("bit"); - - b.HasKey("Id"); - - b.HasIndex("AddressId"); - - b.HasIndex("CategoryId"); - - b.HasIndex("ProviderId"); - - b.ToTable("Workshops"); - }); - - 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("OutOfSchool.Services.Models.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.HasOne("OutOfSchool.Services.Models.User", 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("OutOfSchool.Services.Models.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.HasOne("OutOfSchool.Services.Models.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.Child", b => - { - b.HasOne("OutOfSchool.Services.Models.Parent", "Parent") - .WithMany("Children") - .HasForeignKey("ParentId"); - - b.HasOne("OutOfSchool.Services.Models.SocialGroup", "SocialGroup") - .WithMany("Children") - .HasForeignKey("SocialGroupId"); - - b.Navigation("Parent"); - - b.Navigation("SocialGroup"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.Parent", b => - { - b.HasOne("OutOfSchool.Services.Models.User", "User") - .WithMany() - .HasForeignKey("UserId"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.Provider", b => - { - b.HasOne("OutOfSchool.Services.Models.User", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("User"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.Subcategory", b => - { - b.HasOne("OutOfSchool.Services.Models.Category", "Category") - .WithMany("Subcategories") - .HasForeignKey("CategoryId"); - - b.Navigation("Category"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.Teacher", b => - { - b.HasOne("OutOfSchool.Services.Models.Workshop", "Workshop") - .WithMany("Teachers") - .HasForeignKey("WorkshopId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Workshop"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.Workshop", b => - { - b.HasOne("OutOfSchool.Services.Models.Address", "Address") - .WithMany() - .HasForeignKey("AddressId"); - - b.HasOne("OutOfSchool.Services.Models.Category", "Category") - .WithMany() - .HasForeignKey("CategoryId"); - - b.HasOne("OutOfSchool.Services.Models.Provider", "Provider") - .WithMany("Workshops") - .HasForeignKey("ProviderId"); - - b.Navigation("Address"); - - b.Navigation("Category"); - - b.Navigation("Provider"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.Category", b => - { - b.Navigation("Subcategories"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.Parent", b => - { - b.Navigation("Children"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.Provider", b => - { - b.Navigation("Workshops"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.SocialGroup", b => - { - b.Navigation("Children"); - }); - - modelBuilder.Entity("OutOfSchool.Services.Models.Workshop", b => - { - b.Navigation("Teachers"); - }); -#pragma warning restore 612, 618 - } - } -}