From bf8df5c5ea5d60a7c554c987430cb4dda7b517bc Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Mon, 11 Jun 2018 13:27:12 +0200 Subject: [PATCH] db context hoes back to lib assembly... --- Yavsc.Server/Constants.cs | 2 +- .../Models/ApplicationDbContext.cs | 2 +- .../20180611003253_gitKey.Designer.cs | 1818 +++++++++++++++++ Yavsc/Migrations/20180611003253_gitKey.cs | 1679 +++++++++++++++ .../ApplicationDbContextModelSnapshot.cs | 6 +- Yavsc/Settings/SiteSettings.cs | 2 +- Yavsc/Startup/Startup.FileServer.cs | 7 +- Yavsc/Views/Git/Create.cshtml | 6 - Yavsc/Views/Git/Index.cshtml | 12 +- rc-num.txt | 2 +- 10 files changed, 3518 insertions(+), 18 deletions(-) rename {Yavsc => Yavsc.Server}/Models/ApplicationDbContext.cs (99%) create mode 100644 Yavsc/Migrations/20180611003253_gitKey.Designer.cs create mode 100644 Yavsc/Migrations/20180611003253_gitKey.cs diff --git a/Yavsc.Server/Constants.cs b/Yavsc.Server/Constants.cs index 169f4c1b..c44998f6 100644 --- a/Yavsc.Server/Constants.cs +++ b/Yavsc.Server/Constants.cs @@ -27,7 +27,7 @@ namespace Yavsc GCMNotificationUrl = "https://gcm-http.googleapis.com/gcm/send", UserFilesPath = "/files", AvatarsPath = "/avatars", - GitPath = "/git", + GitPath = "/sources", DefaultAvatar = "/images/Users/icon_user.png", AnonAvatar = "/images/Users/icon_anon_user.png"; diff --git a/Yavsc/Models/ApplicationDbContext.cs b/Yavsc.Server/Models/ApplicationDbContext.cs similarity index 99% rename from Yavsc/Models/ApplicationDbContext.cs rename to Yavsc.Server/Models/ApplicationDbContext.cs index e3ace885..e3deb33f 100644 --- a/Yavsc/Models/ApplicationDbContext.cs +++ b/Yavsc.Server/Models/ApplicationDbContext.cs @@ -66,7 +66,7 @@ namespace Yavsc.Models if (et.ClrType.GetInterface("IBaseTrackedEntity")!=null) et.FindProperty("DateCreated").IsReadOnlyAfterSave = true; } - builder.Entity().HasKey(r => new { r.Path, r.Url, r.Branch }); + builder.Entity().HasKey(r => r.Path ); } public DbSet Applications { get; set; } diff --git a/Yavsc/Migrations/20180611003253_gitKey.Designer.cs b/Yavsc/Migrations/20180611003253_gitKey.Designer.cs new file mode 100644 index 00000000..fa15b340 --- /dev/null +++ b/Yavsc/Migrations/20180611003253_gitKey.Designer.cs @@ -0,0 +1,1818 @@ +using System; +using Microsoft.Data.Entity; +using Microsoft.Data.Entity.Infrastructure; +using Microsoft.Data.Entity.Metadata; +using Microsoft.Data.Entity.Migrations; +using Yavsc.Models; + +namespace Yavsc.Migrations +{ + [DbContext(typeof(ApplicationDbContext))] + [Migration("20180611003253_gitKey")] + partial class gitKey + { + 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("AllowMonthlyEmail"); + + b.Property("Avatar") + .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") + .HasAnnotation("MaxLength", 512); + + 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("MaxFileSize"); + + 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("Currency"); + + b.Property("Description") + .IsRequired() + .HasAnnotation("MaxLength", 512); + + b.Property("EstimateId"); + + b.Property("EstimateTemplateId"); + + b.Property("Name") + .IsRequired() + .HasAnnotation("MaxLength", 256); + + 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") + .IsRequired(); + + b.Property("Description"); + + b.Property("OwnerId"); + + 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.BlogPost", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AuthorId"); + + b.Property("Content") + .HasAnnotation("MaxLength", 56224); + + b.Property("DateCreated"); + + b.Property("DateModified"); + + b.Property("Photo") + .HasAnnotation("MaxLength", 1024); + + b.Property("Rate"); + + b.Property("Title") + .HasAnnotation("MaxLength", 1024); + + b.Property("UserCreated"); + + b.Property("UserModified"); + + b.Property("Visible"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Blog.BlogTag", b => + { + b.Property("PostId"); + + b.Property("TagId"); + + b.HasKey("PostId", "TagId"); + }); + + modelBuilder.Entity("Yavsc.Models.Blog.Comment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AuthorId") + .IsRequired(); + + b.Property("Content"); + + b.Property("DateCreated"); + + b.Property("DateModified"); + + b.Property("ParentId"); + + b.Property("PostId"); + + b.Property("UserCreated"); + + b.Property("UserModified"); + + b.Property("Visible"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Calendar.Period", b => + { + b.Property("Start"); + + b.Property("End"); + + b.HasKey("Start", "End"); + }); + + modelBuilder.Entity("Yavsc.Models.Calendar.Schedule", b => + { + b.Property("OwnerId"); + + b.HasKey("OwnerId"); + }); + + modelBuilder.Entity("Yavsc.Models.Calendar.ScheduledEvent", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("PeriodEnd"); + + b.Property("PeriodStart"); + + b.Property("Reccurence"); + + b.Property("ScheduleOwnerId"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Chat.ChatConnection", b => + { + b.Property("ConnectionId"); + + b.Property("ApplicationUserId") + .IsRequired(); + + b.Property("Connected"); + + b.Property("UserAgent"); + + b.HasKey("ConnectionId"); + }); + + modelBuilder.Entity("Yavsc.Models.Chat.ChatRoom", b => + { + b.Property("Name") + .HasAnnotation("MaxLength", 255); + + b.Property("ApplicationUserId"); + + b.Property("Topic") + .HasAnnotation("MaxLength", 1023); + + b.HasKey("Name"); + }); + + modelBuilder.Entity("Yavsc.Models.Chat.ChatRoomPresence", b => + { + b.Property("ChannelName"); + + b.Property("ChatUserConnectionId"); + + b.Property("Level"); + + b.HasKey("ChannelName", "ChatUserConnectionId"); + }); + + modelBuilder.Entity("Yavsc.Models.Cratie.Option", b => + { + b.Property("Code"); + + b.Property("CodeScrutin"); + + b.Property("DateCreated"); + + b.Property("DateModified"); + + b.Property("Description"); + + b.Property("UserCreated"); + + b.Property("UserModified"); + + b.HasKey("Code", "CodeScrutin"); + }); + + 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.BrusherProfile", b => + { + b.Property("UserId"); + + b.Property("ActionDistance"); + + b.Property("CarePrice"); + + b.Property("FlatFeeDiscount"); + + b.Property("HalfBalayagePrice"); + + b.Property("HalfBrushingPrice"); + + b.Property("HalfColorPrice"); + + b.Property("HalfDefrisPrice"); + + b.Property("HalfFoldingPrice"); + + b.Property("HalfMechPrice"); + + b.Property("HalfMultiColorPrice"); + + b.Property("HalfPermanentPrice"); + + b.Property("KidCutPrice"); + + b.Property("LongBalayagePrice"); + + b.Property("LongBrushingPrice"); + + b.Property("LongColorPrice"); + + b.Property("LongDefrisPrice"); + + b.Property("LongFoldingPrice"); + + b.Property("LongMechPrice"); + + b.Property("LongMultiColorPrice"); + + b.Property("LongPermanentPrice"); + + b.Property("ManBrushPrice"); + + b.Property("ManCutPrice"); + + b.Property("ScheduleOwnerId"); + + b.Property("ShampooPrice"); + + b.Property("ShortBalayagePrice"); + + b.Property("ShortBrushingPrice"); + + b.Property("ShortColorPrice"); + + b.Property("ShortDefrisPrice"); + + b.Property("ShortFoldingPrice"); + + b.Property("ShortMechPrice"); + + b.Property("ShortMultiColorPrice"); + + b.Property("ShortPermanentPrice"); + + b.Property("WomenHalfCutPrice"); + + b.Property("WomenLongCutPrice"); + + b.Property("WomenShortCutPrice"); + + b.HasKey("UserId"); + }); + + modelBuilder.Entity("Yavsc.Models.Haircut.HairCutQuery", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ActivityCode") + .IsRequired(); + + b.Property("AdditionalInfo") + .HasAnnotation("MaxLength", 512); + + b.Property("ClientId") + .IsRequired(); + + b.Property("Consent"); + + b.Property("DateCreated"); + + b.Property("DateModified"); + + b.Property("EventDate"); + + b.Property("LocationId"); + + b.Property("PaymentId"); + + b.Property("PerformerId") + .IsRequired(); + + b.Property("PrestationId"); + + b.Property("Previsional"); + + b.Property("Rejected"); + + b.Property("RejectedAt"); + + b.Property("SelectedProfileUserId"); + + 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("Consent"); + + b.Property("DateCreated"); + + b.Property("DateModified"); + + b.Property("EventDate"); + + b.Property("LocationId"); + + b.Property("PaymentId"); + + b.Property("PerformerId") + .IsRequired(); + + b.Property("Previsional"); + + b.Property("Rejected"); + + b.Property("RejectedAt"); + + 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("Length"); + + b.Property("Shampoo"); + + b.Property("Tech"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Haircut.HairPrestationCollectionItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("PrestationId"); + + b.Property("QueryId"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Haircut.HairTaint", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Brand"); + + b.Property("ColorId"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Haircut.HairTaintInstance", b => + { + b.Property("TaintId"); + + b.Property("PrestationId"); + + b.HasKey("TaintId", "PrestationId"); + }); + + 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("LatestActivityUpdate"); + + b.Property("Model"); + + b.Property("Platform"); + + b.Property("Version"); + + b.HasKey("DeviceId"); + }); + + modelBuilder.Entity("Yavsc.Models.IT.Fixing.Bug", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Description"); + + b.Property("FeatureId"); + + b.Property("Status"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.IT.Maintaining.Feature", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Description"); + + b.Property("ShortName"); + + b.Property("Status"); + + b.HasKey("Id"); + }); + + 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.Announce", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("For"); + + b.Property("Message"); + + b.Property("OwnerId"); + + b.Property("Sender"); + + b.Property("Topic"); + + 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("Target"); + + b.Property("body") + .IsRequired(); + + b.Property("click_action") + .IsRequired(); + + b.Property("color"); + + b.Property("icon") + .HasAnnotation("Relational:DefaultValue", "exclam") + .HasAnnotation("Relational:DefaultValueType", "System.String"); + + 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.Payment.PayPalPayment", b => + { + b.Property("CreationToken"); + + b.Property("DateCreated"); + + b.Property("DateModified"); + + b.Property("ExecutorId") + .IsRequired(); + + b.Property("OrderReference"); + + b.Property("PaypalPayerId"); + + b.Property("State"); + + b.Property("UserCreated"); + + b.Property("UserModified"); + + b.HasKey("CreationToken"); + }); + + 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.HyperLink", b => + { + b.Property("HRef"); + + b.Property("Method"); + + b.Property("BrusherProfileUserId"); + + b.Property("ContentType"); + + b.Property("PayPalPaymentCreationToken"); + + b.Property("Rel"); + + b.HasKey("HRef", "Method"); + }); + + 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.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("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("ActionName"); + + 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("Consent"); + + b.Property("DateCreated"); + + b.Property("DateModified"); + + b.Property("EventDate"); + + b.Property("LocationId"); + + b.Property("LocationType"); + + b.Property("PaymentId"); + + b.Property("PerformerId") + .IsRequired(); + + b.Property("Previsional"); + + b.Property("Reason"); + + b.Property("Rejected"); + + b.Property("RejectedAt"); + + 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("Yavsc.Server.Models.EMailing.MailingTemplate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Body") + .HasAnnotation("MaxLength", 65536); + + b.Property("DateCreated"); + + b.Property("DateModified"); + + b.Property("ManagerId"); + + b.Property("ReplyToAddress"); + + b.Property("ToSend"); + + b.Property("Topic") + .HasAnnotation("MaxLength", 128); + + b.Property("UserCreated"); + + b.Property("UserModified"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Server.Models.IT.SourceCode.GitRepositoryReference", b => + { + b.Property("Path"); + + b.Property("Branch"); + + b.Property("OwnerId"); + + b.Property("Url"); + + b.HasKey("Path"); + }); + + 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.BlogPost") + .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.BlogPost", b => + { + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("AuthorId"); + }); + + modelBuilder.Entity("Yavsc.Models.Blog.BlogTag", b => + { + b.HasOne("Yavsc.Models.Blog.BlogPost") + .WithMany() + .HasForeignKey("PostId"); + + b.HasOne("Yavsc.Models.Relationship.Tag") + .WithMany() + .HasForeignKey("TagId"); + }); + + modelBuilder.Entity("Yavsc.Models.Blog.Comment", b => + { + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("AuthorId"); + + b.HasOne("Yavsc.Models.Blog.Comment") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("Yavsc.Models.Blog.BlogPost") + .WithMany() + .HasForeignKey("PostId"); + }); + + modelBuilder.Entity("Yavsc.Models.Calendar.Schedule", b => + { + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("OwnerId"); + }); + + modelBuilder.Entity("Yavsc.Models.Calendar.ScheduledEvent", b => + { + b.HasOne("Yavsc.Models.Calendar.Schedule") + .WithMany() + .HasForeignKey("ScheduleOwnerId"); + + b.HasOne("Yavsc.Models.Calendar.Period") + .WithMany() + .HasForeignKey("PeriodStart", "PeriodEnd"); + }); + + modelBuilder.Entity("Yavsc.Models.Chat.ChatConnection", b => + { + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("ApplicationUserId"); + }); + + modelBuilder.Entity("Yavsc.Models.Chat.ChatRoom", b => + { + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("ApplicationUserId"); + }); + + modelBuilder.Entity("Yavsc.Models.Chat.ChatRoomPresence", b => + { + b.HasOne("Yavsc.Models.Chat.ChatRoom") + .WithMany() + .HasForeignKey("ChannelName"); + + b.HasOne("Yavsc.Models.Chat.ChatConnection") + .WithMany() + .HasForeignKey("ChatUserConnectionId"); + }); + + modelBuilder.Entity("Yavsc.Models.Haircut.BrusherProfile", b => + { + b.HasOne("Yavsc.Models.Calendar.Schedule") + .WithMany() + .HasForeignKey("ScheduleOwnerId"); + + b.HasOne("Yavsc.Models.Workflow.PerformerProfile") + .WithMany() + .HasForeignKey("UserId"); + }); + + 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.Payment.PayPalPayment") + .WithMany() + .HasForeignKey("PaymentId"); + + b.HasOne("Yavsc.Models.Workflow.PerformerProfile") + .WithMany() + .HasForeignKey("PerformerId"); + + b.HasOne("Yavsc.Models.Haircut.HairPrestation") + .WithMany() + .HasForeignKey("PrestationId"); + + b.HasOne("Yavsc.Models.Haircut.BrusherProfile") + .WithMany() + .HasForeignKey("SelectedProfileUserId"); + }); + + 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.Payment.PayPalPayment") + .WithMany() + .HasForeignKey("PaymentId"); + + b.HasOne("Yavsc.Models.Workflow.PerformerProfile") + .WithMany() + .HasForeignKey("PerformerId"); + }); + + modelBuilder.Entity("Yavsc.Models.Haircut.HairPrestationCollectionItem", b => + { + b.HasOne("Yavsc.Models.Haircut.HairPrestation") + .WithMany() + .HasForeignKey("PrestationId"); + + b.HasOne("Yavsc.Models.Haircut.HairMultiCutQuery") + .WithMany() + .HasForeignKey("QueryId"); + }); + + modelBuilder.Entity("Yavsc.Models.Haircut.HairTaint", b => + { + b.HasOne("Yavsc.Models.Drawing.Color") + .WithMany() + .HasForeignKey("ColorId"); + }); + + modelBuilder.Entity("Yavsc.Models.Haircut.HairTaintInstance", b => + { + b.HasOne("Yavsc.Models.Haircut.HairPrestation") + .WithMany() + .HasForeignKey("PrestationId"); + + b.HasOne("Yavsc.Models.Haircut.HairTaint") + .WithMany() + .HasForeignKey("TaintId"); + }); + + modelBuilder.Entity("Yavsc.Models.Identity.GoogleCloudMobileDeclaration", b => + { + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("DeviceOwnerId"); + }); + + modelBuilder.Entity("Yavsc.Models.IT.Fixing.Bug", b => + { + b.HasOne("Yavsc.Models.IT.Maintaining.Feature") + .WithMany() + .HasForeignKey("FeatureId"); + }); + + modelBuilder.Entity("Yavsc.Models.Market.Service", b => + { + b.HasOne("Yavsc.Models.Workflow.Activity") + .WithMany() + .HasForeignKey("ContextId"); + }); + + modelBuilder.Entity("Yavsc.Models.Messaging.Announce", b => + { + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("OwnerId"); + }); + + 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.Payment.PayPalPayment", b => + { + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("ExecutorId"); + }); + + 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.HyperLink", b => + { + b.HasOne("Yavsc.Models.Haircut.BrusherProfile") + .WithMany() + .HasForeignKey("BrusherProfileUserId"); + + b.HasOne("Yavsc.Models.Payment.PayPalPayment") + .WithMany() + .HasForeignKey("PayPalPaymentCreationToken"); + }); + + 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.Payment.PayPalPayment") + .WithMany() + .HasForeignKey("PaymentId"); + + 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"); + }); + + modelBuilder.Entity("Yavsc.Server.Models.EMailing.MailingTemplate", b => + { + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("ManagerId"); + }); + + modelBuilder.Entity("Yavsc.Server.Models.IT.SourceCode.GitRepositoryReference", b => + { + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("OwnerId"); + }); + } + } +} diff --git a/Yavsc/Migrations/20180611003253_gitKey.cs b/Yavsc/Migrations/20180611003253_gitKey.cs new file mode 100644 index 00000000..37a4c15a --- /dev/null +++ b/Yavsc/Migrations/20180611003253_gitKey.cs @@ -0,0 +1,1679 @@ +using System; +using System.Collections.Generic; +using Microsoft.Data.Entity.Migrations; + +namespace Yavsc.Migrations +{ + public partial class gitKey : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "AspNetRoles", + columns: table => new + { + Id = table.Column(nullable: false), + ConcurrencyStamp = table.Column(nullable: true), + Name = table.Column(nullable: true), + NormalizedName = table.Column(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityRole", x => x.Id); + }); + migrationBuilder.CreateTable( + name: "Ban", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("Npgsql:Serial", true), + DateCreated = table.Column(nullable: false), + DateModified = table.Column(nullable: false), + UserCreated = table.Column(nullable: true), + UserModified = table.Column(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Ban", x => x.Id); + }); + migrationBuilder.CreateTable( + name: "Client", + columns: table => new + { + Id = table.Column(nullable: false), + Active = table.Column(nullable: false), + DisplayName = table.Column(nullable: true), + LogoutRedirectUri = table.Column(nullable: true), + RedirectUri = table.Column(nullable: true), + RefreshTokenLifeTime = table.Column(nullable: false), + Secret = table.Column(nullable: true), + Type = table.Column(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Client", x => x.Id); + }); + migrationBuilder.CreateTable( + name: "RefreshToken", + columns: table => new + { + Id = table.Column(nullable: false), + ClientId = table.Column(nullable: false), + ExpiresUtc = table.Column(nullable: false), + IssuedUtc = table.Column(nullable: false), + ProtectedTicket = table.Column(nullable: false), + Subject = table.Column(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_RefreshToken", x => x.Id); + }); + migrationBuilder.CreateTable( + name: "BankIdentity", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("Npgsql:Serial", true), + AccountNumber = table.Column(nullable: true), + BIC = table.Column(nullable: true), + BankCode = table.Column(nullable: true), + BankedKey = table.Column(nullable: false), + IBAN = table.Column(nullable: true), + WicketCode = table.Column(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_BankIdentity", x => x.Id); + }); + migrationBuilder.CreateTable( + name: "EstimateTemplate", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("Npgsql:Serial", true), + Description = table.Column(nullable: true), + OwnerId = table.Column(nullable: false), + Title = table.Column(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_EstimateTemplate", x => x.Id); + }); + migrationBuilder.CreateTable( + name: "ExceptionSIREN", + columns: table => new + { + SIREN = table.Column(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_ExceptionSIREN", x => x.SIREN); + }); + migrationBuilder.CreateTable( + name: "Period", + columns: table => new + { + Start = table.Column(nullable: false), + End = table.Column(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Period", x => new { x.Start, x.End }); + }); + migrationBuilder.CreateTable( + name: "Option", + columns: table => new + { + Code = table.Column(nullable: false), + CodeScrutin = table.Column(nullable: false), + DateCreated = table.Column(nullable: false), + DateModified = table.Column(nullable: false), + Description = table.Column(nullable: true), + UserCreated = table.Column(nullable: true), + UserModified = table.Column(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Option", x => new { x.Code, x.CodeScrutin }); + }); + migrationBuilder.CreateTable( + name: "Color", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("Npgsql:Serial", true), + Blue = table.Column(nullable: false), + Green = table.Column(nullable: false), + Name = table.Column(nullable: true), + Red = table.Column(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Color", x => x.Id); + }); + migrationBuilder.CreateTable( + name: "Form", + columns: table => new + { + Id = table.Column(nullable: false), + Summary = table.Column(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Form", x => x.Id); + }); + 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), + Length = table.Column(nullable: false), + Shampoo = table.Column(nullable: false), + Tech = table.Column(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_HairPrestation", x => x.Id); + }); + migrationBuilder.CreateTable( + name: "Feature", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("Npgsql:Serial", true), + Description = table.Column(nullable: true), + ShortName = table.Column(nullable: true), + Status = table.Column(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Feature", x => x.Id); + }); + 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: "ClientProviderInfo", + columns: table => new + { + UserId = table.Column(nullable: false), + Avatar = table.Column(nullable: true), + BillingAddressId = table.Column(nullable: false), + EMail = table.Column(nullable: true), + Phone = table.Column(nullable: true), + UserName = table.Column(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_ClientProviderInfo", x => x.UserId); + }); + migrationBuilder.CreateTable( + name: "Notification", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("Npgsql:Serial", true), + Target = table.Column(nullable: true), + body = table.Column(nullable: false), + click_action = table.Column(nullable: false), + color = table.Column(nullable: true), + icon = table.Column(nullable: true, defaultValue: "exclam"), + sound = table.Column(nullable: true), + tag = table.Column(nullable: true), + title = table.Column(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Notification", x => x.Id); + }); + migrationBuilder.CreateTable( + name: "Instrument", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("Npgsql:Serial", true), + Name = table.Column(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Instrument", x => x.Id); + }); + migrationBuilder.CreateTable( + name: "MusicalTendency", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("Npgsql:Serial", true), + Name = table.Column(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_MusicalTendency", x => x.Id); + }); + migrationBuilder.CreateTable( + name: "DjSettings", + columns: table => new + { + UserId = table.Column(nullable: false), + SoundCloudId = table.Column(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_DjSettings", x => x.UserId); + }); + migrationBuilder.CreateTable( + name: "GeneralSettings", + columns: table => new + { + UserId = table.Column(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_GeneralSettings", x => x.UserId); + }); + migrationBuilder.CreateTable( + name: "OAuth2Tokens", + columns: table => new + { + UserId = table.Column(nullable: false), + AccessToken = table.Column(nullable: true), + Expiration = table.Column(nullable: false), + ExpiresIn = table.Column(nullable: true), + RefreshToken = table.Column(nullable: true), + TokenType = table.Column(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_OAuth2Tokens", x => x.UserId); + }); + migrationBuilder.CreateTable( + name: "Location", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("Npgsql:Serial", true), + Address = table.Column(nullable: false), + Latitude = table.Column(nullable: false), + Longitude = table.Column(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Location", x => x.Id); + }); + migrationBuilder.CreateTable( + name: "Tag", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("Npgsql:Serial", true), + Name = table.Column(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Tag", x => x.Id); + }); + migrationBuilder.CreateTable( + name: "Skill", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("Npgsql:Serial", true), + Name = table.Column(nullable: true), + Rate = table.Column(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Skill", x => x.Id); + }); + migrationBuilder.CreateTable( + name: "Activity", + columns: table => new + { + Code = table.Column(nullable: false), + DateCreated = table.Column(nullable: false), + DateModified = table.Column(nullable: false), + Description = table.Column(nullable: true), + Hidden = table.Column(nullable: false), + ModeratorGroupName = table.Column(nullable: true), + Name = table.Column(nullable: false), + ParentCode = table.Column(nullable: true), + Photo = table.Column(nullable: true), + Rate = table.Column(nullable: false), + SettingsClassName = table.Column(nullable: true), + UserCreated = table.Column(nullable: true), + UserModified = table.Column(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Activity", x => x.Code); + table.ForeignKey( + name: "FK_Activity_Activity_ParentCode", + column: x => x.ParentCode, + principalTable: "Activity", + principalColumn: "Code", + onDelete: ReferentialAction.Restrict); + }); + migrationBuilder.CreateTable( + name: "FormationSettings", + columns: table => new + { + UserId = table.Column(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_FormationSettings", x => x.UserId); + }); + migrationBuilder.CreateTable( + name: "AspNetRoleClaims", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("Npgsql:Serial", true), + ClaimType = table.Column(nullable: true), + ClaimValue = table.Column(nullable: true), + RoleId = table.Column(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityRoleClaim", x => x.Id); + table.ForeignKey( + name: "FK_IdentityRoleClaim_IdentityRole_RoleId", + column: x => x.RoleId, + principalTable: "AspNetRoles", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + migrationBuilder.CreateTable( + name: "HairTaint", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("Npgsql:Serial", true), + Brand = table.Column(nullable: true), + ColorId = table.Column(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_HairTaint", x => x.Id); + table.ForeignKey( + name: "FK_HairTaint_Color_ColorId", + column: x => x.ColorId, + principalTable: "Color", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + migrationBuilder.CreateTable( + name: "Bug", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("Npgsql:Serial", true), + Description = table.Column(nullable: true), + FeatureId = table.Column(nullable: true), + Status = table.Column(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Bug", x => x.Id); + table.ForeignKey( + name: "FK_Bug_Feature_FeatureId", + column: x => x.FeatureId, + principalTable: "Feature", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + migrationBuilder.CreateTable( + name: "MusicalPreference", + columns: table => new + { + OwnerProfileId = table.Column(nullable: false), + DjSettingsUserId = table.Column(nullable: true), + GeneralSettingsUserId = table.Column(nullable: true), + Rate = table.Column(nullable: false), + TendencyId = table.Column(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_MusicalPreference", x => x.OwnerProfileId); + table.ForeignKey( + name: "FK_MusicalPreference_DjSettings_DjSettingsUserId", + column: x => x.DjSettingsUserId, + principalTable: "DjSettings", + principalColumn: "UserId", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_MusicalPreference_GeneralSettings_GeneralSettingsUserId", + column: x => x.GeneralSettingsUserId, + principalTable: "GeneralSettings", + principalColumn: "UserId", + onDelete: ReferentialAction.Restrict); + }); + migrationBuilder.CreateTable( + name: "AspNetUsers", + columns: table => new + { + Id = table.Column(nullable: false), + AccessFailedCount = table.Column(nullable: false), + AllowMonthlyEmail = table.Column(nullable: false), + Avatar = table.Column(nullable: true, defaultValue: "/images/Users/icon_user.png"), + BankInfoId = table.Column(nullable: true), + ConcurrencyStamp = table.Column(nullable: true), + DedicatedGoogleCalendar = table.Column(nullable: true), + DiskQuota = table.Column(nullable: false, defaultValue: 524288000L), + DiskUsage = table.Column(nullable: false), + Email = table.Column(nullable: true), + EmailConfirmed = table.Column(nullable: false), + FullName = table.Column(nullable: true), + LockoutEnabled = table.Column(nullable: false), + LockoutEnd = table.Column(nullable: true), + MaxFileSize = table.Column(nullable: false), + NormalizedEmail = table.Column(nullable: true), + NormalizedUserName = table.Column(nullable: true), + PasswordHash = table.Column(nullable: true), + PhoneNumber = table.Column(nullable: true), + PhoneNumberConfirmed = table.Column(nullable: false), + PostalAddressId = table.Column(nullable: true), + SecurityStamp = table.Column(nullable: true), + TwoFactorEnabled = table.Column(nullable: false), + UserName = table.Column(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_ApplicationUser", x => x.Id); + table.ForeignKey( + name: "FK_ApplicationUser_BankIdentity_BankInfoId", + column: x => x.BankInfoId, + principalTable: "BankIdentity", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_ApplicationUser_Location_PostalAddressId", + column: x => x.PostalAddressId, + principalTable: "Location", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + migrationBuilder.CreateTable( + name: "Service", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("Npgsql:Serial", true), + ContextId = table.Column(nullable: true), + Description = table.Column(nullable: true), + Name = table.Column(nullable: true), + Public = table.Column(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Service", x => x.Id); + table.ForeignKey( + name: "FK_Service_Activity_ContextId", + column: x => x.ContextId, + principalTable: "Activity", + principalColumn: "Code", + onDelete: ReferentialAction.Restrict); + }); + migrationBuilder.CreateTable( + name: "CommandForm", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("Npgsql:Serial", true), + ActionName = table.Column(nullable: true), + ActivityCode = table.Column(nullable: false), + Title = table.Column(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_CommandForm", x => x.Id); + table.ForeignKey( + name: "FK_CommandForm_Activity_ActivityCode", + column: x => x.ActivityCode, + principalTable: "Activity", + principalColumn: "Code", + onDelete: ReferentialAction.Cascade); + }); + migrationBuilder.CreateTable( + name: "HairTaintInstance", + columns: table => new + { + TaintId = table.Column(nullable: false), + PrestationId = table.Column(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_HairTaintInstance", x => new { x.TaintId, x.PrestationId }); + table.ForeignKey( + name: "FK_HairTaintInstance_HairPrestation_PrestationId", + column: x => x.PrestationId, + principalTable: "HairPrestation", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_HairTaintInstance_HairTaint_TaintId", + column: x => x.TaintId, + principalTable: "HairTaint", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + migrationBuilder.CreateTable( + name: "AspNetUserClaims", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("Npgsql:Serial", true), + ClaimType = table.Column(nullable: true), + ClaimValue = table.Column(nullable: true), + UserId = table.Column(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityUserClaim", x => x.Id); + table.ForeignKey( + name: "FK_IdentityUserClaim_ApplicationUser_UserId", + column: x => x.UserId, + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + migrationBuilder.CreateTable( + name: "AspNetUserLogins", + columns: table => new + { + LoginProvider = table.Column(nullable: false), + ProviderKey = table.Column(nullable: false), + ProviderDisplayName = table.Column(nullable: true), + UserId = table.Column(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityUserLogin", x => new { x.LoginProvider, x.ProviderKey }); + table.ForeignKey( + name: "FK_IdentityUserLogin_ApplicationUser_UserId", + column: x => x.UserId, + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + migrationBuilder.CreateTable( + name: "AspNetUserRoles", + columns: table => new + { + UserId = table.Column(nullable: false), + RoleId = table.Column(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityUserRole", x => new { x.UserId, x.RoleId }); + table.ForeignKey( + name: "FK_IdentityUserRole_IdentityRole_RoleId", + column: x => x.RoleId, + principalTable: "AspNetRoles", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_IdentityUserRole_ApplicationUser_UserId", + column: x => x.UserId, + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + migrationBuilder.CreateTable( + name: "BlackListed", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("Npgsql:Serial", true), + OwnerId = table.Column(nullable: false), + UserId = table.Column(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_BlackListed", x => x.Id); + table.ForeignKey( + name: "FK_BlackListed_ApplicationUser_OwnerId", + column: x => x.OwnerId, + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + migrationBuilder.CreateTable( + name: "AccountBalance", + columns: table => new + { + UserId = table.Column(nullable: false), + ContactCredits = table.Column(nullable: false), + Credits = table.Column(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AccountBalance", x => x.UserId); + table.ForeignKey( + name: "FK_AccountBalance_ApplicationUser_UserId", + column: x => x.UserId, + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + migrationBuilder.CreateTable( + name: "BlogPost", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("Npgsql:Serial", true), + AuthorId = table.Column(nullable: true), + Content = table.Column(nullable: true), + DateCreated = table.Column(nullable: false), + DateModified = table.Column(nullable: false), + Photo = table.Column(nullable: true), + Rate = table.Column(nullable: false), + Title = table.Column(nullable: true), + UserCreated = table.Column(nullable: true), + UserModified = table.Column(nullable: true), + Visible = table.Column(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_BlogPost", x => x.Id); + table.ForeignKey( + name: "FK_BlogPost_ApplicationUser_AuthorId", + column: x => x.AuthorId, + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + migrationBuilder.CreateTable( + name: "Schedule", + columns: table => new + { + OwnerId = table.Column(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Schedule", x => x.OwnerId); + table.ForeignKey( + name: "FK_Schedule_ApplicationUser_OwnerId", + column: x => x.OwnerId, + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + migrationBuilder.CreateTable( + name: "ChatConnection", + columns: table => new + { + ConnectionId = table.Column(nullable: false), + ApplicationUserId = table.Column(nullable: false), + Connected = table.Column(nullable: false), + UserAgent = table.Column(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_ChatConnection", x => x.ConnectionId); + table.ForeignKey( + name: "FK_ChatConnection_ApplicationUser_ApplicationUserId", + column: x => x.ApplicationUserId, + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + migrationBuilder.CreateTable( + name: "ChatRoom", + columns: table => new + { + Name = table.Column(nullable: false), + ApplicationUserId = table.Column(nullable: true), + Topic = table.Column(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_ChatRoom", x => x.Name); + table.ForeignKey( + name: "FK_ChatRoom_ApplicationUser_ApplicationUserId", + column: x => x.ApplicationUserId, + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + migrationBuilder.CreateTable( + name: "GoogleCloudMobileDeclaration", + columns: table => new + { + DeviceId = table.Column(nullable: false), + DeclarationDate = table.Column(nullable: false, defaultValueSql: "LOCALTIMESTAMP"), + DeviceOwnerId = table.Column(nullable: true), + GCMRegistrationId = table.Column(nullable: false), + LatestActivityUpdate = table.Column(nullable: false), + Model = table.Column(nullable: true), + Platform = table.Column(nullable: true), + Version = table.Column(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_GoogleCloudMobileDeclaration", x => x.DeviceId); + table.ForeignKey( + name: "FK_GoogleCloudMobileDeclaration_ApplicationUser_DeviceOwnerId", + column: x => x.DeviceOwnerId, + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + migrationBuilder.CreateTable( + name: "Announce", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("Npgsql:Serial", true), + For = table.Column(nullable: false), + Message = table.Column(nullable: true), + OwnerId = table.Column(nullable: true), + Sender = table.Column(nullable: true), + Topic = table.Column(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Announce", x => x.Id); + table.ForeignKey( + name: "FK_Announce_ApplicationUser_OwnerId", + column: x => x.OwnerId, + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + migrationBuilder.CreateTable( + name: "DimissClicked", + columns: table => new + { + UserId = table.Column(nullable: false), + NotificationId = table.Column(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_DimissClicked", x => new { x.UserId, x.NotificationId }); + table.ForeignKey( + name: "FK_DimissClicked_Notification_NotificationId", + column: x => x.NotificationId, + principalTable: "Notification", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_DimissClicked_ApplicationUser_UserId", + column: x => x.UserId, + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + migrationBuilder.CreateTable( + name: "PayPalPayment", + columns: table => new + { + CreationToken = table.Column(nullable: false), + DateCreated = table.Column(nullable: false), + DateModified = table.Column(nullable: false), + ExecutorId = table.Column(nullable: false), + OrderReference = table.Column(nullable: true), + PaypalPayerId = table.Column(nullable: true), + State = table.Column(nullable: true), + UserCreated = table.Column(nullable: true), + UserModified = table.Column(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_PayPalPayment", x => x.CreationToken); + table.ForeignKey( + name: "FK_PayPalPayment_ApplicationUser_ExecutorId", + column: x => x.ExecutorId, + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + migrationBuilder.CreateTable( + name: "Circle", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("Npgsql:Serial", true), + ApplicationUserId = table.Column(nullable: true), + Name = table.Column(nullable: true), + OwnerId = table.Column(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Circle", x => x.Id); + table.ForeignKey( + name: "FK_Circle_ApplicationUser_ApplicationUserId", + column: x => x.ApplicationUserId, + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + migrationBuilder.CreateTable( + name: "Contact", + columns: table => new + { + OwnerId = table.Column(nullable: false), + UserId = table.Column(nullable: false), + ApplicationUserId = table.Column(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Contact", x => new { x.OwnerId, x.UserId }); + table.ForeignKey( + name: "FK_Contact_ApplicationUser_ApplicationUserId", + column: x => x.ApplicationUserId, + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + migrationBuilder.CreateTable( + name: "PerformerProfile", + columns: table => new + { + PerformerId = table.Column(nullable: false), + AcceptNotifications = table.Column(nullable: false), + AcceptPublicContact = table.Column(nullable: false), + Active = table.Column(nullable: false), + MaxDailyCost = table.Column(nullable: true), + MinDailyCost = table.Column(nullable: true), + OrganizationAddressId = table.Column(nullable: false), + Rate = table.Column(nullable: false), + SIREN = table.Column(nullable: false), + UseGeoLocalizationToReduceDistanceWithClients = table.Column(nullable: false), + WebSite = table.Column(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_PerformerProfile", x => x.PerformerId); + table.ForeignKey( + name: "FK_PerformerProfile_Location_OrganizationAddressId", + column: x => x.OrganizationAddressId, + principalTable: "Location", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_PerformerProfile_ApplicationUser_PerformerId", + column: x => x.PerformerId, + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + migrationBuilder.CreateTable( + name: "MailingTemplate", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("Npgsql:Serial", true), + Body = table.Column(nullable: true), + DateCreated = table.Column(nullable: false), + DateModified = table.Column(nullable: false), + ManagerId = table.Column(nullable: true), + ReplyToAddress = table.Column(nullable: true), + ToSend = table.Column(nullable: false), + Topic = table.Column(nullable: true), + UserCreated = table.Column(nullable: true), + UserModified = table.Column(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_MailingTemplate", x => x.Id); + table.ForeignKey( + name: "FK_MailingTemplate_ApplicationUser_ManagerId", + column: x => x.ManagerId, + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + 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: "BalanceImpact", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("Npgsql:Serial", true), + BalanceId = table.Column(nullable: false), + ExecDate = table.Column(nullable: false), + Impact = table.Column(nullable: false), + Reason = table.Column(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_BalanceImpact", x => x.Id); + table.ForeignKey( + name: "FK_BalanceImpact_AccountBalance_BalanceId", + column: x => x.BalanceId, + principalTable: "AccountBalance", + principalColumn: "UserId", + onDelete: ReferentialAction.Cascade); + }); + migrationBuilder.CreateTable( + name: "BlogTag", + columns: table => new + { + PostId = table.Column(nullable: false), + TagId = table.Column(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_BlogTag", x => new { x.PostId, x.TagId }); + table.ForeignKey( + name: "FK_BlogTag_BlogPost_PostId", + column: x => x.PostId, + principalTable: "BlogPost", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_BlogTag_Tag_TagId", + column: x => x.TagId, + principalTable: "Tag", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + migrationBuilder.CreateTable( + name: "Comment", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("Npgsql:Serial", true), + AuthorId = table.Column(nullable: false), + Content = table.Column(nullable: true), + DateCreated = table.Column(nullable: false), + DateModified = table.Column(nullable: false), + ParentId = table.Column(nullable: true), + PostId = table.Column(nullable: false), + UserCreated = table.Column(nullable: true), + UserModified = table.Column(nullable: true), + Visible = table.Column(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Comment", x => x.Id); + table.ForeignKey( + name: "FK_Comment_ApplicationUser_AuthorId", + column: x => x.AuthorId, + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_Comment_Comment_ParentId", + column: x => x.ParentId, + principalTable: "Comment", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_Comment_BlogPost_PostId", + column: x => x.PostId, + principalTable: "BlogPost", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + migrationBuilder.CreateTable( + name: "ScheduledEvent", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("Npgsql:Serial", true), + PeriodEnd = table.Column(nullable: true), + PeriodStart = table.Column(nullable: true), + Reccurence = table.Column(nullable: false), + ScheduleOwnerId = table.Column(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_ScheduledEvent", x => x.Id); + table.ForeignKey( + name: "FK_ScheduledEvent_Schedule_ScheduleOwnerId", + column: x => x.ScheduleOwnerId, + principalTable: "Schedule", + principalColumn: "OwnerId", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_ScheduledEvent_Period_PeriodStart_PeriodEnd", + columns: x => new { x.PeriodStart, x.PeriodEnd }, + principalTable: "Period", + principalColumns: new[] { "Start", "End" }, + onDelete: ReferentialAction.Restrict); + }); + migrationBuilder.CreateTable( + name: "ChatRoomPresence", + columns: table => new + { + ChannelName = table.Column(nullable: false), + ChatUserConnectionId = table.Column(nullable: false), + Level = table.Column(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_ChatRoomPresence", x => new { x.ChannelName, x.ChatUserConnectionId }); + table.ForeignKey( + name: "FK_ChatRoomPresence_ChatRoom_ChannelName", + column: x => x.ChannelName, + principalTable: "ChatRoom", + principalColumn: "Name", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_ChatRoomPresence_ChatConnection_ChatUserConnectionId", + column: x => x.ChatUserConnectionId, + principalTable: "ChatConnection", + principalColumn: "ConnectionId", + onDelete: ReferentialAction.Restrict); + }); + migrationBuilder.CreateTable( + name: "CircleAuthorizationToBlogPost", + columns: table => new + { + CircleId = table.Column(nullable: false), + BlogPostId = table.Column(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_CircleAuthorizationToBlogPost", x => new { x.CircleId, x.BlogPostId }); + table.ForeignKey( + name: "FK_CircleAuthorizationToBlogPost_BlogPost_BlogPostId", + column: x => x.BlogPostId, + principalTable: "BlogPost", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_CircleAuthorizationToBlogPost_Circle_CircleId", + column: x => x.CircleId, + principalTable: "Circle", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + migrationBuilder.CreateTable( + name: "CircleMember", + columns: table => new + { + MemberId = table.Column(nullable: false), + CircleId = table.Column(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_CircleMember", x => new { x.MemberId, x.CircleId }); + table.ForeignKey( + name: "FK_CircleMember_Circle_CircleId", + column: x => x.CircleId, + principalTable: "Circle", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_CircleMember_ApplicationUser_MemberId", + column: x => x.MemberId, + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + migrationBuilder.CreateTable( + name: "BrusherProfile", + columns: table => new + { + UserId = table.Column(nullable: false), + ActionDistance = table.Column(nullable: false), + CarePrice = table.Column(nullable: false), + FlatFeeDiscount = table.Column(nullable: false), + HalfBalayagePrice = table.Column(nullable: false), + HalfBrushingPrice = table.Column(nullable: false), + HalfColorPrice = table.Column(nullable: false), + HalfDefrisPrice = table.Column(nullable: false), + HalfFoldingPrice = table.Column(nullable: false), + HalfMechPrice = table.Column(nullable: false), + HalfMultiColorPrice = table.Column(nullable: false), + HalfPermanentPrice = table.Column(nullable: false), + KidCutPrice = table.Column(nullable: false), + LongBalayagePrice = table.Column(nullable: false), + LongBrushingPrice = table.Column(nullable: false), + LongColorPrice = table.Column(nullable: false), + LongDefrisPrice = table.Column(nullable: false), + LongFoldingPrice = table.Column(nullable: false), + LongMechPrice = table.Column(nullable: false), + LongMultiColorPrice = table.Column(nullable: false), + LongPermanentPrice = table.Column(nullable: false), + ManBrushPrice = table.Column(nullable: false), + ManCutPrice = table.Column(nullable: false), + ScheduleOwnerId = table.Column(nullable: true), + ShampooPrice = table.Column(nullable: false), + ShortBalayagePrice = table.Column(nullable: false), + ShortBrushingPrice = table.Column(nullable: false), + ShortColorPrice = table.Column(nullable: false), + ShortDefrisPrice = table.Column(nullable: false), + ShortFoldingPrice = table.Column(nullable: false), + ShortMechPrice = table.Column(nullable: false), + ShortMultiColorPrice = table.Column(nullable: false), + ShortPermanentPrice = table.Column(nullable: false), + WomenHalfCutPrice = table.Column(nullable: false), + WomenLongCutPrice = table.Column(nullable: false), + WomenShortCutPrice = table.Column(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_BrusherProfile", x => x.UserId); + table.ForeignKey( + name: "FK_BrusherProfile_Schedule_ScheduleOwnerId", + column: x => x.ScheduleOwnerId, + principalTable: "Schedule", + principalColumn: "OwnerId", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_BrusherProfile_PerformerProfile_UserId", + column: x => x.UserId, + principalTable: "PerformerProfile", + principalColumn: "PerformerId", + onDelete: ReferentialAction.Cascade); + }); + 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), + Consent = table.Column(nullable: false), + DateCreated = table.Column(nullable: false), + DateModified = table.Column(nullable: false), + EventDate = table.Column(nullable: false), + LocationId = table.Column(nullable: true), + PaymentId = table.Column(nullable: true), + PerformerId = table.Column(nullable: false), + Previsional = table.Column(nullable: true), + Rejected = table.Column(nullable: false), + RejectedAt = table.Column(nullable: false), + 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_PayPalPayment_PaymentId", + column: x => x.PaymentId, + principalTable: "PayPalPayment", + principalColumn: "CreationToken", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_HairMultiCutQuery_PerformerProfile_PerformerId", + column: x => x.PerformerId, + principalTable: "PerformerProfile", + principalColumn: "PerformerId", + onDelete: ReferentialAction.Cascade); + }); + migrationBuilder.CreateTable( + name: "Instrumentation", + columns: table => new + { + InstrumentId = table.Column(nullable: false), + UserId = table.Column(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Instrumentation", x => new { x.InstrumentId, x.UserId }); + table.ForeignKey( + name: "FK_Instrumentation_Instrument_InstrumentId", + column: x => x.InstrumentId, + principalTable: "Instrument", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_Instrumentation_PerformerProfile_UserId", + column: x => x.UserId, + principalTable: "PerformerProfile", + principalColumn: "PerformerId", + onDelete: ReferentialAction.Restrict); + }); + migrationBuilder.CreateTable( + name: "CoWorking", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("Npgsql:Serial", true), + FormationSettingsUserId = table.Column(nullable: true), + PerformerId = table.Column(nullable: true), + WorkingForId = table.Column(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_CoWorking", x => x.Id); + table.ForeignKey( + name: "FK_CoWorking_FormationSettings_FormationSettingsUserId", + column: x => x.FormationSettingsUserId, + principalTable: "FormationSettings", + principalColumn: "UserId", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_CoWorking_PerformerProfile_PerformerId", + column: x => x.PerformerId, + principalTable: "PerformerProfile", + principalColumn: "PerformerId", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_CoWorking_ApplicationUser_WorkingForId", + column: x => x.WorkingForId, + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + 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), + Consent = table.Column(nullable: false), + DateCreated = table.Column(nullable: false), + DateModified = table.Column(nullable: false), + EventDate = table.Column(nullable: false), + LocationId = table.Column(nullable: true), + LocationType = table.Column(nullable: false), + PaymentId = table.Column(nullable: true), + PerformerId = table.Column(nullable: false), + Previsional = table.Column(nullable: true), + Reason = table.Column(nullable: true), + Rejected = table.Column(nullable: false), + RejectedAt = table.Column(nullable: false), + 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_PayPalPayment_PaymentId", + column: x => x.PaymentId, + principalTable: "PayPalPayment", + principalColumn: "CreationToken", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_RdvQuery_PerformerProfile_PerformerId", + column: x => x.PerformerId, + principalTable: "PerformerProfile", + principalColumn: "PerformerId", + onDelete: ReferentialAction.Cascade); + }); + migrationBuilder.CreateTable( + name: "UserActivity", + columns: table => new + { + DoesCode = table.Column(nullable: false), + UserId = table.Column(nullable: false), + Weight = table.Column(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_UserActivity", x => new { x.DoesCode, x.UserId }); + table.ForeignKey( + name: "FK_UserActivity_Activity_DoesCode", + column: x => x.DoesCode, + principalTable: "Activity", + principalColumn: "Code", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_UserActivity_PerformerProfile_UserId", + column: x => x.UserId, + principalTable: "PerformerProfile", + principalColumn: "PerformerId", + onDelete: ReferentialAction.Cascade); + }); + migrationBuilder.CreateTable( + name: "HairCutQuery", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("Npgsql:Serial", true), + ActivityCode = table.Column(nullable: false), + AdditionalInfo = table.Column(nullable: true), + ClientId = table.Column(nullable: false), + Consent = table.Column(nullable: false), + DateCreated = table.Column(nullable: false), + DateModified = table.Column(nullable: false), + EventDate = table.Column(nullable: true), + LocationId = table.Column(nullable: true), + PaymentId = table.Column(nullable: true), + PerformerId = table.Column(nullable: false), + PrestationId = table.Column(nullable: false), + Previsional = table.Column(nullable: true), + Rejected = table.Column(nullable: false), + RejectedAt = table.Column(nullable: false), + SelectedProfileUserId = 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_PayPalPayment_PaymentId", + column: x => x.PaymentId, + principalTable: "PayPalPayment", + principalColumn: "CreationToken", + 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.Cascade); + table.ForeignKey( + name: "FK_HairCutQuery_BrusherProfile_SelectedProfileUserId", + column: x => x.SelectedProfileUserId, + principalTable: "BrusherProfile", + principalColumn: "UserId", + onDelete: ReferentialAction.Restrict); + }); + migrationBuilder.CreateTable( + name: "HyperLink", + columns: table => new + { + HRef = table.Column(nullable: false), + Method = table.Column(nullable: false), + BrusherProfileUserId = table.Column(nullable: true), + ContentType = table.Column(nullable: true), + PayPalPaymentCreationToken = table.Column(nullable: true), + Rel = table.Column(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_HyperLink", x => new { x.HRef, x.Method }); + table.ForeignKey( + name: "FK_HyperLink_BrusherProfile_BrusherProfileUserId", + column: x => x.BrusherProfileUserId, + principalTable: "BrusherProfile", + principalColumn: "UserId", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_HyperLink_PayPalPayment_PayPalPaymentCreationToken", + column: x => x.PayPalPaymentCreationToken, + principalTable: "PayPalPayment", + principalColumn: "CreationToken", + onDelete: ReferentialAction.Restrict); + }); + migrationBuilder.CreateTable( + name: "HairPrestationCollectionItem", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("Npgsql:Serial", true), + PrestationId = table.Column(nullable: false), + QueryId = table.Column(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_HairPrestationCollectionItem", x => x.Id); + table.ForeignKey( + name: "FK_HairPrestationCollectionItem_HairPrestation_PrestationId", + column: x => x.PrestationId, + principalTable: "HairPrestation", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_HairPrestationCollectionItem_HairMultiCutQuery_QueryId", + column: x => x.QueryId, + principalTable: "HairMultiCutQuery", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + migrationBuilder.CreateTable( + name: "Estimate", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("Npgsql:Serial", true), + AttachedFilesString = table.Column(nullable: true), + AttachedGraphicsString = table.Column(nullable: true), + ClientId = table.Column(nullable: false), + ClientValidationDate = table.Column(nullable: false), + CommandId = table.Column(nullable: true), + CommandType = table.Column(nullable: false), + Description = table.Column(nullable: true), + OwnerId = table.Column(nullable: true), + ProviderValidationDate = table.Column(nullable: false), + Title = table.Column(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Estimate", x => x.Id); + table.ForeignKey( + name: "FK_Estimate_ApplicationUser_ClientId", + column: x => x.ClientId, + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_Estimate_RdvQuery_CommandId", + column: x => x.CommandId, + principalTable: "RdvQuery", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_Estimate_PerformerProfile_OwnerId", + column: x => x.OwnerId, + principalTable: "PerformerProfile", + principalColumn: "PerformerId", + onDelete: ReferentialAction.Restrict); + }); + migrationBuilder.CreateTable( + name: "CommandLine", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("Npgsql:Serial", true), + Count = table.Column(nullable: false), + Currency = table.Column(nullable: true), + Description = table.Column(nullable: false), + EstimateId = table.Column(nullable: false), + EstimateTemplateId = table.Column(nullable: true), + Name = table.Column(nullable: false), + UnitaryCost = table.Column(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_CommandLine", x => x.Id); + table.ForeignKey( + name: "FK_CommandLine_Estimate_EstimateId", + column: x => x.EstimateId, + principalTable: "Estimate", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_CommandLine_EstimateTemplate_EstimateTemplateId", + column: x => x.EstimateTemplateId, + principalTable: "EstimateTemplate", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + migrationBuilder.CreateIndex( + name: "RoleNameIndex", + table: "AspNetRoles", + column: "NormalizedName"); + migrationBuilder.CreateIndex( + name: "EmailIndex", + table: "AspNetUsers", + column: "NormalizedEmail"); + migrationBuilder.CreateIndex( + name: "UserNameIndex", + table: "AspNetUsers", + column: "NormalizedUserName"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable("AspNetRoleClaims"); + migrationBuilder.DropTable("AspNetUserClaims"); + migrationBuilder.DropTable("AspNetUserLogins"); + migrationBuilder.DropTable("AspNetUserRoles"); + migrationBuilder.DropTable("Ban"); + migrationBuilder.DropTable("BlackListed"); + migrationBuilder.DropTable("CircleAuthorizationToBlogPost"); + migrationBuilder.DropTable("Client"); + migrationBuilder.DropTable("RefreshToken"); + migrationBuilder.DropTable("BalanceImpact"); + migrationBuilder.DropTable("CommandLine"); + migrationBuilder.DropTable("ExceptionSIREN"); + migrationBuilder.DropTable("BlogTag"); + migrationBuilder.DropTable("Comment"); + migrationBuilder.DropTable("ScheduledEvent"); + migrationBuilder.DropTable("ChatRoomPresence"); + migrationBuilder.DropTable("Option"); + migrationBuilder.DropTable("Form"); + migrationBuilder.DropTable("HairCutQuery"); + migrationBuilder.DropTable("HairPrestationCollectionItem"); + migrationBuilder.DropTable("HairTaintInstance"); + migrationBuilder.DropTable("GoogleCloudMobileDeclaration"); + migrationBuilder.DropTable("Bug"); + migrationBuilder.DropTable("Product"); + migrationBuilder.DropTable("Service"); + migrationBuilder.DropTable("Announce"); + migrationBuilder.DropTable("ClientProviderInfo"); + migrationBuilder.DropTable("DimissClicked"); + migrationBuilder.DropTable("MusicalPreference"); + migrationBuilder.DropTable("MusicalTendency"); + migrationBuilder.DropTable("Instrumentation"); + migrationBuilder.DropTable("OAuth2Tokens"); + migrationBuilder.DropTable("CircleMember"); + migrationBuilder.DropTable("Contact"); + migrationBuilder.DropTable("HyperLink"); + migrationBuilder.DropTable("Skill"); + migrationBuilder.DropTable("CommandForm"); + migrationBuilder.DropTable("CoWorking"); + migrationBuilder.DropTable("UserActivity"); + migrationBuilder.DropTable("MailingTemplate"); + migrationBuilder.DropTable("GitRepositoryReference"); + migrationBuilder.DropTable("AspNetRoles"); + migrationBuilder.DropTable("AccountBalance"); + migrationBuilder.DropTable("Estimate"); + migrationBuilder.DropTable("EstimateTemplate"); + migrationBuilder.DropTable("Tag"); + migrationBuilder.DropTable("BlogPost"); + migrationBuilder.DropTable("Period"); + migrationBuilder.DropTable("ChatRoom"); + migrationBuilder.DropTable("ChatConnection"); + migrationBuilder.DropTable("HairMultiCutQuery"); + migrationBuilder.DropTable("HairPrestation"); + migrationBuilder.DropTable("HairTaint"); + migrationBuilder.DropTable("Feature"); + migrationBuilder.DropTable("Notification"); + migrationBuilder.DropTable("DjSettings"); + migrationBuilder.DropTable("GeneralSettings"); + migrationBuilder.DropTable("Instrument"); + migrationBuilder.DropTable("Circle"); + migrationBuilder.DropTable("BrusherProfile"); + migrationBuilder.DropTable("FormationSettings"); + migrationBuilder.DropTable("RdvQuery"); + migrationBuilder.DropTable("Color"); + migrationBuilder.DropTable("Schedule"); + migrationBuilder.DropTable("Activity"); + migrationBuilder.DropTable("PayPalPayment"); + migrationBuilder.DropTable("PerformerProfile"); + migrationBuilder.DropTable("AspNetUsers"); + migrationBuilder.DropTable("BankIdentity"); + migrationBuilder.DropTable("Location"); + } + } +} diff --git a/Yavsc/Migrations/ApplicationDbContextModelSnapshot.cs b/Yavsc/Migrations/ApplicationDbContextModelSnapshot.cs index 2ffb71c0..64924462 100644 --- a/Yavsc/Migrations/ApplicationDbContextModelSnapshot.cs +++ b/Yavsc/Migrations/ApplicationDbContextModelSnapshot.cs @@ -1341,13 +1341,13 @@ namespace Yavsc.Migrations { b.Property("Path"); - b.Property("Url"); - b.Property("Branch"); b.Property("OwnerId"); - b.HasKey("Path", "Url", "Branch"); + b.Property("Url"); + + b.HasKey("Path"); }); modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim", b => diff --git a/Yavsc/Settings/SiteSettings.cs b/Yavsc/Settings/SiteSettings.cs index 9aa14fc4..45f4b068 100644 --- a/Yavsc/Settings/SiteSettings.cs +++ b/Yavsc/Settings/SiteSettings.cs @@ -36,7 +36,7 @@ namespace Yavsc public long Quota { get; set; } public string Blog { get; set; } public string Bills { get; set; } - public string GitRepository { get; set; } + public string GitRepository { get; set; } = "sources"; public string BusinessName { get; set; } public string Street { get; set; } diff --git a/Yavsc/Startup/Startup.FileServer.cs b/Yavsc/Startup/Startup.FileServer.cs index d1f90880..eb000928 100644 --- a/Yavsc/Startup/Startup.FileServer.cs +++ b/Yavsc/Startup/Startup.FileServer.cs @@ -53,7 +53,12 @@ namespace Yavsc RequestPath = new PathString(Constants.AvatarsPath), EnableDirectoryBrowsing = env.IsDevelopment() }; + + var gitdirinfo = new DirectoryInfo(Startup.SiteSetup.GitRepository); + GitDirName = gitdirinfo.FullName; + if (!gitdirinfo.Exists) gitdirinfo.Create(); + GitOptions = new FileServerOptions() { FileProvider = new PhysicalFileProvider(GitDirName), @@ -61,11 +66,11 @@ namespace Yavsc EnableDirectoryBrowsing = env.IsDevelopment() }; - app.UseFileServer(UserFilesOptions); app.UseFileServer(AvatarsOptions); + app.UseFileServer(GitOptions); app.UseStaticFiles(); } } diff --git a/Yavsc/Views/Git/Create.cshtml b/Yavsc/Views/Git/Create.cshtml index 8790ec7f..62d695a1 100644 --- a/Yavsc/Views/Git/Create.cshtml +++ b/Yavsc/Views/Git/Create.cshtml @@ -29,12 +29,6 @@ -
- -
- -
-
diff --git a/Yavsc/Views/Git/Index.cshtml b/Yavsc/Views/Git/Index.cshtml index 2aaf0a0f..636adadb 100644 --- a/Yavsc/Views/Git/Index.cshtml +++ b/Yavsc/Views/Git/Index.cshtml @@ -11,15 +11,19 @@

- + + @foreach (var item in Model) { + } diff --git a/rc-num.txt b/rc-num.txt index ea27ef16..f699b4cb 100644 --- a/rc-num.txt +++ b/rc-num.txt @@ -1 +1 @@ -20-alpha4 +20-alpha5
Chemin
- @Html.ActionLink("Edit", "Edit", new { /* id=item.PrimaryKey */ }) | - @Html.ActionLink("Details", "Details", new { /* id=item.PrimaryKey */ }) | - @Html.ActionLink("Delete", "Delete", new { /* id=item.PrimaryKey */ }) + @item.Path + + @Html.ActionLink("Edit", "Edit", new { id=item.Path }) | + @Html.ActionLink("Details", "Details", new { id=item.Path }) | + @Html.ActionLink("Delete", "Delete", new { id=item.Path })