From 2ef940e383c3c45a63607d0eb525d3eafe52ec9c Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Mon, 25 Jun 2018 17:54:39 +0200 Subject: [PATCH] to release, a broken migration history ... --- ...20170227151759_hairPrestations.Designer.cs | 1328 ----------------- .../20170227151759_hairPrestations.cs | 744 --------- Yavsc/Migrations/20180625113528_Git.cs | 51 - Yavsc/Models/ApplicationDbContext.cs | 5 + 4 files changed, 5 insertions(+), 2123 deletions(-) delete mode 100644 Yavsc/Migrations/20170227151759_hairPrestations.Designer.cs delete mode 100644 Yavsc/Migrations/20170227151759_hairPrestations.cs diff --git a/Yavsc/Migrations/20170227151759_hairPrestations.Designer.cs b/Yavsc/Migrations/20170227151759_hairPrestations.Designer.cs deleted file mode 100644 index 49167cc5..00000000 --- a/Yavsc/Migrations/20170227151759_hairPrestations.Designer.cs +++ /dev/null @@ -1,1328 +0,0 @@ -using System; -using Microsoft.Data.Entity; -using Microsoft.Data.Entity.Infrastructure; -using Microsoft.Data.Entity.Migrations; -using Yavsc.Models; - -namespace Yavsc.Migrations -{ - [DbContext(typeof(ApplicationDbContext))] - [Migration("20170227151759_hairPrestations")] - partial class hairPrestations - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { - modelBuilder - .HasAnnotation("ProductVersion", "7.0.0-rc1-16348"); - - modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRole", b => - { - b.Property("Id"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken(); - - b.Property("Name") - .HasAnnotation("MaxLength", 256); - - b.Property("NormalizedName") - .HasAnnotation("MaxLength", 256); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName") - .HasAnnotation("Relational:Name", "RoleNameIndex"); - - b.HasAnnotation("Relational:TableName", "AspNetRoles"); - }); - - modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("ClaimType"); - - b.Property("ClaimValue"); - - b.Property("RoleId") - .IsRequired(); - - b.HasKey("Id"); - - b.HasAnnotation("Relational:TableName", "AspNetRoleClaims"); - }); - - modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("ClaimType"); - - b.Property("ClaimValue"); - - b.Property("UserId") - .IsRequired(); - - b.HasKey("Id"); - - b.HasAnnotation("Relational:TableName", "AspNetUserClaims"); - }); - - modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin", b => - { - b.Property("LoginProvider"); - - b.Property("ProviderKey"); - - b.Property("ProviderDisplayName"); - - b.Property("UserId") - .IsRequired(); - - b.HasKey("LoginProvider", "ProviderKey"); - - b.HasAnnotation("Relational:TableName", "AspNetUserLogins"); - }); - - modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole", b => - { - b.Property("UserId"); - - b.Property("RoleId"); - - b.HasKey("UserId", "RoleId"); - - b.HasAnnotation("Relational:TableName", "AspNetUserRoles"); - }); - - modelBuilder.Entity("Yavsc.Models.Access.Ban", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("DateCreated"); - - b.Property("DateModified"); - - b.Property("UserCreated"); - - b.Property("UserModified"); - - b.HasKey("Id"); - }); - - modelBuilder.Entity("Yavsc.Models.Access.BlackListed", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("OwnerId") - .IsRequired(); - - b.Property("UserId") - .IsRequired(); - - b.HasKey("Id"); - }); - - modelBuilder.Entity("Yavsc.Models.Access.CircleAuthorizationToBlogPost", b => - { - b.Property("CircleId"); - - b.Property("BlogPostId"); - - b.HasKey("CircleId", "BlogPostId"); - }); - - modelBuilder.Entity("Yavsc.Models.AccountBalance", b => - { - b.Property("UserId"); - - b.Property("ContactCredits"); - - b.Property("Credits"); - - b.HasKey("UserId"); - }); - - modelBuilder.Entity("Yavsc.Models.ApplicationUser", b => - { - b.Property("Id"); - - b.Property("AccessFailedCount"); - - b.Property("Avatar") - .IsRequired() - .HasAnnotation("MaxLength", 512) - .HasAnnotation("Relational:DefaultValue", "/images/Users/icon_user.png") - .HasAnnotation("Relational:DefaultValueType", "System.String"); - - b.Property("BankInfoId"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken(); - - b.Property("DedicatedGoogleCalendar"); - - b.Property("DiskQuota") - .HasAnnotation("Relational:DefaultValue", "524288000") - .HasAnnotation("Relational:DefaultValueType", "System.Int64"); - - b.Property("DiskUsage"); - - b.Property("Email") - .HasAnnotation("MaxLength", 256); - - b.Property("EmailConfirmed"); - - b.Property("FullName") - .HasAnnotation("MaxLength", 512); - - b.Property("LockoutEnabled"); - - b.Property("LockoutEnd"); - - b.Property("NormalizedEmail") - .HasAnnotation("MaxLength", 256); - - b.Property("NormalizedUserName") - .HasAnnotation("MaxLength", 256); - - b.Property("PasswordHash"); - - b.Property("PhoneNumber"); - - b.Property("PhoneNumberConfirmed"); - - b.Property("PostalAddressId"); - - b.Property("SecurityStamp"); - - b.Property("TwoFactorEnabled"); - - b.Property("UserName") - .HasAnnotation("MaxLength", 256); - - b.HasKey("Id"); - - b.HasIndex("NormalizedEmail") - .HasAnnotation("Relational:Name", "EmailIndex"); - - b.HasIndex("NormalizedUserName") - .HasAnnotation("Relational:Name", "UserNameIndex"); - - b.HasAnnotation("Relational:TableName", "AspNetUsers"); - }); - - modelBuilder.Entity("Yavsc.Models.Auth.Client", b => - { - b.Property("Id"); - - b.Property("Active"); - - b.Property("DisplayName"); - - b.Property("LogoutRedirectUri") - .HasAnnotation("MaxLength", 100); - - b.Property("RedirectUri"); - - b.Property("RefreshTokenLifeTime"); - - b.Property("Secret"); - - b.Property("Type"); - - b.HasKey("Id"); - }); - - modelBuilder.Entity("Yavsc.Models.Auth.RefreshToken", b => - { - b.Property("Id"); - - b.Property("ClientId") - .IsRequired() - .HasAnnotation("MaxLength", 50); - - b.Property("ExpiresUtc"); - - b.Property("IssuedUtc"); - - b.Property("ProtectedTicket") - .IsRequired(); - - b.Property("Subject") - .IsRequired() - .HasAnnotation("MaxLength", 50); - - b.HasKey("Id"); - }); - - modelBuilder.Entity("Yavsc.Models.BalanceImpact", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("BalanceId") - .IsRequired(); - - b.Property("ExecDate"); - - b.Property("Impact"); - - b.Property("Reason") - .IsRequired(); - - b.HasKey("Id"); - }); - - modelBuilder.Entity("Yavsc.Models.Bank.BankIdentity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("AccountNumber") - .HasAnnotation("MaxLength", 15); - - b.Property("BIC") - .HasAnnotation("MaxLength", 15); - - b.Property("BankCode") - .HasAnnotation("MaxLength", 5); - - b.Property("BankedKey"); - - b.Property("IBAN") - .HasAnnotation("MaxLength", 33); - - b.Property("WicketCode") - .HasAnnotation("MaxLength", 5); - - b.HasKey("Id"); - }); - - modelBuilder.Entity("Yavsc.Models.Billing.CommandLine", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("Count"); - - b.Property("Description") - .IsRequired() - .HasAnnotation("MaxLength", 512); - - b.Property("EstimateId"); - - b.Property("EstimateTemplateId"); - - b.Property("UnitaryCost"); - - b.HasKey("Id"); - }); - - modelBuilder.Entity("Yavsc.Models.Billing.Estimate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("AttachedFilesString"); - - b.Property("AttachedGraphicsString"); - - b.Property("ClientId") - .IsRequired(); - - b.Property("ClientValidationDate"); - - b.Property("CommandId"); - - b.Property("CommandType"); - - b.Property("Description"); - - b.Property("OwnerId") - .IsRequired(); - - b.Property("ProviderValidationDate"); - - b.Property("Title"); - - b.HasKey("Id"); - }); - - modelBuilder.Entity("Yavsc.Models.Billing.EstimateTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("Description"); - - b.Property("OwnerId") - .IsRequired(); - - b.Property("Title"); - - b.HasKey("Id"); - }); - - modelBuilder.Entity("Yavsc.Models.Billing.ExceptionSIREN", b => - { - b.Property("SIREN"); - - b.HasKey("SIREN"); - }); - - modelBuilder.Entity("Yavsc.Models.Blog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("AuthorId"); - - b.Property("Content"); - - b.Property("DateCreated"); - - b.Property("DateModified"); - - b.Property("Photo"); - - b.Property("Rate"); - - b.Property("Title"); - - b.Property("UserCreated"); - - b.Property("UserModified"); - - b.Property("Visible"); - - b.HasKey("Id"); - }); - - modelBuilder.Entity("Yavsc.Models.Chat.Connection", b => - { - b.Property("ConnectionId"); - - b.Property("ApplicationUserId"); - - b.Property("Connected"); - - b.Property("UserAgent"); - - b.HasKey("ConnectionId"); - }); - - modelBuilder.Entity("Yavsc.Models.Drawing.Color", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("Blue"); - - b.Property("Green"); - - b.Property("Name"); - - b.Property("Red"); - - b.HasKey("Id"); - }); - - modelBuilder.Entity("Yavsc.Models.Forms.Form", b => - { - b.Property("Id"); - - b.Property("Summary"); - - b.HasKey("Id"); - }); - - modelBuilder.Entity("Yavsc.Models.Haircut.HairCutQuery", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("ActivityCode") - .IsRequired(); - - b.Property("ClientId") - .IsRequired(); - - b.Property("DateCreated"); - - b.Property("DateModified"); - - b.Property("EventDate"); - - b.Property("LocationId"); - - b.Property("PerformerId") - .IsRequired(); - - b.Property("PrestationId"); - - b.Property("Previsional"); - - b.Property("Status"); - - b.Property("UserCreated"); - - b.Property("UserModified"); - - b.Property("ValidationDate"); - - b.HasKey("Id"); - }); - - modelBuilder.Entity("Yavsc.Models.Haircut.HairMultiCutQuery", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("ActivityCode") - .IsRequired(); - - b.Property("ClientId") - .IsRequired(); - - b.Property("DateCreated"); - - b.Property("DateModified"); - - b.Property("EventDate"); - - b.Property("LocationId"); - - b.Property("PerformerId") - .IsRequired(); - - b.Property("Previsional"); - - b.Property("Status"); - - b.Property("UserCreated"); - - b.Property("UserModified"); - - b.Property("ValidationDate"); - - b.HasKey("Id"); - }); - - modelBuilder.Entity("Yavsc.Models.Haircut.HairPrestation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("Cares"); - - b.Property("Cut"); - - b.Property("Dressing"); - - b.Property("Gender"); - - b.Property("HairMultiCutQueryId"); - - b.Property("Length"); - - b.Property("Shampoo"); - - b.Property("Tech"); - - b.HasKey("Id"); - }); - - modelBuilder.Entity("Yavsc.Models.Haircut.HairTaint", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("Brand"); - - b.Property("ColorId"); - - b.Property("HairPrestationId"); - - b.HasKey("Id"); - }); - - modelBuilder.Entity("Yavsc.Models.Identity.GoogleCloudMobileDeclaration", b => - { - b.Property("DeviceId"); - - b.Property("DeclarationDate") - .ValueGeneratedOnAdd() - .HasAnnotation("Relational:GeneratedValueSql", "LOCALTIMESTAMP"); - - b.Property("DeviceOwnerId"); - - b.Property("GCMRegistrationId") - .IsRequired(); - - b.Property("Model"); - - b.Property("Platform"); - - b.Property("Version"); - - b.HasKey("DeviceId"); - }); - - modelBuilder.Entity("Yavsc.Models.Market.Product", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("Depth"); - - b.Property("Description"); - - b.Property("Height"); - - b.Property("Name"); - - b.Property("Price"); - - b.Property("Public"); - - b.Property("Weight"); - - b.Property("Width"); - - b.HasKey("Id"); - }); - - modelBuilder.Entity("Yavsc.Models.Market.Service", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("ContextId"); - - b.Property("Description"); - - b.Property("Name"); - - b.Property("Public"); - - b.HasKey("Id"); - }); - - modelBuilder.Entity("Yavsc.Models.Messaging.ClientProviderInfo", b => - { - b.Property("UserId"); - - b.Property("Avatar"); - - b.Property("BillingAddressId"); - - b.Property("EMail"); - - b.Property("Phone"); - - b.Property("UserName"); - - b.HasKey("UserId"); - }); - - modelBuilder.Entity("Yavsc.Models.Messaging.DimissClicked", b => - { - b.Property("UserId"); - - b.Property("NotificationId"); - - b.HasKey("UserId", "NotificationId"); - }); - - modelBuilder.Entity("Yavsc.Models.Messaging.Notification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("body") - .IsRequired(); - - b.Property("click_action") - .IsRequired(); - - b.Property("color"); - - b.Property("icon"); - - b.Property("sound"); - - b.Property("tag"); - - b.Property("title") - .IsRequired(); - - b.HasKey("Id"); - }); - - modelBuilder.Entity("Yavsc.Models.Musical.Instrument", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("Name") - .IsRequired() - .HasAnnotation("MaxLength", 255); - - b.HasKey("Id"); - }); - - modelBuilder.Entity("Yavsc.Models.Musical.MusicalPreference", b => - { - b.Property("OwnerProfileId"); - - b.Property("DjSettingsUserId"); - - b.Property("GeneralSettingsUserId"); - - b.Property("Rate"); - - b.Property("TendencyId"); - - b.HasKey("OwnerProfileId"); - }); - - modelBuilder.Entity("Yavsc.Models.Musical.MusicalTendency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("Name") - .IsRequired() - .HasAnnotation("MaxLength", 255); - - b.HasKey("Id"); - }); - - modelBuilder.Entity("Yavsc.Models.Musical.Profiles.DjSettings", b => - { - b.Property("UserId"); - - b.Property("SoundCloudId"); - - b.HasKey("UserId"); - }); - - modelBuilder.Entity("Yavsc.Models.Musical.Profiles.GeneralSettings", b => - { - b.Property("UserId"); - - b.HasKey("UserId"); - }); - - modelBuilder.Entity("Yavsc.Models.Musical.Profiles.Instrumentation", b => - { - b.Property("InstrumentId"); - - b.Property("UserId"); - - b.HasKey("InstrumentId", "UserId"); - }); - - modelBuilder.Entity("Yavsc.Models.OAuth.OAuth2Tokens", b => - { - b.Property("UserId"); - - b.Property("AccessToken"); - - b.Property("Expiration"); - - b.Property("ExpiresIn"); - - b.Property("RefreshToken"); - - b.Property("TokenType"); - - b.HasKey("UserId"); - }); - - modelBuilder.Entity("Yavsc.Models.Relationship.Circle", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("ApplicationUserId"); - - b.Property("Name"); - - b.Property("OwnerId"); - - b.HasKey("Id"); - }); - - modelBuilder.Entity("Yavsc.Models.Relationship.CircleMember", b => - { - b.Property("MemberId"); - - b.Property("CircleId"); - - b.HasKey("MemberId", "CircleId"); - }); - - modelBuilder.Entity("Yavsc.Models.Relationship.Contact", b => - { - b.Property("OwnerId"); - - b.Property("UserId"); - - b.Property("ApplicationUserId"); - - b.HasKey("OwnerId", "UserId"); - }); - - modelBuilder.Entity("Yavsc.Models.Relationship.Location", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("Address") - .IsRequired() - .HasAnnotation("MaxLength", 512); - - b.Property("Latitude"); - - b.Property("Longitude"); - - b.HasKey("Id"); - }); - - modelBuilder.Entity("Yavsc.Models.Relationship.LocationType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("Name"); - - b.HasKey("Id"); - }); - - modelBuilder.Entity("Yavsc.Models.Relationship.PostTag", b => - { - b.Property("PostId"); - - b.Property("TagId"); - - b.HasKey("PostId", "TagId"); - }); - - modelBuilder.Entity("Yavsc.Models.Relationship.Tag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("Name") - .IsRequired(); - - b.HasKey("Id"); - }); - - modelBuilder.Entity("Yavsc.Models.Skill", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("Name"); - - b.Property("Rate"); - - b.HasKey("Id"); - }); - - modelBuilder.Entity("Yavsc.Models.Workflow.Activity", b => - { - b.Property("Code") - .HasAnnotation("MaxLength", 512); - - b.Property("ActorDenomination"); - - b.Property("DateCreated"); - - b.Property("DateModified"); - - b.Property("Description"); - - b.Property("Hidden"); - - b.Property("ModeratorGroupName"); - - b.Property("Name") - .IsRequired() - .HasAnnotation("MaxLength", 512); - - b.Property("ParentCode") - .HasAnnotation("MaxLength", 512); - - b.Property("Photo"); - - b.Property("Rate"); - - b.Property("SettingsClassName"); - - b.Property("UserCreated"); - - b.Property("UserModified"); - - b.HasKey("Code"); - }); - - modelBuilder.Entity("Yavsc.Models.Workflow.CommandForm", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("Action"); - - b.Property("ActivityCode") - .IsRequired(); - - b.Property("Title"); - - b.HasKey("Id"); - }); - - modelBuilder.Entity("Yavsc.Models.Workflow.CoWorking", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("FormationSettingsUserId"); - - b.Property("PerformerId"); - - b.Property("WorkingForId"); - - b.HasKey("Id"); - }); - - modelBuilder.Entity("Yavsc.Models.Workflow.PerformerProfile", b => - { - b.Property("PerformerId"); - - b.Property("AcceptNotifications"); - - b.Property("AcceptPublicContact"); - - b.Property("Active"); - - b.Property("MaxDailyCost"); - - b.Property("MinDailyCost"); - - b.Property("OrganizationAddressId"); - - b.Property("Rate"); - - b.Property("SIREN") - .IsRequired() - .HasAnnotation("MaxLength", 14); - - b.Property("UseGeoLocalizationToReduceDistanceWithClients"); - - b.Property("WebSite"); - - b.HasKey("PerformerId"); - }); - - modelBuilder.Entity("Yavsc.Models.Workflow.Profiles.FormationSettings", b => - { - b.Property("UserId"); - - b.HasKey("UserId"); - }); - - modelBuilder.Entity("Yavsc.Models.Workflow.RdvQuery", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("ActivityCode") - .IsRequired(); - - b.Property("ClientId") - .IsRequired(); - - b.Property("DateCreated"); - - b.Property("DateModified"); - - b.Property("EventDate"); - - b.Property("LocationId"); - - b.Property("LocationTypeId"); - - b.Property("PerformerId") - .IsRequired(); - - b.Property("Previsional"); - - b.Property("Reason"); - - b.Property("Status"); - - b.Property("UserCreated"); - - b.Property("UserModified"); - - b.Property("ValidationDate"); - - b.HasKey("Id"); - }); - - modelBuilder.Entity("Yavsc.Models.Workflow.UserActivity", b => - { - b.Property("DoesCode"); - - b.Property("UserId"); - - b.Property("Weight"); - - b.HasKey("DoesCode", "UserId"); - }); - - modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim", b => - { - b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole") - .WithMany() - .HasForeignKey("RoleId"); - }); - - modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim", b => - { - b.HasOne("Yavsc.Models.ApplicationUser") - .WithMany() - .HasForeignKey("UserId"); - }); - - modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin", b => - { - b.HasOne("Yavsc.Models.ApplicationUser") - .WithMany() - .HasForeignKey("UserId"); - }); - - modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole", b => - { - b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole") - .WithMany() - .HasForeignKey("RoleId"); - - b.HasOne("Yavsc.Models.ApplicationUser") - .WithMany() - .HasForeignKey("UserId"); - }); - - modelBuilder.Entity("Yavsc.Models.Access.BlackListed", b => - { - b.HasOne("Yavsc.Models.ApplicationUser") - .WithMany() - .HasForeignKey("OwnerId"); - }); - - modelBuilder.Entity("Yavsc.Models.Access.CircleAuthorizationToBlogPost", b => - { - b.HasOne("Yavsc.Models.Blog") - .WithMany() - .HasForeignKey("BlogPostId"); - - b.HasOne("Yavsc.Models.Relationship.Circle") - .WithMany() - .HasForeignKey("CircleId"); - }); - - modelBuilder.Entity("Yavsc.Models.AccountBalance", b => - { - b.HasOne("Yavsc.Models.ApplicationUser") - .WithOne() - .HasForeignKey("Yavsc.Models.AccountBalance", "UserId"); - }); - - modelBuilder.Entity("Yavsc.Models.ApplicationUser", b => - { - b.HasOne("Yavsc.Models.Bank.BankIdentity") - .WithMany() - .HasForeignKey("BankInfoId"); - - b.HasOne("Yavsc.Models.Relationship.Location") - .WithMany() - .HasForeignKey("PostalAddressId"); - }); - - modelBuilder.Entity("Yavsc.Models.BalanceImpact", b => - { - b.HasOne("Yavsc.Models.AccountBalance") - .WithMany() - .HasForeignKey("BalanceId"); - }); - - modelBuilder.Entity("Yavsc.Models.Billing.CommandLine", b => - { - b.HasOne("Yavsc.Models.Billing.Estimate") - .WithMany() - .HasForeignKey("EstimateId"); - - b.HasOne("Yavsc.Models.Billing.EstimateTemplate") - .WithMany() - .HasForeignKey("EstimateTemplateId"); - }); - - modelBuilder.Entity("Yavsc.Models.Billing.Estimate", b => - { - b.HasOne("Yavsc.Models.ApplicationUser") - .WithMany() - .HasForeignKey("ClientId"); - - b.HasOne("Yavsc.Models.Workflow.RdvQuery") - .WithMany() - .HasForeignKey("CommandId"); - - b.HasOne("Yavsc.Models.Workflow.PerformerProfile") - .WithMany() - .HasForeignKey("OwnerId"); - }); - - modelBuilder.Entity("Yavsc.Models.Blog", b => - { - b.HasOne("Yavsc.Models.ApplicationUser") - .WithMany() - .HasForeignKey("AuthorId"); - }); - - modelBuilder.Entity("Yavsc.Models.Chat.Connection", b => - { - b.HasOne("Yavsc.Models.ApplicationUser") - .WithMany() - .HasForeignKey("ApplicationUserId"); - }); - - modelBuilder.Entity("Yavsc.Models.Haircut.HairCutQuery", b => - { - b.HasOne("Yavsc.Models.Workflow.Activity") - .WithMany() - .HasForeignKey("ActivityCode"); - - b.HasOne("Yavsc.Models.ApplicationUser") - .WithMany() - .HasForeignKey("ClientId"); - - b.HasOne("Yavsc.Models.Relationship.Location") - .WithMany() - .HasForeignKey("LocationId"); - - b.HasOne("Yavsc.Models.Workflow.PerformerProfile") - .WithMany() - .HasForeignKey("PerformerId"); - - b.HasOne("Yavsc.Models.Haircut.HairPrestation") - .WithMany() - .HasForeignKey("PrestationId"); - }); - - modelBuilder.Entity("Yavsc.Models.Haircut.HairMultiCutQuery", b => - { - b.HasOne("Yavsc.Models.Workflow.Activity") - .WithMany() - .HasForeignKey("ActivityCode"); - - b.HasOne("Yavsc.Models.ApplicationUser") - .WithMany() - .HasForeignKey("ClientId"); - - b.HasOne("Yavsc.Models.Relationship.Location") - .WithMany() - .HasForeignKey("LocationId"); - - b.HasOne("Yavsc.Models.Workflow.PerformerProfile") - .WithMany() - .HasForeignKey("PerformerId"); - }); - - modelBuilder.Entity("Yavsc.Models.Haircut.HairPrestation", b => - { - b.HasOne("Yavsc.Models.Haircut.HairMultiCutQuery") - .WithMany() - .HasForeignKey("HairMultiCutQueryId"); - }); - - modelBuilder.Entity("Yavsc.Models.Haircut.HairTaint", b => - { - b.HasOne("Yavsc.Models.Drawing.Color") - .WithMany() - .HasForeignKey("ColorId"); - - b.HasOne("Yavsc.Models.Haircut.HairPrestation") - .WithMany() - .HasForeignKey("HairPrestationId"); - }); - - modelBuilder.Entity("Yavsc.Models.Identity.GoogleCloudMobileDeclaration", b => - { - b.HasOne("Yavsc.Models.ApplicationUser") - .WithMany() - .HasForeignKey("DeviceOwnerId"); - }); - - modelBuilder.Entity("Yavsc.Models.Market.Service", b => - { - b.HasOne("Yavsc.Models.Workflow.Activity") - .WithMany() - .HasForeignKey("ContextId"); - }); - - modelBuilder.Entity("Yavsc.Models.Messaging.ClientProviderInfo", b => - { - b.HasOne("Yavsc.Models.Relationship.Location") - .WithMany() - .HasForeignKey("BillingAddressId"); - }); - - modelBuilder.Entity("Yavsc.Models.Messaging.DimissClicked", b => - { - b.HasOne("Yavsc.Models.Messaging.Notification") - .WithMany() - .HasForeignKey("NotificationId"); - - b.HasOne("Yavsc.Models.ApplicationUser") - .WithMany() - .HasForeignKey("UserId"); - }); - - modelBuilder.Entity("Yavsc.Models.Musical.MusicalPreference", b => - { - b.HasOne("Yavsc.Models.Musical.Profiles.DjSettings") - .WithMany() - .HasForeignKey("DjSettingsUserId"); - - b.HasOne("Yavsc.Models.Musical.Profiles.GeneralSettings") - .WithMany() - .HasForeignKey("GeneralSettingsUserId"); - }); - - modelBuilder.Entity("Yavsc.Models.Musical.Profiles.Instrumentation", b => - { - b.HasOne("Yavsc.Models.Musical.Instrument") - .WithMany() - .HasForeignKey("InstrumentId"); - - b.HasOne("Yavsc.Models.Workflow.PerformerProfile") - .WithMany() - .HasForeignKey("UserId"); - }); - - modelBuilder.Entity("Yavsc.Models.Relationship.Circle", b => - { - b.HasOne("Yavsc.Models.ApplicationUser") - .WithMany() - .HasForeignKey("ApplicationUserId"); - }); - - modelBuilder.Entity("Yavsc.Models.Relationship.CircleMember", b => - { - b.HasOne("Yavsc.Models.Relationship.Circle") - .WithMany() - .HasForeignKey("CircleId"); - - b.HasOne("Yavsc.Models.ApplicationUser") - .WithMany() - .HasForeignKey("MemberId"); - }); - - modelBuilder.Entity("Yavsc.Models.Relationship.Contact", b => - { - b.HasOne("Yavsc.Models.ApplicationUser") - .WithMany() - .HasForeignKey("ApplicationUserId"); - }); - - modelBuilder.Entity("Yavsc.Models.Relationship.PostTag", b => - { - b.HasOne("Yavsc.Models.Blog") - .WithMany() - .HasForeignKey("PostId"); - }); - - modelBuilder.Entity("Yavsc.Models.Workflow.Activity", b => - { - b.HasOne("Yavsc.Models.Workflow.Activity") - .WithMany() - .HasForeignKey("ParentCode"); - }); - - modelBuilder.Entity("Yavsc.Models.Workflow.CommandForm", b => - { - b.HasOne("Yavsc.Models.Workflow.Activity") - .WithMany() - .HasForeignKey("ActivityCode"); - }); - - modelBuilder.Entity("Yavsc.Models.Workflow.CoWorking", b => - { - b.HasOne("Yavsc.Models.Workflow.Profiles.FormationSettings") - .WithMany() - .HasForeignKey("FormationSettingsUserId"); - - b.HasOne("Yavsc.Models.Workflow.PerformerProfile") - .WithMany() - .HasForeignKey("PerformerId"); - - b.HasOne("Yavsc.Models.ApplicationUser") - .WithMany() - .HasForeignKey("WorkingForId"); - }); - - modelBuilder.Entity("Yavsc.Models.Workflow.PerformerProfile", b => - { - b.HasOne("Yavsc.Models.Relationship.Location") - .WithMany() - .HasForeignKey("OrganizationAddressId"); - - b.HasOne("Yavsc.Models.ApplicationUser") - .WithMany() - .HasForeignKey("PerformerId"); - }); - - modelBuilder.Entity("Yavsc.Models.Workflow.RdvQuery", b => - { - b.HasOne("Yavsc.Models.Workflow.Activity") - .WithMany() - .HasForeignKey("ActivityCode"); - - b.HasOne("Yavsc.Models.ApplicationUser") - .WithMany() - .HasForeignKey("ClientId"); - - b.HasOne("Yavsc.Models.Relationship.Location") - .WithMany() - .HasForeignKey("LocationId"); - - b.HasOne("Yavsc.Models.Relationship.LocationType") - .WithMany() - .HasForeignKey("LocationTypeId"); - - b.HasOne("Yavsc.Models.Workflow.PerformerProfile") - .WithMany() - .HasForeignKey("PerformerId"); - }); - - modelBuilder.Entity("Yavsc.Models.Workflow.UserActivity", b => - { - b.HasOne("Yavsc.Models.Workflow.Activity") - .WithMany() - .HasForeignKey("DoesCode"); - - b.HasOne("Yavsc.Models.Workflow.PerformerProfile") - .WithMany() - .HasForeignKey("UserId"); - }); - } - } -} diff --git a/Yavsc/Migrations/20170227151759_hairPrestations.cs b/Yavsc/Migrations/20170227151759_hairPrestations.cs deleted file mode 100644 index 67928122..00000000 --- a/Yavsc/Migrations/20170227151759_hairPrestations.cs +++ /dev/null @@ -1,744 +0,0 @@ -using System; -using Microsoft.Data.Entity.Migrations; - -namespace Yavsc.Migrations -{ - public partial class hairPrestations : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropForeignKey(name: "FK_IdentityRoleClaim_IdentityRole_RoleId", table: "AspNetRoleClaims"); - migrationBuilder.DropForeignKey(name: "FK_IdentityUserClaim_ApplicationUser_UserId", table: "AspNetUserClaims"); - migrationBuilder.DropForeignKey(name: "FK_IdentityUserLogin_ApplicationUser_UserId", table: "AspNetUserLogins"); - migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole_IdentityRole_RoleId", table: "AspNetUserRoles"); - migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole_ApplicationUser_UserId", table: "AspNetUserRoles"); - migrationBuilder.DropForeignKey(name: "FK_BlackListed_ApplicationUser_OwnerId", table: "BlackListed"); - migrationBuilder.DropForeignKey(name: "FK_CircleAuthorizationToBlogPost_Blog_BlogPostId", table: "CircleAuthorizationToBlogPost"); - migrationBuilder.DropForeignKey(name: "FK_CircleAuthorizationToBlogPost_Circle_CircleId", table: "CircleAuthorizationToBlogPost"); - migrationBuilder.DropForeignKey(name: "FK_AccountBalance_ApplicationUser_UserId", table: "AccountBalance"); - migrationBuilder.DropForeignKey(name: "FK_BalanceImpact_AccountBalance_BalanceId", table: "BalanceImpact"); - migrationBuilder.DropForeignKey(name: "FK_CommandLine_BaseProduct_ArticleId", table: "CommandLine"); - migrationBuilder.DropForeignKey(name: "FK_CommandLine_Estimate_EstimateId", table: "CommandLine"); - migrationBuilder.DropForeignKey(name: "FK_Estimate_ApplicationUser_ClientId", table: "Estimate"); - migrationBuilder.DropForeignKey(name: "FK_Estimate_BookQuery_CommandId", table: "Estimate"); - migrationBuilder.DropForeignKey(name: "FK_Estimate_PerformerProfile_OwnerId", table: "Estimate"); - migrationBuilder.DropForeignKey(name: "FK_HairTaint_Color_ColorId", table: "HairTaint"); - migrationBuilder.DropForeignKey(name: "FK_DimissClicked_Notification_NotificationId", table: "DimissClicked"); - migrationBuilder.DropForeignKey(name: "FK_DimissClicked_ApplicationUser_UserId", table: "DimissClicked"); - migrationBuilder.DropForeignKey(name: "FK_Instrumentation_Instrument_InstrumentId", table: "Instrumentation"); - migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember"); - migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember"); - migrationBuilder.DropForeignKey(name: "FK_PostTag_Blog_PostId", table: "PostTag"); - migrationBuilder.DropForeignKey(name: "FK_CommandForm_Activity_ActivityCode", table: "CommandForm"); - migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile"); - migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile"); - migrationBuilder.DropForeignKey(name: "FK_UserActivity_Activity_DoesCode", table: "UserActivity"); - migrationBuilder.DropForeignKey(name: "FK_UserActivity_PerformerProfile_UserId", table: "UserActivity"); - migrationBuilder.DropColumn(name: "ArticleId", table: "CommandLine"); - migrationBuilder.DropTable("BaseProduct"); - migrationBuilder.DropTable("BookQuery"); - // les id de requete existant venaient d'une table nomée "BookQuery" - // qui n'existe plus. - migrationBuilder.Sql("DELETE FROM \"Estimate\""); - migrationBuilder.Sql("DELETE FROM \"CommandLine\""); - migrationBuilder.CreateTable( - name: "HairMultiCutQuery", - columns: table => new - { - Id = table.Column(nullable: false) - .Annotation("Npgsql:Serial", true), - ActivityCode = table.Column(nullable: false), - ClientId = table.Column(nullable: false), - DateCreated = table.Column(nullable: false), - DateModified = table.Column(nullable: false), - EventDate = table.Column(nullable: false), - LocationId = table.Column(nullable: true), - PerformerId = table.Column(nullable: false), - Previsional = table.Column(nullable: true), - Status = table.Column(nullable: false), - UserCreated = table.Column(nullable: true), - UserModified = table.Column(nullable: true), - ValidationDate = table.Column(nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_HairMultiCutQuery", x => x.Id); - table.ForeignKey( - name: "FK_HairMultiCutQuery_Activity_ActivityCode", - column: x => x.ActivityCode, - principalTable: "Activity", - principalColumn: "Code", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_HairMultiCutQuery_ApplicationUser_ClientId", - column: x => x.ClientId, - principalTable: "AspNetUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_HairMultiCutQuery_Location_LocationId", - column: x => x.LocationId, - principalTable: "Location", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_HairMultiCutQuery_PerformerProfile_PerformerId", - column: x => x.PerformerId, - principalTable: "PerformerProfile", - principalColumn: "PerformerId", - onDelete: ReferentialAction.Cascade); - }); - migrationBuilder.CreateTable( - name: "Product", - columns: table => new - { - Id = table.Column(nullable: false) - .Annotation("Npgsql:Serial", true), - Depth = table.Column(nullable: false), - Description = table.Column(nullable: true), - Height = table.Column(nullable: false), - Name = table.Column(nullable: true), - Price = table.Column(nullable: true), - Public = table.Column(nullable: false), - Weight = table.Column(nullable: false), - Width = table.Column(nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Product", x => x.Id); - }); - migrationBuilder.CreateTable( - name: "RdvQuery", - columns: table => new - { - Id = table.Column(nullable: false) - .Annotation("Npgsql:Serial", true), - ActivityCode = table.Column(nullable: false), - ClientId = table.Column(nullable: false), - DateCreated = table.Column(nullable: false), - DateModified = table.Column(nullable: false), - EventDate = table.Column(nullable: false), - LocationId = table.Column(nullable: true), - LocationTypeId = table.Column(nullable: true), - PerformerId = table.Column(nullable: false), - Previsional = table.Column(nullable: true), - Reason = table.Column(nullable: true), - Status = table.Column(nullable: false), - UserCreated = table.Column(nullable: true), - UserModified = table.Column(nullable: true), - ValidationDate = table.Column(nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_RdvQuery", x => x.Id); - table.ForeignKey( - name: "FK_RdvQuery_Activity_ActivityCode", - column: x => x.ActivityCode, - principalTable: "Activity", - principalColumn: "Code", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_RdvQuery_ApplicationUser_ClientId", - column: x => x.ClientId, - principalTable: "AspNetUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_RdvQuery_Location_LocationId", - column: x => x.LocationId, - principalTable: "Location", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_RdvQuery_LocationType_LocationTypeId", - column: x => x.LocationTypeId, - principalTable: "LocationType", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_RdvQuery_PerformerProfile_PerformerId", - column: x => x.PerformerId, - principalTable: "PerformerProfile", - principalColumn: "PerformerId", - onDelete: ReferentialAction.Cascade); - }); - migrationBuilder.CreateTable( - name: "HairPrestation", - columns: table => new - { - Id = table.Column(nullable: false) - .Annotation("Npgsql:Serial", true), - Cares = table.Column(nullable: false), - Cut = table.Column(nullable: false), - Dressing = table.Column(nullable: false), - Gender = table.Column(nullable: false), - HairMultiCutQueryId = table.Column(nullable: true), - Length = table.Column(nullable: false), - Shampoo = table.Column(nullable: false), - Tech = table.Column(nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_HairPrestation", x => x.Id); - table.ForeignKey( - name: "FK_HairPrestation_HairMultiCutQuery_HairMultiCutQueryId", - column: x => x.HairMultiCutQueryId, - principalTable: "HairMultiCutQuery", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - migrationBuilder.CreateTable( - name: "HairCutQuery", - columns: table => new - { - Id = table.Column(nullable: false) - .Annotation("Npgsql:Serial", true), - ActivityCode = table.Column(nullable: false), - ClientId = table.Column(nullable: false), - DateCreated = table.Column(nullable: false), - DateModified = table.Column(nullable: false), - EventDate = table.Column(nullable: false), - LocationId = table.Column(nullable: true), - PerformerId = table.Column(nullable: false), - PrestationId = table.Column(nullable: true), - Previsional = table.Column(nullable: true), - Status = table.Column(nullable: false), - UserCreated = table.Column(nullable: true), - UserModified = table.Column(nullable: true), - ValidationDate = table.Column(nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_HairCutQuery", x => x.Id); - table.ForeignKey( - name: "FK_HairCutQuery_Activity_ActivityCode", - column: x => x.ActivityCode, - principalTable: "Activity", - principalColumn: "Code", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_HairCutQuery_ApplicationUser_ClientId", - column: x => x.ClientId, - principalTable: "AspNetUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_HairCutQuery_Location_LocationId", - column: x => x.LocationId, - principalTable: "Location", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_HairCutQuery_PerformerProfile_PerformerId", - column: x => x.PerformerId, - principalTable: "PerformerProfile", - principalColumn: "PerformerId", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_HairCutQuery_HairPrestation_PrestationId", - column: x => x.PrestationId, - principalTable: "HairPrestation", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - migrationBuilder.AddColumn( - name: "HairPrestationId", - table: "HairTaint", - nullable: true); - migrationBuilder.AddForeignKey( - name: "FK_IdentityRoleClaim_IdentityRole_RoleId", - table: "AspNetRoleClaims", - column: "RoleId", - principalTable: "AspNetRoles", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - migrationBuilder.AddForeignKey( - name: "FK_IdentityUserClaim_ApplicationUser_UserId", - table: "AspNetUserClaims", - column: "UserId", - principalTable: "AspNetUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - migrationBuilder.AddForeignKey( - name: "FK_IdentityUserLogin_ApplicationUser_UserId", - table: "AspNetUserLogins", - column: "UserId", - principalTable: "AspNetUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - migrationBuilder.AddForeignKey( - name: "FK_IdentityUserRole_IdentityRole_RoleId", - table: "AspNetUserRoles", - column: "RoleId", - principalTable: "AspNetRoles", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - migrationBuilder.AddForeignKey( - name: "FK_IdentityUserRole_ApplicationUser_UserId", - table: "AspNetUserRoles", - column: "UserId", - principalTable: "AspNetUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - migrationBuilder.AddForeignKey( - name: "FK_BlackListed_ApplicationUser_OwnerId", - table: "BlackListed", - column: "OwnerId", - principalTable: "AspNetUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - migrationBuilder.AddForeignKey( - name: "FK_CircleAuthorizationToBlogPost_Blog_BlogPostId", - table: "CircleAuthorizationToBlogPost", - column: "BlogPostId", - principalTable: "Blog", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - migrationBuilder.AddForeignKey( - name: "FK_CircleAuthorizationToBlogPost_Circle_CircleId", - table: "CircleAuthorizationToBlogPost", - column: "CircleId", - principalTable: "Circle", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - migrationBuilder.AddForeignKey( - name: "FK_AccountBalance_ApplicationUser_UserId", - table: "AccountBalance", - column: "UserId", - principalTable: "AspNetUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - migrationBuilder.AddForeignKey( - name: "FK_BalanceImpact_AccountBalance_BalanceId", - table: "BalanceImpact", - column: "BalanceId", - principalTable: "AccountBalance", - principalColumn: "UserId", - onDelete: ReferentialAction.Cascade); - migrationBuilder.AddForeignKey( - name: "FK_CommandLine_Estimate_EstimateId", - table: "CommandLine", - column: "EstimateId", - principalTable: "Estimate", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - migrationBuilder.AddForeignKey( - name: "FK_Estimate_ApplicationUser_ClientId", - table: "Estimate", - column: "ClientId", - principalTable: "AspNetUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - migrationBuilder.AddForeignKey( - name: "FK_Estimate_RdvQuery_CommandId", - table: "Estimate", - column: "CommandId", - principalTable: "RdvQuery", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - migrationBuilder.AddForeignKey( - name: "FK_Estimate_PerformerProfile_OwnerId", - table: "Estimate", - column: "OwnerId", - principalTable: "PerformerProfile", - principalColumn: "PerformerId", - onDelete: ReferentialAction.Cascade); - migrationBuilder.AddForeignKey( - name: "FK_HairTaint_Color_ColorId", - table: "HairTaint", - column: "ColorId", - principalTable: "Color", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - migrationBuilder.AddForeignKey( - name: "FK_HairTaint_HairPrestation_HairPrestationId", - table: "HairTaint", - column: "HairPrestationId", - principalTable: "HairPrestation", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - migrationBuilder.AddForeignKey( - name: "FK_DimissClicked_Notification_NotificationId", - table: "DimissClicked", - column: "NotificationId", - principalTable: "Notification", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - migrationBuilder.AddForeignKey( - name: "FK_DimissClicked_ApplicationUser_UserId", - table: "DimissClicked", - column: "UserId", - principalTable: "AspNetUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - migrationBuilder.AddForeignKey( - name: "FK_Instrumentation_Instrument_InstrumentId", - table: "Instrumentation", - column: "InstrumentId", - principalTable: "Instrument", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - migrationBuilder.AddForeignKey( - name: "FK_CircleMember_Circle_CircleId", - table: "CircleMember", - column: "CircleId", - principalTable: "Circle", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - migrationBuilder.AddForeignKey( - name: "FK_CircleMember_ApplicationUser_MemberId", - table: "CircleMember", - column: "MemberId", - principalTable: "AspNetUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - migrationBuilder.AddForeignKey( - name: "FK_PostTag_Blog_PostId", - table: "PostTag", - column: "PostId", - principalTable: "Blog", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - migrationBuilder.AddForeignKey( - name: "FK_CommandForm_Activity_ActivityCode", - table: "CommandForm", - column: "ActivityCode", - principalTable: "Activity", - principalColumn: "Code", - onDelete: ReferentialAction.Cascade); - migrationBuilder.AddForeignKey( - name: "FK_PerformerProfile_Location_OrganizationAddressId", - table: "PerformerProfile", - column: "OrganizationAddressId", - principalTable: "Location", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - migrationBuilder.AddForeignKey( - name: "FK_PerformerProfile_ApplicationUser_PerformerId", - table: "PerformerProfile", - column: "PerformerId", - principalTable: "AspNetUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - migrationBuilder.AddForeignKey( - name: "FK_UserActivity_Activity_DoesCode", - table: "UserActivity", - column: "DoesCode", - principalTable: "Activity", - principalColumn: "Code", - onDelete: ReferentialAction.Cascade); - migrationBuilder.AddForeignKey( - name: "FK_UserActivity_PerformerProfile_UserId", - table: "UserActivity", - column: "UserId", - principalTable: "PerformerProfile", - principalColumn: "PerformerId", - onDelete: ReferentialAction.Cascade); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropForeignKey(name: "FK_IdentityRoleClaim_IdentityRole_RoleId", table: "AspNetRoleClaims"); - migrationBuilder.DropForeignKey(name: "FK_IdentityUserClaim_ApplicationUser_UserId", table: "AspNetUserClaims"); - migrationBuilder.DropForeignKey(name: "FK_IdentityUserLogin_ApplicationUser_UserId", table: "AspNetUserLogins"); - migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole_IdentityRole_RoleId", table: "AspNetUserRoles"); - migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole_ApplicationUser_UserId", table: "AspNetUserRoles"); - migrationBuilder.DropForeignKey(name: "FK_BlackListed_ApplicationUser_OwnerId", table: "BlackListed"); - migrationBuilder.DropForeignKey(name: "FK_CircleAuthorizationToBlogPost_Blog_BlogPostId", table: "CircleAuthorizationToBlogPost"); - migrationBuilder.DropForeignKey(name: "FK_CircleAuthorizationToBlogPost_Circle_CircleId", table: "CircleAuthorizationToBlogPost"); - migrationBuilder.DropForeignKey(name: "FK_AccountBalance_ApplicationUser_UserId", table: "AccountBalance"); - migrationBuilder.DropForeignKey(name: "FK_BalanceImpact_AccountBalance_BalanceId", table: "BalanceImpact"); - migrationBuilder.DropForeignKey(name: "FK_CommandLine_Estimate_EstimateId", table: "CommandLine"); - migrationBuilder.DropForeignKey(name: "FK_Estimate_ApplicationUser_ClientId", table: "Estimate"); - migrationBuilder.DropForeignKey(name: "FK_Estimate_RdvQuery_CommandId", table: "Estimate"); - migrationBuilder.DropForeignKey(name: "FK_Estimate_PerformerProfile_OwnerId", table: "Estimate"); - migrationBuilder.DropForeignKey(name: "FK_HairTaint_Color_ColorId", table: "HairTaint"); - migrationBuilder.DropForeignKey(name: "FK_HairTaint_HairPrestation_HairPrestationId", table: "HairTaint"); - migrationBuilder.DropForeignKey(name: "FK_DimissClicked_Notification_NotificationId", table: "DimissClicked"); - migrationBuilder.DropForeignKey(name: "FK_DimissClicked_ApplicationUser_UserId", table: "DimissClicked"); - migrationBuilder.DropForeignKey(name: "FK_Instrumentation_Instrument_InstrumentId", table: "Instrumentation"); - migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember"); - migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember"); - migrationBuilder.DropForeignKey(name: "FK_PostTag_Blog_PostId", table: "PostTag"); - migrationBuilder.DropForeignKey(name: "FK_CommandForm_Activity_ActivityCode", table: "CommandForm"); - migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile"); - migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile"); - migrationBuilder.DropForeignKey(name: "FK_UserActivity_Activity_DoesCode", table: "UserActivity"); - migrationBuilder.DropForeignKey(name: "FK_UserActivity_PerformerProfile_UserId", table: "UserActivity"); - migrationBuilder.DropColumn(name: "HairPrestationId", table: "HairTaint"); - migrationBuilder.DropTable("HairCutQuery"); - migrationBuilder.DropTable("Product"); - migrationBuilder.DropTable("RdvQuery"); - migrationBuilder.DropTable("HairPrestation"); - migrationBuilder.DropTable("HairMultiCutQuery"); - migrationBuilder.CreateTable( - name: "BaseProduct", - columns: table => new - { - Id = table.Column(nullable: false) - .Annotation("Npgsql:Serial", true), - Description = table.Column(nullable: true), - Discriminator = table.Column(nullable: false), - Name = table.Column(nullable: true), - Public = table.Column(nullable: false), - Depth = table.Column(nullable: true), - Height = table.Column(nullable: true), - Price = table.Column(nullable: true), - Weight = table.Column(nullable: true), - Width = table.Column(nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_BaseProduct", x => x.Id); - }); - migrationBuilder.CreateTable( - name: "BookQuery", - columns: table => new - { - Id = table.Column(nullable: false) - .Annotation("Npgsql:Serial", true), - ActivityCode = table.Column(nullable: false), - ClientId = table.Column(nullable: false), - DateCreated = table.Column(nullable: false), - DateModified = table.Column(nullable: false), - EventDate = table.Column(nullable: false), - LocationId = table.Column(nullable: true), - LocationTypeId = table.Column(nullable: true), - PerformerId = table.Column(nullable: false), - Previsional = table.Column(nullable: true), - Reason = table.Column(nullable: true), - Status = table.Column(nullable: false), - UserCreated = table.Column(nullable: true), - UserModified = table.Column(nullable: true), - ValidationDate = table.Column(nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_BookQuery", x => x.Id); - table.ForeignKey( - name: "FK_BookQuery_Activity_ActivityCode", - column: x => x.ActivityCode, - principalTable: "Activity", - principalColumn: "Code", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_BookQuery_ApplicationUser_ClientId", - column: x => x.ClientId, - principalTable: "AspNetUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_BookQuery_Location_LocationId", - column: x => x.LocationId, - principalTable: "Location", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_BookQuery_LocationType_LocationTypeId", - column: x => x.LocationTypeId, - principalTable: "LocationType", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_BookQuery_PerformerProfile_PerformerId", - column: x => x.PerformerId, - principalTable: "PerformerProfile", - principalColumn: "PerformerId", - onDelete: ReferentialAction.Restrict); - }); - migrationBuilder.AddColumn( - name: "ArticleId", - table: "CommandLine", - nullable: true); - migrationBuilder.AddForeignKey( - name: "FK_IdentityRoleClaim_IdentityRole_RoleId", - table: "AspNetRoleClaims", - column: "RoleId", - principalTable: "AspNetRoles", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - migrationBuilder.AddForeignKey( - name: "FK_IdentityUserClaim_ApplicationUser_UserId", - table: "AspNetUserClaims", - column: "UserId", - principalTable: "AspNetUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - migrationBuilder.AddForeignKey( - name: "FK_IdentityUserLogin_ApplicationUser_UserId", - table: "AspNetUserLogins", - column: "UserId", - principalTable: "AspNetUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - migrationBuilder.AddForeignKey( - name: "FK_IdentityUserRole_IdentityRole_RoleId", - table: "AspNetUserRoles", - column: "RoleId", - principalTable: "AspNetRoles", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - migrationBuilder.AddForeignKey( - name: "FK_IdentityUserRole_ApplicationUser_UserId", - table: "AspNetUserRoles", - column: "UserId", - principalTable: "AspNetUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - migrationBuilder.AddForeignKey( - name: "FK_BlackListed_ApplicationUser_OwnerId", - table: "BlackListed", - column: "OwnerId", - principalTable: "AspNetUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - migrationBuilder.AddForeignKey( - name: "FK_CircleAuthorizationToBlogPost_Blog_BlogPostId", - table: "CircleAuthorizationToBlogPost", - column: "BlogPostId", - principalTable: "Blog", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - migrationBuilder.AddForeignKey( - name: "FK_CircleAuthorizationToBlogPost_Circle_CircleId", - table: "CircleAuthorizationToBlogPost", - column: "CircleId", - principalTable: "Circle", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - migrationBuilder.AddForeignKey( - name: "FK_AccountBalance_ApplicationUser_UserId", - table: "AccountBalance", - column: "UserId", - principalTable: "AspNetUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - migrationBuilder.AddForeignKey( - name: "FK_BalanceImpact_AccountBalance_BalanceId", - table: "BalanceImpact", - column: "BalanceId", - principalTable: "AccountBalance", - principalColumn: "UserId", - onDelete: ReferentialAction.Restrict); - migrationBuilder.AddForeignKey( - name: "FK_CommandLine_BaseProduct_ArticleId", - table: "CommandLine", - column: "ArticleId", - principalTable: "BaseProduct", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - migrationBuilder.AddForeignKey( - name: "FK_CommandLine_Estimate_EstimateId", - table: "CommandLine", - column: "EstimateId", - principalTable: "Estimate", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - migrationBuilder.AddForeignKey( - name: "FK_Estimate_ApplicationUser_ClientId", - table: "Estimate", - column: "ClientId", - principalTable: "AspNetUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - migrationBuilder.AddForeignKey( - name: "FK_Estimate_BookQuery_CommandId", - table: "Estimate", - column: "CommandId", - principalTable: "BookQuery", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - migrationBuilder.AddForeignKey( - name: "FK_Estimate_PerformerProfile_OwnerId", - table: "Estimate", - column: "OwnerId", - principalTable: "PerformerProfile", - principalColumn: "PerformerId", - onDelete: ReferentialAction.Restrict); - migrationBuilder.AddForeignKey( - name: "FK_HairTaint_Color_ColorId", - table: "HairTaint", - column: "ColorId", - principalTable: "Color", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - migrationBuilder.AddForeignKey( - name: "FK_DimissClicked_Notification_NotificationId", - table: "DimissClicked", - column: "NotificationId", - principalTable: "Notification", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - migrationBuilder.AddForeignKey( - name: "FK_DimissClicked_ApplicationUser_UserId", - table: "DimissClicked", - column: "UserId", - principalTable: "AspNetUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - migrationBuilder.AddForeignKey( - name: "FK_Instrumentation_Instrument_InstrumentId", - table: "Instrumentation", - column: "InstrumentId", - principalTable: "Instrument", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - migrationBuilder.AddForeignKey( - name: "FK_CircleMember_Circle_CircleId", - table: "CircleMember", - column: "CircleId", - principalTable: "Circle", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - migrationBuilder.AddForeignKey( - name: "FK_CircleMember_ApplicationUser_MemberId", - table: "CircleMember", - column: "MemberId", - principalTable: "AspNetUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - migrationBuilder.AddForeignKey( - name: "FK_PostTag_Blog_PostId", - table: "PostTag", - column: "PostId", - principalTable: "Blog", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - migrationBuilder.AddForeignKey( - name: "FK_CommandForm_Activity_ActivityCode", - table: "CommandForm", - column: "ActivityCode", - principalTable: "Activity", - principalColumn: "Code", - onDelete: ReferentialAction.Restrict); - migrationBuilder.AddForeignKey( - name: "FK_PerformerProfile_Location_OrganizationAddressId", - table: "PerformerProfile", - column: "OrganizationAddressId", - principalTable: "Location", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - migrationBuilder.AddForeignKey( - name: "FK_PerformerProfile_ApplicationUser_PerformerId", - table: "PerformerProfile", - column: "PerformerId", - principalTable: "AspNetUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - migrationBuilder.AddForeignKey( - name: "FK_UserActivity_Activity_DoesCode", - table: "UserActivity", - column: "DoesCode", - principalTable: "Activity", - principalColumn: "Code", - onDelete: ReferentialAction.Restrict); - migrationBuilder.AddForeignKey( - name: "FK_UserActivity_PerformerProfile_UserId", - table: "UserActivity", - column: "UserId", - principalTable: "PerformerProfile", - principalColumn: "PerformerId", - onDelete: ReferentialAction.Restrict); - } - } -} diff --git a/Yavsc/Migrations/20180625113528_Git.cs b/Yavsc/Migrations/20180625113528_Git.cs index 15f7fbc8..eb7c80e2 100644 --- a/Yavsc/Migrations/20180625113528_Git.cs +++ b/Yavsc/Migrations/20180625113528_Git.cs @@ -51,31 +51,9 @@ namespace Yavsc.Migrations migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile"); migrationBuilder.DropForeignKey(name: "FK_RdvQuery_Activity_ActivityCode", table: "RdvQuery"); migrationBuilder.DropForeignKey(name: "FK_RdvQuery_ApplicationUser_ClientId", table: "RdvQuery"); - migrationBuilder.DropForeignKey(name: "FK_RdvQuery_LocationType_LocationTypeId", table: "RdvQuery"); migrationBuilder.DropForeignKey(name: "FK_RdvQuery_PerformerProfile_PerformerId", table: "RdvQuery"); migrationBuilder.DropForeignKey(name: "FK_UserActivity_Activity_DoesCode", table: "UserActivity"); migrationBuilder.DropForeignKey(name: "FK_UserActivity_PerformerProfile_UserId", table: "UserActivity"); - migrationBuilder.DropColumn(name: "LocationTypeId", table: "RdvQuery"); - migrationBuilder.DropTable("LocationType"); - migrationBuilder.CreateTable( - name: "GitRepositoryReference", - columns: table => new - { - Path = table.Column(nullable: false), - Branch = table.Column(nullable: true), - OwnerId = table.Column(nullable: true), - Url = table.Column(nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_GitRepositoryReference", x => x.Path); - table.ForeignKey( - name: "FK_GitRepositoryReference_ApplicationUser_OwnerId", - column: x => x.OwnerId, - principalTable: "AspNetUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); migrationBuilder.CreateTable( name: "Project", columns: table => new @@ -154,11 +132,6 @@ namespace Yavsc.Migrations principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); - migrationBuilder.AddColumn( - name: "LocationType", - table: "RdvQuery", - nullable: false, - defaultValue: LocationKind.PostalAddress); migrationBuilder.AddForeignKey( name: "FK_IdentityRoleClaim_IdentityRole_RoleId", table: "AspNetRoleClaims", @@ -523,26 +496,9 @@ namespace Yavsc.Migrations migrationBuilder.DropForeignKey(name: "FK_RdvQuery_PerformerProfile_PerformerId", table: "RdvQuery"); migrationBuilder.DropForeignKey(name: "FK_UserActivity_Activity_DoesCode", table: "UserActivity"); migrationBuilder.DropForeignKey(name: "FK_UserActivity_PerformerProfile_UserId", table: "UserActivity"); - migrationBuilder.DropColumn(name: "LocationType", table: "RdvQuery"); migrationBuilder.DropTable("ProjectBuildConfiguration"); migrationBuilder.DropTable("Project"); migrationBuilder.DropTable("GitRepositoryReference"); - migrationBuilder.CreateTable( - name: "LocationType", - columns: table => new - { - Id = table.Column(nullable: false) - .Annotation("Npgsql:Serial", true), - Name = table.Column(nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_LocationType", x => x.Id); - }); - migrationBuilder.AddColumn( - name: "LocationTypeId", - table: "RdvQuery", - nullable: true); migrationBuilder.AddForeignKey( name: "FK_IdentityRoleClaim_IdentityRole_RoleId", table: "AspNetRoleClaims", @@ -837,13 +793,6 @@ namespace Yavsc.Migrations principalTable: "AspNetUsers", principalColumn: "Id", onDelete: ReferentialAction.Restrict); - migrationBuilder.AddForeignKey( - name: "FK_RdvQuery_LocationType_LocationTypeId", - table: "RdvQuery", - column: "LocationTypeId", - principalTable: "LocationType", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); migrationBuilder.AddForeignKey( name: "FK_RdvQuery_PerformerProfile_PerformerId", table: "RdvQuery", diff --git a/Yavsc/Models/ApplicationDbContext.cs b/Yavsc/Models/ApplicationDbContext.cs index f3c38ff3..4719b786 100644 --- a/Yavsc/Models/ApplicationDbContext.cs +++ b/Yavsc/Models/ApplicationDbContext.cs @@ -68,6 +68,11 @@ namespace Yavsc.Models et.FindProperty("DateCreated").IsReadOnlyAfterSave = true; } } + protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) + { + optionsBuilder.UseNpgsql(Startup.ConnectionString); + } + public DbSet Applications { get; set; }