From efcb1620d695addef8f3a6f765f26451b6632325 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Sun, 26 Mar 2023 20:41:42 +0100 Subject: [PATCH] migration applied --- src/Yavsc.Server/Settings/SiteSettings.cs | 28 +- src/Yavsc/Controllers/HomeController.cs | 141 +- src/Yavsc/Controllers/HomeController.cs.new | 31 + src/Yavsc/Helpers/ControllerHelpers.cs | 3 +- .../Migrations/2018/20180625113528_Git.cs | 2 +- .../20230326173049_net7.Designer.cs | 3554 +++++++++ src/Yavsc/Migrations/20230326173049_net7.cs | 7089 +++++++++++++++++ .../ApplicationDbContextModelSnapshot.cs | 3005 +++++-- src/Yavsc/Models/ApplicationDbContext.cs | 2 + src/Yavsc/Program.cs | 2 +- src/Yavsc/Startup/Startup.cs | 44 +- src/Yavsc/Views/Home.new/About.cshtml | 159 + src/Yavsc/Views/Home.new/About.pt.cshtml | 163 + src/Yavsc/Views/Home.new/AboutAccess.cshtml | 38 + src/Yavsc/Views/Home.new/AboutMarkdown.cshtml | 19 + src/Yavsc/Views/Home.new/Audio.cshtml | 9 + src/Yavsc/Views/Home.new/Basket.cshtml | 10 + src/Yavsc/Views/Home.new/CGV.cshtml | 13 + src/Yavsc/Views/Home.new/Chat.cshtml | 22 + src/Yavsc/Views/Home.new/Contact.cshtml | 17 + src/Yavsc/Views/Home.new/Dash.cshtml | 19 + src/Yavsc/Views/Home.new/Index.cshtml | 8 + .../Views/{Home => Home.new}/Index.cshtml.old | 0 src/Yavsc/Views/Home.new/Privacy.cshtml | 6 + .../{Home => Home.new}/Privacy.cshtml.old | 0 src/Yavsc/Views/Home.new/Todo.cshtml | 17 + src/Yavsc/Views/Home.new/VideoChat.cshtml | 76 + src/Yavsc/Views/Home/About.cshtml | 16 +- src/Yavsc/Views/Home/About.pt.cshtml | 6 +- src/Yavsc/Views/Home/AboutAccess.cshtml | 4 +- src/Yavsc/Views/Home/AboutMarkdown.cshtml | 2 +- src/Yavsc/Views/Home/Audio.cshtml | 2 +- src/Yavsc/Views/Home/Dash.cshtml | 2 +- src/Yavsc/Views/Home/Index.cshtml | 105 +- src/Yavsc/Views/Home/Privacy.cshtml | 14 +- src/Yavsc/Views/Home/Todo.cshtml | 4 +- src/Yavsc/Views/Home/VideoChat.cshtml | 4 +- src/Yavsc/Views/_ViewImports.cshtml | 2 + src/Yavsc/Yavsc.csproj | 4 +- src/Yavsc/appsettings.Development.json.old | 86 - src/Yavsc/appsettings.json | 67 +- 41 files changed, 13882 insertions(+), 913 deletions(-) create mode 100644 src/Yavsc/Controllers/HomeController.cs.new create mode 100644 src/Yavsc/Migrations/20230326173049_net7.Designer.cs create mode 100644 src/Yavsc/Migrations/20230326173049_net7.cs create mode 100755 src/Yavsc/Views/Home.new/About.cshtml create mode 100755 src/Yavsc/Views/Home.new/About.pt.cshtml create mode 100644 src/Yavsc/Views/Home.new/AboutAccess.cshtml create mode 100644 src/Yavsc/Views/Home.new/AboutMarkdown.cshtml create mode 100644 src/Yavsc/Views/Home.new/Audio.cshtml create mode 100644 src/Yavsc/Views/Home.new/Basket.cshtml create mode 100644 src/Yavsc/Views/Home.new/CGV.cshtml create mode 100644 src/Yavsc/Views/Home.new/Chat.cshtml create mode 100755 src/Yavsc/Views/Home.new/Contact.cshtml create mode 100644 src/Yavsc/Views/Home.new/Dash.cshtml create mode 100644 src/Yavsc/Views/Home.new/Index.cshtml rename src/Yavsc/Views/{Home => Home.new}/Index.cshtml.old (100%) create mode 100644 src/Yavsc/Views/Home.new/Privacy.cshtml rename src/Yavsc/Views/{Home => Home.new}/Privacy.cshtml.old (100%) create mode 100755 src/Yavsc/Views/Home.new/Todo.cshtml create mode 100644 src/Yavsc/Views/Home.new/VideoChat.cshtml mode change 100644 => 100755 src/Yavsc/Views/Home/Index.cshtml delete mode 100755 src/Yavsc/appsettings.Development.json.old diff --git a/src/Yavsc.Server/Settings/SiteSettings.cs b/src/Yavsc.Server/Settings/SiteSettings.cs index ede3c086..dc5ae869 100644 --- a/src/Yavsc.Server/Settings/SiteSettings.cs +++ b/src/Yavsc.Server/Settings/SiteSettings.cs @@ -7,21 +7,21 @@ namespace Yavsc public string Title { get; set; } public string Slogan { get; set; } - public string StyleSheet { get; set; } - public string FavIcon { get; set; } - public string Logo { get; set; } + public string StyleSheet { get; set; } + public string FavIcon { get; set; } + public string Logo { get; set; } /// /// Conceptually, /// This authorisation server only has this present site as unique audience. /// /// - public string Audience { get; set; } + public string Audience { get; set; } /// /// it's a very small company, with one domaine name only, /// so let it be the same as in the Audience field. /// /// - public string Authority { get; set; } + public string Authority { get; set; } /// /// Owner's email /// @@ -34,16 +34,16 @@ namespace Yavsc public Contact Admin { get; set; } public string DataDir { get; set; } - public string Avatars { get; set; } - public long Quota { get; set; } - public string Blog { get; set; } - public string Bills { get; set; } + public string Avatars { get; set; } = "avatars"; + public long Quota { get; set; } + public string Blog { get; set; } = "blogs"; + public string Bills { get; set; } = "bills"; public string GitRepository { get; set; } = "sources"; - public string BusinessName { get; set; } - public string Street { get; set; } - public string PostalCode { get; set; } - public string CountryCode { get; set; } + public string BusinessName { get; set; } + public string Street { get; set; } + public string PostalCode { get; set; } + public string CountryCode { get; set; } public string HomeViewName { get; set; } /// @@ -51,7 +51,7 @@ namespace Yavsc /// generated pdf files using pandoc /// /// The temporary directory to use - public string TempDir { get; set; } = "Temp"; + public string TempDir { get; set; } = "temp"; /// /// Only one performer will capture payments diff --git a/src/Yavsc/Controllers/HomeController.cs b/src/Yavsc/Controllers/HomeController.cs index ddf01adb..9edbe1f1 100644 --- a/src/Yavsc/Controllers/HomeController.cs +++ b/src/Yavsc/Controllers/HomeController.cs @@ -1,31 +1,132 @@ -using System.Diagnostics; using Microsoft.AspNetCore.Mvc; using Yavsc.Models; +using Yavsc.Helpers; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc.Localization; +using Microsoft.EntityFrameworkCore; +using Microsoft.AspNetCore.Diagnostics; +using Microsoft.Extensions.Options; -namespace Yavsc.Controllers; - -public class HomeController : Controller +namespace Yavsc.Controllers { - private readonly ILogger _logger; - public HomeController(ILogger logger) + [AllowAnonymous] + public class HomeController : Controller { - _logger = logger; - } + readonly ApplicationDbContext _dbContext; - public IActionResult Index() - { - return View(); - } + readonly IHtmlLocalizer _localizer; - public IActionResult Privacy() - { - return View(); - } + private SiteSettings siteSettings; + public HomeController(ILogger logger, + IHtmlLocalizer localizer, + ApplicationDbContext context, + IOptions settingsOptions) + { + _localizer = localizer; + _dbContext = context; + siteSettings = settingsOptions.Value; + } + + public async Task Index(string id) + { + ViewBag.IsFromSecureProx = Request.Headers.ContainsKey(Constants.SshHeaderKey) && Request.Headers[Constants.SshHeaderKey] == "on"; + ViewBag.SecureHomeUrl = "https://" + Request.Headers["X-Forwarded-Host"]; + ViewBag.SshHeaderKey = Request.Headers[Constants.SshHeaderKey]; + var uid = User.GetUserId(); + long[] clicked = null; + if (uid == null) + { + await HttpContext.Session.LoadAsync(); + var strclicked = HttpContext.Session.GetString("clicked"); + if (strclicked != null) clicked = strclicked.Split(':').Select(c => long.Parse(c)).ToArray(); + if (clicked == null) clicked = new long[0]; + } + else clicked = _dbContext.DimissClicked.Where(d => d.UserId == uid).Select(d => d.NotificationId).ToArray(); + var notes = _dbContext.Notification.Where( + n => !clicked.Contains(n.Id) + ); + if (notes.Any()) this.Notify(notes); + + ViewData["HaircutCommandCount"] = _dbContext.HairCutQueries.Where( + q => q.ClientId == uid && q.Status < QueryStatus.Failed + ).Count(); + var toShow = _dbContext.Activities + .Include(a => a.Forms) + .Include(a => a.Parent) + .Include(a => a.Children) + .Where(a => !a.Hidden) + .Where(a => a.ParentCode == id) + .OrderByDescending(a => a.Rate).ToList(); + + foreach (var a in toShow) + { + a.Children = a.Children.Where(c => !c.Hidden).ToList(); + } + return View(toShow); + } + public async Task About() + { + FileInfo fi = new FileInfo("wwwroot/version"); + return View("About", fi.Exists ? _localizer["Version logicielle: "] + await fi.OpenText().ReadToEndAsync() : _localizer["Aucune information sur la version logicielle n'est publiée."]); + } + public IActionResult Privacy() + { + return View(); + } + public IActionResult AboutMarkdown() + { + return View(); + } + + public IActionResult Contact() + { + return View(); + } + public IActionResult Dash() + { + return View(); + } + public ActionResult Chat() + { + if (User.Identity.IsAuthenticated) + { + ViewBag.IsAuthenticated = true; + string uid = User.GetUserId(); + ViewBag.Contacts = _dbContext.Contact.Where(c => c.OwnerId == uid) + ; + } + else ViewBag.IsAuthenticated = false; + return View(); + } + + public IActionResult Error() + { + var feature = this.HttpContext.Features.Get(); + + return View("~/Views/Shared/Error.cshtml", feature?.Error); + } + public IActionResult Status(int id) + { + ViewBag.StatusCode = id; + return View("~/Views/Shared/Status.cshtml"); + } + public IActionResult Todo() + { + User.GetUserId(); + + return View(); + } + + public IActionResult VideoChat() + { + return View(); + } + + public IActionResult Audio() + { + return View(); + } - [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] - public IActionResult Error() - { - return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier }); } } diff --git a/src/Yavsc/Controllers/HomeController.cs.new b/src/Yavsc/Controllers/HomeController.cs.new new file mode 100644 index 00000000..ddf01adb --- /dev/null +++ b/src/Yavsc/Controllers/HomeController.cs.new @@ -0,0 +1,31 @@ +using System.Diagnostics; +using Microsoft.AspNetCore.Mvc; +using Yavsc.Models; + +namespace Yavsc.Controllers; + +public class HomeController : Controller +{ + private readonly ILogger _logger; + + public HomeController(ILogger logger) + { + _logger = logger; + } + + public IActionResult Index() + { + return View(); + } + + public IActionResult Privacy() + { + return View(); + } + + [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] + public IActionResult Error() + { + return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier }); + } +} diff --git a/src/Yavsc/Helpers/ControllerHelpers.cs b/src/Yavsc/Helpers/ControllerHelpers.cs index e071723d..6b89b104 100644 --- a/src/Yavsc/Helpers/ControllerHelpers.cs +++ b/src/Yavsc/Helpers/ControllerHelpers.cs @@ -16,7 +16,8 @@ namespace Yavsc.Helpers var notifs = SetupNotificationList(controller); notifs.Add(new Notification { title = title, body = body }); } - public static void Notify(this Controller controller, IEnumerable notes) + + public static void Notify(this Controller controller, IEnumerable notes) { var notifs = SetupNotificationList(controller); notifs.AddRange(notes); diff --git a/src/Yavsc/Migrations/2018/20180625113528_Git.cs b/src/Yavsc/Migrations/2018/20180625113528_Git.cs index bbfc7c13..4164ac0d 100644 --- a/src/Yavsc/Migrations/2018/20180625113528_Git.cs +++ b/src/Yavsc/Migrations/2018/20180625113528_Git.cs @@ -99,7 +99,7 @@ namespace Yavsc.Migrations column: x => x.PaymentId, principalTable: "PayPalPayment", principalColumn: "CreationToken", - onDelete: ReferentialAction.Restrict); + onDelete: ReferentialAction.Cascade); table.ForeignKey( name: "FK_Project_PerformerProfile_PerformerId", column: x => x.PerformerId, diff --git a/src/Yavsc/Migrations/20230326173049_net7.Designer.cs b/src/Yavsc/Migrations/20230326173049_net7.Designer.cs new file mode 100644 index 00000000..d5878557 --- /dev/null +++ b/src/Yavsc/Migrations/20230326173049_net7.Designer.cs @@ -0,0 +1,3554 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; +using Yavsc.Models; + +#nullable disable + +namespace Yavsc.Migrations +{ + [DbContext(typeof(ApplicationDbContext))] + [Migration("20230326173049_net7")] + partial class net7 + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "7.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => + { + b.Property("Id") + .HasColumnType("text"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("text"); + + b.Property("Name") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("NormalizedName") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName") + .IsUnique() + .HasDatabaseName("RoleNameIndex"); + + b.ToTable("AspNetRoles", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("ClaimType") + .HasColumnType("text"); + + b.Property("ClaimValue") + .HasColumnType("text"); + + b.Property("RoleId") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AspNetRoleClaims", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("ClaimType") + .HasColumnType("text"); + + b.Property("ClaimValue") + .HasColumnType("text"); + + b.Property("UserId") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AspNetUserClaims", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => + { + b.Property("LoginProvider") + .HasColumnType("text"); + + b.Property("ProviderKey") + .HasColumnType("text"); + + b.Property("ProviderDisplayName") + .HasColumnType("text"); + + b.Property("UserId") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("LoginProvider", "ProviderKey"); + + b.HasIndex("UserId"); + + b.ToTable("AspNetUserLogins", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("text"); + + b.Property("RoleId") + .HasColumnType("text"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId"); + + b.ToTable("AspNetUserRoles", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("text"); + + b.Property("LoginProvider") + .HasColumnType("text"); + + b.Property("Name") + .HasColumnType("text"); + + b.Property("Value") + .HasColumnType("text"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AspNetUserTokens", (string)null); + }); + + modelBuilder.Entity("Yavsc.Abstract.Identity.ClientProviderInfo", b => + { + b.Property("UserId") + .HasColumnType("text"); + + b.Property("Avatar") + .IsRequired() + .HasColumnType("text"); + + b.Property("BillingAddressId") + .HasColumnType("bigint"); + + b.Property("EMail") + .IsRequired() + .HasColumnType("text"); + + b.Property("Phone") + .IsRequired() + .HasColumnType("text"); + + b.Property("UserName") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("UserId"); + + b.ToTable("ClientProviderInfo"); + }); + + modelBuilder.Entity("Yavsc.Models.Access.Ban", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone"); + + b.Property("DateModified") + .HasColumnType("timestamp with time zone"); + + b.Property("Reason") + .IsRequired() + .HasColumnType("text"); + + b.Property("TargetId") + .IsRequired() + .HasColumnType("text"); + + b.Property("UserCreated") + .IsRequired() + .HasColumnType("text"); + + b.Property("UserModified") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("TargetId"); + + b.ToTable("Ban"); + }); + + modelBuilder.Entity("Yavsc.Models.Access.BlackListed", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("OwnerId") + .IsRequired() + .HasColumnType("text"); + + b.Property("UserId") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("OwnerId"); + + b.HasIndex("UserId"); + + b.ToTable("BlackListed"); + }); + + modelBuilder.Entity("Yavsc.Models.Access.CircleAuthorizationToBlogPost", b => + { + b.Property("CircleId") + .HasColumnType("bigint"); + + b.Property("BlogPostId") + .HasColumnType("bigint"); + + b.HasKey("CircleId", "BlogPostId"); + + b.HasIndex("BlogPostId"); + + b.ToTable("CircleAuthorizationToBlogPost"); + }); + + modelBuilder.Entity("Yavsc.Models.AccountBalance", b => + { + b.Property("UserId") + .HasColumnType("text"); + + b.Property("ContactCredits") + .HasColumnType("bigint"); + + b.Property("Credits") + .HasColumnType("numeric"); + + b.HasKey("UserId"); + + b.ToTable("BankStatus"); + }); + + modelBuilder.Entity("Yavsc.Models.ApplicationUser", b => + { + b.Property("Id") + .HasColumnType("text"); + + b.Property("AccessFailedCount") + .HasColumnType("integer"); + + b.Property("AllowMonthlyEmail") + .HasColumnType("boolean"); + + b.Property("Avatar") + .IsRequired() + .ValueGeneratedOnAdd() + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasDefaultValue("/images/Users/icon_user.png"); + + b.Property("BankInfoId") + .HasColumnType("bigint"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("text"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone"); + + b.Property("DateModified") + .HasColumnType("timestamp with time zone"); + + b.Property("DedicatedGoogleCalendar") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("character varying(512)"); + + b.Property("DiskQuota") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(524288000L); + + b.Property("DiskUsage") + .HasColumnType("bigint"); + + b.Property("Email") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("EmailConfirmed") + .HasColumnType("boolean"); + + b.Property("FullName") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("character varying(512)"); + + b.Property("LockoutEnabled") + .HasColumnType("boolean"); + + b.Property("LockoutEnd") + .HasColumnType("timestamp with time zone"); + + b.Property("MaxFileSize") + .HasColumnType("bigint"); + + b.Property("NormalizedEmail") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("NormalizedUserName") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("PasswordHash") + .HasColumnType("text"); + + b.Property("PhoneNumber") + .HasColumnType("text"); + + b.Property("PhoneNumberConfirmed") + .HasColumnType("boolean"); + + b.Property("PostalAddressId") + .IsRequired() + .HasColumnType("bigint"); + + b.Property("SecurityStamp") + .HasColumnType("text"); + + b.Property("TwoFactorEnabled") + .HasColumnType("boolean"); + + b.Property("UserCreated") + .IsRequired() + .HasColumnType("text"); + + b.Property("UserModified") + .IsRequired() + .HasColumnType("text"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.HasKey("Id"); + + b.HasIndex("BankInfoId"); + + b.HasIndex("NormalizedEmail") + .HasDatabaseName("EmailIndex"); + + b.HasIndex("NormalizedUserName") + .IsUnique() + .HasDatabaseName("UserNameIndex"); + + b.HasIndex("PostalAddressId"); + + b.ToTable("AspNetUsers", (string)null); + }); + + modelBuilder.Entity("Yavsc.Models.Auth.Client", b => + { + b.Property("Id") + .HasColumnType("text"); + + b.Property("Active") + .HasColumnType("boolean"); + + b.Property("DisplayName") + .IsRequired() + .HasColumnType("text"); + + b.Property("LogoutRedirectUri") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("character varying(100)"); + + b.Property("RedirectUri") + .IsRequired() + .HasColumnType("text"); + + b.Property("RefreshTokenLifeTime") + .HasColumnType("integer"); + + b.Property("Secret") + .IsRequired() + .HasColumnType("text"); + + b.Property("Type") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.ToTable("Applications"); + }); + + modelBuilder.Entity("Yavsc.Models.Auth.OAuth2Tokens", b => + { + b.Property("UserId") + .HasColumnType("text"); + + b.Property("AccessToken") + .IsRequired() + .HasColumnType("text"); + + b.Property("Expiration") + .HasColumnType("timestamp with time zone"); + + b.Property("ExpiresIn") + .IsRequired() + .HasColumnType("text"); + + b.Property("RefreshToken") + .IsRequired() + .HasColumnType("text"); + + b.Property("TokenType") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("UserId"); + + b.ToTable("OAuth2Tokens"); + }); + + modelBuilder.Entity("Yavsc.Models.Auth.RefreshToken", b => + { + b.Property("Id") + .HasColumnType("text"); + + b.Property("ClientId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("ExpiresUtc") + .HasColumnType("timestamp with time zone"); + + b.Property("IssuedUtc") + .HasColumnType("timestamp with time zone"); + + b.Property("ProtectedTicket") + .IsRequired() + .HasColumnType("text"); + + b.Property("Subject") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.HasKey("Id"); + + b.ToTable("RefreshTokens"); + }); + + modelBuilder.Entity("Yavsc.Models.BalanceImpact", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("BalanceId") + .IsRequired() + .HasColumnType("text"); + + b.Property("ExecDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Impact") + .HasColumnType("numeric"); + + b.Property("Reason") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("BalanceId"); + + b.ToTable("BankBook"); + }); + + modelBuilder.Entity("Yavsc.Models.Bank.BankIdentity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("AccountNumber") + .IsRequired() + .HasColumnType("text"); + + b.Property("BIC") + .IsRequired() + .HasColumnType("text"); + + b.Property("BankCode") + .IsRequired() + .HasColumnType("text"); + + b.Property("BankedKey") + .HasColumnType("integer"); + + b.Property("IBAN") + .IsRequired() + .HasColumnType("text"); + + b.Property("WicketCode") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.ToTable("BankIdentity"); + }); + + modelBuilder.Entity("Yavsc.Models.Billing.CommandLine", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Count") + .HasColumnType("integer"); + + b.Property("Currency") + .IsRequired() + .HasColumnType("text"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("character varying(512)"); + + b.Property("EstimateId") + .HasColumnType("bigint"); + + b.Property("EstimateTemplateId") + .HasColumnType("bigint"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("UnitaryCost") + .HasColumnType("numeric"); + + b.HasKey("Id"); + + b.HasIndex("EstimateId"); + + b.HasIndex("EstimateTemplateId"); + + b.ToTable("CommandLine"); + }); + + modelBuilder.Entity("Yavsc.Models.Billing.Estimate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("AttachedFilesString") + .IsRequired() + .HasColumnType("text"); + + b.Property("AttachedGraphicsString") + .IsRequired() + .HasColumnType("text"); + + b.Property("ClientId") + .IsRequired() + .HasColumnType("text"); + + b.Property("ClientValidationDate") + .HasColumnType("timestamp with time zone"); + + b.Property("CommandId") + .HasColumnType("bigint"); + + b.Property("CommandType") + .IsRequired() + .HasColumnType("text"); + + b.Property("Description") + .IsRequired() + .HasColumnType("text"); + + b.Property("OwnerId") + .IsRequired() + .HasColumnType("text"); + + b.Property("ProviderValidationDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Title") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("ClientId"); + + b.HasIndex("CommandId"); + + b.HasIndex("OwnerId"); + + b.ToTable("Estimates"); + }); + + modelBuilder.Entity("Yavsc.Models.Billing.EstimateTemplate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Description") + .IsRequired() + .HasColumnType("text"); + + b.Property("OwnerId") + .IsRequired() + .HasColumnType("text"); + + b.Property("Title") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.ToTable("EstimateTemplates"); + }); + + modelBuilder.Entity("Yavsc.Models.Billing.ExceptionSIREN", b => + { + b.Property("SIREN") + .HasColumnType("text"); + + b.HasKey("SIREN"); + + b.ToTable("ExceptionsSIREN"); + }); + + modelBuilder.Entity("Yavsc.Models.Blog.BlogPost", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("AuthorId") + .IsRequired() + .HasColumnType("text"); + + b.Property("Content") + .IsRequired() + .HasColumnType("text"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone"); + + b.Property("DateModified") + .HasColumnType("timestamp with time zone"); + + b.Property("Lang") + .IsRequired() + .HasColumnType("text"); + + b.Property("Photo") + .IsRequired() + .HasColumnType("text"); + + b.Property("Rate") + .HasColumnType("integer"); + + b.Property("Title") + .IsRequired() + .HasColumnType("text"); + + b.Property("UserCreated") + .IsRequired() + .HasColumnType("text"); + + b.Property("UserModified") + .IsRequired() + .HasColumnType("text"); + + b.Property("Visible") + .HasColumnType("boolean"); + + b.HasKey("Id"); + + b.HasIndex("AuthorId"); + + b.ToTable("Blogspot"); + }); + + modelBuilder.Entity("Yavsc.Models.Blog.BlogTag", b => + { + b.Property("PostId") + .HasColumnType("bigint"); + + b.Property("TagId") + .HasColumnType("bigint"); + + b.HasKey("PostId", "TagId"); + + b.HasIndex("TagId"); + + b.ToTable("BlogTag"); + }); + + modelBuilder.Entity("Yavsc.Models.Blog.Comment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("AuthorId") + .IsRequired() + .HasColumnType("text"); + + b.Property("Content") + .IsRequired() + .HasColumnType("text"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone"); + + b.Property("DateModified") + .HasColumnType("timestamp with time zone"); + + b.Property("ParentId") + .HasColumnType("bigint"); + + b.Property("PostId") + .HasColumnType("bigint"); + + b.Property("UserCreated") + .IsRequired() + .HasColumnType("text"); + + b.Property("UserModified") + .IsRequired() + .HasColumnType("text"); + + b.Property("Visible") + .HasColumnType("boolean"); + + b.HasKey("Id"); + + b.HasIndex("AuthorId"); + + b.HasIndex("ParentId"); + + b.HasIndex("PostId"); + + b.ToTable("Comment"); + }); + + modelBuilder.Entity("Yavsc.Models.Calendar.Schedule", b => + { + b.Property("OwnerId") + .HasColumnType("text"); + + b.HasKey("OwnerId"); + + b.ToTable("Schedule"); + }); + + modelBuilder.Entity("Yavsc.Models.Calendar.ScheduledEvent", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("PeriodEnd") + .HasColumnType("timestamp with time zone"); + + b.Property("PeriodStart") + .HasColumnType("timestamp with time zone"); + + b.Property("Reccurence") + .HasColumnType("integer"); + + b.Property("ScheduleOwnerId") + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("ScheduleOwnerId"); + + b.HasIndex("PeriodStart", "PeriodEnd"); + + b.ToTable("ScheduledEvent"); + }); + + modelBuilder.Entity("Yavsc.Models.Chat.ChatConnection", b => + { + b.Property("ConnectionId") + .HasColumnType("text"); + + b.Property("ApplicationUserId") + .IsRequired() + .HasColumnType("text"); + + b.Property("Connected") + .HasColumnType("boolean"); + + b.Property("UserAgent") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("ConnectionId"); + + b.HasIndex("ApplicationUserId"); + + b.ToTable("ChatConnection"); + }); + + modelBuilder.Entity("Yavsc.Models.Chat.ChatRoom", b => + { + b.Property("Name") + .HasColumnType("text"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone"); + + b.Property("DateModified") + .HasColumnType("timestamp with time zone"); + + b.Property("LatestJoinPart") + .HasColumnType("timestamp with time zone"); + + b.Property("OwnerId") + .IsRequired() + .HasColumnType("text"); + + b.Property("Topic") + .IsRequired() + .HasColumnType("text"); + + b.Property("UserCreated") + .IsRequired() + .HasColumnType("text"); + + b.Property("UserModified") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Name"); + + b.HasIndex("OwnerId"); + + b.ToTable("ChatRoom"); + }); + + modelBuilder.Entity("Yavsc.Models.Chat.ChatRoomAccess", b => + { + b.Property("ChannelName") + .HasColumnType("text"); + + b.Property("UserId") + .HasColumnType("text"); + + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Level") + .HasColumnType("integer"); + + b.HasKey("ChannelName", "UserId"); + + b.HasIndex("UserId"); + + b.ToTable("ChatRoomAccess"); + }); + + modelBuilder.Entity("Yavsc.Models.Cratie.Option", b => + { + b.Property("Code") + .HasColumnType("text"); + + b.Property("CodeScrutin") + .HasColumnType("text"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone"); + + b.Property("DateModified") + .HasColumnType("timestamp with time zone"); + + b.Property("Description") + .IsRequired() + .HasColumnType("text"); + + b.Property("UserCreated") + .IsRequired() + .HasColumnType("text"); + + b.Property("UserModified") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Code", "CodeScrutin"); + + b.ToTable("Option"); + }); + + modelBuilder.Entity("Yavsc.Models.Drawing.Color", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Blue") + .HasColumnType("smallint"); + + b.Property("Green") + .HasColumnType("smallint"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text"); + + b.Property("Red") + .HasColumnType("smallint"); + + b.HasKey("Id"); + + b.ToTable("Color"); + }); + + modelBuilder.Entity("Yavsc.Models.Forms.Form", b => + { + b.Property("Id") + .HasColumnType("text"); + + b.Property("Summary") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.ToTable("Form"); + }); + + modelBuilder.Entity("Yavsc.Models.Haircut.BrusherProfile", b => + { + b.Property("UserId") + .HasColumnType("text"); + + b.Property("ActionDistance") + .HasColumnType("integer"); + + b.Property("CarePrice") + .HasColumnType("numeric"); + + b.Property("FlatFeeDiscount") + .HasColumnType("numeric"); + + b.Property("HalfBalayagePrice") + .HasColumnType("numeric"); + + b.Property("HalfBrushingPrice") + .HasColumnType("numeric"); + + b.Property("HalfColorPrice") + .HasColumnType("numeric"); + + b.Property("HalfDefrisPrice") + .HasColumnType("numeric"); + + b.Property("HalfFoldingPrice") + .HasColumnType("numeric"); + + b.Property("HalfMechPrice") + .HasColumnType("numeric"); + + b.Property("HalfMultiColorPrice") + .HasColumnType("numeric"); + + b.Property("HalfPermanentPrice") + .HasColumnType("numeric"); + + b.Property("KidCutPrice") + .HasColumnType("numeric"); + + b.Property("LongBalayagePrice") + .HasColumnType("numeric"); + + b.Property("LongBrushingPrice") + .HasColumnType("numeric"); + + b.Property("LongColorPrice") + .HasColumnType("numeric"); + + b.Property("LongDefrisPrice") + .HasColumnType("numeric"); + + b.Property("LongFoldingPrice") + .HasColumnType("numeric"); + + b.Property("LongMechPrice") + .HasColumnType("numeric"); + + b.Property("LongMultiColorPrice") + .HasColumnType("numeric"); + + b.Property("LongPermanentPrice") + .HasColumnType("numeric"); + + b.Property("ManBrushPrice") + .HasColumnType("numeric"); + + b.Property("ManCutPrice") + .HasColumnType("numeric"); + + b.Property("ScheduleOwnerId") + .IsRequired() + .HasColumnType("text"); + + b.Property("ShampooPrice") + .HasColumnType("numeric"); + + b.Property("ShortBalayagePrice") + .HasColumnType("numeric"); + + b.Property("ShortBrushingPrice") + .HasColumnType("numeric"); + + b.Property("ShortColorPrice") + .HasColumnType("numeric"); + + b.Property("ShortDefrisPrice") + .HasColumnType("numeric"); + + b.Property("ShortFoldingPrice") + .HasColumnType("numeric"); + + b.Property("ShortMechPrice") + .HasColumnType("numeric"); + + b.Property("ShortMultiColorPrice") + .HasColumnType("numeric"); + + b.Property("ShortPermanentPrice") + .HasColumnType("numeric"); + + b.Property("WomenHalfCutPrice") + .HasColumnType("numeric"); + + b.Property("WomenLongCutPrice") + .HasColumnType("numeric"); + + b.Property("WomenShortCutPrice") + .HasColumnType("numeric"); + + b.HasKey("UserId"); + + b.HasIndex("ScheduleOwnerId"); + + b.ToTable("BrusherProfile"); + }); + + modelBuilder.Entity("Yavsc.Models.Haircut.HairCutQuery", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("ActivityCode") + .IsRequired() + .HasColumnType("text"); + + b.Property("AdditionalInfo") + .IsRequired() + .HasColumnType("text"); + + b.Property("ClientId") + .IsRequired() + .HasColumnType("text"); + + b.Property("Consent") + .HasColumnType("boolean"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone"); + + b.Property("DateModified") + .HasColumnType("timestamp with time zone"); + + b.Property("Description") + .IsRequired() + .HasColumnType("text"); + + b.Property("EventDate") + .HasColumnType("timestamp with time zone"); + + b.Property("LocationId") + .IsRequired() + .HasColumnType("bigint"); + + b.Property("PaymentId") + .IsRequired() + .HasColumnType("text"); + + b.Property("PerformerId") + .IsRequired() + .HasColumnType("text"); + + b.Property("PrestationId") + .HasColumnType("bigint"); + + b.Property("Previsional") + .HasColumnType("numeric"); + + b.Property("Rejected") + .HasColumnType("boolean"); + + b.Property("RejectedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("SelectedProfileUserId") + .HasColumnType("text"); + + b.Property("Status") + .HasColumnType("integer"); + + b.Property("UserCreated") + .IsRequired() + .HasColumnType("text"); + + b.Property("UserModified") + .IsRequired() + .HasColumnType("text"); + + b.Property("ValidationDate") + .HasColumnType("timestamp with time zone"); + + b.HasKey("Id"); + + b.HasIndex("ActivityCode"); + + b.HasIndex("ClientId"); + + b.HasIndex("LocationId"); + + b.HasIndex("PaymentId"); + + b.HasIndex("PerformerId"); + + b.HasIndex("PrestationId"); + + b.HasIndex("SelectedProfileUserId"); + + b.ToTable("HairCutQueries"); + }); + + modelBuilder.Entity("Yavsc.Models.Haircut.HairMultiCutQuery", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("ActivityCode") + .IsRequired() + .HasColumnType("text"); + + b.Property("ClientId") + .IsRequired() + .HasColumnType("text"); + + b.Property("Consent") + .HasColumnType("boolean"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone"); + + b.Property("DateModified") + .HasColumnType("timestamp with time zone"); + + b.Property("Description") + .IsRequired() + .HasColumnType("text"); + + b.Property("EventDate") + .HasColumnType("timestamp with time zone"); + + b.Property("LocationId") + .HasColumnType("bigint"); + + b.Property("PaymentId") + .IsRequired() + .HasColumnType("text"); + + b.Property("PerformerId") + .IsRequired() + .HasColumnType("text"); + + b.Property("Previsional") + .HasColumnType("numeric"); + + b.Property("Rejected") + .HasColumnType("boolean"); + + b.Property("RejectedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("Status") + .HasColumnType("integer"); + + b.Property("UserCreated") + .IsRequired() + .HasColumnType("text"); + + b.Property("UserModified") + .IsRequired() + .HasColumnType("text"); + + b.Property("ValidationDate") + .HasColumnType("timestamp with time zone"); + + b.HasKey("Id"); + + b.HasIndex("ActivityCode"); + + b.HasIndex("ClientId"); + + b.HasIndex("LocationId"); + + b.HasIndex("PaymentId"); + + b.HasIndex("PerformerId"); + + b.ToTable("HairMultiCutQueries"); + }); + + modelBuilder.Entity("Yavsc.Models.Haircut.HairPrestation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Cares") + .HasColumnType("boolean"); + + b.Property("Cut") + .HasColumnType("boolean"); + + b.Property("Dressing") + .HasColumnType("integer"); + + b.Property("Gender") + .HasColumnType("integer"); + + b.Property("Length") + .HasColumnType("integer"); + + b.Property("Shampoo") + .HasColumnType("boolean"); + + b.Property("Tech") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.ToTable("HairPrestation"); + }); + + modelBuilder.Entity("Yavsc.Models.Haircut.HairPrestationCollectionItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("PrestationId") + .HasColumnType("bigint"); + + b.Property("QueryId") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.HasIndex("PrestationId"); + + b.HasIndex("QueryId"); + + b.ToTable("HairPrestationCollectionItem"); + }); + + modelBuilder.Entity("Yavsc.Models.Haircut.HairTaint", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Brand") + .IsRequired() + .HasColumnType("text"); + + b.Property("ColorId") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.HasIndex("ColorId"); + + b.ToTable("HairTaint"); + }); + + modelBuilder.Entity("Yavsc.Models.Haircut.HairTaintInstance", b => + { + b.Property("TaintId") + .HasColumnType("bigint"); + + b.Property("PrestationId") + .HasColumnType("bigint"); + + b.HasKey("TaintId", "PrestationId"); + + b.HasIndex("PrestationId"); + + b.ToTable("HairTaintInstance"); + }); + + modelBuilder.Entity("Yavsc.Models.IT.Evolution.Feature", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Description") + .IsRequired() + .HasColumnType("text"); + + b.Property("ShortName") + .IsRequired() + .HasColumnType("text"); + + b.Property("Status") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.ToTable("Feature"); + }); + + modelBuilder.Entity("Yavsc.Models.IT.Fixing.Bug", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Description") + .IsRequired() + .HasColumnType("text"); + + b.Property("FeatureId") + .IsRequired() + .HasColumnType("bigint"); + + b.Property("Status") + .HasColumnType("integer"); + + b.Property("Title") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("FeatureId"); + + b.ToTable("Bug"); + }); + + modelBuilder.Entity("Yavsc.Models.Identity.DeviceDeclaration", b => + { + b.Property("DeviceId") + .HasColumnType("text"); + + b.Property("DeclarationDate") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("LOCALTIMESTAMP"); + + b.Property("DeviceOwnerId") + .IsRequired() + .HasColumnType("text"); + + b.Property("LatestActivityUpdate") + .HasColumnType("timestamp with time zone"); + + b.Property("Model") + .IsRequired() + .HasColumnType("text"); + + b.Property("Platform") + .IsRequired() + .HasColumnType("text"); + + b.Property("Version") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("DeviceId"); + + b.HasIndex("DeviceOwnerId"); + + b.ToTable("DeviceDeclaration"); + }); + + modelBuilder.Entity("Yavsc.Models.Market.Product", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Depth") + .HasColumnType("numeric"); + + b.Property("Description") + .IsRequired() + .HasColumnType("text"); + + b.Property("Height") + .HasColumnType("numeric"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text"); + + b.Property("Price") + .HasColumnType("numeric"); + + b.Property("Public") + .HasColumnType("boolean"); + + b.Property("Weight") + .HasColumnType("numeric"); + + b.Property("Width") + .HasColumnType("numeric"); + + b.HasKey("Id"); + + b.ToTable("Products"); + }); + + modelBuilder.Entity("Yavsc.Models.Market.Service", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("ContextId") + .IsRequired() + .HasColumnType("text"); + + b.Property("Description") + .IsRequired() + .HasColumnType("text"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text"); + + b.Property("Public") + .HasColumnType("boolean"); + + b.HasKey("Id"); + + b.HasIndex("ContextId"); + + b.ToTable("Services"); + }); + + modelBuilder.Entity("Yavsc.Models.Messaging.Announce", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("For") + .HasColumnType("smallint"); + + b.Property("Message") + .IsRequired() + .HasColumnType("text"); + + b.Property("OwnerId") + .IsRequired() + .HasColumnType("text"); + + b.Property("Sender") + .IsRequired() + .HasColumnType("text"); + + b.Property("Topic") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("OwnerId"); + + b.ToTable("Announce"); + }); + + modelBuilder.Entity("Yavsc.Models.Messaging.DimissClicked", b => + { + b.Property("UserId") + .HasColumnType("text"); + + b.Property("NotificationId") + .HasColumnType("bigint"); + + b.HasKey("UserId", "NotificationId"); + + b.HasIndex("NotificationId"); + + b.ToTable("DimissClicked"); + }); + + modelBuilder.Entity("Yavsc.Models.Messaging.Notification", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Target") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("character varying(512)"); + + b.Property("body") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("character varying(512)"); + + b.Property("click_action") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("character varying(512)"); + + b.Property("color") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("character varying(512)"); + + b.Property("icon") + .IsRequired() + .ValueGeneratedOnAdd() + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasDefaultValue("exclam"); + + b.Property("sound") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("character varying(512)"); + + b.Property("tag") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("character varying(512)"); + + b.Property("title") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b.HasKey("Id"); + + b.ToTable("Notification"); + }); + + modelBuilder.Entity("Yavsc.Models.Musical.Instrument", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.HasKey("Id"); + + b.ToTable("Instrument"); + }); + + modelBuilder.Entity("Yavsc.Models.Musical.InstrumentRating", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("InstrumentId") + .HasColumnType("bigint"); + + b.Property("OwnerId") + .IsRequired() + .HasColumnType("text"); + + b.Property("Rate") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.HasAlternateKey("InstrumentId", "OwnerId"); + + b.HasIndex("OwnerId"); + + b.ToTable("InstrumentRating"); + }); + + modelBuilder.Entity("Yavsc.Models.Musical.MusicalPreference", b => + { + b.Property("OwnerProfileId") + .HasColumnType("text"); + + b.Property("DjSettingsUserId") + .HasColumnType("text"); + + b.Property("GeneralSettingsUserId") + .HasColumnType("text"); + + b.Property("Rate") + .HasColumnType("integer"); + + b.Property("TendencyId") + .HasColumnType("bigint"); + + b.HasKey("OwnerProfileId"); + + b.HasIndex("DjSettingsUserId"); + + b.HasIndex("GeneralSettingsUserId"); + + b.ToTable("MusicalPreference"); + }); + + modelBuilder.Entity("Yavsc.Models.Musical.MusicalTendency", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.HasKey("Id"); + + b.ToTable("MusicalTendency"); + }); + + modelBuilder.Entity("Yavsc.Models.Musical.Profiles.DjSettings", b => + { + b.Property("UserId") + .HasColumnType("text"); + + b.Property("SoundCloudId") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("UserId"); + + b.ToTable("DjSettings"); + }); + + modelBuilder.Entity("Yavsc.Models.Musical.Profiles.GeneralSettings", b => + { + b.Property("UserId") + .HasColumnType("text"); + + b.HasKey("UserId"); + + b.ToTable("GeneralSettings"); + }); + + modelBuilder.Entity("Yavsc.Models.Musical.Profiles.Instrumentation", b => + { + b.Property("InstrumentId") + .HasColumnType("bigint"); + + b.Property("UserId") + .HasColumnType("text"); + + b.HasKey("InstrumentId", "UserId"); + + b.HasIndex("UserId"); + + b.ToTable("Instrumentation"); + }); + + modelBuilder.Entity("Yavsc.Models.Payment.PayPalPayment", b => + { + b.Property("CreationToken") + .HasColumnType("text"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone"); + + b.Property("DateModified") + .HasColumnType("timestamp with time zone"); + + b.Property("ExecutorId") + .IsRequired() + .HasColumnType("text"); + + b.Property("OrderReference") + .IsRequired() + .HasColumnType("text"); + + b.Property("PaypalPayerId") + .IsRequired() + .HasColumnType("text"); + + b.Property("State") + .IsRequired() + .HasColumnType("text"); + + b.Property("UserCreated") + .IsRequired() + .HasColumnType("text"); + + b.Property("UserModified") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("CreationToken"); + + b.HasIndex("ExecutorId"); + + b.ToTable("PayPalPayment"); + }); + + modelBuilder.Entity("Yavsc.Models.Relationship.Circle", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("ApplicationUserId") + .HasColumnType("text"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text"); + + b.Property("OwnerId") + .IsRequired() + .HasColumnType("text"); + + b.Property("Public") + .HasColumnType("boolean"); + + b.HasKey("Id"); + + b.HasIndex("ApplicationUserId"); + + b.ToTable("Circle"); + }); + + modelBuilder.Entity("Yavsc.Models.Relationship.CircleMember", b => + { + b.Property("MemberId") + .HasColumnType("text"); + + b.Property("CircleId") + .HasColumnType("bigint"); + + b.HasKey("MemberId", "CircleId"); + + b.HasIndex("CircleId"); + + b.ToTable("CircleMembers"); + }); + + modelBuilder.Entity("Yavsc.Models.Relationship.Contact", b => + { + b.Property("OwnerId") + .HasColumnType("text"); + + b.Property("UserId") + .HasColumnType("text"); + + b.Property("AddressId") + .HasColumnType("bigint"); + + b.Property("ApplicationUserId") + .HasColumnType("text"); + + b.Property("EMail") + .IsRequired() + .HasColumnType("text"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("OwnerId", "UserId"); + + b.HasIndex("AddressId"); + + b.HasIndex("ApplicationUserId"); + + b.ToTable("Contact"); + }); + + modelBuilder.Entity("Yavsc.Models.Relationship.HyperLink", b => + { + b.Property("HRef") + .HasColumnType("text"); + + b.Property("Method") + .HasColumnType("text"); + + b.Property("BrusherProfileUserId") + .HasColumnType("text"); + + b.Property("ContentType") + .IsRequired() + .HasColumnType("text"); + + b.Property("PayPalPaymentCreationToken") + .HasColumnType("text"); + + b.Property("Rel") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("HRef", "Method"); + + b.HasIndex("BrusherProfileUserId"); + + b.HasIndex("PayPalPaymentCreationToken"); + + b.ToTable("HyperLink"); + }); + + modelBuilder.Entity("Yavsc.Models.Relationship.Location", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Address") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("character varying(512)"); + + b.Property("Latitude") + .HasColumnType("double precision"); + + b.Property("Longitude") + .HasColumnType("double precision"); + + b.HasKey("Id"); + + b.ToTable("Locations"); + }); + + modelBuilder.Entity("Yavsc.Models.Relationship.PostalAddress", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("City") + .IsRequired() + .HasColumnType("text"); + + b.Property("Country") + .IsRequired() + .HasColumnType("text"); + + b.Property("PostalCode") + .IsRequired() + .HasColumnType("text"); + + b.Property("Province") + .IsRequired() + .HasColumnType("text"); + + b.Property("State") + .IsRequired() + .HasColumnType("text"); + + b.Property("Street1") + .IsRequired() + .HasColumnType("text"); + + b.Property("Street2") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.ToTable("PostalAddress"); + }); + + modelBuilder.Entity("Yavsc.Models.Relationship.Tag", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Name") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.ToTable("Tags"); + }); + + modelBuilder.Entity("Yavsc.Models.Skill", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Name") + .IsRequired() + .HasColumnType("text"); + + b.Property("Rate") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.ToTable("SiteSkills"); + }); + + modelBuilder.Entity("Yavsc.Models.Streaming.LiveFlow", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("DifferedFileName") + .IsRequired() + .HasColumnType("text"); + + b.Property("MediaType") + .IsRequired() + .HasColumnType("text"); + + b.Property("OwnerId") + .IsRequired() + .HasColumnType("text"); + + b.Property("Pitch") + .IsRequired() + .HasColumnType("text"); + + b.Property("SequenceNumber") + .HasColumnType("integer"); + + b.Property("Title") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("OwnerId"); + + b.ToTable("LiveFlow"); + }); + + modelBuilder.Entity("Yavsc.Models.Workflow.Activity", b => + { + b.Property("Code") + .HasColumnType("text"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone"); + + b.Property("DateModified") + .HasColumnType("timestamp with time zone"); + + b.Property("Description") + .IsRequired() + .HasColumnType("text"); + + b.Property("Hidden") + .HasColumnType("boolean"); + + b.Property("ModeratorGroupName") + .IsRequired() + .HasColumnType("text"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text"); + + b.Property("ParentCode") + .IsRequired() + .HasColumnType("text"); + + b.Property("Photo") + .IsRequired() + .HasColumnType("text"); + + b.Property("Rate") + .HasColumnType("integer"); + + b.Property("SettingsClassName") + .IsRequired() + .HasColumnType("text"); + + b.Property("UserCreated") + .IsRequired() + .HasColumnType("text"); + + b.Property("UserModified") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Code"); + + b.HasIndex("ParentCode"); + + b.ToTable("Activities"); + }); + + modelBuilder.Entity("Yavsc.Models.Workflow.CoWorking", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("FormationSettingsUserId") + .HasColumnType("text"); + + b.Property("PerformerId") + .IsRequired() + .HasColumnType("text"); + + b.Property("WorkingForId") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("FormationSettingsUserId"); + + b.HasIndex("PerformerId"); + + b.HasIndex("WorkingForId"); + + b.ToTable("CoWorking"); + }); + + modelBuilder.Entity("Yavsc.Models.Workflow.CommandForm", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("ActionName") + .IsRequired() + .HasColumnType("text"); + + b.Property("ActivityCode") + .IsRequired() + .HasColumnType("text"); + + b.Property("Title") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("ActivityCode"); + + b.ToTable("CommandForm"); + }); + + modelBuilder.Entity("Yavsc.Models.Workflow.PerformerProfile", b => + { + b.Property("PerformerId") + .HasColumnType("text"); + + b.Property("AcceptNotifications") + .HasColumnType("boolean"); + + b.Property("AcceptPublicContact") + .HasColumnType("boolean"); + + b.Property("Active") + .HasColumnType("boolean"); + + b.Property("MaxDailyCost") + .HasColumnType("integer"); + + b.Property("MinDailyCost") + .HasColumnType("integer"); + + b.Property("OrganizationAddressId") + .HasColumnType("bigint"); + + b.Property("Rate") + .HasColumnType("integer"); + + b.Property("SIREN") + .IsRequired() + .HasColumnType("text"); + + b.Property("UseGeoLocalizationToReduceDistanceWithClients") + .HasColumnType("boolean"); + + b.Property("WebSite") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("PerformerId"); + + b.HasIndex("OrganizationAddressId"); + + b.ToTable("Performers"); + }); + + modelBuilder.Entity("Yavsc.Models.Workflow.Profiles.FormationSettings", b => + { + b.Property("UserId") + .HasColumnType("text"); + + b.Property("DisplayName") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("UserId"); + + b.ToTable("FormationSettings"); + }); + + modelBuilder.Entity("Yavsc.Models.Workflow.RdvQuery", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("ActivityCode") + .IsRequired() + .HasColumnType("text"); + + b.Property("ClientId") + .IsRequired() + .HasColumnType("text"); + + b.Property("Consent") + .HasColumnType("boolean"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone"); + + b.Property("DateModified") + .HasColumnType("timestamp with time zone"); + + b.Property("Description") + .IsRequired() + .HasColumnType("text"); + + b.Property("EventDate") + .HasColumnType("timestamp with time zone"); + + b.Property("LocationId") + .HasColumnType("bigint"); + + b.Property("LocationType") + .HasColumnType("integer"); + + b.Property("PaymentId") + .IsRequired() + .HasColumnType("text"); + + b.Property("PerformerId") + .IsRequired() + .HasColumnType("text"); + + b.Property("Previsional") + .HasColumnType("numeric"); + + b.Property("Reason") + .IsRequired() + .HasColumnType("text"); + + b.Property("Rejected") + .HasColumnType("boolean"); + + b.Property("RejectedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("Status") + .HasColumnType("integer"); + + b.Property("UserCreated") + .IsRequired() + .HasColumnType("text"); + + b.Property("UserModified") + .IsRequired() + .HasColumnType("text"); + + b.Property("ValidationDate") + .HasColumnType("timestamp with time zone"); + + b.HasKey("Id"); + + b.HasIndex("ActivityCode"); + + b.HasIndex("ClientId"); + + b.HasIndex("LocationId"); + + b.HasIndex("PaymentId"); + + b.HasIndex("PerformerId"); + + b.ToTable("RdvQueries"); + }); + + modelBuilder.Entity("Yavsc.Models.Workflow.UserActivity", b => + { + b.Property("DoesCode") + .HasColumnType("text"); + + b.Property("UserId") + .HasColumnType("text"); + + b.Property("Weight") + .HasColumnType("integer"); + + b.HasKey("DoesCode", "UserId"); + + b.HasIndex("UserId"); + + b.ToTable("UserActivities"); + }); + + modelBuilder.Entity("Yavsc.Server.Models.Blog.BlogTrad", b => + { + b.Property("PostId") + .HasColumnType("bigint"); + + b.Property("Lang") + .HasColumnType("text"); + + b.Property("Body") + .IsRequired() + .HasColumnType("text"); + + b.Property("Title") + .IsRequired() + .HasColumnType("text"); + + b.Property("TraducerId") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("PostId", "Lang"); + + b.HasIndex("TraducerId"); + + b.ToTable("BlogTrad"); + }); + + modelBuilder.Entity("Yavsc.Server.Models.Calendar.Period", b => + { + b.Property("Start") + .HasColumnType("timestamp with time zone"); + + b.Property("End") + .HasColumnType("timestamp with time zone"); + + b.HasKey("Start", "End"); + + b.ToTable("Period"); + }); + + modelBuilder.Entity("Yavsc.Server.Models.EMailing.MailingTemplate", b => + { + b.Property("Id") + .HasColumnType("text"); + + b.Property("Body") + .IsRequired() + .HasMaxLength(65536) + .HasColumnType("character varying(65536)"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone"); + + b.Property("DateModified") + .HasColumnType("timestamp with time zone"); + + b.Property("ReplyToAddress") + .IsRequired() + .HasColumnType("text"); + + b.Property("ToSend") + .HasColumnType("integer"); + + b.Property("Topic") + .IsRequired() + .HasColumnType("text"); + + b.Property("UserCreated") + .IsRequired() + .HasColumnType("text"); + + b.Property("UserModified") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.ToTable("MailingTemplate"); + }); + + modelBuilder.Entity("Yavsc.Server.Models.IT.Project", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("ActivityCode") + .IsRequired() + .HasColumnType("text"); + + b.Property("ClientId") + .IsRequired() + .HasColumnType("text"); + + b.Property("Consent") + .HasColumnType("boolean"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone"); + + b.Property("DateModified") + .HasColumnType("timestamp with time zone"); + + b.Property("Description") + .IsRequired() + .HasColumnType("text"); + + b.Property("GitId") + .HasColumnType("bigint"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text"); + + b.Property("OwnerId") + .IsRequired() + .HasColumnType("text"); + + b.Property("PaymentId") + .IsRequired() + .HasColumnType("text"); + + b.Property("PerformerId") + .IsRequired() + .HasColumnType("text"); + + b.Property("Previsional") + .HasColumnType("numeric"); + + b.Property("Rejected") + .HasColumnType("boolean"); + + b.Property("RejectedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("Status") + .HasColumnType("integer"); + + b.Property("UserCreated") + .IsRequired() + .HasColumnType("text"); + + b.Property("UserModified") + .IsRequired() + .HasColumnType("text"); + + b.Property("ValidationDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Version") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("ActivityCode"); + + b.HasIndex("ClientId"); + + b.HasIndex("GitId"); + + b.HasIndex("PaymentId"); + + b.HasIndex("PerformerId"); + + b.ToTable("Project"); + }); + + modelBuilder.Entity("Yavsc.Server.Models.IT.ProjectBuildConfiguration", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Name") + .IsRequired() + .HasColumnType("text"); + + b.Property("ProjectId") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.HasIndex("ProjectId"); + + b.ToTable("ProjectBuildConfiguration"); + }); + + modelBuilder.Entity("Yavsc.Server.Models.IT.SourceCode.GitRepositoryReference", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Branch") + .IsRequired() + .HasColumnType("text"); + + b.Property("OwnerId") + .IsRequired() + .HasColumnType("text"); + + b.Property("Path") + .IsRequired() + .HasColumnType("text"); + + b.Property("Url") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("OwnerId"); + + b.ToTable("GitRepositoryReference"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => + { + b.HasOne("Yavsc.Models.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => + { + b.HasOne("Yavsc.Models.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Yavsc.Models.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.HasOne("Yavsc.Models.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Yavsc.Models.Access.Ban", b => + { + b.HasOne("Yavsc.Models.ApplicationUser", "TargetUser") + .WithMany() + .HasForeignKey("TargetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TargetUser"); + }); + + modelBuilder.Entity("Yavsc.Models.Access.BlackListed", b => + { + b.HasOne("Yavsc.Models.ApplicationUser", "Owner") + .WithMany("BlackList") + .HasForeignKey("OwnerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Yavsc.Models.ApplicationUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Owner"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Yavsc.Models.Access.CircleAuthorizationToBlogPost", b => + { + b.HasOne("Yavsc.Models.Blog.BlogPost", "Target") + .WithMany("ACL") + .HasForeignKey("BlogPostId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Yavsc.Models.Relationship.Circle", "Allowed") + .WithMany() + .HasForeignKey("CircleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Allowed"); + + b.Navigation("Target"); + }); + + modelBuilder.Entity("Yavsc.Models.AccountBalance", b => + { + b.HasOne("Yavsc.Models.ApplicationUser", "Owner") + .WithOne("AccountBalance") + .HasForeignKey("Yavsc.Models.AccountBalance", "UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Owner"); + }); + + modelBuilder.Entity("Yavsc.Models.ApplicationUser", b => + { + b.HasOne("Yavsc.Models.Bank.BankIdentity", "BankInfo") + .WithMany() + .HasForeignKey("BankInfoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Yavsc.Models.Relationship.Location", "PostalAddress") + .WithMany() + .HasForeignKey("PostalAddressId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BankInfo"); + + b.Navigation("PostalAddress"); + }); + + modelBuilder.Entity("Yavsc.Models.BalanceImpact", b => + { + b.HasOne("Yavsc.Models.AccountBalance", "Balance") + .WithMany() + .HasForeignKey("BalanceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Balance"); + }); + + modelBuilder.Entity("Yavsc.Models.Billing.CommandLine", b => + { + b.HasOne("Yavsc.Models.Billing.Estimate", null) + .WithMany("Bill") + .HasForeignKey("EstimateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Yavsc.Models.Billing.EstimateTemplate", null) + .WithMany("Bill") + .HasForeignKey("EstimateTemplateId"); + }); + + modelBuilder.Entity("Yavsc.Models.Billing.Estimate", b => + { + b.HasOne("Yavsc.Models.ApplicationUser", "Client") + .WithMany() + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Yavsc.Models.Workflow.RdvQuery", "Query") + .WithMany() + .HasForeignKey("CommandId"); + + b.HasOne("Yavsc.Models.Workflow.PerformerProfile", "Owner") + .WithMany() + .HasForeignKey("OwnerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Client"); + + b.Navigation("Owner"); + + b.Navigation("Query"); + }); + + modelBuilder.Entity("Yavsc.Models.Blog.BlogPost", b => + { + b.HasOne("Yavsc.Models.ApplicationUser", "Author") + .WithMany("Posts") + .HasForeignKey("AuthorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Author"); + }); + + modelBuilder.Entity("Yavsc.Models.Blog.BlogTag", b => + { + b.HasOne("Yavsc.Models.Blog.BlogPost", "Post") + .WithMany("Tags") + .HasForeignKey("PostId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Yavsc.Models.Relationship.Tag", "Tag") + .WithMany() + .HasForeignKey("TagId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Post"); + + b.Navigation("Tag"); + }); + + modelBuilder.Entity("Yavsc.Models.Blog.Comment", b => + { + b.HasOne("Yavsc.Models.ApplicationUser", "Author") + .WithMany() + .HasForeignKey("AuthorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Yavsc.Models.Blog.Comment", "Parent") + .WithMany("Children") + .HasForeignKey("ParentId"); + + b.HasOne("Yavsc.Models.Blog.BlogPost", "Post") + .WithMany("Comments") + .HasForeignKey("PostId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Author"); + + b.Navigation("Parent"); + + b.Navigation("Post"); + }); + + modelBuilder.Entity("Yavsc.Models.Calendar.Schedule", b => + { + b.HasOne("Yavsc.Models.ApplicationUser", "Owner") + .WithMany() + .HasForeignKey("OwnerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Owner"); + }); + + modelBuilder.Entity("Yavsc.Models.Calendar.ScheduledEvent", b => + { + b.HasOne("Yavsc.Models.Calendar.Schedule", null) + .WithMany("Events") + .HasForeignKey("ScheduleOwnerId"); + + b.HasOne("Yavsc.Server.Models.Calendar.Period", "Period") + .WithMany() + .HasForeignKey("PeriodStart", "PeriodEnd") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Period"); + }); + + modelBuilder.Entity("Yavsc.Models.Chat.ChatConnection", b => + { + b.HasOne("Yavsc.Models.ApplicationUser", "Owner") + .WithMany("Connections") + .HasForeignKey("ApplicationUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Owner"); + }); + + modelBuilder.Entity("Yavsc.Models.Chat.ChatRoom", b => + { + b.HasOne("Yavsc.Models.ApplicationUser", "Owner") + .WithMany("Rooms") + .HasForeignKey("OwnerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Owner"); + }); + + modelBuilder.Entity("Yavsc.Models.Chat.ChatRoomAccess", b => + { + b.HasOne("Yavsc.Models.Chat.ChatRoom", "Room") + .WithMany("Moderation") + .HasForeignKey("ChannelName") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Yavsc.Models.ApplicationUser", "User") + .WithMany("RoomAccess") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Room"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Yavsc.Models.Haircut.BrusherProfile", b => + { + b.HasOne("Yavsc.Models.Calendar.Schedule", "Schedule") + .WithMany() + .HasForeignKey("ScheduleOwnerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Yavsc.Models.Workflow.PerformerProfile", "BaseProfile") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BaseProfile"); + + b.Navigation("Schedule"); + }); + + modelBuilder.Entity("Yavsc.Models.Haircut.HairCutQuery", b => + { + b.HasOne("Yavsc.Models.Workflow.Activity", "Context") + .WithMany() + .HasForeignKey("ActivityCode") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Yavsc.Models.ApplicationUser", "Client") + .WithMany() + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Yavsc.Models.Relationship.Location", "Location") + .WithMany() + .HasForeignKey("LocationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Yavsc.Models.Payment.PayPalPayment", "Regularisation") + .WithMany() + .HasForeignKey("PaymentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Yavsc.Models.Workflow.PerformerProfile", "PerformerProfile") + .WithMany() + .HasForeignKey("PerformerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Yavsc.Models.Haircut.HairPrestation", "Prestation") + .WithMany() + .HasForeignKey("PrestationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Yavsc.Models.Haircut.BrusherProfile", "SelectedProfile") + .WithMany() + .HasForeignKey("SelectedProfileUserId"); + + b.Navigation("Client"); + + b.Navigation("Context"); + + b.Navigation("Location"); + + b.Navigation("PerformerProfile"); + + b.Navigation("Prestation"); + + b.Navigation("Regularisation"); + + b.Navigation("SelectedProfile"); + }); + + modelBuilder.Entity("Yavsc.Models.Haircut.HairMultiCutQuery", b => + { + b.HasOne("Yavsc.Models.Workflow.Activity", "Context") + .WithMany() + .HasForeignKey("ActivityCode") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Yavsc.Models.ApplicationUser", "Client") + .WithMany() + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Yavsc.Models.Relationship.Location", "Location") + .WithMany() + .HasForeignKey("LocationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Yavsc.Models.Payment.PayPalPayment", "Regularisation") + .WithMany() + .HasForeignKey("PaymentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Yavsc.Models.Workflow.PerformerProfile", "PerformerProfile") + .WithMany() + .HasForeignKey("PerformerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Client"); + + b.Navigation("Context"); + + b.Navigation("Location"); + + b.Navigation("PerformerProfile"); + + b.Navigation("Regularisation"); + }); + + modelBuilder.Entity("Yavsc.Models.Haircut.HairPrestationCollectionItem", b => + { + b.HasOne("Yavsc.Models.Haircut.HairPrestation", "Prestation") + .WithMany() + .HasForeignKey("PrestationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Yavsc.Models.Haircut.HairMultiCutQuery", "Query") + .WithMany("Prestations") + .HasForeignKey("QueryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Prestation"); + + b.Navigation("Query"); + }); + + modelBuilder.Entity("Yavsc.Models.Haircut.HairTaint", b => + { + b.HasOne("Yavsc.Models.Drawing.Color", "Color") + .WithMany() + .HasForeignKey("ColorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Color"); + }); + + modelBuilder.Entity("Yavsc.Models.Haircut.HairTaintInstance", b => + { + b.HasOne("Yavsc.Models.Haircut.HairPrestation", "Prestation") + .WithMany("Taints") + .HasForeignKey("PrestationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Yavsc.Models.Haircut.HairTaint", "Taint") + .WithMany() + .HasForeignKey("TaintId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Prestation"); + + b.Navigation("Taint"); + }); + + modelBuilder.Entity("Yavsc.Models.IT.Fixing.Bug", b => + { + b.HasOne("Yavsc.Models.IT.Evolution.Feature", "False") + .WithMany() + .HasForeignKey("FeatureId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("False"); + }); + + modelBuilder.Entity("Yavsc.Models.Identity.DeviceDeclaration", b => + { + b.HasOne("Yavsc.Models.ApplicationUser", "DeviceOwner") + .WithMany("DeviceDeclaration") + .HasForeignKey("DeviceOwnerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DeviceOwner"); + }); + + modelBuilder.Entity("Yavsc.Models.Market.Service", b => + { + b.HasOne("Yavsc.Models.Workflow.Activity", "Context") + .WithMany("Services") + .HasForeignKey("ContextId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Context"); + }); + + modelBuilder.Entity("Yavsc.Models.Messaging.Announce", b => + { + b.HasOne("Yavsc.Models.ApplicationUser", "Owner") + .WithMany() + .HasForeignKey("OwnerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Owner"); + }); + + modelBuilder.Entity("Yavsc.Models.Messaging.DimissClicked", b => + { + b.HasOne("Yavsc.Models.Messaging.Notification", "Notified") + .WithMany() + .HasForeignKey("NotificationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Yavsc.Models.ApplicationUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Notified"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Yavsc.Models.Musical.InstrumentRating", b => + { + b.HasOne("Yavsc.Models.Musical.Instrument", "Instrument") + .WithMany() + .HasForeignKey("InstrumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Yavsc.Models.Workflow.PerformerProfile", "Profile") + .WithMany() + .HasForeignKey("OwnerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Instrument"); + + b.Navigation("Profile"); + }); + + modelBuilder.Entity("Yavsc.Models.Musical.MusicalPreference", b => + { + b.HasOne("Yavsc.Models.Musical.Profiles.DjSettings", null) + .WithMany("SoundColor") + .HasForeignKey("DjSettingsUserId"); + + b.HasOne("Yavsc.Models.Musical.Profiles.GeneralSettings", null) + .WithMany("SoundColor") + .HasForeignKey("GeneralSettingsUserId"); + }); + + modelBuilder.Entity("Yavsc.Models.Musical.Profiles.Instrumentation", b => + { + b.HasOne("Yavsc.Models.Musical.Instrument", "Tool") + .WithMany() + .HasForeignKey("InstrumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Yavsc.Models.Workflow.PerformerProfile", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Tool"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Yavsc.Models.Payment.PayPalPayment", b => + { + b.HasOne("Yavsc.Models.ApplicationUser", "Executor") + .WithMany() + .HasForeignKey("ExecutorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Executor"); + }); + + modelBuilder.Entity("Yavsc.Models.Relationship.Circle", b => + { + b.HasOne("Yavsc.Models.ApplicationUser", null) + .WithMany("Circles") + .HasForeignKey("ApplicationUserId"); + }); + + modelBuilder.Entity("Yavsc.Models.Relationship.CircleMember", b => + { + b.HasOne("Yavsc.Models.Relationship.Circle", "Circle") + .WithMany("Members") + .HasForeignKey("CircleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Yavsc.Models.ApplicationUser", "Member") + .WithMany("Membership") + .HasForeignKey("MemberId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Circle"); + + b.Navigation("Member"); + }); + + modelBuilder.Entity("Yavsc.Models.Relationship.Contact", b => + { + b.HasOne("Yavsc.Models.Relationship.PostalAddress", "PostalAddress") + .WithMany() + .HasForeignKey("AddressId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Yavsc.Models.ApplicationUser", null) + .WithMany("Book") + .HasForeignKey("ApplicationUserId"); + + b.Navigation("PostalAddress"); + }); + + modelBuilder.Entity("Yavsc.Models.Relationship.HyperLink", b => + { + b.HasOne("Yavsc.Models.Haircut.BrusherProfile", null) + .WithMany("Links") + .HasForeignKey("BrusherProfileUserId"); + + b.HasOne("Yavsc.Models.Payment.PayPalPayment", null) + .WithMany("Links") + .HasForeignKey("PayPalPaymentCreationToken"); + }); + + modelBuilder.Entity("Yavsc.Models.Streaming.LiveFlow", b => + { + b.HasOne("Yavsc.Models.ApplicationUser", "Owner") + .WithMany() + .HasForeignKey("OwnerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Owner"); + }); + + modelBuilder.Entity("Yavsc.Models.Workflow.Activity", b => + { + b.HasOne("Yavsc.Models.Workflow.Activity", "Parent") + .WithMany("Children") + .HasForeignKey("ParentCode") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("Yavsc.Models.Workflow.CoWorking", b => + { + b.HasOne("Yavsc.Models.Workflow.Profiles.FormationSettings", null) + .WithMany("CoWorking") + .HasForeignKey("FormationSettingsUserId"); + + b.HasOne("Yavsc.Models.Workflow.PerformerProfile", "Performer") + .WithMany() + .HasForeignKey("PerformerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Yavsc.Models.ApplicationUser", "WorkingFor") + .WithMany() + .HasForeignKey("WorkingForId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Performer"); + + b.Navigation("WorkingFor"); + }); + + modelBuilder.Entity("Yavsc.Models.Workflow.CommandForm", b => + { + b.HasOne("Yavsc.Models.Workflow.Activity", "Context") + .WithMany("Forms") + .HasForeignKey("ActivityCode") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Context"); + }); + + modelBuilder.Entity("Yavsc.Models.Workflow.PerformerProfile", b => + { + b.HasOne("Yavsc.Models.Relationship.Location", "OrganizationAddress") + .WithMany() + .HasForeignKey("OrganizationAddressId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Yavsc.Models.ApplicationUser", "Performer") + .WithMany() + .HasForeignKey("PerformerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("OrganizationAddress"); + + b.Navigation("Performer"); + }); + + modelBuilder.Entity("Yavsc.Models.Workflow.RdvQuery", b => + { + b.HasOne("Yavsc.Models.Workflow.Activity", "Context") + .WithMany() + .HasForeignKey("ActivityCode") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Yavsc.Models.ApplicationUser", "Client") + .WithMany() + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Yavsc.Models.Relationship.Location", "Location") + .WithMany() + .HasForeignKey("LocationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Yavsc.Models.Payment.PayPalPayment", "Regularisation") + .WithMany() + .HasForeignKey("PaymentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Yavsc.Models.Workflow.PerformerProfile", "PerformerProfile") + .WithMany() + .HasForeignKey("PerformerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Client"); + + b.Navigation("Context"); + + b.Navigation("Location"); + + b.Navigation("PerformerProfile"); + + b.Navigation("Regularisation"); + }); + + modelBuilder.Entity("Yavsc.Models.Workflow.UserActivity", b => + { + b.HasOne("Yavsc.Models.Workflow.Activity", "Does") + .WithMany() + .HasForeignKey("DoesCode") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Yavsc.Models.Workflow.PerformerProfile", "User") + .WithMany("Activity") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Does"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Yavsc.Server.Models.Blog.BlogTrad", b => + { + b.HasOne("Yavsc.Models.ApplicationUser", "Traducer") + .WithMany() + .HasForeignKey("TraducerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Traducer"); + }); + + modelBuilder.Entity("Yavsc.Server.Models.IT.Project", b => + { + b.HasOne("Yavsc.Models.Workflow.Activity", "Context") + .WithMany() + .HasForeignKey("ActivityCode") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Yavsc.Models.ApplicationUser", "Client") + .WithMany() + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Yavsc.Server.Models.IT.SourceCode.GitRepositoryReference", "Repository") + .WithMany() + .HasForeignKey("GitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Yavsc.Models.Payment.PayPalPayment", "Regularisation") + .WithMany() + .HasForeignKey("PaymentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Yavsc.Models.Workflow.PerformerProfile", "PerformerProfile") + .WithMany() + .HasForeignKey("PerformerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Client"); + + b.Navigation("Context"); + + b.Navigation("PerformerProfile"); + + b.Navigation("Regularisation"); + + b.Navigation("Repository"); + }); + + modelBuilder.Entity("Yavsc.Server.Models.IT.ProjectBuildConfiguration", b => + { + b.HasOne("Yavsc.Server.Models.IT.Project", "TargetProject") + .WithMany("Configurations") + .HasForeignKey("ProjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TargetProject"); + }); + + modelBuilder.Entity("Yavsc.Server.Models.IT.SourceCode.GitRepositoryReference", b => + { + b.HasOne("Yavsc.Models.ApplicationUser", "Owner") + .WithMany() + .HasForeignKey("OwnerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Owner"); + }); + + modelBuilder.Entity("Yavsc.Models.ApplicationUser", b => + { + b.Navigation("AccountBalance") + .IsRequired(); + + b.Navigation("BlackList"); + + b.Navigation("Book"); + + b.Navigation("Circles"); + + b.Navigation("Connections"); + + b.Navigation("DeviceDeclaration"); + + b.Navigation("Membership"); + + b.Navigation("Posts"); + + b.Navigation("RoomAccess"); + + b.Navigation("Rooms"); + }); + + modelBuilder.Entity("Yavsc.Models.Billing.Estimate", b => + { + b.Navigation("Bill"); + }); + + modelBuilder.Entity("Yavsc.Models.Billing.EstimateTemplate", b => + { + b.Navigation("Bill"); + }); + + modelBuilder.Entity("Yavsc.Models.Blog.BlogPost", b => + { + b.Navigation("ACL"); + + b.Navigation("Comments"); + + b.Navigation("Tags"); + }); + + modelBuilder.Entity("Yavsc.Models.Blog.Comment", b => + { + b.Navigation("Children"); + }); + + modelBuilder.Entity("Yavsc.Models.Calendar.Schedule", b => + { + b.Navigation("Events"); + }); + + modelBuilder.Entity("Yavsc.Models.Chat.ChatRoom", b => + { + b.Navigation("Moderation"); + }); + + modelBuilder.Entity("Yavsc.Models.Haircut.BrusherProfile", b => + { + b.Navigation("Links"); + }); + + modelBuilder.Entity("Yavsc.Models.Haircut.HairMultiCutQuery", b => + { + b.Navigation("Prestations"); + }); + + modelBuilder.Entity("Yavsc.Models.Haircut.HairPrestation", b => + { + b.Navigation("Taints"); + }); + + modelBuilder.Entity("Yavsc.Models.Musical.Profiles.DjSettings", b => + { + b.Navigation("SoundColor"); + }); + + modelBuilder.Entity("Yavsc.Models.Musical.Profiles.GeneralSettings", b => + { + b.Navigation("SoundColor"); + }); + + modelBuilder.Entity("Yavsc.Models.Payment.PayPalPayment", b => + { + b.Navigation("Links"); + }); + + modelBuilder.Entity("Yavsc.Models.Relationship.Circle", b => + { + b.Navigation("Members"); + }); + + modelBuilder.Entity("Yavsc.Models.Workflow.Activity", b => + { + b.Navigation("Children"); + + b.Navigation("Forms"); + + b.Navigation("Services"); + }); + + modelBuilder.Entity("Yavsc.Models.Workflow.PerformerProfile", b => + { + b.Navigation("Activity"); + }); + + modelBuilder.Entity("Yavsc.Models.Workflow.Profiles.FormationSettings", b => + { + b.Navigation("CoWorking"); + }); + + modelBuilder.Entity("Yavsc.Server.Models.IT.Project", b => + { + b.Navigation("Configurations"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/Yavsc/Migrations/20230326173049_net7.cs b/src/Yavsc/Migrations/20230326173049_net7.cs new file mode 100644 index 00000000..8d5929ce --- /dev/null +++ b/src/Yavsc/Migrations/20230326173049_net7.cs @@ -0,0 +1,7089 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace Yavsc.Migrations +{ + /// + public partial class net7 : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.Sql("delete from \"Announce\" where \"OwnerId\" IS NULL"); + + migrationBuilder.DropForeignKey( + name: "FK_Comment_BlogPost_PostId", + table: "Comment" + ); + + migrationBuilder.DropForeignKey( + name: "FK_CircleAuthorizationToBlogPost_BlogPost_BlogPostId", + table: "CircleAuthorizationToBlogPost"); + + migrationBuilder.DropForeignKey( + name: "FK_CircleAuthorizationToBlogPost_Circle_CircleId", + table: "CircleAuthorizationToBlogPost"); + + + migrationBuilder.DropForeignKey( + name: "FK_BlogTag_BlogPost_PostId", + table: "BlogTag"); + + migrationBuilder.DropForeignKey( + name: "FK_BlogTag_Tag_TagId", + table: "BlogTag"); + + migrationBuilder.DropPrimaryKey( + name: "PK_Blog", + table: "BlogPost"); + + migrationBuilder.DropForeignKey( + name: "FK_Activity_Activity_ParentCode", + table: "Activity"); + + /* migrationBuilder.DropForeignKey( + name: "FK_AccountBalance_AspNetUsers_UserId", + table: "AccountBalance"); */ + + /* migrationBuilder.DropForeignKey( + name: "FK_Announce_AspNetUsers_OwnerId", + table: "Announce"); + + migrationBuilder.DropForeignKey( + name: "FK_AspNetRoleClaims_AspNetRoles_RoleId", + table: "AspNetRoleClaims"); + + migrationBuilder.DropForeignKey( + name: "FK_AspNetUserClaims_AspNetUsers_UserId", + table: "AspNetUserClaims"); + + migrationBuilder.DropForeignKey( + name: "FK_AspNetUserLogins_AspNetUsers_UserId", + table: "AspNetUserLogins"); + + migrationBuilder.DropForeignKey( + name: "FK_AspNetUserRoles_AspNetRoles_RoleId", + table: "AspNetUserRoles"); + + migrationBuilder.DropForeignKey( + name: "FK_AspNetUserRoles_AspNetUsers_UserId", + table: "AspNetUserRoles"); + + migrationBuilder.DropForeignKey( + name: "FK_AspNetUsers_BankIdentity_BankInfoId", + table: "AspNetUsers"); + + migrationBuilder.DropForeignKey( + name: "FK_AspNetUsers_Location_PostalAddressId", + table: "AspNetUsers"); + migrationBuilder.DropForeignKey( + name: "FK_Ban_AspNetUsers_TargetId", + table: "Ban");*/ + + migrationBuilder.DropForeignKey( + name: "FK_ApplicationUser_BankIdentity_BankInfoId", + table: "AspNetUsers"); + migrationBuilder.DropForeignKey( + name: "FK_ApplicationUser_Location_PostalAddressId", + table: "AspNetUsers"); + migrationBuilder.DropForeignKey( + name: "FK_Ban_ApplicationUser_TargetId", + table: "Ban"); + + migrationBuilder.DropForeignKey( + name: "FK_BalanceImpact_AccountBalance_BalanceId", + table: "BalanceImpact"); + +/* + migrationBuilder.DropForeignKey( + name: "FK_BlackListed_AspNetUsers_OwnerId", + table: "BlackListed"); + + migrationBuilder.DropForeignKey( + name: "FK_BlackListed_AspNetUsers_UserId", + table: "BlackListed"); + + migrationBuilder.DropForeignKey( + name: "FK_BlogPost_AspNetUsers_AuthorId", + table: "BlogPost");*/ + + +/* + migrationBuilder.DropForeignKey( + name: "FK_BlogTrad_AspNetUsers_TraducerId", + table: "BlogTrad");*/ + + migrationBuilder.DropForeignKey( + name: "FK_BrusherProfile_PerformerProfile_UserId", + table: "BrusherProfile"); + + migrationBuilder.DropForeignKey( + name: "FK_BrusherProfile_Schedule_ScheduleOwnerId", + table: "BrusherProfile"); + + migrationBuilder.DropForeignKey( + name: "FK_Bug_Feature_FeatureId", + table: "Bug"); +/* + migrationBuilder.DropForeignKey( + name: "FK_ChatConnection_AspNetUsers_ApplicationUserId", + table: "ChatConnection"); + + migrationBuilder.DropForeignKey( + name: "FK_ChatRoom_AspNetUsers_OwnerId", + table: "ChatRoom"); + + migrationBuilder.DropForeignKey( + name: "FK_ChatRoomAccess_AspNetUsers_UserId", + table: "ChatRoomAccess");*/ + + migrationBuilder.DropForeignKey( + name: "FK_ChatRoomAccess_ChatRoom_ChannelName", + table: "ChatRoomAccess"); + + /* migrationBuilder.DropForeignKey( + name: "FK_CircleMember_AspNetUsers_MemberId", + table: "CircleMember"); */ + + migrationBuilder.DropForeignKey( + name: "FK_CircleMember_Circle_CircleId", + table: "CircleMember"); + + migrationBuilder.DropForeignKey( + name: "FK_CommandForm_Activity_ActivityCode", + table: "CommandForm"); + + migrationBuilder.DropForeignKey( + name: "FK_CommandLine_EstimateTemplate_EstimateTemplateId", + table: "CommandLine"); + + migrationBuilder.DropForeignKey( + name: "FK_CommandLine_Estimate_EstimateId", + table: "CommandLine"); +/* + migrationBuilder.DropForeignKey( + name: "FK_Comment_AspNetUsers_AuthorId", + table: "Comment");*/ + + + migrationBuilder.DropForeignKey( + name: "FK_Contact_PostalAddress_AddressId", + table: "Contact"); +/* + migrationBuilder.DropForeignKey( + name: "FK_CoWorking_AspNetUsers_WorkingForId", + table: "CoWorking");*/ + + migrationBuilder.DropForeignKey( + name: "FK_CoWorking_PerformerProfile_PerformerId", + table: "CoWorking"); + + /* migrationBuilder.DropForeignKey( + name: "FK_DeviceDeclaration_AspNetUsers_DeviceOwnerId", + table: "DeviceDeclaration"); + + migrationBuilder.DropForeignKey( + name: "FK_DimissClicked_AspNetUsers_UserId", + table: "DimissClicked");*/ + + migrationBuilder.DropForeignKey( + name: "FK_DimissClicked_Notification_NotificationId", + table: "DimissClicked"); +/* + migrationBuilder.DropForeignKey( + name: "FK_Estimate_AspNetUsers_ClientId", + table: "Estimate");*/ + + migrationBuilder.DropForeignKey( + name: "FK_Estimate_PerformerProfile_OwnerId", + table: "Estimate"); + + migrationBuilder.DropForeignKey( + name: "FK_Estimate_RdvQuery_CommandId", + table: "Estimate"); + + /* migrationBuilder.DropForeignKey( + name: "FK_GitRepositoryReference_AspNetUsers_OwnerId", + table: "GitRepositoryReference"); */ + + migrationBuilder.DropForeignKey( + name: "FK_HairCutQuery_Activity_ActivityCode", + table: "HairCutQuery"); + + /* migrationBuilder.DropForeignKey( + name: "FK_HairCutQuery_AspNetUsers_ClientId", + table: "HairCutQuery"); */ + + migrationBuilder.DropForeignKey( + name: "FK_HairCutQuery_BrusherProfile_SelectedProfileUserId", + table: "HairCutQuery"); + + migrationBuilder.DropForeignKey( + name: "FK_HairCutQuery_HairPrestation_PrestationId", + table: "HairCutQuery"); + + migrationBuilder.DropForeignKey( + name: "FK_HairCutQuery_Location_LocationId", + table: "HairCutQuery"); + +/* + migrationBuilder.DropForeignKey( + name: "FK_HairCutQuery_PayPalPayment_PaymentId", + table: "HairCutQuery"); */ + + migrationBuilder.DropForeignKey( + name: "FK_HairCutQuery_PerformerProfile_PerformerId", + table: "HairCutQuery"); + + migrationBuilder.DropForeignKey( + name: "FK_HairMultiCutQuery_Activity_ActivityCode", + table: "HairMultiCutQuery"); + + /* migrationBuilder.DropForeignKey( + name: "FK_HairMultiCutQuery_AspNetUsers_ClientId", + table: "HairMultiCutQuery"); */ + + migrationBuilder.DropForeignKey( + name: "FK_HairMultiCutQuery_Location_LocationId", + table: "HairMultiCutQuery"); +/* + migrationBuilder.DropForeignKey( + name: "FK_HairMultiCutQuery_PayPalPayment_PaymentId", + table: "HairMultiCutQuery"); */ + + migrationBuilder.DropForeignKey( + name: "FK_HairMultiCutQuery_PerformerProfile_PerformerId", + table: "HairMultiCutQuery"); + + migrationBuilder.DropForeignKey( + name: "FK_HairPrestationCollectionItem_HairMultiCutQuery_QueryId", + table: "HairPrestationCollectionItem"); + + migrationBuilder.DropForeignKey( + name: "FK_HairPrestationCollectionItem_HairPrestation_PrestationId", + table: "HairPrestationCollectionItem"); + + migrationBuilder.DropForeignKey( + name: "FK_HairTaint_Color_ColorId", + table: "HairTaint"); + + migrationBuilder.DropForeignKey( + name: "FK_HairTaintInstance_HairPrestation_PrestationId", + table: "HairTaintInstance"); + + migrationBuilder.DropForeignKey( + name: "FK_HairTaintInstance_HairTaint_TaintId", + table: "HairTaintInstance"); + + migrationBuilder.DropForeignKey( + name: "FK_Instrumentation_Instrument_InstrumentId", + table: "Instrumentation"); + + migrationBuilder.DropForeignKey( + name: "FK_Instrumentation_PerformerProfile_UserId", + table: "Instrumentation"); + + migrationBuilder.DropForeignKey( + name: "FK_InstrumentRating_Instrument_InstrumentId", + table: "InstrumentRating"); + + migrationBuilder.DropForeignKey( + name: "FK_InstrumentRating_PerformerProfile_OwnerId", + table: "InstrumentRating"); +/* + migrationBuilder.DropForeignKey( + name: "FK_LiveFlow_AspNetUsers_OwnerId", + table: "LiveFlow"); + + migrationBuilder.DropForeignKey( + name: "FK_PayPalPayment_AspNetUsers_ExecutorId", + table: "PayPalPayment"); + + migrationBuilder.DropForeignKey( + name: "FK_PerformerProfile_AspNetUsers_PerformerId", + table: "PerformerProfile");*/ + + migrationBuilder.DropForeignKey( + name: "FK_PerformerProfile_Location_OrganizationAddressId", + table: "PerformerProfile"); + + migrationBuilder.DropForeignKey( + name: "FK_Project_Activity_ActivityCode", + table: "Project"); +/* + migrationBuilder.DropForeignKey( + name: "FK_Project_AspNetUsers_ClientId", + table: "Project"); */ + + migrationBuilder.DropForeignKey( + name: "FK_Project_GitRepositoryReference_GitId", + table: "Project"); + + migrationBuilder.DropForeignKey( + name: "FK_Project_PayPalPayment_PaymentId", + table: "Project"); + + migrationBuilder.DropForeignKey( + name: "FK_Project_PerformerProfile_PerformerId", + table: "Project"); + + migrationBuilder.DropForeignKey( + name: "FK_ProjectBuildConfiguration_Project_ProjectId", + table: "ProjectBuildConfiguration"); + + migrationBuilder.DropForeignKey( + name: "FK_RdvQuery_Activity_ActivityCode", + table: "RdvQuery"); +/* + migrationBuilder.DropForeignKey( + name: "FK_RdvQuery_AspNetUsers_ClientId", + table: "RdvQuery"); */ + + migrationBuilder.DropForeignKey( + name: "FK_RdvQuery_Location_LocationId", + table: "RdvQuery"); +/* + migrationBuilder.DropForeignKey( + name: "FK_RdvQuery_PayPalPayment_PaymentId", + table: "RdvQuery"); */ + + migrationBuilder.DropForeignKey( + name: "FK_RdvQuery_PerformerProfile_PerformerId", + table: "RdvQuery"); +/* + migrationBuilder.DropForeignKey( + name: "FK_Schedule_AspNetUsers_OwnerId", + table: "Schedule"); */ + + migrationBuilder.DropForeignKey( + name: "FK_ScheduledEvent_Period_PeriodStart_PeriodEnd", + table: "ScheduledEvent"); + + migrationBuilder.DropForeignKey( + name: "FK_Service_Activity_ContextId", + table: "Service"); + + migrationBuilder.DropForeignKey( + name: "FK_UserActivity_Activity_DoesCode", + table: "UserActivity"); + + migrationBuilder.DropForeignKey( + name: "FK_UserActivity_PerformerProfile_UserId", + table: "UserActivity"); + + + migrationBuilder.DropIndex( + name: "UserNameIndex", + table: "AspNetUsers"); + + migrationBuilder.DropIndex( + name: "RoleNameIndex", + table: "AspNetRoles"); + + migrationBuilder.DropPrimaryKey( + name: "PK_UserActivity", + table: "UserActivity"); + + migrationBuilder.DropPrimaryKey( + name: "PK_Tag", + table: "Tag"); + + migrationBuilder.DropPrimaryKey( + name: "PK_Skill", + table: "Skill"); + + migrationBuilder.DropPrimaryKey( + name: "PK_Service", + table: "Service"); + + migrationBuilder.DropPrimaryKey( + name: "PK_RefreshToken", + table: "RefreshToken"); + + migrationBuilder.DropPrimaryKey( + name: "PK_RdvQuery", + table: "RdvQuery"); + + migrationBuilder.DropPrimaryKey( + name: "PK_Product", + table: "Product"); + + migrationBuilder.DropPrimaryKey( + name: "PK_PerformerProfile", + table: "PerformerProfile"); + + migrationBuilder.DropPrimaryKey( + name: "PK_Location", + table: "Location"); + + migrationBuilder.DropPrimaryKey( + name: "PK_HairMultiCutQuery", + table: "HairMultiCutQuery"); + + migrationBuilder.DropPrimaryKey( + name: "PK_HairCutQuery", + table: "HairCutQuery"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ExceptionSIREN", + table: "ExceptionSIREN"); + + migrationBuilder.DropPrimaryKey( + name: "PK_EstimateTemplate", + table: "EstimateTemplate"); + + migrationBuilder.DropPrimaryKey( + name: "PK_Estimate", + table: "Estimate"); + + migrationBuilder.DropPrimaryKey( + name: "PK_Client", + table: "Client"); + + migrationBuilder.DropPrimaryKey( + name: "PK_CircleMember", + table: "CircleMember"); + + /* migrationBuilder.DropPrimaryKey( + name: "PK_BlogPost", + table: "BlogPost"); */ + + migrationBuilder.DropPrimaryKey( + name: "PK_BalanceImpact", + table: "BalanceImpact"); + + migrationBuilder.DropPrimaryKey( + name: "PK_Activity", + table: "Activity"); + + migrationBuilder.DropPrimaryKey( + name: "PK_AccountBalance", + table: "AccountBalance"); + + migrationBuilder.RenameTable( + name: "UserActivity", + newName: "UserActivities"); + + migrationBuilder.RenameTable( + name: "Tag", + newName: "Tags"); + + migrationBuilder.RenameTable( + name: "Skill", + newName: "SiteSkills"); + + migrationBuilder.RenameTable( + name: "Service", + newName: "Services"); + + migrationBuilder.RenameTable( + name: "RefreshToken", + newName: "RefreshTokens"); + + migrationBuilder.RenameTable( + name: "RdvQuery", + newName: "RdvQueries"); + + migrationBuilder.RenameTable( + name: "Product", + newName: "Products"); + + migrationBuilder.RenameTable( + name: "PerformerProfile", + newName: "Performers"); + + migrationBuilder.RenameTable( + name: "Location", + newName: "Locations"); + + migrationBuilder.RenameTable( + name: "HairMultiCutQuery", + newName: "HairMultiCutQueries"); + + migrationBuilder.RenameTable( + name: "HairCutQuery", + newName: "HairCutQueries"); + + migrationBuilder.RenameTable( + name: "ExceptionSIREN", + newName: "ExceptionsSIREN"); + + migrationBuilder.RenameTable( + name: "EstimateTemplate", + newName: "EstimateTemplates"); + + migrationBuilder.RenameTable( + name: "Estimate", + newName: "Estimates"); + + migrationBuilder.RenameTable( + name: "Client", + newName: "Applications"); + + migrationBuilder.RenameTable( + name: "CircleMember", + newName: "CircleMembers"); + + migrationBuilder.RenameTable( + name: "BlogPost", + newName: "Blogspot"); + + migrationBuilder.RenameTable( + name: "BalanceImpact", + newName: "BankBook"); + + migrationBuilder.RenameTable( + name: "Activity", + newName: "Activities"); + + migrationBuilder.RenameTable( + name: "AccountBalance", + newName: "BankStatus"); + + migrationBuilder.AlterColumn( + name: "PeriodStart", + table: "ScheduledEvent", + type: "timestamp with time zone", + nullable: false, + defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + oldClrType: typeof(DateTime), + oldType: "timestamp with time zone", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "PeriodEnd", + table: "ScheduledEvent", + type: "timestamp with time zone", + nullable: false, + defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + oldClrType: typeof(DateTime), + oldType: "timestamp with time zone", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Id", + table: "ScheduledEvent", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "Name", + table: "ProjectBuildConfiguration", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Id", + table: "ProjectBuildConfiguration", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "Version", + table: "Project", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "UserModified", + table: "Project", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "UserCreated", + table: "Project", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "PaymentId", + table: "Project", + type: "text", + nullable: true, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "OwnerId", + table: "Project", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Name", + table: "Project", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Description", + table: "Project", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Id", + table: "Project", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "Street2", + table: "PostalAddress", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Street1", + table: "PostalAddress", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "State", + table: "PostalAddress", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Province", + table: "PostalAddress", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "PostalCode", + table: "PostalAddress", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Country", + table: "PostalAddress", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "City", + table: "PostalAddress", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Id", + table: "PostalAddress", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "UserModified", + table: "PayPalPayment", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "UserCreated", + table: "PayPalPayment", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "State", + table: "PayPalPayment", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "PaypalPayerId", + table: "PayPalPayment", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "OrderReference", + table: "PayPalPayment", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ExecutorId", + table: "PayPalPayment", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "UserModified", + table: "Option", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "UserCreated", + table: "Option", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Description", + table: "Option", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "TokenType", + table: "OAuth2Tokens", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "RefreshToken", + table: "OAuth2Tokens", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ExpiresIn", + table: "OAuth2Tokens", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "AccessToken", + table: "OAuth2Tokens", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "title", + table: "Notification", + type: "character varying(1024)", + maxLength: 1024, + nullable: false, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "tag", + table: "Notification", + type: "character varying(512)", + maxLength: 512, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "sound", + table: "Notification", + type: "character varying(512)", + maxLength: 512, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "icon", + table: "Notification", + type: "character varying(512)", + maxLength: 512, + nullable: false, + defaultValue: "exclam", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true, + oldDefaultValue: "exclam"); + + migrationBuilder.AlterColumn( + name: "color", + table: "Notification", + type: "character varying(512)", + maxLength: 512, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "click_action", + table: "Notification", + type: "character varying(512)", + maxLength: 512, + nullable: false, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "body", + table: "Notification", + type: "character varying(512)", + maxLength: 512, + nullable: false, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Target", + table: "Notification", + type: "character varying(512)", + maxLength: 512, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Id", + table: "Notification", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "Name", + table: "MusicalTendency", + type: "character varying(255)", + maxLength: 255, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "character varying(255)", + oldMaxLength: 255, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Id", + table: "MusicalTendency", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "UserModified", + table: "MailingTemplate", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "UserCreated", + table: "MailingTemplate", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Topic", + table: "MailingTemplate", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ReplyToAddress", + table: "MailingTemplate", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Body", + table: "MailingTemplate", + type: "character varying(65536)", + maxLength: 65536, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "character varying(65536)", + oldMaxLength: 65536, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Title", + table: "LiveFlow", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Pitch", + table: "LiveFlow", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "OwnerId", + table: "LiveFlow", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "MediaType", + table: "LiveFlow", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "DifferedFileName", + table: "LiveFlow", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Id", + table: "LiveFlow", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "Id", + table: "InstrumentRating", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "Name", + table: "Instrument", + type: "character varying(255)", + maxLength: 255, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "character varying(255)", + oldMaxLength: 255, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Id", + table: "Instrument", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "Rel", + table: "HyperLink", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ContentType", + table: "HyperLink", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Brand", + table: "HairTaint", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Id", + table: "HairTaint", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "Id", + table: "HairPrestationCollectionItem", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "Id", + table: "HairPrestation", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "Url", + table: "GitRepositoryReference", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Path", + table: "GitRepositoryReference", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "OwnerId", + table: "GitRepositoryReference", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Branch", + table: "GitRepositoryReference", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Id", + table: "GitRepositoryReference", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "DisplayName", + table: "FormationSettings", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Summary", + table: "Form", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ShortName", + table: "Feature", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Description", + table: "Feature", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Id", + table: "Feature", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "SoundCloudId", + table: "DjSettings", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Version", + table: "DeviceDeclaration", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Platform", + table: "DeviceDeclaration", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Model", + table: "DeviceDeclaration", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "DeviceOwnerId", + table: "DeviceDeclaration", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "DeclarationDate", + table: "DeviceDeclaration", + type: "timestamp with time zone", + nullable: false, + defaultValueSql: "LOCALTIMESTAMP", + oldClrType: typeof(DateTime), + oldType: "timestamp with time zone"); + + migrationBuilder.AlterColumn( + name: "WorkingForId", + table: "CoWorking", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "PerformerId", + table: "CoWorking", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Id", + table: "CoWorking", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "Name", + table: "Contact", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "EMail", + table: "Contact", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "UserModified", + table: "Comment", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "UserCreated", + table: "Comment", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Content", + table: "Comment", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Id", + table: "Comment", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "Currency", + table: "CommandLine", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Id", + table: "CommandLine", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "Title", + table: "CommandForm", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ActivityCode", + table: "CommandForm", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ActionName", + table: "CommandForm", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Id", + table: "CommandForm", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "Name", + table: "Color", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Id", + table: "Color", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "UserName", + table: "ClientProviderInfo", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Phone", + table: "ClientProviderInfo", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "EMail", + table: "ClientProviderInfo", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Avatar", + table: "ClientProviderInfo", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "OwnerId", + table: "Circle", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Name", + table: "Circle", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Id", + table: "Circle", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "Id", + table: "ChatRoomAccess", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "UserModified", + table: "ChatRoom", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "UserCreated", + table: "ChatRoom", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Topic", + table: "ChatRoom", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "OwnerId", + table: "ChatRoom", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "UserAgent", + table: "ChatConnection", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Title", + table: "Bug", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "FeatureId", + table: "Bug", + type: "bigint", + nullable: true, + defaultValue: 0L, + oldClrType: typeof(long), + oldType: "bigint", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Description", + table: "Bug", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Id", + table: "Bug", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "ScheduleOwnerId", + table: "BrusherProfile", + type: "text", + nullable: true, + defaultValue: null, + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "TraducerId", + table: "BlogTrad", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Title", + table: "BlogTrad", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Body", + table: "BlogTrad", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Id", + table: "BlackListed", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "WicketCode", + table: "BankIdentity", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "IBAN", + table: "BankIdentity", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "BankCode", + table: "BankIdentity", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "BIC", + table: "BankIdentity", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "AccountNumber", + table: "BankIdentity", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Id", + table: "BankIdentity", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "UserModified", + table: "Ban", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "UserCreated", + table: "Ban", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Id", + table: "Ban", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "UserModified", + table: "AspNetUsers", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "UserCreated", + table: "AspNetUsers", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "PostalAddressId", + table: "AspNetUsers", + type: "bigint", + nullable: true, + defaultValue: 0L, + oldClrType: typeof(long), + oldType: "bigint", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "FullName", + table: "AspNetUsers", + type: "character varying(512)", + maxLength: 512, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "character varying(512)", + oldMaxLength: 512, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "DedicatedGoogleCalendar", + table: "AspNetUsers", + type: "character varying(512)", + maxLength: 512, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "character varying(512)", + oldMaxLength: 512, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "BankInfoId", + table: "AspNetUsers", + type: "bigint", + nullable: true, + defaultValue: null, + oldClrType: typeof(long), + oldType: "bigint", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Avatar", + table: "AspNetUsers", + type: "character varying(512)", + maxLength: 512, + nullable: false, + defaultValue: "/images/Users/icon_user.png", + oldClrType: typeof(string), + oldType: "character varying(512)", + oldMaxLength: 512, + oldNullable: true, + oldDefaultValue: "/images/Users/icon_user.png"); + + migrationBuilder.AlterColumn( + name: "Id", + table: "AspNetUserClaims", + type: "integer", + nullable: false, + oldClrType: typeof(int), + oldType: "integer") + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "Id", + table: "AspNetRoleClaims", + type: "integer", + nullable: false, + oldClrType: typeof(int), + oldType: "integer") + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "Topic", + table: "Announce", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Sender", + table: "Announce", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "OwnerId", + table: "Announce", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Message", + table: "Announce", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Id", + table: "Announce", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "Name", + table: "Tags", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Id", + table: "Tags", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "Name", + table: "SiteSkills", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Id", + table: "SiteSkills", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "Name", + table: "Services", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Description", + table: "Services", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ContextId", + table: "Services", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Id", + table: "Services", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "UserModified", + table: "RdvQueries", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "UserCreated", + table: "RdvQueries", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Reason", + table: "RdvQueries", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "PaymentId", + table: "RdvQueries", + type: "text", + nullable: true, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "LocationId", + table: "RdvQueries", + type: "bigint", + nullable: false, + defaultValue: 0L, + oldClrType: typeof(long), + oldType: "bigint", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Description", + table: "RdvQueries", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Id", + table: "RdvQueries", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "Name", + table: "Products", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Description", + table: "Products", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Id", + table: "Products", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "WebSite", + table: "Performers", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "SIREN", + table: "Performers", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Address", + table: "Locations", + type: "character varying(512)", + maxLength: 512, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "character varying(512)", + oldMaxLength: 512, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Id", + table: "Locations", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "UserModified", + table: "HairMultiCutQueries", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "UserCreated", + table: "HairMultiCutQueries", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "PaymentId", + table: "HairMultiCutQueries", + type: "text", + nullable: true, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "LocationId", + table: "HairMultiCutQueries", + type: "bigint", + nullable: false, + defaultValue: 0L, + oldClrType: typeof(long), + oldType: "bigint", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Description", + table: "HairMultiCutQueries", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Id", + table: "HairMultiCutQueries", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "UserModified", + table: "HairCutQueries", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "UserCreated", + table: "HairCutQueries", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "PaymentId", + table: "HairCutQueries", + type: "text", + nullable: true, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "LocationId", + table: "HairCutQueries", + type: "bigint", + nullable: false, + defaultValue: 0L, + oldClrType: typeof(long), + oldType: "bigint", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Description", + table: "HairCutQueries", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "AdditionalInfo", + table: "HairCutQueries", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Id", + table: "HairCutQueries", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "Title", + table: "EstimateTemplates", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Description", + table: "EstimateTemplates", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Id", + table: "EstimateTemplates", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "Title", + table: "Estimates", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "OwnerId", + table: "Estimates", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Description", + table: "Estimates", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "AttachedGraphicsString", + table: "Estimates", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "AttachedFilesString", + table: "Estimates", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Id", + table: "Estimates", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "Secret", + table: "Applications", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "RedirectUri", + table: "Applications", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "LogoutRedirectUri", + table: "Applications", + type: "character varying(100)", + maxLength: 100, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "DisplayName", + table: "Applications", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "UserModified", + table: "Blogspot", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "UserCreated", + table: "Blogspot", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Title", + table: "Blogspot", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Photo", + table: "Blogspot", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Lang", + table: "Blogspot", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Content", + table: "Blogspot", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "AuthorId", + table: "Blogspot", + type: "text", + nullable: true, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Id", + table: "Blogspot", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "Id", + table: "BankBook", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "UserModified", + table: "Activities", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "UserCreated", + table: "Activities", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "SettingsClassName", + table: "Activities", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Photo", + table: "Activities", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ParentCode", + table: "Activities", + type: "text", + nullable: true, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Name", + table: "Activities", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ModeratorGroupName", + table: "Activities", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Description", + table: "Activities", + type: "text", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + + migrationBuilder.AddPrimaryKey( + name: "PK_UserActivities", + table: "UserActivities", + columns: new[] { "DoesCode", "UserId" }); + + migrationBuilder.AddPrimaryKey( + name: "PK_Tags", + table: "Tags", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_SiteSkills", + table: "SiteSkills", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_Services", + table: "Services", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_RefreshTokens", + table: "RefreshTokens", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_RdvQueries", + table: "RdvQueries", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_Products", + table: "Products", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_Performers", + table: "Performers", + column: "PerformerId"); + + migrationBuilder.AddPrimaryKey( + name: "PK_Locations", + table: "Locations", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_HairMultiCutQueries", + table: "HairMultiCutQueries", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_HairCutQueries", + table: "HairCutQueries", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_ExceptionsSIREN", + table: "ExceptionsSIREN", + column: "SIREN"); + + migrationBuilder.AddPrimaryKey( + name: "PK_EstimateTemplates", + table: "EstimateTemplates", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_Estimates", + table: "Estimates", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_Applications", + table: "Applications", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_CircleMembers", + table: "CircleMembers", + columns: new[] { "MemberId", "CircleId" }); + + migrationBuilder.AddPrimaryKey( + name: "PK_Blogspot", + table: "Blogspot", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_BankBook", + table: "BankBook", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_Activities", + table: "Activities", + column: "Code"); + + migrationBuilder.AddPrimaryKey( + name: "PK_BankStatus", + table: "BankStatus", + column: "UserId"); + + migrationBuilder.CreateTable( + name: "AspNetUserTokens", + columns: table => new + { + UserId = table.Column(type: "text", nullable: false), + LoginProvider = table.Column(type: "text", nullable: false), + Name = table.Column(type: "text", nullable: false), + Value = table.Column(type: "text", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AspNetUserTokens", x => new { x.UserId, x.LoginProvider, x.Name }); + table.ForeignKey( + name: "FK_AspNetUserTokens_AspNetUsers_UserId", + column: x => x.UserId, + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateIndex( + name: "IX_ScheduledEvent_PeriodStart_PeriodEnd", + table: "ScheduledEvent", + columns: new[] { "PeriodStart", "PeriodEnd" }); + + migrationBuilder.CreateIndex( + name: "IX_ScheduledEvent_ScheduleOwnerId", + table: "ScheduledEvent", + column: "ScheduleOwnerId"); + + migrationBuilder.CreateIndex( + name: "IX_ProjectBuildConfiguration_ProjectId", + table: "ProjectBuildConfiguration", + column: "ProjectId"); + + migrationBuilder.CreateIndex( + name: "IX_Project_ActivityCode", + table: "Project", + column: "ActivityCode"); + + migrationBuilder.CreateIndex( + name: "IX_Project_ClientId", + table: "Project", + column: "ClientId"); + + migrationBuilder.CreateIndex( + name: "IX_Project_GitId", + table: "Project", + column: "GitId"); + + migrationBuilder.CreateIndex( + name: "IX_Project_PaymentId", + table: "Project", + column: "PaymentId"); + + migrationBuilder.CreateIndex( + name: "IX_Project_PerformerId", + table: "Project", + column: "PerformerId"); + + migrationBuilder.CreateIndex( + name: "IX_PayPalPayment_ExecutorId", + table: "PayPalPayment", + column: "ExecutorId"); + + migrationBuilder.CreateIndex( + name: "IX_MusicalPreference_DjSettingsUserId", + table: "MusicalPreference", + column: "DjSettingsUserId"); + + migrationBuilder.CreateIndex( + name: "IX_MusicalPreference_GeneralSettingsUserId", + table: "MusicalPreference", + column: "GeneralSettingsUserId"); + + migrationBuilder.CreateIndex( + name: "IX_LiveFlow_OwnerId", + table: "LiveFlow", + column: "OwnerId"); + + migrationBuilder.CreateIndex( + name: "IX_InstrumentRating_OwnerId", + table: "InstrumentRating", + column: "OwnerId"); + + migrationBuilder.CreateIndex( + name: "IX_Instrumentation_UserId", + table: "Instrumentation", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_HyperLink_BrusherProfileUserId", + table: "HyperLink", + column: "BrusherProfileUserId"); + + migrationBuilder.CreateIndex( + name: "IX_HyperLink_PayPalPaymentCreationToken", + table: "HyperLink", + column: "PayPalPaymentCreationToken"); + + migrationBuilder.CreateIndex( + name: "IX_HairTaintInstance_PrestationId", + table: "HairTaintInstance", + column: "PrestationId"); + + migrationBuilder.CreateIndex( + name: "IX_HairTaint_ColorId", + table: "HairTaint", + column: "ColorId"); + + migrationBuilder.CreateIndex( + name: "IX_HairPrestationCollectionItem_PrestationId", + table: "HairPrestationCollectionItem", + column: "PrestationId"); + + migrationBuilder.CreateIndex( + name: "IX_HairPrestationCollectionItem_QueryId", + table: "HairPrestationCollectionItem", + column: "QueryId"); + + migrationBuilder.CreateIndex( + name: "IX_GitRepositoryReference_OwnerId", + table: "GitRepositoryReference", + column: "OwnerId"); + + migrationBuilder.CreateIndex( + name: "IX_DimissClicked_NotificationId", + table: "DimissClicked", + column: "NotificationId"); + + migrationBuilder.CreateIndex( + name: "IX_DeviceDeclaration_DeviceOwnerId", + table: "DeviceDeclaration", + column: "DeviceOwnerId"); + + migrationBuilder.CreateIndex( + name: "IX_CoWorking_FormationSettingsUserId", + table: "CoWorking", + column: "FormationSettingsUserId"); + + migrationBuilder.CreateIndex( + name: "IX_CoWorking_PerformerId", + table: "CoWorking", + column: "PerformerId"); + + migrationBuilder.CreateIndex( + name: "IX_CoWorking_WorkingForId", + table: "CoWorking", + column: "WorkingForId"); + + migrationBuilder.CreateIndex( + name: "IX_Contact_AddressId", + table: "Contact", + column: "AddressId"); + + migrationBuilder.CreateIndex( + name: "IX_Contact_ApplicationUserId", + table: "Contact", + column: "ApplicationUserId"); + + migrationBuilder.CreateIndex( + name: "IX_Comment_AuthorId", + table: "Comment", + column: "AuthorId"); + + migrationBuilder.CreateIndex( + name: "IX_Comment_ParentId", + table: "Comment", + column: "ParentId"); + + migrationBuilder.CreateIndex( + name: "IX_Comment_PostId", + table: "Comment", + column: "PostId"); + + migrationBuilder.CreateIndex( + name: "IX_CommandLine_EstimateId", + table: "CommandLine", + column: "EstimateId"); + + migrationBuilder.CreateIndex( + name: "IX_CommandLine_EstimateTemplateId", + table: "CommandLine", + column: "EstimateTemplateId"); + + migrationBuilder.CreateIndex( + name: "IX_CommandForm_ActivityCode", + table: "CommandForm", + column: "ActivityCode"); + + migrationBuilder.CreateIndex( + name: "IX_CircleAuthorizationToBlogPost_BlogPostId", + table: "CircleAuthorizationToBlogPost", + column: "BlogPostId"); + + migrationBuilder.CreateIndex( + name: "IX_Circle_ApplicationUserId", + table: "Circle", + column: "ApplicationUserId"); + + migrationBuilder.CreateIndex( + name: "IX_ChatRoomAccess_UserId", + table: "ChatRoomAccess", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_ChatRoom_OwnerId", + table: "ChatRoom", + column: "OwnerId"); + + migrationBuilder.CreateIndex( + name: "IX_ChatConnection_ApplicationUserId", + table: "ChatConnection", + column: "ApplicationUserId"); + + migrationBuilder.CreateIndex( + name: "IX_Bug_FeatureId", + table: "Bug", + column: "FeatureId"); + + migrationBuilder.CreateIndex( + name: "IX_BrusherProfile_ScheduleOwnerId", + table: "BrusherProfile", + column: "ScheduleOwnerId"); + + migrationBuilder.CreateIndex( + name: "IX_BlogTrad_TraducerId", + table: "BlogTrad", + column: "TraducerId"); + + migrationBuilder.CreateIndex( + name: "IX_BlogTag_TagId", + table: "BlogTag", + column: "TagId"); + + migrationBuilder.CreateIndex( + name: "IX_BlackListed_OwnerId", + table: "BlackListed", + column: "OwnerId"); + + migrationBuilder.CreateIndex( + name: "IX_BlackListed_UserId", + table: "BlackListed", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_Ban_TargetId", + table: "Ban", + column: "TargetId"); + + migrationBuilder.CreateIndex( + name: "IX_AspNetUsers_BankInfoId", + table: "AspNetUsers", + column: "BankInfoId"); + + migrationBuilder.CreateIndex( + name: "IX_AspNetUsers_PostalAddressId", + table: "AspNetUsers", + column: "PostalAddressId"); + + migrationBuilder.CreateIndex( + name: "UserNameIndex", + table: "AspNetUsers", + column: "NormalizedUserName", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_AspNetUserRoles_RoleId", + table: "AspNetUserRoles", + column: "RoleId"); + + migrationBuilder.CreateIndex( + name: "IX_AspNetUserLogins_UserId", + table: "AspNetUserLogins", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_AspNetUserClaims_UserId", + table: "AspNetUserClaims", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "RoleNameIndex", + table: "AspNetRoles", + column: "NormalizedName", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_AspNetRoleClaims_RoleId", + table: "AspNetRoleClaims", + column: "RoleId"); + + migrationBuilder.CreateIndex( + name: "IX_Announce_OwnerId", + table: "Announce", + column: "OwnerId"); + + migrationBuilder.CreateIndex( + name: "IX_UserActivities_UserId", + table: "UserActivities", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_Services_ContextId", + table: "Services", + column: "ContextId"); + + migrationBuilder.CreateIndex( + name: "IX_RdvQueries_ActivityCode", + table: "RdvQueries", + column: "ActivityCode"); + + migrationBuilder.CreateIndex( + name: "IX_RdvQueries_ClientId", + table: "RdvQueries", + column: "ClientId"); + + migrationBuilder.CreateIndex( + name: "IX_RdvQueries_LocationId", + table: "RdvQueries", + column: "LocationId"); + + migrationBuilder.CreateIndex( + name: "IX_RdvQueries_PaymentId", + table: "RdvQueries", + column: "PaymentId"); + + migrationBuilder.CreateIndex( + name: "IX_RdvQueries_PerformerId", + table: "RdvQueries", + column: "PerformerId"); + + migrationBuilder.CreateIndex( + name: "IX_Performers_OrganizationAddressId", + table: "Performers", + column: "OrganizationAddressId"); + + migrationBuilder.CreateIndex( + name: "IX_HairMultiCutQueries_ActivityCode", + table: "HairMultiCutQueries", + column: "ActivityCode"); + + migrationBuilder.CreateIndex( + name: "IX_HairMultiCutQueries_ClientId", + table: "HairMultiCutQueries", + column: "ClientId"); + + migrationBuilder.CreateIndex( + name: "IX_HairMultiCutQueries_LocationId", + table: "HairMultiCutQueries", + column: "LocationId"); + + migrationBuilder.CreateIndex( + name: "IX_HairMultiCutQueries_PaymentId", + table: "HairMultiCutQueries", + column: "PaymentId"); + + migrationBuilder.CreateIndex( + name: "IX_HairMultiCutQueries_PerformerId", + table: "HairMultiCutQueries", + column: "PerformerId"); + + migrationBuilder.CreateIndex( + name: "IX_HairCutQueries_ActivityCode", + table: "HairCutQueries", + column: "ActivityCode"); + + migrationBuilder.CreateIndex( + name: "IX_HairCutQueries_ClientId", + table: "HairCutQueries", + column: "ClientId"); + + migrationBuilder.CreateIndex( + name: "IX_HairCutQueries_LocationId", + table: "HairCutQueries", + column: "LocationId"); + + migrationBuilder.CreateIndex( + name: "IX_HairCutQueries_PaymentId", + table: "HairCutQueries", + column: "PaymentId"); + + migrationBuilder.CreateIndex( + name: "IX_HairCutQueries_PerformerId", + table: "HairCutQueries", + column: "PerformerId"); + + migrationBuilder.CreateIndex( + name: "IX_HairCutQueries_PrestationId", + table: "HairCutQueries", + column: "PrestationId"); + + migrationBuilder.CreateIndex( + name: "IX_HairCutQueries_SelectedProfileUserId", + table: "HairCutQueries", + column: "SelectedProfileUserId"); + + migrationBuilder.CreateIndex( + name: "IX_Estimates_ClientId", + table: "Estimates", + column: "ClientId"); + + migrationBuilder.CreateIndex( + name: "IX_Estimates_CommandId", + table: "Estimates", + column: "CommandId"); + + migrationBuilder.CreateIndex( + name: "IX_Estimates_OwnerId", + table: "Estimates", + column: "OwnerId"); + + migrationBuilder.CreateIndex( + name: "IX_CircleMembers_CircleId", + table: "CircleMembers", + column: "CircleId"); + + migrationBuilder.CreateIndex( + name: "IX_Blogspot_AuthorId", + table: "Blogspot", + column: "AuthorId"); + + migrationBuilder.CreateIndex( + name: "IX_BankBook_BalanceId", + table: "BankBook", + column: "BalanceId"); + + migrationBuilder.CreateIndex( + name: "IX_Activities_ParentCode", + table: "Activities", + column: "ParentCode"); + + migrationBuilder.AddForeignKey( + name: "FK_Activities_Activities_ParentCode", + table: "Activities", + column: "ParentCode", + principalTable: "Activities", + principalColumn: "Code", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_Announce_AspNetUsers_OwnerId", + table: "Announce", + column: "OwnerId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_AspNetRoleClaims_AspNetRoles_RoleId", + table: "AspNetRoleClaims", + column: "RoleId", + principalTable: "AspNetRoles", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_AspNetUserClaims_AspNetUsers_UserId", + table: "AspNetUserClaims", + column: "UserId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_AspNetUserLogins_AspNetUsers_UserId", + table: "AspNetUserLogins", + column: "UserId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_AspNetUserRoles_AspNetRoles_RoleId", + table: "AspNetUserRoles", + column: "RoleId", + principalTable: "AspNetRoles", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_AspNetUserRoles_AspNetUsers_UserId", + table: "AspNetUserRoles", + column: "UserId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_AspNetUsers_BankIdentity_BankInfoId", + table: "AspNetUsers", + column: "BankInfoId", + principalTable: "BankIdentity", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_AspNetUsers_Locations_PostalAddressId", + table: "AspNetUsers", + column: "PostalAddressId", + principalTable: "Locations", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_Ban_AspNetUsers_TargetId", + table: "Ban", + column: "TargetId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_BankBook_BankStatus_BalanceId", + table: "BankBook", + column: "BalanceId", + principalTable: "BankStatus", + principalColumn: "UserId", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_BankStatus_AspNetUsers_UserId", + table: "BankStatus", + column: "UserId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_BlackListed_AspNetUsers_OwnerId", + table: "BlackListed", + column: "OwnerId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_BlackListed_AspNetUsers_UserId", + table: "BlackListed", + column: "UserId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_Blogspot_AspNetUsers_AuthorId", + table: "Blogspot", + column: "AuthorId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_BlogTag_Blogspot_PostId", + table: "BlogTag", + column: "PostId", + principalTable: "Blogspot", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_BlogTag_Tags_TagId", + table: "BlogTag", + column: "TagId", + principalTable: "Tags", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_BlogTrad_AspNetUsers_TraducerId", + table: "BlogTrad", + column: "TraducerId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_BrusherProfile_Performers_UserId", + table: "BrusherProfile", + column: "UserId", + principalTable: "Performers", + principalColumn: "PerformerId", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_BrusherProfile_Schedule_ScheduleOwnerId", + table: "BrusherProfile", + column: "ScheduleOwnerId", + principalTable: "Schedule", + principalColumn: "OwnerId", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_Bug_Feature_FeatureId", + table: "Bug", + column: "FeatureId", + principalTable: "Feature", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_ChatConnection_AspNetUsers_ApplicationUserId", + table: "ChatConnection", + column: "ApplicationUserId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_ChatRoom_AspNetUsers_OwnerId", + table: "ChatRoom", + column: "OwnerId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_ChatRoomAccess_AspNetUsers_UserId", + table: "ChatRoomAccess", + column: "UserId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_ChatRoomAccess_ChatRoom_ChannelName", + table: "ChatRoomAccess", + column: "ChannelName", + principalTable: "ChatRoom", + principalColumn: "Name", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_CircleAuthorizationToBlogPost_Blogspot_BlogPostId", + table: "CircleAuthorizationToBlogPost", + column: "BlogPostId", + principalTable: "Blogspot", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_CircleAuthorizationToBlogPost_Circle_CircleId", + table: "CircleAuthorizationToBlogPost", + column: "CircleId", + principalTable: "Circle", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_CircleMembers_AspNetUsers_MemberId", + table: "CircleMembers", + column: "MemberId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_CircleMembers_Circle_CircleId", + table: "CircleMembers", + column: "CircleId", + principalTable: "Circle", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_CommandForm_Activities_ActivityCode", + table: "CommandForm", + column: "ActivityCode", + principalTable: "Activities", + principalColumn: "Code", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_CommandLine_EstimateTemplates_EstimateTemplateId", + table: "CommandLine", + column: "EstimateTemplateId", + principalTable: "EstimateTemplates", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_CommandLine_Estimates_EstimateId", + table: "CommandLine", + column: "EstimateId", + principalTable: "Estimates", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_Comment_AspNetUsers_AuthorId", + table: "Comment", + column: "AuthorId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_Comment_Blogspot_PostId", + table: "Comment", + column: "PostId", + principalTable: "Blogspot", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_Contact_PostalAddress_AddressId", + table: "Contact", + column: "AddressId", + principalTable: "PostalAddress", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_CoWorking_AspNetUsers_WorkingForId", + table: "CoWorking", + column: "WorkingForId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_CoWorking_Performers_PerformerId", + table: "CoWorking", + column: "PerformerId", + principalTable: "Performers", + principalColumn: "PerformerId", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_DeviceDeclaration_AspNetUsers_DeviceOwnerId", + table: "DeviceDeclaration", + column: "DeviceOwnerId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_DimissClicked_AspNetUsers_UserId", + table: "DimissClicked", + column: "UserId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_DimissClicked_Notification_NotificationId", + table: "DimissClicked", + column: "NotificationId", + principalTable: "Notification", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_Estimates_AspNetUsers_ClientId", + table: "Estimates", + column: "ClientId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_Estimates_Performers_OwnerId", + table: "Estimates", + column: "OwnerId", + principalTable: "Performers", + principalColumn: "PerformerId", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_Estimates_RdvQueries_CommandId", + table: "Estimates", + column: "CommandId", + principalTable: "RdvQueries", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_GitRepositoryReference_AspNetUsers_OwnerId", + table: "GitRepositoryReference", + column: "OwnerId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_HairCutQueries_Activities_ActivityCode", + table: "HairCutQueries", + column: "ActivityCode", + principalTable: "Activities", + principalColumn: "Code", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_HairCutQueries_AspNetUsers_ClientId", + table: "HairCutQueries", + column: "ClientId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_HairCutQueries_BrusherProfile_SelectedProfileUserId", + table: "HairCutQueries", + column: "SelectedProfileUserId", + principalTable: "BrusherProfile", + principalColumn: "UserId"); + + migrationBuilder.AddForeignKey( + name: "FK_HairCutQueries_HairPrestation_PrestationId", + table: "HairCutQueries", + column: "PrestationId", + principalTable: "HairPrestation", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_HairCutQueries_Locations_LocationId", + table: "HairCutQueries", + column: "LocationId", + principalTable: "Locations", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_HairCutQueries_PayPalPayment_PaymentId", + table: "HairCutQueries", + column: "PaymentId", + principalTable: "PayPalPayment", + principalColumn: "CreationToken", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_HairCutQueries_Performers_PerformerId", + table: "HairCutQueries", + column: "PerformerId", + principalTable: "Performers", + principalColumn: "PerformerId", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_HairMultiCutQueries_Activities_ActivityCode", + table: "HairMultiCutQueries", + column: "ActivityCode", + principalTable: "Activities", + principalColumn: "Code", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_HairMultiCutQueries_AspNetUsers_ClientId", + table: "HairMultiCutQueries", + column: "ClientId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_HairMultiCutQueries_Locations_LocationId", + table: "HairMultiCutQueries", + column: "LocationId", + principalTable: "Locations", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_HairMultiCutQueries_PayPalPayment_PaymentId", + table: "HairMultiCutQueries", + column: "PaymentId", + principalTable: "PayPalPayment", + principalColumn: "CreationToken", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_HairMultiCutQueries_Performers_PerformerId", + table: "HairMultiCutQueries", + column: "PerformerId", + principalTable: "Performers", + principalColumn: "PerformerId", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_HairPrestationCollectionItem_HairMultiCutQueries_QueryId", + table: "HairPrestationCollectionItem", + column: "QueryId", + principalTable: "HairMultiCutQueries", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_HairPrestationCollectionItem_HairPrestation_PrestationId", + table: "HairPrestationCollectionItem", + column: "PrestationId", + principalTable: "HairPrestation", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_HairTaint_Color_ColorId", + table: "HairTaint", + column: "ColorId", + principalTable: "Color", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_HairTaintInstance_HairPrestation_PrestationId", + table: "HairTaintInstance", + column: "PrestationId", + principalTable: "HairPrestation", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_HairTaintInstance_HairTaint_TaintId", + table: "HairTaintInstance", + column: "TaintId", + principalTable: "HairTaint", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_Instrumentation_Instrument_InstrumentId", + table: "Instrumentation", + column: "InstrumentId", + principalTable: "Instrument", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_Instrumentation_Performers_UserId", + table: "Instrumentation", + column: "UserId", + principalTable: "Performers", + principalColumn: "PerformerId", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_InstrumentRating_Instrument_InstrumentId", + table: "InstrumentRating", + column: "InstrumentId", + principalTable: "Instrument", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_InstrumentRating_Performers_OwnerId", + table: "InstrumentRating", + column: "OwnerId", + principalTable: "Performers", + principalColumn: "PerformerId", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_LiveFlow_AspNetUsers_OwnerId", + table: "LiveFlow", + column: "OwnerId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_PayPalPayment_AspNetUsers_ExecutorId", + table: "PayPalPayment", + column: "ExecutorId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_Performers_AspNetUsers_PerformerId", + table: "Performers", + column: "PerformerId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_Performers_Locations_OrganizationAddressId", + table: "Performers", + column: "OrganizationAddressId", + principalTable: "Locations", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_Project_Activities_ActivityCode", + table: "Project", + column: "ActivityCode", + principalTable: "Activities", + principalColumn: "Code", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_Project_AspNetUsers_ClientId", + table: "Project", + column: "ClientId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_Project_GitRepositoryReference_GitId", + table: "Project", + column: "GitId", + principalTable: "GitRepositoryReference", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_Project_PayPalPayment_PaymentId", + table: "Project", + column: "PaymentId", + principalTable: "PayPalPayment", + principalColumn: "CreationToken", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_Project_Performers_PerformerId", + table: "Project", + column: "PerformerId", + principalTable: "Performers", + principalColumn: "PerformerId", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_ProjectBuildConfiguration_Project_ProjectId", + table: "ProjectBuildConfiguration", + column: "ProjectId", + principalTable: "Project", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_RdvQueries_Activities_ActivityCode", + table: "RdvQueries", + column: "ActivityCode", + principalTable: "Activities", + principalColumn: "Code", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_RdvQueries_AspNetUsers_ClientId", + table: "RdvQueries", + column: "ClientId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_RdvQueries_Locations_LocationId", + table: "RdvQueries", + column: "LocationId", + principalTable: "Locations", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_RdvQueries_PayPalPayment_PaymentId", + table: "RdvQueries", + column: "PaymentId", + principalTable: "PayPalPayment", + principalColumn: "CreationToken", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_RdvQueries_Performers_PerformerId", + table: "RdvQueries", + column: "PerformerId", + principalTable: "Performers", + principalColumn: "PerformerId", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_Schedule_AspNetUsers_OwnerId", + table: "Schedule", + column: "OwnerId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_ScheduledEvent_Period_PeriodStart_PeriodEnd", + table: "ScheduledEvent", + columns: new[] { "PeriodStart", "PeriodEnd" }, + principalTable: "Period", + principalColumns: new[] { "Start", "End" }, + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_Services_Activities_ContextId", + table: "Services", + column: "ContextId", + principalTable: "Activities", + principalColumn: "Code", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_UserActivities_Activities_DoesCode", + table: "UserActivities", + column: "DoesCode", + principalTable: "Activities", + principalColumn: "Code", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_UserActivities_Performers_UserId", + table: "UserActivities", + column: "UserId", + principalTable: "Performers", + principalColumn: "PerformerId", + onDelete: ReferentialAction.Cascade); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropForeignKey( + name: "FK_Activities_Activities_ParentCode", + table: "Activities"); + + migrationBuilder.DropForeignKey( + name: "FK_Announce_AspNetUsers_OwnerId", + table: "Announce"); + + migrationBuilder.DropForeignKey( + name: "FK_AspNetRoleClaims_AspNetRoles_RoleId", + table: "AspNetRoleClaims"); + + migrationBuilder.DropForeignKey( + name: "FK_AspNetUserClaims_AspNetUsers_UserId", + table: "AspNetUserClaims"); + + migrationBuilder.DropForeignKey( + name: "FK_AspNetUserLogins_AspNetUsers_UserId", + table: "AspNetUserLogins"); + + migrationBuilder.DropForeignKey( + name: "FK_AspNetUserRoles_AspNetRoles_RoleId", + table: "AspNetUserRoles"); + + migrationBuilder.DropForeignKey( + name: "FK_AspNetUserRoles_AspNetUsers_UserId", + table: "AspNetUserRoles"); + + migrationBuilder.DropForeignKey( + name: "FK_AspNetUsers_BankIdentity_BankInfoId", + table: "AspNetUsers"); + + migrationBuilder.DropForeignKey( + name: "FK_AspNetUsers_Locations_PostalAddressId", + table: "AspNetUsers"); + + migrationBuilder.DropForeignKey( + name: "FK_Ban_AspNetUsers_TargetId", + table: "Ban"); + + migrationBuilder.DropForeignKey( + name: "FK_BankBook_BankStatus_BalanceId", + table: "BankBook"); + + migrationBuilder.DropForeignKey( + name: "FK_BankStatus_AspNetUsers_UserId", + table: "BankStatus"); + + migrationBuilder.DropForeignKey( + name: "FK_BlackListed_AspNetUsers_OwnerId", + table: "BlackListed"); + + migrationBuilder.DropForeignKey( + name: "FK_BlackListed_AspNetUsers_UserId", + table: "BlackListed"); + + migrationBuilder.DropForeignKey( + name: "FK_Blogspot_AspNetUsers_AuthorId", + table: "Blogspot"); + + migrationBuilder.DropForeignKey( + name: "FK_BlogTag_Blogspot_PostId", + table: "BlogTag"); + + migrationBuilder.DropForeignKey( + name: "FK_BlogTag_Tags_TagId", + table: "BlogTag"); + + migrationBuilder.DropForeignKey( + name: "FK_BlogTrad_AspNetUsers_TraducerId", + table: "BlogTrad"); + + migrationBuilder.DropForeignKey( + name: "FK_BrusherProfile_Performers_UserId", + table: "BrusherProfile"); + + migrationBuilder.DropForeignKey( + name: "FK_BrusherProfile_Schedule_ScheduleOwnerId", + table: "BrusherProfile"); + + migrationBuilder.DropForeignKey( + name: "FK_Bug_Feature_FeatureId", + table: "Bug"); + + migrationBuilder.DropForeignKey( + name: "FK_ChatConnection_AspNetUsers_ApplicationUserId", + table: "ChatConnection"); + + migrationBuilder.DropForeignKey( + name: "FK_ChatRoom_AspNetUsers_OwnerId", + table: "ChatRoom"); + + migrationBuilder.DropForeignKey( + name: "FK_ChatRoomAccess_AspNetUsers_UserId", + table: "ChatRoomAccess"); + + migrationBuilder.DropForeignKey( + name: "FK_ChatRoomAccess_ChatRoom_ChannelName", + table: "ChatRoomAccess"); + + migrationBuilder.DropForeignKey( + name: "FK_CircleAuthorizationToBlogPost_Blogspot_BlogPostId", + table: "CircleAuthorizationToBlogPost"); + + migrationBuilder.DropForeignKey( + name: "FK_CircleAuthorizationToBlogPost_Circle_CircleId", + table: "CircleAuthorizationToBlogPost"); + + migrationBuilder.DropForeignKey( + name: "FK_CircleMembers_AspNetUsers_MemberId", + table: "CircleMembers"); + + migrationBuilder.DropForeignKey( + name: "FK_CircleMembers_Circle_CircleId", + table: "CircleMembers"); + + migrationBuilder.DropForeignKey( + name: "FK_CommandForm_Activities_ActivityCode", + table: "CommandForm"); + + migrationBuilder.DropForeignKey( + name: "FK_CommandLine_EstimateTemplates_EstimateTemplateId", + table: "CommandLine"); + + migrationBuilder.DropForeignKey( + name: "FK_CommandLine_Estimates_EstimateId", + table: "CommandLine"); + + migrationBuilder.DropForeignKey( + name: "FK_Comment_AspNetUsers_AuthorId", + table: "Comment"); + + migrationBuilder.DropForeignKey( + name: "FK_Comment_Blogspot_PostId", + table: "Comment"); + + migrationBuilder.DropForeignKey( + name: "FK_Contact_PostalAddress_AddressId", + table: "Contact"); + + migrationBuilder.DropForeignKey( + name: "FK_CoWorking_AspNetUsers_WorkingForId", + table: "CoWorking"); + + migrationBuilder.DropForeignKey( + name: "FK_CoWorking_Performers_PerformerId", + table: "CoWorking"); + + migrationBuilder.DropForeignKey( + name: "FK_DeviceDeclaration_AspNetUsers_DeviceOwnerId", + table: "DeviceDeclaration"); + + migrationBuilder.DropForeignKey( + name: "FK_DimissClicked_AspNetUsers_UserId", + table: "DimissClicked"); + + migrationBuilder.DropForeignKey( + name: "FK_DimissClicked_Notification_NotificationId", + table: "DimissClicked"); + + migrationBuilder.DropForeignKey( + name: "FK_Estimates_AspNetUsers_ClientId", + table: "Estimates"); + + migrationBuilder.DropForeignKey( + name: "FK_Estimates_Performers_OwnerId", + table: "Estimates"); + + migrationBuilder.DropForeignKey( + name: "FK_Estimates_RdvQueries_CommandId", + table: "Estimates"); + + migrationBuilder.DropForeignKey( + name: "FK_GitRepositoryReference_AspNetUsers_OwnerId", + table: "GitRepositoryReference"); + + migrationBuilder.DropForeignKey( + name: "FK_HairCutQueries_Activities_ActivityCode", + table: "HairCutQueries"); + + migrationBuilder.DropForeignKey( + name: "FK_HairCutQueries_AspNetUsers_ClientId", + table: "HairCutQueries"); + + migrationBuilder.DropForeignKey( + name: "FK_HairCutQueries_BrusherProfile_SelectedProfileUserId", + table: "HairCutQueries"); + + migrationBuilder.DropForeignKey( + name: "FK_HairCutQueries_HairPrestation_PrestationId", + table: "HairCutQueries"); + + migrationBuilder.DropForeignKey( + name: "FK_HairCutQueries_Locations_LocationId", + table: "HairCutQueries"); + + migrationBuilder.DropForeignKey( + name: "FK_HairCutQueries_PayPalPayment_PaymentId", + table: "HairCutQueries"); + + migrationBuilder.DropForeignKey( + name: "FK_HairCutQueries_Performers_PerformerId", + table: "HairCutQueries"); + + migrationBuilder.DropForeignKey( + name: "FK_HairMultiCutQueries_Activities_ActivityCode", + table: "HairMultiCutQueries"); + + migrationBuilder.DropForeignKey( + name: "FK_HairMultiCutQueries_AspNetUsers_ClientId", + table: "HairMultiCutQueries"); + + migrationBuilder.DropForeignKey( + name: "FK_HairMultiCutQueries_Locations_LocationId", + table: "HairMultiCutQueries"); + + migrationBuilder.DropForeignKey( + name: "FK_HairMultiCutQueries_PayPalPayment_PaymentId", + table: "HairMultiCutQueries"); + + migrationBuilder.DropForeignKey( + name: "FK_HairMultiCutQueries_Performers_PerformerId", + table: "HairMultiCutQueries"); + + migrationBuilder.DropForeignKey( + name: "FK_HairPrestationCollectionItem_HairMultiCutQueries_QueryId", + table: "HairPrestationCollectionItem"); + + migrationBuilder.DropForeignKey( + name: "FK_HairPrestationCollectionItem_HairPrestation_PrestationId", + table: "HairPrestationCollectionItem"); + + migrationBuilder.DropForeignKey( + name: "FK_HairTaint_Color_ColorId", + table: "HairTaint"); + + migrationBuilder.DropForeignKey( + name: "FK_HairTaintInstance_HairPrestation_PrestationId", + table: "HairTaintInstance"); + + migrationBuilder.DropForeignKey( + name: "FK_HairTaintInstance_HairTaint_TaintId", + table: "HairTaintInstance"); + + migrationBuilder.DropForeignKey( + name: "FK_Instrumentation_Instrument_InstrumentId", + table: "Instrumentation"); + + migrationBuilder.DropForeignKey( + name: "FK_Instrumentation_Performers_UserId", + table: "Instrumentation"); + + migrationBuilder.DropForeignKey( + name: "FK_InstrumentRating_Instrument_InstrumentId", + table: "InstrumentRating"); + + migrationBuilder.DropForeignKey( + name: "FK_InstrumentRating_Performers_OwnerId", + table: "InstrumentRating"); + + migrationBuilder.DropForeignKey( + name: "FK_LiveFlow_AspNetUsers_OwnerId", + table: "LiveFlow"); + + migrationBuilder.DropForeignKey( + name: "FK_PayPalPayment_AspNetUsers_ExecutorId", + table: "PayPalPayment"); + + migrationBuilder.DropForeignKey( + name: "FK_Performers_AspNetUsers_PerformerId", + table: "Performers"); + + migrationBuilder.DropForeignKey( + name: "FK_Performers_Locations_OrganizationAddressId", + table: "Performers"); + + migrationBuilder.DropForeignKey( + name: "FK_Project_Activities_ActivityCode", + table: "Project"); + + migrationBuilder.DropForeignKey( + name: "FK_Project_AspNetUsers_ClientId", + table: "Project"); + + migrationBuilder.DropForeignKey( + name: "FK_Project_GitRepositoryReference_GitId", + table: "Project"); + + migrationBuilder.DropForeignKey( + name: "FK_Project_PayPalPayment_PaymentId", + table: "Project"); + + migrationBuilder.DropForeignKey( + name: "FK_Project_Performers_PerformerId", + table: "Project"); + + migrationBuilder.DropForeignKey( + name: "FK_ProjectBuildConfiguration_Project_ProjectId", + table: "ProjectBuildConfiguration"); + + migrationBuilder.DropForeignKey( + name: "FK_RdvQueries_Activities_ActivityCode", + table: "RdvQueries"); + + migrationBuilder.DropForeignKey( + name: "FK_RdvQueries_AspNetUsers_ClientId", + table: "RdvQueries"); + + migrationBuilder.DropForeignKey( + name: "FK_RdvQueries_Locations_LocationId", + table: "RdvQueries"); + + migrationBuilder.DropForeignKey( + name: "FK_RdvQueries_PayPalPayment_PaymentId", + table: "RdvQueries"); + + migrationBuilder.DropForeignKey( + name: "FK_RdvQueries_Performers_PerformerId", + table: "RdvQueries"); + + migrationBuilder.DropForeignKey( + name: "FK_Schedule_AspNetUsers_OwnerId", + table: "Schedule"); + + migrationBuilder.DropForeignKey( + name: "FK_ScheduledEvent_Period_PeriodStart_PeriodEnd", + table: "ScheduledEvent"); + + migrationBuilder.DropForeignKey( + name: "FK_Services_Activities_ContextId", + table: "Services"); + + migrationBuilder.DropForeignKey( + name: "FK_UserActivities_Activities_DoesCode", + table: "UserActivities"); + + migrationBuilder.DropForeignKey( + name: "FK_UserActivities_Performers_UserId", + table: "UserActivities"); + + migrationBuilder.DropTable( + name: "AspNetUserTokens"); + + migrationBuilder.DropIndex( + name: "IX_ScheduledEvent_PeriodStart_PeriodEnd", + table: "ScheduledEvent"); + + migrationBuilder.DropIndex( + name: "IX_ScheduledEvent_ScheduleOwnerId", + table: "ScheduledEvent"); + + migrationBuilder.DropIndex( + name: "IX_ProjectBuildConfiguration_ProjectId", + table: "ProjectBuildConfiguration"); + + migrationBuilder.DropIndex( + name: "IX_Project_ActivityCode", + table: "Project"); + + migrationBuilder.DropIndex( + name: "IX_Project_ClientId", + table: "Project"); + + migrationBuilder.DropIndex( + name: "IX_Project_GitId", + table: "Project"); + + migrationBuilder.DropIndex( + name: "IX_Project_PaymentId", + table: "Project"); + + migrationBuilder.DropIndex( + name: "IX_Project_PerformerId", + table: "Project"); + + migrationBuilder.DropIndex( + name: "IX_PayPalPayment_ExecutorId", + table: "PayPalPayment"); + + migrationBuilder.DropIndex( + name: "IX_MusicalPreference_DjSettingsUserId", + table: "MusicalPreference"); + + migrationBuilder.DropIndex( + name: "IX_MusicalPreference_GeneralSettingsUserId", + table: "MusicalPreference"); + + migrationBuilder.DropIndex( + name: "IX_LiveFlow_OwnerId", + table: "LiveFlow"); + + migrationBuilder.DropIndex( + name: "IX_InstrumentRating_OwnerId", + table: "InstrumentRating"); + + migrationBuilder.DropIndex( + name: "IX_Instrumentation_UserId", + table: "Instrumentation"); + + migrationBuilder.DropIndex( + name: "IX_HyperLink_BrusherProfileUserId", + table: "HyperLink"); + + migrationBuilder.DropIndex( + name: "IX_HyperLink_PayPalPaymentCreationToken", + table: "HyperLink"); + + migrationBuilder.DropIndex( + name: "IX_HairTaintInstance_PrestationId", + table: "HairTaintInstance"); + + migrationBuilder.DropIndex( + name: "IX_HairTaint_ColorId", + table: "HairTaint"); + + migrationBuilder.DropIndex( + name: "IX_HairPrestationCollectionItem_PrestationId", + table: "HairPrestationCollectionItem"); + + migrationBuilder.DropIndex( + name: "IX_HairPrestationCollectionItem_QueryId", + table: "HairPrestationCollectionItem"); + + migrationBuilder.DropIndex( + name: "IX_GitRepositoryReference_OwnerId", + table: "GitRepositoryReference"); + + migrationBuilder.DropIndex( + name: "IX_DimissClicked_NotificationId", + table: "DimissClicked"); + + migrationBuilder.DropIndex( + name: "IX_DeviceDeclaration_DeviceOwnerId", + table: "DeviceDeclaration"); + + migrationBuilder.DropIndex( + name: "IX_CoWorking_FormationSettingsUserId", + table: "CoWorking"); + + migrationBuilder.DropIndex( + name: "IX_CoWorking_PerformerId", + table: "CoWorking"); + + migrationBuilder.DropIndex( + name: "IX_CoWorking_WorkingForId", + table: "CoWorking"); + + migrationBuilder.DropIndex( + name: "IX_Contact_AddressId", + table: "Contact"); + + migrationBuilder.DropIndex( + name: "IX_Contact_ApplicationUserId", + table: "Contact"); + + migrationBuilder.DropIndex( + name: "IX_Comment_AuthorId", + table: "Comment"); + + migrationBuilder.DropIndex( + name: "IX_Comment_ParentId", + table: "Comment"); + + migrationBuilder.DropIndex( + name: "IX_Comment_PostId", + table: "Comment"); + + migrationBuilder.DropIndex( + name: "IX_CommandLine_EstimateId", + table: "CommandLine"); + + migrationBuilder.DropIndex( + name: "IX_CommandLine_EstimateTemplateId", + table: "CommandLine"); + + migrationBuilder.DropIndex( + name: "IX_CommandForm_ActivityCode", + table: "CommandForm"); + + migrationBuilder.DropIndex( + name: "IX_CircleAuthorizationToBlogPost_BlogPostId", + table: "CircleAuthorizationToBlogPost"); + + migrationBuilder.DropIndex( + name: "IX_Circle_ApplicationUserId", + table: "Circle"); + + migrationBuilder.DropIndex( + name: "IX_ChatRoomAccess_UserId", + table: "ChatRoomAccess"); + + migrationBuilder.DropIndex( + name: "IX_ChatRoom_OwnerId", + table: "ChatRoom"); + + migrationBuilder.DropIndex( + name: "IX_ChatConnection_ApplicationUserId", + table: "ChatConnection"); + + migrationBuilder.DropIndex( + name: "IX_Bug_FeatureId", + table: "Bug"); + + migrationBuilder.DropIndex( + name: "IX_BrusherProfile_ScheduleOwnerId", + table: "BrusherProfile"); + + migrationBuilder.DropIndex( + name: "IX_BlogTrad_TraducerId", + table: "BlogTrad"); + + migrationBuilder.DropIndex( + name: "IX_BlogTag_TagId", + table: "BlogTag"); + + migrationBuilder.DropIndex( + name: "IX_BlackListed_OwnerId", + table: "BlackListed"); + + migrationBuilder.DropIndex( + name: "IX_BlackListed_UserId", + table: "BlackListed"); + + migrationBuilder.DropIndex( + name: "IX_Ban_TargetId", + table: "Ban"); + + migrationBuilder.DropIndex( + name: "IX_AspNetUsers_BankInfoId", + table: "AspNetUsers"); + + migrationBuilder.DropIndex( + name: "IX_AspNetUsers_PostalAddressId", + table: "AspNetUsers"); + + migrationBuilder.DropIndex( + name: "UserNameIndex", + table: "AspNetUsers"); + + migrationBuilder.DropIndex( + name: "IX_AspNetUserRoles_RoleId", + table: "AspNetUserRoles"); + + migrationBuilder.DropIndex( + name: "IX_AspNetUserLogins_UserId", + table: "AspNetUserLogins"); + + migrationBuilder.DropIndex( + name: "IX_AspNetUserClaims_UserId", + table: "AspNetUserClaims"); + + migrationBuilder.DropIndex( + name: "RoleNameIndex", + table: "AspNetRoles"); + + migrationBuilder.DropIndex( + name: "IX_AspNetRoleClaims_RoleId", + table: "AspNetRoleClaims"); + + migrationBuilder.DropIndex( + name: "IX_Announce_OwnerId", + table: "Announce"); + + migrationBuilder.DropPrimaryKey( + name: "PK_UserActivities", + table: "UserActivities"); + + migrationBuilder.DropIndex( + name: "IX_UserActivities_UserId", + table: "UserActivities"); + + migrationBuilder.DropPrimaryKey( + name: "PK_Tags", + table: "Tags"); + + migrationBuilder.DropPrimaryKey( + name: "PK_SiteSkills", + table: "SiteSkills"); + + migrationBuilder.DropPrimaryKey( + name: "PK_Services", + table: "Services"); + + migrationBuilder.DropIndex( + name: "IX_Services_ContextId", + table: "Services"); + + migrationBuilder.DropPrimaryKey( + name: "PK_RefreshTokens", + table: "RefreshTokens"); + + migrationBuilder.DropPrimaryKey( + name: "PK_RdvQueries", + table: "RdvQueries"); + + migrationBuilder.DropIndex( + name: "IX_RdvQueries_ActivityCode", + table: "RdvQueries"); + + migrationBuilder.DropIndex( + name: "IX_RdvQueries_ClientId", + table: "RdvQueries"); + + migrationBuilder.DropIndex( + name: "IX_RdvQueries_LocationId", + table: "RdvQueries"); + + migrationBuilder.DropIndex( + name: "IX_RdvQueries_PaymentId", + table: "RdvQueries"); + + migrationBuilder.DropIndex( + name: "IX_RdvQueries_PerformerId", + table: "RdvQueries"); + + migrationBuilder.DropPrimaryKey( + name: "PK_Products", + table: "Products"); + + migrationBuilder.DropPrimaryKey( + name: "PK_Performers", + table: "Performers"); + + migrationBuilder.DropIndex( + name: "IX_Performers_OrganizationAddressId", + table: "Performers"); + + migrationBuilder.DropPrimaryKey( + name: "PK_Locations", + table: "Locations"); + + migrationBuilder.DropPrimaryKey( + name: "PK_HairMultiCutQueries", + table: "HairMultiCutQueries"); + + migrationBuilder.DropIndex( + name: "IX_HairMultiCutQueries_ActivityCode", + table: "HairMultiCutQueries"); + + migrationBuilder.DropIndex( + name: "IX_HairMultiCutQueries_ClientId", + table: "HairMultiCutQueries"); + + migrationBuilder.DropIndex( + name: "IX_HairMultiCutQueries_LocationId", + table: "HairMultiCutQueries"); + + migrationBuilder.DropIndex( + name: "IX_HairMultiCutQueries_PaymentId", + table: "HairMultiCutQueries"); + + migrationBuilder.DropIndex( + name: "IX_HairMultiCutQueries_PerformerId", + table: "HairMultiCutQueries"); + + migrationBuilder.DropPrimaryKey( + name: "PK_HairCutQueries", + table: "HairCutQueries"); + + migrationBuilder.DropIndex( + name: "IX_HairCutQueries_ActivityCode", + table: "HairCutQueries"); + + migrationBuilder.DropIndex( + name: "IX_HairCutQueries_ClientId", + table: "HairCutQueries"); + + migrationBuilder.DropIndex( + name: "IX_HairCutQueries_LocationId", + table: "HairCutQueries"); + + migrationBuilder.DropIndex( + name: "IX_HairCutQueries_PaymentId", + table: "HairCutQueries"); + + migrationBuilder.DropIndex( + name: "IX_HairCutQueries_PerformerId", + table: "HairCutQueries"); + + migrationBuilder.DropIndex( + name: "IX_HairCutQueries_PrestationId", + table: "HairCutQueries"); + + migrationBuilder.DropIndex( + name: "IX_HairCutQueries_SelectedProfileUserId", + table: "HairCutQueries"); + + migrationBuilder.DropPrimaryKey( + name: "PK_ExceptionsSIREN", + table: "ExceptionsSIREN"); + + migrationBuilder.DropPrimaryKey( + name: "PK_EstimateTemplates", + table: "EstimateTemplates"); + + migrationBuilder.DropPrimaryKey( + name: "PK_Estimates", + table: "Estimates"); + + migrationBuilder.DropIndex( + name: "IX_Estimates_ClientId", + table: "Estimates"); + + migrationBuilder.DropIndex( + name: "IX_Estimates_CommandId", + table: "Estimates"); + + migrationBuilder.DropIndex( + name: "IX_Estimates_OwnerId", + table: "Estimates"); + + migrationBuilder.DropPrimaryKey( + name: "PK_CircleMembers", + table: "CircleMembers"); + + migrationBuilder.DropIndex( + name: "IX_CircleMembers_CircleId", + table: "CircleMembers"); + + migrationBuilder.DropPrimaryKey( + name: "PK_Blogspot", + table: "Blogspot"); + + migrationBuilder.DropIndex( + name: "IX_Blogspot_AuthorId", + table: "Blogspot"); + + migrationBuilder.DropPrimaryKey( + name: "PK_BankStatus", + table: "BankStatus"); + + migrationBuilder.DropPrimaryKey( + name: "PK_BankBook", + table: "BankBook"); + + migrationBuilder.DropIndex( + name: "IX_BankBook_BalanceId", + table: "BankBook"); + + migrationBuilder.DropPrimaryKey( + name: "PK_Applications", + table: "Applications"); + + migrationBuilder.DropPrimaryKey( + name: "PK_Activities", + table: "Activities"); + + migrationBuilder.DropIndex( + name: "IX_Activities_ParentCode", + table: "Activities"); + + migrationBuilder.RenameTable( + name: "UserActivities", + newName: "UserActivity"); + + migrationBuilder.RenameTable( + name: "Tags", + newName: "Tag"); + + migrationBuilder.RenameTable( + name: "SiteSkills", + newName: "Skill"); + + migrationBuilder.RenameTable( + name: "Services", + newName: "Service"); + + migrationBuilder.RenameTable( + name: "RefreshTokens", + newName: "RefreshToken"); + + migrationBuilder.RenameTable( + name: "RdvQueries", + newName: "RdvQuery"); + + migrationBuilder.RenameTable( + name: "Products", + newName: "Product"); + + migrationBuilder.RenameTable( + name: "Performers", + newName: "PerformerProfile"); + + migrationBuilder.RenameTable( + name: "Locations", + newName: "Location"); + + migrationBuilder.RenameTable( + name: "HairMultiCutQueries", + newName: "HairMultiCutQuery"); + + migrationBuilder.RenameTable( + name: "HairCutQueries", + newName: "HairCutQuery"); + + migrationBuilder.RenameTable( + name: "ExceptionsSIREN", + newName: "ExceptionSIREN"); + + migrationBuilder.RenameTable( + name: "EstimateTemplates", + newName: "EstimateTemplate"); + + migrationBuilder.RenameTable( + name: "Estimates", + newName: "Estimate"); + + migrationBuilder.RenameTable( + name: "CircleMembers", + newName: "CircleMember"); + + migrationBuilder.RenameTable( + name: "Blogspot", + newName: "BlogPost"); + + migrationBuilder.RenameTable( + name: "BankStatus", + newName: "AccountBalance"); + + migrationBuilder.RenameTable( + name: "BankBook", + newName: "BalanceImpact"); + + migrationBuilder.RenameTable( + name: "Applications", + newName: "Client"); + + migrationBuilder.RenameTable( + name: "Activities", + newName: "Activity"); + + migrationBuilder.AlterColumn( + name: "PeriodStart", + table: "ScheduledEvent", + type: "timestamp with time zone", + nullable: true, + oldClrType: typeof(DateTime), + oldType: "timestamp with time zone"); + + migrationBuilder.AlterColumn( + name: "PeriodEnd", + table: "ScheduledEvent", + type: "timestamp with time zone", + nullable: true, + oldClrType: typeof(DateTime), + oldType: "timestamp with time zone"); + + migrationBuilder.AlterColumn( + name: "Id", + table: "ScheduledEvent", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "Name", + table: "ProjectBuildConfiguration", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Id", + table: "ProjectBuildConfiguration", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "Version", + table: "Project", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "UserModified", + table: "Project", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "UserCreated", + table: "Project", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "PaymentId", + table: "Project", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "OwnerId", + table: "Project", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Name", + table: "Project", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Description", + table: "Project", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Id", + table: "Project", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "Street2", + table: "PostalAddress", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Street1", + table: "PostalAddress", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "State", + table: "PostalAddress", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Province", + table: "PostalAddress", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "PostalCode", + table: "PostalAddress", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Country", + table: "PostalAddress", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "City", + table: "PostalAddress", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Id", + table: "PostalAddress", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "UserModified", + table: "PayPalPayment", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "UserCreated", + table: "PayPalPayment", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "State", + table: "PayPalPayment", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "PaypalPayerId", + table: "PayPalPayment", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "OrderReference", + table: "PayPalPayment", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "ExecutorId", + table: "PayPalPayment", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "UserModified", + table: "Option", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "UserCreated", + table: "Option", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Description", + table: "Option", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "TokenType", + table: "OAuth2Tokens", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "RefreshToken", + table: "OAuth2Tokens", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "ExpiresIn", + table: "OAuth2Tokens", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "AccessToken", + table: "OAuth2Tokens", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "title", + table: "Notification", + type: "text", + nullable: false, + oldClrType: typeof(string), + oldType: "character varying(1024)", + oldMaxLength: 1024); + + migrationBuilder.AlterColumn( + name: "tag", + table: "Notification", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(512)", + oldMaxLength: 512); + + migrationBuilder.AlterColumn( + name: "sound", + table: "Notification", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(512)", + oldMaxLength: 512); + + migrationBuilder.AlterColumn( + name: "icon", + table: "Notification", + type: "text", + nullable: true, + defaultValue: "exclam", + oldClrType: typeof(string), + oldType: "character varying(512)", + oldMaxLength: 512, + oldDefaultValue: "exclam"); + + migrationBuilder.AlterColumn( + name: "color", + table: "Notification", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(512)", + oldMaxLength: 512); + + migrationBuilder.AlterColumn( + name: "click_action", + table: "Notification", + type: "text", + nullable: false, + oldClrType: typeof(string), + oldType: "character varying(512)", + oldMaxLength: 512); + + migrationBuilder.AlterColumn( + name: "body", + table: "Notification", + type: "text", + nullable: false, + oldClrType: typeof(string), + oldType: "character varying(512)", + oldMaxLength: 512); + + migrationBuilder.AlterColumn( + name: "Target", + table: "Notification", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(512)", + oldMaxLength: 512); + + migrationBuilder.AlterColumn( + name: "Id", + table: "Notification", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "Name", + table: "MusicalTendency", + type: "character varying(255)", + maxLength: 255, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(255)", + oldMaxLength: 255); + + migrationBuilder.AlterColumn( + name: "Id", + table: "MusicalTendency", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "UserModified", + table: "MailingTemplate", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "UserCreated", + table: "MailingTemplate", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Topic", + table: "MailingTemplate", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "ReplyToAddress", + table: "MailingTemplate", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Body", + table: "MailingTemplate", + type: "character varying(65536)", + maxLength: 65536, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(65536)", + oldMaxLength: 65536); + + migrationBuilder.AlterColumn( + name: "Title", + table: "LiveFlow", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Pitch", + table: "LiveFlow", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "OwnerId", + table: "LiveFlow", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "MediaType", + table: "LiveFlow", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "DifferedFileName", + table: "LiveFlow", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Id", + table: "LiveFlow", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "Id", + table: "InstrumentRating", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "Name", + table: "Instrument", + type: "character varying(255)", + maxLength: 255, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(255)", + oldMaxLength: 255); + + migrationBuilder.AlterColumn( + name: "Id", + table: "Instrument", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "Rel", + table: "HyperLink", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "ContentType", + table: "HyperLink", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Brand", + table: "HairTaint", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Id", + table: "HairTaint", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "Id", + table: "HairPrestationCollectionItem", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "Id", + table: "HairPrestation", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "Url", + table: "GitRepositoryReference", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Path", + table: "GitRepositoryReference", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "OwnerId", + table: "GitRepositoryReference", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Branch", + table: "GitRepositoryReference", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Id", + table: "GitRepositoryReference", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "DisplayName", + table: "FormationSettings", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Summary", + table: "Form", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "ShortName", + table: "Feature", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Description", + table: "Feature", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Id", + table: "Feature", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "SoundCloudId", + table: "DjSettings", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Version", + table: "DeviceDeclaration", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Platform", + table: "DeviceDeclaration", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Model", + table: "DeviceDeclaration", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "DeviceOwnerId", + table: "DeviceDeclaration", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "DeclarationDate", + table: "DeviceDeclaration", + type: "timestamp with time zone", + nullable: false, + oldClrType: typeof(DateTime), + oldType: "timestamp with time zone", + oldDefaultValueSql: "LOCALTIMESTAMP"); + + migrationBuilder.AlterColumn( + name: "WorkingForId", + table: "CoWorking", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "PerformerId", + table: "CoWorking", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Id", + table: "CoWorking", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "Name", + table: "Contact", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "EMail", + table: "Contact", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "UserModified", + table: "Comment", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "UserCreated", + table: "Comment", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Content", + table: "Comment", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Id", + table: "Comment", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "Currency", + table: "CommandLine", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Id", + table: "CommandLine", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "Title", + table: "CommandForm", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "ActivityCode", + table: "CommandForm", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "ActionName", + table: "CommandForm", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Id", + table: "CommandForm", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "Name", + table: "Color", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Id", + table: "Color", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "UserName", + table: "ClientProviderInfo", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Phone", + table: "ClientProviderInfo", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "EMail", + table: "ClientProviderInfo", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Avatar", + table: "ClientProviderInfo", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "OwnerId", + table: "Circle", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Name", + table: "Circle", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Id", + table: "Circle", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "Id", + table: "ChatRoomAccess", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "UserModified", + table: "ChatRoom", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "UserCreated", + table: "ChatRoom", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Topic", + table: "ChatRoom", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "OwnerId", + table: "ChatRoom", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "UserAgent", + table: "ChatConnection", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Title", + table: "Bug", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "FeatureId", + table: "Bug", + type: "bigint", + nullable: true, + oldClrType: typeof(long), + oldType: "bigint"); + + migrationBuilder.AlterColumn( + name: "Description", + table: "Bug", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Id", + table: "Bug", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "ScheduleOwnerId", + table: "BrusherProfile", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "TraducerId", + table: "BlogTrad", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Title", + table: "BlogTrad", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Body", + table: "BlogTrad", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Id", + table: "BlackListed", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "WicketCode", + table: "BankIdentity", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "IBAN", + table: "BankIdentity", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "BankCode", + table: "BankIdentity", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "BIC", + table: "BankIdentity", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "AccountNumber", + table: "BankIdentity", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Id", + table: "BankIdentity", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "UserModified", + table: "Ban", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "UserCreated", + table: "Ban", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Id", + table: "Ban", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "UserModified", + table: "AspNetUsers", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "UserCreated", + table: "AspNetUsers", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "PostalAddressId", + table: "AspNetUsers", + type: "bigint", + nullable: true, + oldClrType: typeof(long), + oldType: "bigint"); + + migrationBuilder.AlterColumn( + name: "FullName", + table: "AspNetUsers", + type: "character varying(512)", + maxLength: 512, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(512)", + oldMaxLength: 512); + + migrationBuilder.AlterColumn( + name: "DedicatedGoogleCalendar", + table: "AspNetUsers", + type: "character varying(512)", + maxLength: 512, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(512)", + oldMaxLength: 512); + + migrationBuilder.AlterColumn( + name: "BankInfoId", + table: "AspNetUsers", + type: "bigint", + nullable: true, + oldClrType: typeof(long), + oldType: "bigint"); + + migrationBuilder.AlterColumn( + name: "Avatar", + table: "AspNetUsers", + type: "character varying(512)", + maxLength: 512, + nullable: true, + defaultValue: "/images/Users/icon_user.png", + oldClrType: typeof(string), + oldType: "character varying(512)", + oldMaxLength: 512, + oldDefaultValue: "/images/Users/icon_user.png"); + + migrationBuilder.AlterColumn( + name: "Id", + table: "AspNetUserClaims", + type: "integer", + nullable: false, + oldClrType: typeof(int), + oldType: "integer") + .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "Id", + table: "AspNetRoleClaims", + type: "integer", + nullable: false, + oldClrType: typeof(int), + oldType: "integer") + .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "Topic", + table: "Announce", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Sender", + table: "Announce", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "OwnerId", + table: "Announce", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Message", + table: "Announce", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Id", + table: "Announce", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "Name", + table: "Tag", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Id", + table: "Tag", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "Name", + table: "Skill", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Id", + table: "Skill", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "Name", + table: "Service", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Description", + table: "Service", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "ContextId", + table: "Service", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Id", + table: "Service", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "UserModified", + table: "RdvQuery", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "UserCreated", + table: "RdvQuery", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Reason", + table: "RdvQuery", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "PaymentId", + table: "RdvQuery", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "LocationId", + table: "RdvQuery", + type: "bigint", + nullable: true, + oldClrType: typeof(long), + oldType: "bigint"); + + migrationBuilder.AlterColumn( + name: "Description", + table: "RdvQuery", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Id", + table: "RdvQuery", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "Name", + table: "Product", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Description", + table: "Product", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Id", + table: "Product", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "WebSite", + table: "PerformerProfile", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "SIREN", + table: "PerformerProfile", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Address", + table: "Location", + type: "character varying(512)", + maxLength: 512, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(512)", + oldMaxLength: 512); + + migrationBuilder.AlterColumn( + name: "Id", + table: "Location", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "UserModified", + table: "HairMultiCutQuery", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "UserCreated", + table: "HairMultiCutQuery", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "PaymentId", + table: "HairMultiCutQuery", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "LocationId", + table: "HairMultiCutQuery", + type: "bigint", + nullable: true, + oldClrType: typeof(long), + oldType: "bigint"); + + migrationBuilder.AlterColumn( + name: "Description", + table: "HairMultiCutQuery", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Id", + table: "HairMultiCutQuery", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "UserModified", + table: "HairCutQuery", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "UserCreated", + table: "HairCutQuery", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "PaymentId", + table: "HairCutQuery", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "LocationId", + table: "HairCutQuery", + type: "bigint", + nullable: true, + oldClrType: typeof(long), + oldType: "bigint"); + + migrationBuilder.AlterColumn( + name: "Description", + table: "HairCutQuery", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "AdditionalInfo", + table: "HairCutQuery", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Id", + table: "HairCutQuery", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "Title", + table: "EstimateTemplate", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Description", + table: "EstimateTemplate", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Id", + table: "EstimateTemplate", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "Title", + table: "Estimate", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "OwnerId", + table: "Estimate", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Description", + table: "Estimate", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "AttachedGraphicsString", + table: "Estimate", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "AttachedFilesString", + table: "Estimate", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Id", + table: "Estimate", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "UserModified", + table: "BlogPost", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "UserCreated", + table: "BlogPost", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Title", + table: "BlogPost", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Photo", + table: "BlogPost", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Lang", + table: "BlogPost", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Content", + table: "BlogPost", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "AuthorId", + table: "BlogPost", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Id", + table: "BlogPost", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "Id", + table: "BalanceImpact", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + migrationBuilder.AlterColumn( + name: "Secret", + table: "Client", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "RedirectUri", + table: "Client", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "LogoutRedirectUri", + table: "Client", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100); + + migrationBuilder.AlterColumn( + name: "DisplayName", + table: "Client", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "UserModified", + table: "Activity", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "UserCreated", + table: "Activity", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "SettingsClassName", + table: "Activity", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Photo", + table: "Activity", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "ParentCode", + table: "Activity", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Name", + table: "Activity", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "ModeratorGroupName", + table: "Activity", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AlterColumn( + name: "Description", + table: "Activity", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "text"); + + migrationBuilder.AddPrimaryKey( + name: "PK_UserActivity", + table: "UserActivity", + columns: new[] { "DoesCode", "UserId" }); + + migrationBuilder.AddPrimaryKey( + name: "PK_Tag", + table: "Tag", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_Skill", + table: "Skill", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_Service", + table: "Service", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_RefreshToken", + table: "RefreshToken", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_RdvQuery", + table: "RdvQuery", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_Product", + table: "Product", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_PerformerProfile", + table: "PerformerProfile", + column: "PerformerId"); + + migrationBuilder.AddPrimaryKey( + name: "PK_Location", + table: "Location", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_HairMultiCutQuery", + table: "HairMultiCutQuery", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_HairCutQuery", + table: "HairCutQuery", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_ExceptionSIREN", + table: "ExceptionSIREN", + column: "SIREN"); + + migrationBuilder.AddPrimaryKey( + name: "PK_EstimateTemplate", + table: "EstimateTemplate", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_Estimate", + table: "Estimate", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_CircleMember", + table: "CircleMember", + columns: new[] { "MemberId", "CircleId" }); + + migrationBuilder.AddPrimaryKey( + name: "PK_BlogPost", + table: "BlogPost", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_AccountBalance", + table: "AccountBalance", + column: "UserId"); + + migrationBuilder.AddPrimaryKey( + name: "PK_BalanceImpact", + table: "BalanceImpact", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_Client", + table: "Client", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_Activity", + table: "Activity", + column: "Code"); + + migrationBuilder.CreateIndex( + name: "UserNameIndex", + table: "AspNetUsers", + column: "NormalizedUserName"); + + migrationBuilder.CreateIndex( + name: "RoleNameIndex", + table: "AspNetRoles", + column: "NormalizedName"); + + migrationBuilder.AddForeignKey( + name: "FK_AccountBalance_AspNetUsers_UserId", + table: "AccountBalance", + column: "UserId", + principalTable: "AspNetUsers", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_Activity_Activity_ParentCode", + table: "Activity", + column: "ParentCode", + principalTable: "Activity", + principalColumn: "Code"); + + migrationBuilder.AddForeignKey( + name: "FK_Announce_AspNetUsers_OwnerId", + table: "Announce", + column: "OwnerId", + principalTable: "AspNetUsers", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_AspNetRoleClaims_AspNetRoles_RoleId", + table: "AspNetRoleClaims", + column: "RoleId", + principalTable: "AspNetRoles", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_AspNetUserClaims_AspNetUsers_UserId", + table: "AspNetUserClaims", + column: "UserId", + principalTable: "AspNetUsers", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_AspNetUserLogins_AspNetUsers_UserId", + table: "AspNetUserLogins", + column: "UserId", + principalTable: "AspNetUsers", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_AspNetUserRoles_AspNetRoles_RoleId", + table: "AspNetUserRoles", + column: "RoleId", + principalTable: "AspNetRoles", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_AspNetUserRoles_AspNetUsers_UserId", + table: "AspNetUserRoles", + column: "UserId", + principalTable: "AspNetUsers", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_AspNetUsers_BankIdentity_BankInfoId", + table: "AspNetUsers", + column: "BankInfoId", + principalTable: "BankIdentity", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_AspNetUsers_Location_PostalAddressId", + table: "AspNetUsers", + column: "PostalAddressId", + principalTable: "Location", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_BalanceImpact_AccountBalance_BalanceId", + table: "BalanceImpact", + column: "BalanceId", + principalTable: "AccountBalance", + principalColumn: "UserId"); + + migrationBuilder.AddForeignKey( + name: "FK_Ban_AspNetUsers_TargetId", + table: "Ban", + column: "TargetId", + principalTable: "AspNetUsers", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_BlackListed_AspNetUsers_OwnerId", + table: "BlackListed", + column: "OwnerId", + principalTable: "AspNetUsers", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_BlackListed_AspNetUsers_UserId", + table: "BlackListed", + column: "UserId", + principalTable: "AspNetUsers", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_BlogPost_AspNetUsers_AuthorId", + table: "BlogPost", + column: "AuthorId", + principalTable: "AspNetUsers", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_BlogTag_BlogPost_PostId", + table: "BlogTag", + column: "PostId", + principalTable: "BlogPost", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_BlogTag_Tag_TagId", + table: "BlogTag", + column: "TagId", + principalTable: "Tag", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_BlogTrad_AspNetUsers_TraducerId", + table: "BlogTrad", + column: "TraducerId", + principalTable: "AspNetUsers", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_BrusherProfile_PerformerProfile_UserId", + table: "BrusherProfile", + column: "UserId", + principalTable: "PerformerProfile", + principalColumn: "PerformerId"); + + migrationBuilder.AddForeignKey( + name: "FK_BrusherProfile_Schedule_ScheduleOwnerId", + table: "BrusherProfile", + column: "ScheduleOwnerId", + principalTable: "Schedule", + principalColumn: "OwnerId"); + + migrationBuilder.AddForeignKey( + name: "FK_Bug_Feature_FeatureId", + table: "Bug", + column: "FeatureId", + principalTable: "Feature", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_ChatConnection_AspNetUsers_ApplicationUserId", + table: "ChatConnection", + column: "ApplicationUserId", + principalTable: "AspNetUsers", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_ChatRoom_AspNetUsers_OwnerId", + table: "ChatRoom", + column: "OwnerId", + principalTable: "AspNetUsers", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_ChatRoomAccess_AspNetUsers_UserId", + table: "ChatRoomAccess", + column: "UserId", + principalTable: "AspNetUsers", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_ChatRoomAccess_ChatRoom_ChannelName", + table: "ChatRoomAccess", + column: "ChannelName", + principalTable: "ChatRoom", + principalColumn: "Name"); + + migrationBuilder.AddForeignKey( + name: "FK_CircleAuthorizationToBlogPost_BlogPost_BlogPostId", + table: "CircleAuthorizationToBlogPost", + column: "BlogPostId", + principalTable: "BlogPost", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_CircleAuthorizationToBlogPost_Circle_CircleId", + table: "CircleAuthorizationToBlogPost", + column: "CircleId", + principalTable: "Circle", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_CircleMember_AspNetUsers_MemberId", + table: "CircleMember", + column: "MemberId", + principalTable: "AspNetUsers", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_CircleMember_Circle_CircleId", + table: "CircleMember", + column: "CircleId", + principalTable: "Circle", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_CommandForm_Activity_ActivityCode", + table: "CommandForm", + column: "ActivityCode", + principalTable: "Activity", + principalColumn: "Code"); + + migrationBuilder.AddForeignKey( + name: "FK_CommandLine_EstimateTemplate_EstimateTemplateId", + table: "CommandLine", + column: "EstimateTemplateId", + principalTable: "EstimateTemplate", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_CommandLine_Estimate_EstimateId", + table: "CommandLine", + column: "EstimateId", + principalTable: "Estimate", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_Comment_AspNetUsers_AuthorId", + table: "Comment", + column: "AuthorId", + principalTable: "AspNetUsers", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_Comment_BlogPost_PostId", + table: "Comment", + column: "PostId", + principalTable: "BlogPost", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_Contact_PostalAddress_AddressId", + table: "Contact", + column: "AddressId", + principalTable: "PostalAddress", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_CoWorking_AspNetUsers_WorkingForId", + table: "CoWorking", + column: "WorkingForId", + principalTable: "AspNetUsers", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_CoWorking_PerformerProfile_PerformerId", + table: "CoWorking", + column: "PerformerId", + principalTable: "PerformerProfile", + principalColumn: "PerformerId"); + + migrationBuilder.AddForeignKey( + name: "FK_DeviceDeclaration_AspNetUsers_DeviceOwnerId", + table: "DeviceDeclaration", + column: "DeviceOwnerId", + principalTable: "AspNetUsers", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_DimissClicked_AspNetUsers_UserId", + table: "DimissClicked", + column: "UserId", + principalTable: "AspNetUsers", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_DimissClicked_Notification_NotificationId", + table: "DimissClicked", + column: "NotificationId", + principalTable: "Notification", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_Estimate_AspNetUsers_ClientId", + table: "Estimate", + column: "ClientId", + principalTable: "AspNetUsers", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_Estimate_PerformerProfile_OwnerId", + table: "Estimate", + column: "OwnerId", + principalTable: "PerformerProfile", + principalColumn: "PerformerId"); + + migrationBuilder.AddForeignKey( + name: "FK_Estimate_RdvQuery_CommandId", + table: "Estimate", + column: "CommandId", + principalTable: "RdvQuery", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_GitRepositoryReference_AspNetUsers_OwnerId", + table: "GitRepositoryReference", + column: "OwnerId", + principalTable: "AspNetUsers", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_HairCutQuery_Activity_ActivityCode", + table: "HairCutQuery", + column: "ActivityCode", + principalTable: "Activity", + principalColumn: "Code"); + + migrationBuilder.AddForeignKey( + name: "FK_HairCutQuery_AspNetUsers_ClientId", + table: "HairCutQuery", + column: "ClientId", + principalTable: "AspNetUsers", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_HairCutQuery_BrusherProfile_SelectedProfileUserId", + table: "HairCutQuery", + column: "SelectedProfileUserId", + principalTable: "BrusherProfile", + principalColumn: "UserId"); + + migrationBuilder.AddForeignKey( + name: "FK_HairCutQuery_HairPrestation_PrestationId", + table: "HairCutQuery", + column: "PrestationId", + principalTable: "HairPrestation", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_HairCutQuery_Location_LocationId", + table: "HairCutQuery", + column: "LocationId", + principalTable: "Location", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_HairCutQuery_PayPalPayment_PaymentId", + table: "HairCutQuery", + column: "PaymentId", + principalTable: "PayPalPayment", + principalColumn: "CreationToken" + ); + + migrationBuilder.AddForeignKey( + name: "FK_HairCutQuery_PerformerProfile_PerformerId", + table: "HairCutQuery", + column: "PerformerId", + principalTable: "PerformerProfile", + principalColumn: "PerformerId"); + + migrationBuilder.AddForeignKey( + name: "FK_HairMultiCutQuery_Activity_ActivityCode", + table: "HairMultiCutQuery", + column: "ActivityCode", + principalTable: "Activity", + principalColumn: "Code"); + + migrationBuilder.AddForeignKey( + name: "FK_HairMultiCutQuery_AspNetUsers_ClientId", + table: "HairMultiCutQuery", + column: "ClientId", + principalTable: "AspNetUsers", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_HairMultiCutQuery_Location_LocationId", + table: "HairMultiCutQuery", + column: "LocationId", + principalTable: "Location", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_HairMultiCutQuery_PayPalPayment_PaymentId", + table: "HairMultiCutQuery", + column: "PaymentId", + principalTable: "PayPalPayment", + principalColumn: "CreationToken"); + + migrationBuilder.AddForeignKey( + name: "FK_HairMultiCutQuery_PerformerProfile_PerformerId", + table: "HairMultiCutQuery", + column: "PerformerId", + principalTable: "PerformerProfile", + principalColumn: "PerformerId"); + + migrationBuilder.AddForeignKey( + name: "FK_HairPrestationCollectionItem_HairMultiCutQuery_QueryId", + table: "HairPrestationCollectionItem", + column: "QueryId", + principalTable: "HairMultiCutQuery", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_HairPrestationCollectionItem_HairPrestation_PrestationId", + table: "HairPrestationCollectionItem", + column: "PrestationId", + principalTable: "HairPrestation", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_HairTaint_Color_ColorId", + table: "HairTaint", + column: "ColorId", + principalTable: "Color", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_HairTaintInstance_HairPrestation_PrestationId", + table: "HairTaintInstance", + column: "PrestationId", + principalTable: "HairPrestation", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_HairTaintInstance_HairTaint_TaintId", + table: "HairTaintInstance", + column: "TaintId", + principalTable: "HairTaint", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_Instrumentation_Instrument_InstrumentId", + table: "Instrumentation", + column: "InstrumentId", + principalTable: "Instrument", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_Instrumentation_PerformerProfile_UserId", + table: "Instrumentation", + column: "UserId", + principalTable: "PerformerProfile", + principalColumn: "PerformerId"); + + migrationBuilder.AddForeignKey( + name: "FK_InstrumentRating_Instrument_InstrumentId", + table: "InstrumentRating", + column: "InstrumentId", + principalTable: "Instrument", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_InstrumentRating_PerformerProfile_OwnerId", + table: "InstrumentRating", + column: "OwnerId", + principalTable: "PerformerProfile", + principalColumn: "PerformerId"); + + migrationBuilder.AddForeignKey( + name: "FK_LiveFlow_AspNetUsers_OwnerId", + table: "LiveFlow", + column: "OwnerId", + principalTable: "AspNetUsers", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_PayPalPayment_AspNetUsers_ExecutorId", + table: "PayPalPayment", + column: "ExecutorId", + principalTable: "AspNetUsers", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_PerformerProfile_AspNetUsers_PerformerId", + table: "PerformerProfile", + column: "PerformerId", + principalTable: "AspNetUsers", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_PerformerProfile_Location_OrganizationAddressId", + table: "PerformerProfile", + column: "OrganizationAddressId", + principalTable: "Location", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_Project_Activity_ActivityCode", + table: "Project", + column: "ActivityCode", + principalTable: "Activity", + principalColumn: "Code"); + + migrationBuilder.AddForeignKey( + name: "FK_Project_AspNetUsers_ClientId", + table: "Project", + column: "ClientId", + principalTable: "AspNetUsers", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_Project_GitRepositoryReference_GitId", + table: "Project", + column: "GitId", + principalTable: "GitRepositoryReference", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_Project_PayPalPayment_PaymentId", + table: "Project", + column: "PaymentId", + principalTable: "PayPalPayment", + principalColumn: "CreationToken"); + + migrationBuilder.AddForeignKey( + name: "FK_Project_PerformerProfile_PerformerId", + table: "Project", + column: "PerformerId", + principalTable: "PerformerProfile", + principalColumn: "PerformerId"); + + migrationBuilder.AddForeignKey( + name: "FK_ProjectBuildConfiguration_Project_ProjectId", + table: "ProjectBuildConfiguration", + column: "ProjectId", + principalTable: "Project", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_RdvQuery_Activity_ActivityCode", + table: "RdvQuery", + column: "ActivityCode", + principalTable: "Activity", + principalColumn: "Code"); + + migrationBuilder.AddForeignKey( + name: "FK_RdvQuery_AspNetUsers_ClientId", + table: "RdvQuery", + column: "ClientId", + principalTable: "AspNetUsers", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_RdvQuery_Location_LocationId", + table: "RdvQuery", + column: "LocationId", + principalTable: "Location", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_RdvQuery_PayPalPayment_PaymentId", + table: "RdvQuery", + column: "PaymentId", + principalTable: "PayPalPayment", + principalColumn: "CreationToken"); + + migrationBuilder.AddForeignKey( + name: "FK_RdvQuery_PerformerProfile_PerformerId", + table: "RdvQuery", + column: "PerformerId", + principalTable: "PerformerProfile", + principalColumn: "PerformerId"); + + migrationBuilder.AddForeignKey( + name: "FK_Schedule_AspNetUsers_OwnerId", + table: "Schedule", + column: "OwnerId", + principalTable: "AspNetUsers", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_ScheduledEvent_Period_PeriodStart_PeriodEnd", + table: "ScheduledEvent", + columns: new[] { "PeriodStart", "PeriodEnd" }, + principalTable: "Period", + principalColumns: new[] { "Start", "End" }); + + migrationBuilder.AddForeignKey( + name: "FK_Service_Activity_ContextId", + table: "Service", + column: "ContextId", + principalTable: "Activity", + principalColumn: "Code"); + + migrationBuilder.AddForeignKey( + name: "FK_UserActivity_Activity_DoesCode", + table: "UserActivity", + column: "DoesCode", + principalTable: "Activity", + principalColumn: "Code"); + + migrationBuilder.AddForeignKey( + name: "FK_UserActivity_PerformerProfile_UserId", + table: "UserActivity", + column: "UserId", + principalTable: "PerformerProfile", + principalColumn: "PerformerId"); + } + } +} diff --git a/src/Yavsc/Migrations/ApplicationDbContextModelSnapshot.cs b/src/Yavsc/Migrations/ApplicationDbContextModelSnapshot.cs index 991ba507..ae9a5ee7 100644 --- a/src/Yavsc/Migrations/ApplicationDbContextModelSnapshot.cs +++ b/src/Yavsc/Migrations/ApplicationDbContextModelSnapshot.cs @@ -1,10 +1,13 @@ +// using System; - using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; using Yavsc.Models; +#nullable disable + namespace Yavsc.Migrations { [DbContext(typeof(ApplicationDbContext))] @@ -12,2023 +15,3537 @@ namespace Yavsc.Migrations { protected override void BuildModel(ModelBuilder modelBuilder) { +#pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "7.0.0-rc1-16348"); + .HasAnnotation("ProductVersion", "7.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 63); - modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRole", b => + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => { - b.Property("Id"); + b.Property("Id") + .HasColumnType("text"); b.Property("ConcurrencyStamp") - .IsConcurrencyToken(); + .IsConcurrencyToken() + .HasColumnType("text"); b.Property("Name") - .HasAnnotation("MaxLength", 256); + .HasMaxLength(256) + .HasColumnType("character varying(256)"); b.Property("NormalizedName") - .HasAnnotation("MaxLength", 256); + .HasMaxLength(256) + .HasColumnType("character varying(256)"); b.HasKey("Id"); b.HasIndex("NormalizedName") - .HasAnnotation("Relational:Name", "RoleNameIndex"); + .IsUnique() + .HasDatabaseName("RoleNameIndex"); - b.HasAnnotation("Relational:TableName", "AspNetRoles"); + b.ToTable("AspNetRoles", (string)null); }); - modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim", b => + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("integer"); - b.Property("ClaimType"); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ClaimValue"); + b.Property("ClaimType") + .HasColumnType("text"); + + b.Property("ClaimValue") + .HasColumnType("text"); b.Property("RoleId") - .IsRequired(); + .IsRequired() + .HasColumnType("text"); b.HasKey("Id"); - b.HasAnnotation("Relational:TableName", "AspNetRoleClaims"); + b.HasIndex("RoleId"); + + b.ToTable("AspNetRoleClaims", (string)null); }); - modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim", b => + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ClaimType"); + b.Property("ClaimType") + .HasColumnType("text"); - b.Property("ClaimValue"); + b.Property("ClaimValue") + .HasColumnType("text"); b.Property("UserId") - .IsRequired(); + .IsRequired() + .HasColumnType("text"); b.HasKey("Id"); - b.HasAnnotation("Relational:TableName", "AspNetUserClaims"); + b.HasIndex("UserId"); + + b.ToTable("AspNetUserClaims", (string)null); }); - modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin", b => + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => { - b.Property("LoginProvider"); + b.Property("LoginProvider") + .HasColumnType("text"); - b.Property("ProviderKey"); + b.Property("ProviderKey") + .HasColumnType("text"); - b.Property("ProviderDisplayName"); + b.Property("ProviderDisplayName") + .HasColumnType("text"); b.Property("UserId") - .IsRequired(); + .IsRequired() + .HasColumnType("text"); b.HasKey("LoginProvider", "ProviderKey"); - b.HasAnnotation("Relational:TableName", "AspNetUserLogins"); + b.HasIndex("UserId"); + + b.ToTable("AspNetUserLogins", (string)null); }); - modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole", b => + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => { - b.Property("UserId"); + b.Property("UserId") + .HasColumnType("text"); - b.Property("RoleId"); + b.Property("RoleId") + .HasColumnType("text"); b.HasKey("UserId", "RoleId"); - b.HasAnnotation("Relational:TableName", "AspNetUserRoles"); + b.HasIndex("RoleId"); + + b.ToTable("AspNetUserRoles", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("text"); + + b.Property("LoginProvider") + .HasColumnType("text"); + + b.Property("Name") + .HasColumnType("text"); + + b.Property("Value") + .HasColumnType("text"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AspNetUserTokens", (string)null); }); modelBuilder.Entity("Yavsc.Abstract.Identity.ClientProviderInfo", b => { - b.Property("UserId"); + b.Property("UserId") + .HasColumnType("text"); - b.Property("Avatar"); + b.Property("Avatar") + .IsRequired() + .HasColumnType("text"); - b.Property("BillingAddressId"); + b.Property("BillingAddressId") + .HasColumnType("bigint"); - b.Property("EMail"); + b.Property("EMail") + .IsRequired() + .HasColumnType("text"); - b.Property("Phone"); + b.Property("Phone") + .IsRequired() + .HasColumnType("text"); - b.Property("UserName"); + b.Property("UserName") + .IsRequired() + .HasColumnType("text"); b.HasKey("UserId"); + + b.ToTable("ClientProviderInfo"); }); modelBuilder.Entity("Yavsc.Models.Access.Ban", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); - b.Property("DateCreated"); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateModified"); + b.Property("DateCreated") + .HasColumnType("timestamp with time zone"); + + b.Property("DateModified") + .HasColumnType("timestamp with time zone"); b.Property("Reason") - .IsRequired(); + .IsRequired() + .HasColumnType("text"); b.Property("TargetId") - .IsRequired(); + .IsRequired() + .HasColumnType("text"); - b.Property("UserCreated"); + b.Property("UserCreated") + .IsRequired() + .HasColumnType("text"); - b.Property("UserModified"); + b.Property("UserModified") + .IsRequired() + .HasColumnType("text"); b.HasKey("Id"); + + b.HasIndex("TargetId"); + + b.ToTable("Ban"); }); modelBuilder.Entity("Yavsc.Models.Access.BlackListed", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("OwnerId") - .IsRequired(); + .IsRequired() + .HasColumnType("text"); b.Property("UserId") - .IsRequired(); + .IsRequired() + .HasColumnType("text"); b.HasKey("Id"); + + b.HasIndex("OwnerId"); + + b.HasIndex("UserId"); + + b.ToTable("BlackListed"); }); modelBuilder.Entity("Yavsc.Models.Access.CircleAuthorizationToBlogPost", b => { - b.Property("CircleId"); + b.Property("CircleId") + .HasColumnType("bigint"); - b.Property("BlogPostId"); + b.Property("BlogPostId") + .HasColumnType("bigint"); b.HasKey("CircleId", "BlogPostId"); + + b.HasIndex("BlogPostId"); + + b.ToTable("CircleAuthorizationToBlogPost"); }); modelBuilder.Entity("Yavsc.Models.AccountBalance", b => { - b.Property("UserId"); + b.Property("UserId") + .HasColumnType("text"); - b.Property("ContactCredits"); + b.Property("ContactCredits") + .HasColumnType("bigint"); - b.Property("Credits"); + b.Property("Credits") + .HasColumnType("numeric"); b.HasKey("UserId"); + + b.ToTable("BankStatus"); }); modelBuilder.Entity("Yavsc.Models.ApplicationUser", b => { - b.Property("Id"); + b.Property("Id") + .HasColumnType("text"); - b.Property("AccessFailedCount"); + b.Property("AccessFailedCount") + .HasColumnType("integer"); - b.Property("AllowMonthlyEmail"); + b.Property("AllowMonthlyEmail") + .HasColumnType("boolean"); b.Property("Avatar") - .HasAnnotation("MaxLength", 512) - .HasAnnotation("Relational:DefaultValue", "/images/Users/icon_user.png") - .HasAnnotation("Relational:DefaultValueType", "System.String"); + .IsRequired() + .ValueGeneratedOnAdd() + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasDefaultValue("/images/Users/icon_user.png"); - b.Property("BankInfoId"); + b.Property("BankInfoId") + .HasColumnType("bigint"); b.Property("ConcurrencyStamp") - .IsConcurrencyToken(); + .IsConcurrencyToken() + .HasColumnType("text"); - b.Property("DateCreated"); + b.Property("DateCreated") + .HasColumnType("timestamp with time zone"); - b.Property("DateModified"); + b.Property("DateModified") + .HasColumnType("timestamp with time zone"); b.Property("DedicatedGoogleCalendar") - .HasAnnotation("MaxLength", 512); + .IsRequired() + .HasMaxLength(512) + .HasColumnType("character varying(512)"); b.Property("DiskQuota") - .HasAnnotation("Relational:DefaultValue", "524288000") - .HasAnnotation("Relational:DefaultValueType", "System.Int64"); + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(524288000L); - b.Property("DiskUsage"); + b.Property("DiskUsage") + .HasColumnType("bigint"); b.Property("Email") - .HasAnnotation("MaxLength", 256); + .HasMaxLength(256) + .HasColumnType("character varying(256)"); - b.Property("EmailConfirmed"); + b.Property("EmailConfirmed") + .HasColumnType("boolean"); b.Property("FullName") - .HasAnnotation("MaxLength", 512); + .IsRequired() + .HasMaxLength(512) + .HasColumnType("character varying(512)"); - b.Property("LockoutEnabled"); + b.Property("LockoutEnabled") + .HasColumnType("boolean"); - b.Property("LockoutEnd"); + b.Property("LockoutEnd") + .HasColumnType("timestamp with time zone"); - b.Property("MaxFileSize"); + b.Property("MaxFileSize") + .HasColumnType("bigint"); b.Property("NormalizedEmail") - .HasAnnotation("MaxLength", 256); + .HasMaxLength(256) + .HasColumnType("character varying(256)"); b.Property("NormalizedUserName") - .HasAnnotation("MaxLength", 256); + .HasMaxLength(256) + .HasColumnType("character varying(256)"); - b.Property("PasswordHash"); + b.Property("PasswordHash") + .HasColumnType("text"); - b.Property("PhoneNumber"); + b.Property("PhoneNumber") + .HasColumnType("text"); - b.Property("PhoneNumberConfirmed"); + b.Property("PhoneNumberConfirmed") + .HasColumnType("boolean"); - b.Property("PostalAddressId"); + b.Property("PostalAddressId") + .IsRequired() + .HasColumnType("bigint"); - b.Property("SecurityStamp"); + b.Property("SecurityStamp") + .HasColumnType("text"); - b.Property("TwoFactorEnabled"); + b.Property("TwoFactorEnabled") + .HasColumnType("boolean"); - b.Property("UserCreated"); + b.Property("UserCreated") + .IsRequired() + .HasColumnType("text"); - b.Property("UserModified"); + b.Property("UserModified") + .IsRequired() + .HasColumnType("text"); b.Property("UserName") - .HasAnnotation("MaxLength", 256); + .HasMaxLength(256) + .HasColumnType("character varying(256)"); b.HasKey("Id"); + b.HasIndex("BankInfoId"); + b.HasIndex("NormalizedEmail") - .HasAnnotation("Relational:Name", "EmailIndex"); + .HasDatabaseName("EmailIndex"); b.HasIndex("NormalizedUserName") - .HasAnnotation("Relational:Name", "UserNameIndex"); + .IsUnique() + .HasDatabaseName("UserNameIndex"); + + b.HasIndex("PostalAddressId"); - b.HasAnnotation("Relational:TableName", "AspNetUsers"); + b.ToTable("AspNetUsers", (string)null); }); modelBuilder.Entity("Yavsc.Models.Auth.Client", b => { - b.Property("Id"); + b.Property("Id") + .HasColumnType("text"); - b.Property("Active"); + b.Property("Active") + .HasColumnType("boolean"); - b.Property("DisplayName"); + b.Property("DisplayName") + .IsRequired() + .HasColumnType("text"); b.Property("LogoutRedirectUri") - .HasAnnotation("MaxLength", 100); + .IsRequired() + .HasMaxLength(100) + .HasColumnType("character varying(100)"); - b.Property("RedirectUri"); + b.Property("RedirectUri") + .IsRequired() + .HasColumnType("text"); - b.Property("RefreshTokenLifeTime"); + b.Property("RefreshTokenLifeTime") + .HasColumnType("integer"); - b.Property("Secret"); + b.Property("Secret") + .IsRequired() + .HasColumnType("text"); - b.Property("Type"); + b.Property("Type") + .HasColumnType("integer"); b.HasKey("Id"); + + b.ToTable("Applications"); }); modelBuilder.Entity("Yavsc.Models.Auth.OAuth2Tokens", b => { - b.Property("UserId"); + b.Property("UserId") + .HasColumnType("text"); - b.Property("AccessToken"); + b.Property("AccessToken") + .IsRequired() + .HasColumnType("text"); - b.Property("Expiration"); + b.Property("Expiration") + .HasColumnType("timestamp with time zone"); - b.Property("ExpiresIn"); + b.Property("ExpiresIn") + .IsRequired() + .HasColumnType("text"); - b.Property("RefreshToken"); + b.Property("RefreshToken") + .IsRequired() + .HasColumnType("text"); - b.Property("TokenType"); + b.Property("TokenType") + .IsRequired() + .HasColumnType("text"); b.HasKey("UserId"); + + b.ToTable("OAuth2Tokens"); }); modelBuilder.Entity("Yavsc.Models.Auth.RefreshToken", b => { - b.Property("Id"); + b.Property("Id") + .HasColumnType("text"); b.Property("ClientId") .IsRequired() - .HasAnnotation("MaxLength", 50); + .HasMaxLength(50) + .HasColumnType("character varying(50)"); - b.Property("ExpiresUtc"); + b.Property("ExpiresUtc") + .HasColumnType("timestamp with time zone"); - b.Property("IssuedUtc"); + b.Property("IssuedUtc") + .HasColumnType("timestamp with time zone"); b.Property("ProtectedTicket") - .IsRequired(); + .IsRequired() + .HasColumnType("text"); b.Property("Subject") .IsRequired() - .HasAnnotation("MaxLength", 50); + .HasMaxLength(50) + .HasColumnType("character varying(50)"); b.HasKey("Id"); + + b.ToTable("RefreshTokens"); }); modelBuilder.Entity("Yavsc.Models.BalanceImpact", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("BalanceId") - .IsRequired(); + .IsRequired() + .HasColumnType("text"); - b.Property("ExecDate"); + b.Property("ExecDate") + .HasColumnType("timestamp with time zone"); - b.Property("Impact"); + b.Property("Impact") + .HasColumnType("numeric"); b.Property("Reason") - .IsRequired(); + .IsRequired() + .HasColumnType("text"); b.HasKey("Id"); + + b.HasIndex("BalanceId"); + + b.ToTable("BankBook"); }); modelBuilder.Entity("Yavsc.Models.Bank.BankIdentity", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("AccountNumber"); + b.Property("AccountNumber") + .IsRequired() + .HasColumnType("text"); - b.Property("BIC"); + b.Property("BIC") + .IsRequired() + .HasColumnType("text"); - b.Property("BankCode"); + b.Property("BankCode") + .IsRequired() + .HasColumnType("text"); - b.Property("BankedKey"); + b.Property("BankedKey") + .HasColumnType("integer"); - b.Property("IBAN"); + b.Property("IBAN") + .IsRequired() + .HasColumnType("text"); - b.Property("WicketCode"); + b.Property("WicketCode") + .IsRequired() + .HasColumnType("text"); b.HasKey("Id"); + + b.ToTable("BankIdentity"); }); modelBuilder.Entity("Yavsc.Models.Billing.CommandLine", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("Count"); + b.Property("Count") + .HasColumnType("integer"); - b.Property("Currency"); + b.Property("Currency") + .IsRequired() + .HasColumnType("text"); b.Property("Description") .IsRequired() - .HasAnnotation("MaxLength", 512); + .HasMaxLength(512) + .HasColumnType("character varying(512)"); - b.Property("EstimateId"); + b.Property("EstimateId") + .HasColumnType("bigint"); - b.Property("EstimateTemplateId"); + b.Property("EstimateTemplateId") + .HasColumnType("bigint"); b.Property("Name") .IsRequired() - .HasAnnotation("MaxLength", 256); + .HasMaxLength(256) + .HasColumnType("character varying(256)"); - b.Property("UnitaryCost"); + b.Property("UnitaryCost") + .HasColumnType("numeric"); b.HasKey("Id"); + + b.HasIndex("EstimateId"); + + b.HasIndex("EstimateTemplateId"); + + b.ToTable("CommandLine"); }); modelBuilder.Entity("Yavsc.Models.Billing.Estimate", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("AttachedFilesString"); + b.Property("AttachedFilesString") + .IsRequired() + .HasColumnType("text"); - b.Property("AttachedGraphicsString"); + b.Property("AttachedGraphicsString") + .IsRequired() + .HasColumnType("text"); b.Property("ClientId") - .IsRequired(); + .IsRequired() + .HasColumnType("text"); - b.Property("ClientValidationDate"); + b.Property("ClientValidationDate") + .HasColumnType("timestamp with time zone"); - b.Property("CommandId"); + b.Property("CommandId") + .HasColumnType("bigint"); b.Property("CommandType") - .IsRequired(); + .IsRequired() + .HasColumnType("text"); - b.Property("Description"); + b.Property("Description") + .IsRequired() + .HasColumnType("text"); - b.Property("OwnerId"); + b.Property("OwnerId") + .IsRequired() + .HasColumnType("text"); - b.Property("ProviderValidationDate"); + b.Property("ProviderValidationDate") + .HasColumnType("timestamp with time zone"); - b.Property("Title"); + b.Property("Title") + .IsRequired() + .HasColumnType("text"); b.HasKey("Id"); + + b.HasIndex("ClientId"); + + b.HasIndex("CommandId"); + + b.HasIndex("OwnerId"); + + b.ToTable("Estimates"); }); modelBuilder.Entity("Yavsc.Models.Billing.EstimateTemplate", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); - b.Property("Description"); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Description") + .IsRequired() + .HasColumnType("text"); b.Property("OwnerId") - .IsRequired(); + .IsRequired() + .HasColumnType("text"); - b.Property("Title"); + b.Property("Title") + .IsRequired() + .HasColumnType("text"); b.HasKey("Id"); + + b.ToTable("EstimateTemplates"); }); modelBuilder.Entity("Yavsc.Models.Billing.ExceptionSIREN", b => { - b.Property("SIREN"); + b.Property("SIREN") + .HasColumnType("text"); b.HasKey("SIREN"); + + b.ToTable("ExceptionsSIREN"); }); modelBuilder.Entity("Yavsc.Models.Blog.BlogPost", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("AuthorId"); + b.Property("AuthorId") + .IsRequired() + .HasColumnType("text"); - b.Property("Content"); + b.Property("Content") + .IsRequired() + .HasColumnType("text"); - b.Property("DateCreated"); + b.Property("DateCreated") + .HasColumnType("timestamp with time zone"); - b.Property("DateModified"); + b.Property("DateModified") + .HasColumnType("timestamp with time zone"); - b.Property("Lang"); + b.Property("Lang") + .IsRequired() + .HasColumnType("text"); - b.Property("Photo"); + b.Property("Photo") + .IsRequired() + .HasColumnType("text"); - b.Property("Rate"); + b.Property("Rate") + .HasColumnType("integer"); - b.Property("Title"); + b.Property("Title") + .IsRequired() + .HasColumnType("text"); - b.Property("UserCreated"); + b.Property("UserCreated") + .IsRequired() + .HasColumnType("text"); - b.Property("UserModified"); + b.Property("UserModified") + .IsRequired() + .HasColumnType("text"); - b.Property("Visible"); + b.Property("Visible") + .HasColumnType("boolean"); b.HasKey("Id"); + + b.HasIndex("AuthorId"); + + b.ToTable("Blogspot"); }); modelBuilder.Entity("Yavsc.Models.Blog.BlogTag", b => { - b.Property("PostId"); + b.Property("PostId") + .HasColumnType("bigint"); - b.Property("TagId"); + b.Property("TagId") + .HasColumnType("bigint"); b.HasKey("PostId", "TagId"); + + b.HasIndex("TagId"); + + b.ToTable("BlogTag"); }); modelBuilder.Entity("Yavsc.Models.Blog.Comment", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("AuthorId") - .IsRequired(); + .IsRequired() + .HasColumnType("text"); - b.Property("Content"); + b.Property("Content") + .IsRequired() + .HasColumnType("text"); - b.Property("DateCreated"); + b.Property("DateCreated") + .HasColumnType("timestamp with time zone"); - b.Property("DateModified"); + b.Property("DateModified") + .HasColumnType("timestamp with time zone"); - b.Property("ParentId"); + b.Property("ParentId") + .HasColumnType("bigint"); - b.Property("PostId"); + b.Property("PostId") + .HasColumnType("bigint"); - b.Property("UserCreated"); + b.Property("UserCreated") + .IsRequired() + .HasColumnType("text"); - b.Property("UserModified"); + b.Property("UserModified") + .IsRequired() + .HasColumnType("text"); - b.Property("Visible"); + b.Property("Visible") + .HasColumnType("boolean"); b.HasKey("Id"); - }); - modelBuilder.Entity("Yavsc.Models.Calendar.Period", b => - { - b.Property("Start"); + b.HasIndex("AuthorId"); - b.Property("End"); + b.HasIndex("ParentId"); - b.HasKey("Start", "End"); + b.HasIndex("PostId"); + + b.ToTable("Comment"); }); modelBuilder.Entity("Yavsc.Models.Calendar.Schedule", b => { - b.Property("OwnerId"); + b.Property("OwnerId") + .HasColumnType("text"); b.HasKey("OwnerId"); + + b.ToTable("Schedule"); }); modelBuilder.Entity("Yavsc.Models.Calendar.ScheduledEvent", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); - b.Property("PeriodEnd"); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("PeriodStart"); + b.Property("PeriodEnd") + .HasColumnType("timestamp with time zone"); - b.Property("Reccurence"); + b.Property("PeriodStart") + .HasColumnType("timestamp with time zone"); - b.Property("ScheduleOwnerId"); + b.Property("Reccurence") + .HasColumnType("integer"); + + b.Property("ScheduleOwnerId") + .HasColumnType("text"); b.HasKey("Id"); + + b.HasIndex("ScheduleOwnerId"); + + b.HasIndex("PeriodStart", "PeriodEnd"); + + b.ToTable("ScheduledEvent"); }); modelBuilder.Entity("Yavsc.Models.Chat.ChatConnection", b => { - b.Property("ConnectionId"); + b.Property("ConnectionId") + .HasColumnType("text"); b.Property("ApplicationUserId") - .IsRequired(); + .IsRequired() + .HasColumnType("text"); - b.Property("Connected"); + b.Property("Connected") + .HasColumnType("boolean"); - b.Property("UserAgent"); + b.Property("UserAgent") + .IsRequired() + .HasColumnType("text"); b.HasKey("ConnectionId"); + + b.HasIndex("ApplicationUserId"); + + b.ToTable("ChatConnection"); }); modelBuilder.Entity("Yavsc.Models.Chat.ChatRoom", b => { - b.Property("Name"); + b.Property("Name") + .HasColumnType("text"); - b.Property("DateCreated"); + b.Property("DateCreated") + .HasColumnType("timestamp with time zone"); - b.Property("DateModified"); + b.Property("DateModified") + .HasColumnType("timestamp with time zone"); - b.Property("LatestJoinPart"); + b.Property("LatestJoinPart") + .HasColumnType("timestamp with time zone"); - b.Property("OwnerId"); + b.Property("OwnerId") + .IsRequired() + .HasColumnType("text"); - b.Property("Topic"); + b.Property("Topic") + .IsRequired() + .HasColumnType("text"); - b.Property("UserCreated"); + b.Property("UserCreated") + .IsRequired() + .HasColumnType("text"); - b.Property("UserModified"); + b.Property("UserModified") + .IsRequired() + .HasColumnType("text"); b.HasKey("Name"); + + b.HasIndex("OwnerId"); + + b.ToTable("ChatRoom"); }); modelBuilder.Entity("Yavsc.Models.Chat.ChatRoomAccess", b => { - b.Property("ChannelName"); + b.Property("ChannelName") + .HasColumnType("text"); - b.Property("UserId"); + b.Property("UserId") + .HasColumnType("text"); b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("Level"); + b.Property("Level") + .HasColumnType("integer"); b.HasKey("ChannelName", "UserId"); + + b.HasIndex("UserId"); + + b.ToTable("ChatRoomAccess"); }); modelBuilder.Entity("Yavsc.Models.Cratie.Option", b => { - b.Property("Code"); + b.Property("Code") + .HasColumnType("text"); - b.Property("CodeScrutin"); + b.Property("CodeScrutin") + .HasColumnType("text"); - b.Property("DateCreated"); + b.Property("DateCreated") + .HasColumnType("timestamp with time zone"); - b.Property("DateModified"); + b.Property("DateModified") + .HasColumnType("timestamp with time zone"); - b.Property("Description"); + b.Property("Description") + .IsRequired() + .HasColumnType("text"); - b.Property("UserCreated"); + b.Property("UserCreated") + .IsRequired() + .HasColumnType("text"); - b.Property("UserModified"); + b.Property("UserModified") + .IsRequired() + .HasColumnType("text"); b.HasKey("Code", "CodeScrutin"); + + b.ToTable("Option"); }); modelBuilder.Entity("Yavsc.Models.Drawing.Color", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); - b.Property("Blue"); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("Green"); + b.Property("Blue") + .HasColumnType("smallint"); - b.Property("Name"); + b.Property("Green") + .HasColumnType("smallint"); - b.Property("Red"); + b.Property("Name") + .IsRequired() + .HasColumnType("text"); + + b.Property("Red") + .HasColumnType("smallint"); b.HasKey("Id"); + + b.ToTable("Color"); }); modelBuilder.Entity("Yavsc.Models.Forms.Form", b => { - b.Property("Id"); + b.Property("Id") + .HasColumnType("text"); - b.Property("Summary"); + b.Property("Summary") + .IsRequired() + .HasColumnType("text"); b.HasKey("Id"); + + b.ToTable("Form"); }); modelBuilder.Entity("Yavsc.Models.Haircut.BrusherProfile", b => { - b.Property("UserId"); + b.Property("UserId") + .HasColumnType("text"); - b.Property("ActionDistance"); + b.Property("ActionDistance") + .HasColumnType("integer"); - b.Property("CarePrice"); + b.Property("CarePrice") + .HasColumnType("numeric"); - b.Property("FlatFeeDiscount"); + b.Property("FlatFeeDiscount") + .HasColumnType("numeric"); - b.Property("HalfBalayagePrice"); + b.Property("HalfBalayagePrice") + .HasColumnType("numeric"); - b.Property("HalfBrushingPrice"); + b.Property("HalfBrushingPrice") + .HasColumnType("numeric"); - b.Property("HalfColorPrice"); + b.Property("HalfColorPrice") + .HasColumnType("numeric"); - b.Property("HalfDefrisPrice"); + b.Property("HalfDefrisPrice") + .HasColumnType("numeric"); - b.Property("HalfFoldingPrice"); + b.Property("HalfFoldingPrice") + .HasColumnType("numeric"); - b.Property("HalfMechPrice"); + b.Property("HalfMechPrice") + .HasColumnType("numeric"); - b.Property("HalfMultiColorPrice"); + b.Property("HalfMultiColorPrice") + .HasColumnType("numeric"); - b.Property("HalfPermanentPrice"); + b.Property("HalfPermanentPrice") + .HasColumnType("numeric"); - b.Property("KidCutPrice"); + b.Property("KidCutPrice") + .HasColumnType("numeric"); - b.Property("LongBalayagePrice"); + b.Property("LongBalayagePrice") + .HasColumnType("numeric"); - b.Property("LongBrushingPrice"); + b.Property("LongBrushingPrice") + .HasColumnType("numeric"); - b.Property("LongColorPrice"); + b.Property("LongColorPrice") + .HasColumnType("numeric"); - b.Property("LongDefrisPrice"); + b.Property("LongDefrisPrice") + .HasColumnType("numeric"); - b.Property("LongFoldingPrice"); + b.Property("LongFoldingPrice") + .HasColumnType("numeric"); - b.Property("LongMechPrice"); + b.Property("LongMechPrice") + .HasColumnType("numeric"); - b.Property("LongMultiColorPrice"); + b.Property("LongMultiColorPrice") + .HasColumnType("numeric"); - b.Property("LongPermanentPrice"); + b.Property("LongPermanentPrice") + .HasColumnType("numeric"); - b.Property("ManBrushPrice"); + b.Property("ManBrushPrice") + .HasColumnType("numeric"); - b.Property("ManCutPrice"); + b.Property("ManCutPrice") + .HasColumnType("numeric"); - b.Property("ScheduleOwnerId"); + b.Property("ScheduleOwnerId") + .IsRequired() + .HasColumnType("text"); - b.Property("ShampooPrice"); + b.Property("ShampooPrice") + .HasColumnType("numeric"); - b.Property("ShortBalayagePrice"); + b.Property("ShortBalayagePrice") + .HasColumnType("numeric"); - b.Property("ShortBrushingPrice"); + b.Property("ShortBrushingPrice") + .HasColumnType("numeric"); - b.Property("ShortColorPrice"); + b.Property("ShortColorPrice") + .HasColumnType("numeric"); - b.Property("ShortDefrisPrice"); + b.Property("ShortDefrisPrice") + .HasColumnType("numeric"); - b.Property("ShortFoldingPrice"); + b.Property("ShortFoldingPrice") + .HasColumnType("numeric"); - b.Property("ShortMechPrice"); + b.Property("ShortMechPrice") + .HasColumnType("numeric"); - b.Property("ShortMultiColorPrice"); + b.Property("ShortMultiColorPrice") + .HasColumnType("numeric"); - b.Property("ShortPermanentPrice"); + b.Property("ShortPermanentPrice") + .HasColumnType("numeric"); - b.Property("WomenHalfCutPrice"); + b.Property("WomenHalfCutPrice") + .HasColumnType("numeric"); - b.Property("WomenLongCutPrice"); + b.Property("WomenLongCutPrice") + .HasColumnType("numeric"); - b.Property("WomenShortCutPrice"); + b.Property("WomenShortCutPrice") + .HasColumnType("numeric"); b.HasKey("UserId"); + + b.HasIndex("ScheduleOwnerId"); + + b.ToTable("BrusherProfile"); }); modelBuilder.Entity("Yavsc.Models.Haircut.HairCutQuery", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("ActivityCode") - .IsRequired(); + .IsRequired() + .HasColumnType("text"); - b.Property("AdditionalInfo"); + b.Property("AdditionalInfo") + .IsRequired() + .HasColumnType("text"); b.Property("ClientId") - .IsRequired(); + .IsRequired() + .HasColumnType("text"); - b.Property("Consent"); + b.Property("Consent") + .HasColumnType("boolean"); - b.Property("DateCreated"); + b.Property("DateCreated") + .HasColumnType("timestamp with time zone"); - b.Property("DateModified"); + b.Property("DateModified") + .HasColumnType("timestamp with time zone"); - b.Property("Description"); + b.Property("Description") + .IsRequired() + .HasColumnType("text"); - b.Property("EventDate"); + b.Property("EventDate") + .HasColumnType("timestamp with time zone"); - b.Property("LocationId"); + b.Property("LocationId") + .IsRequired() + .HasColumnType("bigint"); - b.Property("PaymentId"); + b.Property("PaymentId") + .IsRequired() + .HasColumnType("text"); b.Property("PerformerId") - .IsRequired(); + .IsRequired() + .HasColumnType("text"); - b.Property("PrestationId"); + b.Property("PrestationId") + .HasColumnType("bigint"); - b.Property("Previsional"); + b.Property("Previsional") + .HasColumnType("numeric"); - b.Property("Rejected"); + b.Property("Rejected") + .HasColumnType("boolean"); - b.Property("RejectedAt"); + b.Property("RejectedAt") + .HasColumnType("timestamp with time zone"); - b.Property("SelectedProfileUserId"); + b.Property("SelectedProfileUserId") + .HasColumnType("text"); - b.Property("Status"); + b.Property("Status") + .HasColumnType("integer"); - b.Property("UserCreated"); + b.Property("UserCreated") + .IsRequired() + .HasColumnType("text"); - b.Property("UserModified"); + b.Property("UserModified") + .IsRequired() + .HasColumnType("text"); - b.Property("ValidationDate"); + b.Property("ValidationDate") + .HasColumnType("timestamp with time zone"); b.HasKey("Id"); + + b.HasIndex("ActivityCode"); + + b.HasIndex("ClientId"); + + b.HasIndex("LocationId"); + + b.HasIndex("PaymentId"); + + b.HasIndex("PerformerId"); + + b.HasIndex("PrestationId"); + + b.HasIndex("SelectedProfileUserId"); + + b.ToTable("HairCutQueries"); }); modelBuilder.Entity("Yavsc.Models.Haircut.HairMultiCutQuery", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("ActivityCode") - .IsRequired(); + .IsRequired() + .HasColumnType("text"); b.Property("ClientId") - .IsRequired(); + .IsRequired() + .HasColumnType("text"); - b.Property("Consent"); + b.Property("Consent") + .HasColumnType("boolean"); - b.Property("DateCreated"); + b.Property("DateCreated") + .HasColumnType("timestamp with time zone"); - b.Property("DateModified"); + b.Property("DateModified") + .HasColumnType("timestamp with time zone"); - b.Property("Description"); + b.Property("Description") + .IsRequired() + .HasColumnType("text"); - b.Property("EventDate"); + b.Property("EventDate") + .HasColumnType("timestamp with time zone"); - b.Property("LocationId"); + b.Property("LocationId") + .HasColumnType("bigint"); - b.Property("PaymentId"); + b.Property("PaymentId") + .IsRequired() + .HasColumnType("text"); b.Property("PerformerId") - .IsRequired(); + .IsRequired() + .HasColumnType("text"); - b.Property("Previsional"); + b.Property("Previsional") + .HasColumnType("numeric"); - b.Property("Rejected"); + b.Property("Rejected") + .HasColumnType("boolean"); - b.Property("RejectedAt"); + b.Property("RejectedAt") + .HasColumnType("timestamp with time zone"); - b.Property("Status"); + b.Property("Status") + .HasColumnType("integer"); - b.Property("UserCreated"); + b.Property("UserCreated") + .IsRequired() + .HasColumnType("text"); - b.Property("UserModified"); + b.Property("UserModified") + .IsRequired() + .HasColumnType("text"); - b.Property("ValidationDate"); + b.Property("ValidationDate") + .HasColumnType("timestamp with time zone"); b.HasKey("Id"); + + b.HasIndex("ActivityCode"); + + b.HasIndex("ClientId"); + + b.HasIndex("LocationId"); + + b.HasIndex("PaymentId"); + + b.HasIndex("PerformerId"); + + b.ToTable("HairMultiCutQueries"); }); modelBuilder.Entity("Yavsc.Models.Haircut.HairPrestation", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("Cares"); + b.Property("Cares") + .HasColumnType("boolean"); - b.Property("Cut"); + b.Property("Cut") + .HasColumnType("boolean"); - b.Property("Dressing"); + b.Property("Dressing") + .HasColumnType("integer"); - b.Property("Gender"); + b.Property("Gender") + .HasColumnType("integer"); - b.Property("Length"); + b.Property("Length") + .HasColumnType("integer"); - b.Property("Shampoo"); + b.Property("Shampoo") + .HasColumnType("boolean"); - b.Property("Tech"); + b.Property("Tech") + .HasColumnType("integer"); b.HasKey("Id"); + + b.ToTable("HairPrestation"); }); modelBuilder.Entity("Yavsc.Models.Haircut.HairPrestationCollectionItem", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); - b.Property("PrestationId"); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("QueryId"); + b.Property("PrestationId") + .HasColumnType("bigint"); + + b.Property("QueryId") + .HasColumnType("bigint"); b.HasKey("Id"); + + b.HasIndex("PrestationId"); + + b.HasIndex("QueryId"); + + b.ToTable("HairPrestationCollectionItem"); }); modelBuilder.Entity("Yavsc.Models.Haircut.HairTaint", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("Brand"); + b.Property("Brand") + .IsRequired() + .HasColumnType("text"); - b.Property("ColorId"); + b.Property("ColorId") + .HasColumnType("bigint"); b.HasKey("Id"); + + b.HasIndex("ColorId"); + + b.ToTable("HairTaint"); }); modelBuilder.Entity("Yavsc.Models.Haircut.HairTaintInstance", b => { - b.Property("TaintId"); + b.Property("TaintId") + .HasColumnType("bigint"); - b.Property("PrestationId"); + b.Property("PrestationId") + .HasColumnType("bigint"); b.HasKey("TaintId", "PrestationId"); - }); - modelBuilder.Entity("Yavsc.Models.Identity.DeviceDeclaration", b => - { - b.Property("DeviceId"); + b.HasIndex("PrestationId"); - b.Property("DeclarationDate") + b.ToTable("HairTaintInstance"); + }); + + modelBuilder.Entity("Yavsc.Models.IT.Evolution.Feature", b => + { + b.Property("Id") .ValueGeneratedOnAdd() - .HasAnnotation("Relational:GeneratedValueSql", "LOCALTIMESTAMP"); + .HasColumnType("bigint"); - b.Property("DeviceOwnerId"); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("LatestActivityUpdate"); + b.Property("Description") + .IsRequired() + .HasColumnType("text"); - b.Property("Model"); + b.Property("ShortName") + .IsRequired() + .HasColumnType("text"); - b.Property("Platform"); + b.Property("Status") + .HasColumnType("integer"); - b.Property("Version"); + b.HasKey("Id"); - b.HasKey("DeviceId"); + b.ToTable("Feature"); }); - modelBuilder.Entity("Yavsc.Models.IT.Evolution.Feature", b => + modelBuilder.Entity("Yavsc.Models.IT.Fixing.Bug", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Description") + .IsRequired() + .HasColumnType("text"); - b.Property("Description"); + b.Property("FeatureId") + .IsRequired() + .HasColumnType("bigint"); - b.Property("ShortName"); + b.Property("Status") + .HasColumnType("integer"); - b.Property("Status"); + b.Property("Title") + .IsRequired() + .HasColumnType("text"); b.HasKey("Id"); + + b.HasIndex("FeatureId"); + + b.ToTable("Bug"); }); - modelBuilder.Entity("Yavsc.Models.IT.Fixing.Bug", b => + modelBuilder.Entity("Yavsc.Models.Identity.DeviceDeclaration", b => { - b.Property("Id") - .ValueGeneratedOnAdd(); + b.Property("DeviceId") + .HasColumnType("text"); + + b.Property("DeclarationDate") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("LOCALTIMESTAMP"); - b.Property("Description"); + b.Property("DeviceOwnerId") + .IsRequired() + .HasColumnType("text"); - b.Property("FeatureId"); + b.Property("LatestActivityUpdate") + .HasColumnType("timestamp with time zone"); - b.Property("Status"); + b.Property("Model") + .IsRequired() + .HasColumnType("text"); - b.Property("Title"); + b.Property("Platform") + .IsRequired() + .HasColumnType("text"); - b.HasKey("Id"); + b.Property("Version") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("DeviceId"); + + b.HasIndex("DeviceOwnerId"); + + b.ToTable("DeviceDeclaration"); }); modelBuilder.Entity("Yavsc.Models.Market.Product", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); - b.Property("Depth"); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("Description"); + b.Property("Depth") + .HasColumnType("numeric"); + + b.Property("Description") + .IsRequired() + .HasColumnType("text"); - b.Property("Height"); + b.Property("Height") + .HasColumnType("numeric"); - b.Property("Name"); + b.Property("Name") + .IsRequired() + .HasColumnType("text"); - b.Property("Price"); + b.Property("Price") + .HasColumnType("numeric"); - b.Property("Public"); + b.Property("Public") + .HasColumnType("boolean"); - b.Property("Weight"); + b.Property("Weight") + .HasColumnType("numeric"); - b.Property("Width"); + b.Property("Width") + .HasColumnType("numeric"); b.HasKey("Id"); + + b.ToTable("Products"); }); modelBuilder.Entity("Yavsc.Models.Market.Service", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ContextId"); + b.Property("ContextId") + .IsRequired() + .HasColumnType("text"); - b.Property("Description"); + b.Property("Description") + .IsRequired() + .HasColumnType("text"); - b.Property("Name"); + b.Property("Name") + .IsRequired() + .HasColumnType("text"); - b.Property("Public"); + b.Property("Public") + .HasColumnType("boolean"); b.HasKey("Id"); + + b.HasIndex("ContextId"); + + b.ToTable("Services"); }); modelBuilder.Entity("Yavsc.Models.Messaging.Announce", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); - b.Property("For"); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("Message"); + b.Property("For") + .HasColumnType("smallint"); + + b.Property("Message") + .IsRequired() + .HasColumnType("text"); - b.Property("OwnerId"); + b.Property("OwnerId") + .IsRequired() + .HasColumnType("text"); - b.Property("Sender"); + b.Property("Sender") + .IsRequired() + .HasColumnType("text"); - b.Property("Topic"); + b.Property("Topic") + .IsRequired() + .HasColumnType("text"); b.HasKey("Id"); + + b.HasIndex("OwnerId"); + + b.ToTable("Announce"); }); modelBuilder.Entity("Yavsc.Models.Messaging.DimissClicked", b => { - b.Property("UserId"); + b.Property("UserId") + .HasColumnType("text"); - b.Property("NotificationId"); + b.Property("NotificationId") + .HasColumnType("bigint"); b.HasKey("UserId", "NotificationId"); + + b.HasIndex("NotificationId"); + + b.ToTable("DimissClicked"); }); modelBuilder.Entity("Yavsc.Models.Messaging.Notification", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); - b.Property("Target"); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Target") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("character varying(512)"); b.Property("body") - .IsRequired(); + .IsRequired() + .HasMaxLength(512) + .HasColumnType("character varying(512)"); b.Property("click_action") - .IsRequired(); + .IsRequired() + .HasMaxLength(512) + .HasColumnType("character varying(512)"); - b.Property("color"); + b.Property("color") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("character varying(512)"); b.Property("icon") - .HasAnnotation("Relational:DefaultValue", "exclam") - .HasAnnotation("Relational:DefaultValueType", "System.String"); + .IsRequired() + .ValueGeneratedOnAdd() + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasDefaultValue("exclam"); - b.Property("sound"); + b.Property("sound") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("character varying(512)"); - b.Property("tag"); + b.Property("tag") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("character varying(512)"); b.Property("title") - .IsRequired(); + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); b.HasKey("Id"); + + b.ToTable("Notification"); }); modelBuilder.Entity("Yavsc.Models.Musical.Instrument", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("Name") - .HasAnnotation("MaxLength", 255); + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)"); b.HasKey("Id"); + + b.ToTable("Instrument"); }); modelBuilder.Entity("Yavsc.Models.Musical.InstrumentRating", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("InstrumentId"); + b.Property("InstrumentId") + .HasColumnType("bigint"); - b.Property("OwnerId"); + b.Property("OwnerId") + .IsRequired() + .HasColumnType("text"); - b.Property("Rate"); + b.Property("Rate") + .HasColumnType("integer"); b.HasKey("Id"); b.HasAlternateKey("InstrumentId", "OwnerId"); + + b.HasIndex("OwnerId"); + + b.ToTable("InstrumentRating"); }); modelBuilder.Entity("Yavsc.Models.Musical.MusicalPreference", b => { - b.Property("OwnerProfileId"); + b.Property("OwnerProfileId") + .HasColumnType("text"); - b.Property("DjSettingsUserId"); + b.Property("DjSettingsUserId") + .HasColumnType("text"); - b.Property("GeneralSettingsUserId"); + b.Property("GeneralSettingsUserId") + .HasColumnType("text"); - b.Property("Rate"); + b.Property("Rate") + .HasColumnType("integer"); - b.Property("TendencyId"); + b.Property("TendencyId") + .HasColumnType("bigint"); b.HasKey("OwnerProfileId"); + + b.HasIndex("DjSettingsUserId"); + + b.HasIndex("GeneralSettingsUserId"); + + b.ToTable("MusicalPreference"); }); modelBuilder.Entity("Yavsc.Models.Musical.MusicalTendency", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("Name") - .HasAnnotation("MaxLength", 255); + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)"); b.HasKey("Id"); + + b.ToTable("MusicalTendency"); }); modelBuilder.Entity("Yavsc.Models.Musical.Profiles.DjSettings", b => { - b.Property("UserId"); + b.Property("UserId") + .HasColumnType("text"); - b.Property("SoundCloudId"); + b.Property("SoundCloudId") + .IsRequired() + .HasColumnType("text"); b.HasKey("UserId"); + + b.ToTable("DjSettings"); }); modelBuilder.Entity("Yavsc.Models.Musical.Profiles.GeneralSettings", b => { - b.Property("UserId"); + b.Property("UserId") + .HasColumnType("text"); b.HasKey("UserId"); + + b.ToTable("GeneralSettings"); }); modelBuilder.Entity("Yavsc.Models.Musical.Profiles.Instrumentation", b => { - b.Property("InstrumentId"); + b.Property("InstrumentId") + .HasColumnType("bigint"); - b.Property("UserId"); + b.Property("UserId") + .HasColumnType("text"); b.HasKey("InstrumentId", "UserId"); + + b.HasIndex("UserId"); + + b.ToTable("Instrumentation"); }); modelBuilder.Entity("Yavsc.Models.Payment.PayPalPayment", b => { - b.Property("CreationToken"); + b.Property("CreationToken") + .HasColumnType("text"); - b.Property("DateCreated"); + b.Property("DateCreated") + .HasColumnType("timestamp with time zone"); - b.Property("DateModified"); + b.Property("DateModified") + .HasColumnType("timestamp with time zone"); - b.Property("ExecutorId"); + b.Property("ExecutorId") + .IsRequired() + .HasColumnType("text"); - b.Property("OrderReference"); + b.Property("OrderReference") + .IsRequired() + .HasColumnType("text"); - b.Property("PaypalPayerId"); + b.Property("PaypalPayerId") + .IsRequired() + .HasColumnType("text"); - b.Property("State"); + b.Property("State") + .IsRequired() + .HasColumnType("text"); - b.Property("UserCreated"); + b.Property("UserCreated") + .IsRequired() + .HasColumnType("text"); - b.Property("UserModified"); + b.Property("UserModified") + .IsRequired() + .HasColumnType("text"); b.HasKey("CreationToken"); + + b.HasIndex("ExecutorId"); + + b.ToTable("PayPalPayment"); }); modelBuilder.Entity("Yavsc.Models.Relationship.Circle", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); - b.Property("ApplicationUserId"); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("ApplicationUserId") + .HasColumnType("text"); - b.Property("Name"); + b.Property("Name") + .IsRequired() + .HasColumnType("text"); - b.Property("OwnerId"); + b.Property("OwnerId") + .IsRequired() + .HasColumnType("text"); - b.Property("Public"); + b.Property("Public") + .HasColumnType("boolean"); b.HasKey("Id"); + + b.HasIndex("ApplicationUserId"); + + b.ToTable("Circle"); }); modelBuilder.Entity("Yavsc.Models.Relationship.CircleMember", b => { - b.Property("MemberId"); + b.Property("MemberId") + .HasColumnType("text"); - b.Property("CircleId"); + b.Property("CircleId") + .HasColumnType("bigint"); b.HasKey("MemberId", "CircleId"); + + b.HasIndex("CircleId"); + + b.ToTable("CircleMembers"); }); modelBuilder.Entity("Yavsc.Models.Relationship.Contact", b => { - b.Property("OwnerId"); + b.Property("OwnerId") + .HasColumnType("text"); - b.Property("UserId"); + b.Property("UserId") + .HasColumnType("text"); - b.Property("AddressId"); + b.Property("AddressId") + .HasColumnType("bigint"); - b.Property("ApplicationUserId"); + b.Property("ApplicationUserId") + .HasColumnType("text"); - b.Property("EMail"); + b.Property("EMail") + .IsRequired() + .HasColumnType("text"); - b.Property("Name"); + b.Property("Name") + .IsRequired() + .HasColumnType("text"); b.HasKey("OwnerId", "UserId"); + + b.HasIndex("AddressId"); + + b.HasIndex("ApplicationUserId"); + + b.ToTable("Contact"); }); modelBuilder.Entity("Yavsc.Models.Relationship.HyperLink", b => { - b.Property("HRef"); + b.Property("HRef") + .HasColumnType("text"); - b.Property("Method"); + b.Property("Method") + .HasColumnType("text"); - b.Property("BrusherProfileUserId"); + b.Property("BrusherProfileUserId") + .HasColumnType("text"); - b.Property("ContentType"); + b.Property("ContentType") + .IsRequired() + .HasColumnType("text"); - b.Property("PayPalPaymentCreationToken"); + b.Property("PayPalPaymentCreationToken") + .HasColumnType("text"); - b.Property("Rel"); + b.Property("Rel") + .IsRequired() + .HasColumnType("text"); b.HasKey("HRef", "Method"); + + b.HasIndex("BrusherProfileUserId"); + + b.HasIndex("PayPalPaymentCreationToken"); + + b.ToTable("HyperLink"); }); modelBuilder.Entity("Yavsc.Models.Relationship.Location", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("Address") - .HasAnnotation("MaxLength", 512); + .IsRequired() + .HasMaxLength(512) + .HasColumnType("character varying(512)"); - b.Property("Latitude"); + b.Property("Latitude") + .HasColumnType("double precision"); - b.Property("Longitude"); + b.Property("Longitude") + .HasColumnType("double precision"); b.HasKey("Id"); + + b.ToTable("Locations"); }); modelBuilder.Entity("Yavsc.Models.Relationship.PostalAddress", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("City"); + b.Property("City") + .IsRequired() + .HasColumnType("text"); - b.Property("Country"); + b.Property("Country") + .IsRequired() + .HasColumnType("text"); - b.Property("PostalCode"); + b.Property("PostalCode") + .IsRequired() + .HasColumnType("text"); - b.Property("Province"); + b.Property("Province") + .IsRequired() + .HasColumnType("text"); - b.Property("State"); + b.Property("State") + .IsRequired() + .HasColumnType("text"); - b.Property("Street1"); + b.Property("Street1") + .IsRequired() + .HasColumnType("text"); - b.Property("Street2"); + b.Property("Street2") + .IsRequired() + .HasColumnType("text"); b.HasKey("Id"); + + b.ToTable("PostalAddress"); }); modelBuilder.Entity("Yavsc.Models.Relationship.Tag", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("Name"); + b.Property("Name") + .IsRequired() + .HasColumnType("text"); b.HasKey("Id"); + + b.ToTable("Tags"); }); modelBuilder.Entity("Yavsc.Models.Skill", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); - b.Property("Name"); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Name") + .IsRequired() + .HasColumnType("text"); - b.Property("Rate"); + b.Property("Rate") + .HasColumnType("integer"); b.HasKey("Id"); + + b.ToTable("SiteSkills"); }); modelBuilder.Entity("Yavsc.Models.Streaming.LiveFlow", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DifferedFileName"); + b.Property("DifferedFileName") + .IsRequired() + .HasColumnType("text"); - b.Property("MediaType"); + b.Property("MediaType") + .IsRequired() + .HasColumnType("text"); - b.Property("OwnerId"); + b.Property("OwnerId") + .IsRequired() + .HasColumnType("text"); - b.Property("Pitch"); + b.Property("Pitch") + .IsRequired() + .HasColumnType("text"); - b.Property("SequenceNumber"); + b.Property("SequenceNumber") + .HasColumnType("integer"); - b.Property("Title"); + b.Property("Title") + .IsRequired() + .HasColumnType("text"); b.HasKey("Id"); + + b.HasIndex("OwnerId"); + + b.ToTable("LiveFlow"); }); modelBuilder.Entity("Yavsc.Models.Workflow.Activity", b => { - b.Property("Code"); + b.Property("Code") + .HasColumnType("text"); - b.Property("DateCreated"); + b.Property("DateCreated") + .HasColumnType("timestamp with time zone"); - b.Property("DateModified"); + b.Property("DateModified") + .HasColumnType("timestamp with time zone"); - b.Property("Description"); + b.Property("Description") + .IsRequired() + .HasColumnType("text"); - b.Property("Hidden"); + b.Property("Hidden") + .HasColumnType("boolean"); - b.Property("ModeratorGroupName"); + b.Property("ModeratorGroupName") + .IsRequired() + .HasColumnType("text"); - b.Property("Name"); + b.Property("Name") + .IsRequired() + .HasColumnType("text"); - b.Property("ParentCode"); + b.Property("ParentCode") + .IsRequired() + .HasColumnType("text"); - b.Property("Photo"); + b.Property("Photo") + .IsRequired() + .HasColumnType("text"); - b.Property("Rate"); + b.Property("Rate") + .HasColumnType("integer"); - b.Property("SettingsClassName"); + b.Property("SettingsClassName") + .IsRequired() + .HasColumnType("text"); - b.Property("UserCreated"); + b.Property("UserCreated") + .IsRequired() + .HasColumnType("text"); - b.Property("UserModified"); + b.Property("UserModified") + .IsRequired() + .HasColumnType("text"); b.HasKey("Code"); + + b.HasIndex("ParentCode"); + + b.ToTable("Activities"); }); - modelBuilder.Entity("Yavsc.Models.Workflow.CommandForm", b => + modelBuilder.Entity("Yavsc.Models.Workflow.CoWorking", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ActionName"); + b.Property("FormationSettingsUserId") + .HasColumnType("text"); - b.Property("ActivityCode"); + b.Property("PerformerId") + .IsRequired() + .HasColumnType("text"); - b.Property("Title"); + b.Property("WorkingForId") + .IsRequired() + .HasColumnType("text"); b.HasKey("Id"); + + b.HasIndex("FormationSettingsUserId"); + + b.HasIndex("PerformerId"); + + b.HasIndex("WorkingForId"); + + b.ToTable("CoWorking"); }); - modelBuilder.Entity("Yavsc.Models.Workflow.CoWorking", b => + modelBuilder.Entity("Yavsc.Models.Workflow.CommandForm", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); - b.Property("FormationSettingsUserId"); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("ActionName") + .IsRequired() + .HasColumnType("text"); - b.Property("PerformerId"); + b.Property("ActivityCode") + .IsRequired() + .HasColumnType("text"); - b.Property("WorkingForId"); + b.Property("Title") + .IsRequired() + .HasColumnType("text"); b.HasKey("Id"); + + b.HasIndex("ActivityCode"); + + b.ToTable("CommandForm"); }); modelBuilder.Entity("Yavsc.Models.Workflow.PerformerProfile", b => { - b.Property("PerformerId"); + b.Property("PerformerId") + .HasColumnType("text"); - b.Property("AcceptNotifications"); + b.Property("AcceptNotifications") + .HasColumnType("boolean"); - b.Property("AcceptPublicContact"); + b.Property("AcceptPublicContact") + .HasColumnType("boolean"); - b.Property("Active"); + b.Property("Active") + .HasColumnType("boolean"); - b.Property("MaxDailyCost"); + b.Property("MaxDailyCost") + .HasColumnType("integer"); - b.Property("MinDailyCost"); + b.Property("MinDailyCost") + .HasColumnType("integer"); - b.Property("OrganizationAddressId"); + b.Property("OrganizationAddressId") + .HasColumnType("bigint"); - b.Property("Rate"); + b.Property("Rate") + .HasColumnType("integer"); - b.Property("SIREN"); + b.Property("SIREN") + .IsRequired() + .HasColumnType("text"); - b.Property("UseGeoLocalizationToReduceDistanceWithClients"); + b.Property("UseGeoLocalizationToReduceDistanceWithClients") + .HasColumnType("boolean"); - b.Property("WebSite"); + b.Property("WebSite") + .IsRequired() + .HasColumnType("text"); b.HasKey("PerformerId"); + + b.HasIndex("OrganizationAddressId"); + + b.ToTable("Performers"); }); modelBuilder.Entity("Yavsc.Models.Workflow.Profiles.FormationSettings", b => { - b.Property("UserId"); + b.Property("UserId") + .HasColumnType("text"); - b.Property("DisplayName"); + b.Property("DisplayName") + .IsRequired() + .HasColumnType("text"); b.HasKey("UserId"); + + b.ToTable("FormationSettings"); }); modelBuilder.Entity("Yavsc.Models.Workflow.RdvQuery", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("ActivityCode") - .IsRequired(); + .IsRequired() + .HasColumnType("text"); b.Property("ClientId") - .IsRequired(); + .IsRequired() + .HasColumnType("text"); - b.Property("Consent"); + b.Property("Consent") + .HasColumnType("boolean"); - b.Property("DateCreated"); + b.Property("DateCreated") + .HasColumnType("timestamp with time zone"); - b.Property("DateModified"); + b.Property("DateModified") + .HasColumnType("timestamp with time zone"); - b.Property("Description"); + b.Property("Description") + .IsRequired() + .HasColumnType("text"); - b.Property("EventDate"); + b.Property("EventDate") + .HasColumnType("timestamp with time zone"); - b.Property("LocationId"); + b.Property("LocationId") + .HasColumnType("bigint"); - b.Property("LocationType"); + b.Property("LocationType") + .HasColumnType("integer"); - b.Property("PaymentId"); + b.Property("PaymentId") + .IsRequired() + .HasColumnType("text"); b.Property("PerformerId") - .IsRequired(); + .IsRequired() + .HasColumnType("text"); - b.Property("Previsional"); + b.Property("Previsional") + .HasColumnType("numeric"); - b.Property("Reason"); + b.Property("Reason") + .IsRequired() + .HasColumnType("text"); - b.Property("Rejected"); + b.Property("Rejected") + .HasColumnType("boolean"); - b.Property("RejectedAt"); + b.Property("RejectedAt") + .HasColumnType("timestamp with time zone"); - b.Property("Status"); + b.Property("Status") + .HasColumnType("integer"); - b.Property("UserCreated"); + b.Property("UserCreated") + .IsRequired() + .HasColumnType("text"); - b.Property("UserModified"); + b.Property("UserModified") + .IsRequired() + .HasColumnType("text"); - b.Property("ValidationDate"); + b.Property("ValidationDate") + .HasColumnType("timestamp with time zone"); b.HasKey("Id"); + + b.HasIndex("ActivityCode"); + + b.HasIndex("ClientId"); + + b.HasIndex("LocationId"); + + b.HasIndex("PaymentId"); + + b.HasIndex("PerformerId"); + + b.ToTable("RdvQueries"); }); modelBuilder.Entity("Yavsc.Models.Workflow.UserActivity", b => { - b.Property("DoesCode"); + b.Property("DoesCode") + .HasColumnType("text"); - b.Property("UserId"); + b.Property("UserId") + .HasColumnType("text"); - b.Property("Weight"); + b.Property("Weight") + .HasColumnType("integer"); b.HasKey("DoesCode", "UserId"); + + b.HasIndex("UserId"); + + b.ToTable("UserActivities"); }); modelBuilder.Entity("Yavsc.Server.Models.Blog.BlogTrad", b => { - b.Property("PostId"); + b.Property("PostId") + .HasColumnType("bigint"); - b.Property("Lang"); + b.Property("Lang") + .HasColumnType("text"); - b.Property("Body"); + b.Property("Body") + .IsRequired() + .HasColumnType("text"); - b.Property("Title"); + b.Property("Title") + .IsRequired() + .HasColumnType("text"); - b.Property("TraducerId"); + b.Property("TraducerId") + .IsRequired() + .HasColumnType("text"); b.HasKey("PostId", "Lang"); + + b.HasIndex("TraducerId"); + + b.ToTable("BlogTrad"); + }); + + modelBuilder.Entity("Yavsc.Server.Models.Calendar.Period", b => + { + b.Property("Start") + .HasColumnType("timestamp with time zone"); + + b.Property("End") + .HasColumnType("timestamp with time zone"); + + b.HasKey("Start", "End"); + + b.ToTable("Period"); }); modelBuilder.Entity("Yavsc.Server.Models.EMailing.MailingTemplate", b => { - b.Property("Id"); + b.Property("Id") + .HasColumnType("text"); b.Property("Body") - .HasAnnotation("MaxLength", 65536); + .IsRequired() + .HasMaxLength(65536) + .HasColumnType("character varying(65536)"); - b.Property("DateCreated"); + b.Property("DateCreated") + .HasColumnType("timestamp with time zone"); - b.Property("DateModified"); + b.Property("DateModified") + .HasColumnType("timestamp with time zone"); - b.Property("ReplyToAddress"); + b.Property("ReplyToAddress") + .IsRequired() + .HasColumnType("text"); - b.Property("ToSend"); + b.Property("ToSend") + .HasColumnType("integer"); - b.Property("Topic"); + b.Property("Topic") + .IsRequired() + .HasColumnType("text"); - b.Property("UserCreated"); + b.Property("UserCreated") + .IsRequired() + .HasColumnType("text"); - b.Property("UserModified"); + b.Property("UserModified") + .IsRequired() + .HasColumnType("text"); b.HasKey("Id"); + + b.ToTable("MailingTemplate"); }); modelBuilder.Entity("Yavsc.Server.Models.IT.Project", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("ActivityCode") - .IsRequired(); + .IsRequired() + .HasColumnType("text"); b.Property("ClientId") - .IsRequired(); + .IsRequired() + .HasColumnType("text"); - b.Property("Consent"); + b.Property("Consent") + .HasColumnType("boolean"); - b.Property("DateCreated"); + b.Property("DateCreated") + .HasColumnType("timestamp with time zone"); - b.Property("DateModified"); + b.Property("DateModified") + .HasColumnType("timestamp with time zone"); - b.Property("Description"); + b.Property("Description") + .IsRequired() + .HasColumnType("text"); - b.Property("GitId"); + b.Property("GitId") + .HasColumnType("bigint"); - b.Property("Name"); + b.Property("Name") + .IsRequired() + .HasColumnType("text"); - b.Property("OwnerId"); + b.Property("OwnerId") + .IsRequired() + .HasColumnType("text"); - b.Property("PaymentId"); + b.Property("PaymentId") + .IsRequired() + .HasColumnType("text"); b.Property("PerformerId") - .IsRequired(); + .IsRequired() + .HasColumnType("text"); - b.Property("Previsional"); + b.Property("Previsional") + .HasColumnType("numeric"); - b.Property("Rejected"); + b.Property("Rejected") + .HasColumnType("boolean"); - b.Property("RejectedAt"); + b.Property("RejectedAt") + .HasColumnType("timestamp with time zone"); - b.Property("Status"); + b.Property("Status") + .HasColumnType("integer"); - b.Property("UserCreated"); + b.Property("UserCreated") + .IsRequired() + .HasColumnType("text"); - b.Property("UserModified"); + b.Property("UserModified") + .IsRequired() + .HasColumnType("text"); - b.Property("ValidationDate"); + b.Property("ValidationDate") + .HasColumnType("timestamp with time zone"); - b.Property("Version"); + b.Property("Version") + .IsRequired() + .HasColumnType("text"); b.HasKey("Id"); + + b.HasIndex("ActivityCode"); + + b.HasIndex("ClientId"); + + b.HasIndex("GitId"); + + b.HasIndex("PaymentId"); + + b.HasIndex("PerformerId"); + + b.ToTable("Project"); }); modelBuilder.Entity("Yavsc.Server.Models.IT.ProjectBuildConfiguration", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); - b.Property("Name"); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("ProjectId"); + b.Property("Name") + .IsRequired() + .HasColumnType("text"); + + b.Property("ProjectId") + .HasColumnType("bigint"); b.HasKey("Id"); + + b.HasIndex("ProjectId"); + + b.ToTable("ProjectBuildConfiguration"); }); modelBuilder.Entity("Yavsc.Server.Models.IT.SourceCode.GitRepositoryReference", b => { b.Property("Id") - .ValueGeneratedOnAdd(); + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); - b.Property("Branch"); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("OwnerId"); + b.Property("Branch") + .IsRequired() + .HasColumnType("text"); - b.Property("Path"); + b.Property("OwnerId") + .IsRequired() + .HasColumnType("text"); - b.Property("Url"); + b.Property("Path") + .IsRequired() + .HasColumnType("text"); + + b.Property("Url") + .IsRequired() + .HasColumnType("text"); b.HasKey("Id"); + + b.HasIndex("OwnerId"); + + b.ToTable("GitRepositoryReference"); }); - modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim", b => + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => { - b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole") + b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) .WithMany() - .HasForeignKey("RoleId"); + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); - modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim", b => + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => { - b.HasOne("Yavsc.Models.ApplicationUser") + b.HasOne("Yavsc.Models.ApplicationUser", null) .WithMany() - .HasForeignKey("UserId"); + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); - modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin", b => + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => { - b.HasOne("Yavsc.Models.ApplicationUser") + b.HasOne("Yavsc.Models.ApplicationUser", null) .WithMany() - .HasForeignKey("UserId"); + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); - modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole", b => + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => { - b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole") + b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) .WithMany() - .HasForeignKey("RoleId"); + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.HasOne("Yavsc.Models.ApplicationUser") + b.HasOne("Yavsc.Models.ApplicationUser", null) .WithMany() - .HasForeignKey("UserId"); + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.HasOne("Yavsc.Models.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("Yavsc.Models.Access.Ban", b => { - b.HasOne("Yavsc.Models.ApplicationUser") + b.HasOne("Yavsc.Models.ApplicationUser", "TargetUser") .WithMany() - .HasForeignKey("TargetId"); + .HasForeignKey("TargetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TargetUser"); }); modelBuilder.Entity("Yavsc.Models.Access.BlackListed", b => { - b.HasOne("Yavsc.Models.ApplicationUser") - .WithMany() - .HasForeignKey("OwnerId"); + b.HasOne("Yavsc.Models.ApplicationUser", "Owner") + .WithMany("BlackList") + .HasForeignKey("OwnerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.HasOne("Yavsc.Models.ApplicationUser") + b.HasOne("Yavsc.Models.ApplicationUser", "User") .WithMany() - .HasForeignKey("UserId"); + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Owner"); + + b.Navigation("User"); }); modelBuilder.Entity("Yavsc.Models.Access.CircleAuthorizationToBlogPost", b => { - b.HasOne("Yavsc.Models.Blog.BlogPost") - .WithMany() - .HasForeignKey("BlogPostId"); + b.HasOne("Yavsc.Models.Blog.BlogPost", "Target") + .WithMany("ACL") + .HasForeignKey("BlogPostId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.HasOne("Yavsc.Models.Relationship.Circle") + b.HasOne("Yavsc.Models.Relationship.Circle", "Allowed") .WithMany() - .HasForeignKey("CircleId"); + .HasForeignKey("CircleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Allowed"); + + b.Navigation("Target"); }); modelBuilder.Entity("Yavsc.Models.AccountBalance", b => { - b.HasOne("Yavsc.Models.ApplicationUser") - .WithOne() - .HasForeignKey("Yavsc.Models.AccountBalance", "UserId"); + b.HasOne("Yavsc.Models.ApplicationUser", "Owner") + .WithOne("AccountBalance") + .HasForeignKey("Yavsc.Models.AccountBalance", "UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Owner"); }); modelBuilder.Entity("Yavsc.Models.ApplicationUser", b => { - b.HasOne("Yavsc.Models.Bank.BankIdentity") + b.HasOne("Yavsc.Models.Bank.BankIdentity", "BankInfo") .WithMany() - .HasForeignKey("BankInfoId"); + .HasForeignKey("BankInfoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.HasOne("Yavsc.Models.Relationship.Location") + b.HasOne("Yavsc.Models.Relationship.Location", "PostalAddress") .WithMany() - .HasForeignKey("PostalAddressId"); + .HasForeignKey("PostalAddressId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BankInfo"); + + b.Navigation("PostalAddress"); }); modelBuilder.Entity("Yavsc.Models.BalanceImpact", b => { - b.HasOne("Yavsc.Models.AccountBalance") + b.HasOne("Yavsc.Models.AccountBalance", "Balance") .WithMany() - .HasForeignKey("BalanceId"); + .HasForeignKey("BalanceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Balance"); }); modelBuilder.Entity("Yavsc.Models.Billing.CommandLine", b => { - b.HasOne("Yavsc.Models.Billing.Estimate") - .WithMany() - .HasForeignKey("EstimateId"); + b.HasOne("Yavsc.Models.Billing.Estimate", null) + .WithMany("Bill") + .HasForeignKey("EstimateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.HasOne("Yavsc.Models.Billing.EstimateTemplate") - .WithMany() + b.HasOne("Yavsc.Models.Billing.EstimateTemplate", null) + .WithMany("Bill") .HasForeignKey("EstimateTemplateId"); }); modelBuilder.Entity("Yavsc.Models.Billing.Estimate", b => { - b.HasOne("Yavsc.Models.ApplicationUser") + b.HasOne("Yavsc.Models.ApplicationUser", "Client") .WithMany() - .HasForeignKey("ClientId"); + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.HasOne("Yavsc.Models.Workflow.RdvQuery") + b.HasOne("Yavsc.Models.Workflow.RdvQuery", "Query") .WithMany() .HasForeignKey("CommandId"); - b.HasOne("Yavsc.Models.Workflow.PerformerProfile") + b.HasOne("Yavsc.Models.Workflow.PerformerProfile", "Owner") .WithMany() - .HasForeignKey("OwnerId"); + .HasForeignKey("OwnerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Client"); + + b.Navigation("Owner"); + + b.Navigation("Query"); }); modelBuilder.Entity("Yavsc.Models.Blog.BlogPost", b => { - b.HasOne("Yavsc.Models.ApplicationUser") - .WithMany() - .HasForeignKey("AuthorId"); + b.HasOne("Yavsc.Models.ApplicationUser", "Author") + .WithMany("Posts") + .HasForeignKey("AuthorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Author"); }); modelBuilder.Entity("Yavsc.Models.Blog.BlogTag", b => { - b.HasOne("Yavsc.Models.Blog.BlogPost") - .WithMany() - .HasForeignKey("PostId"); + b.HasOne("Yavsc.Models.Blog.BlogPost", "Post") + .WithMany("Tags") + .HasForeignKey("PostId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.HasOne("Yavsc.Models.Relationship.Tag") + b.HasOne("Yavsc.Models.Relationship.Tag", "Tag") .WithMany() - .HasForeignKey("TagId"); + .HasForeignKey("TagId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Post"); + + b.Navigation("Tag"); }); modelBuilder.Entity("Yavsc.Models.Blog.Comment", b => { - b.HasOne("Yavsc.Models.ApplicationUser") + b.HasOne("Yavsc.Models.ApplicationUser", "Author") .WithMany() - .HasForeignKey("AuthorId"); + .HasForeignKey("AuthorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.HasOne("Yavsc.Models.Blog.Comment") - .WithMany() + b.HasOne("Yavsc.Models.Blog.Comment", "Parent") + .WithMany("Children") .HasForeignKey("ParentId"); - b.HasOne("Yavsc.Models.Blog.BlogPost") - .WithMany() - .HasForeignKey("PostId"); + b.HasOne("Yavsc.Models.Blog.BlogPost", "Post") + .WithMany("Comments") + .HasForeignKey("PostId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Author"); + + b.Navigation("Parent"); + + b.Navigation("Post"); }); modelBuilder.Entity("Yavsc.Models.Calendar.Schedule", b => { - b.HasOne("Yavsc.Models.ApplicationUser") + b.HasOne("Yavsc.Models.ApplicationUser", "Owner") .WithMany() - .HasForeignKey("OwnerId"); + .HasForeignKey("OwnerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Owner"); }); modelBuilder.Entity("Yavsc.Models.Calendar.ScheduledEvent", b => { - b.HasOne("Yavsc.Models.Calendar.Schedule") - .WithMany() + b.HasOne("Yavsc.Models.Calendar.Schedule", null) + .WithMany("Events") .HasForeignKey("ScheduleOwnerId"); - b.HasOne("Yavsc.Models.Calendar.Period") + b.HasOne("Yavsc.Server.Models.Calendar.Period", "Period") .WithMany() - .HasForeignKey("PeriodStart", "PeriodEnd"); + .HasForeignKey("PeriodStart", "PeriodEnd") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Period"); }); modelBuilder.Entity("Yavsc.Models.Chat.ChatConnection", b => { - b.HasOne("Yavsc.Models.ApplicationUser") - .WithMany() - .HasForeignKey("ApplicationUserId"); + b.HasOne("Yavsc.Models.ApplicationUser", "Owner") + .WithMany("Connections") + .HasForeignKey("ApplicationUserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Owner"); }); modelBuilder.Entity("Yavsc.Models.Chat.ChatRoom", b => { - b.HasOne("Yavsc.Models.ApplicationUser") - .WithMany() - .HasForeignKey("OwnerId"); + b.HasOne("Yavsc.Models.ApplicationUser", "Owner") + .WithMany("Rooms") + .HasForeignKey("OwnerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Owner"); }); modelBuilder.Entity("Yavsc.Models.Chat.ChatRoomAccess", b => { - b.HasOne("Yavsc.Models.Chat.ChatRoom") - .WithMany() - .HasForeignKey("ChannelName"); + b.HasOne("Yavsc.Models.Chat.ChatRoom", "Room") + .WithMany("Moderation") + .HasForeignKey("ChannelName") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.HasOne("Yavsc.Models.ApplicationUser") - .WithMany() - .HasForeignKey("UserId"); + b.HasOne("Yavsc.Models.ApplicationUser", "User") + .WithMany("RoomAccess") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Room"); + + b.Navigation("User"); }); modelBuilder.Entity("Yavsc.Models.Haircut.BrusherProfile", b => { - b.HasOne("Yavsc.Models.Calendar.Schedule") + b.HasOne("Yavsc.Models.Calendar.Schedule", "Schedule") .WithMany() - .HasForeignKey("ScheduleOwnerId"); + .HasForeignKey("ScheduleOwnerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.HasOne("Yavsc.Models.Workflow.PerformerProfile") + b.HasOne("Yavsc.Models.Workflow.PerformerProfile", "BaseProfile") .WithMany() - .HasForeignKey("UserId"); + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BaseProfile"); + + b.Navigation("Schedule"); }); modelBuilder.Entity("Yavsc.Models.Haircut.HairCutQuery", b => { - b.HasOne("Yavsc.Models.Workflow.Activity") + b.HasOne("Yavsc.Models.Workflow.Activity", "Context") .WithMany() - .HasForeignKey("ActivityCode"); + .HasForeignKey("ActivityCode") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.HasOne("Yavsc.Models.ApplicationUser") + b.HasOne("Yavsc.Models.ApplicationUser", "Client") .WithMany() - .HasForeignKey("ClientId"); + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.HasOne("Yavsc.Models.Relationship.Location") + b.HasOne("Yavsc.Models.Relationship.Location", "Location") .WithMany() - .HasForeignKey("LocationId"); + .HasForeignKey("LocationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.HasOne("Yavsc.Models.Payment.PayPalPayment") + b.HasOne("Yavsc.Models.Payment.PayPalPayment", "Regularisation") .WithMany() - .HasForeignKey("PaymentId"); + .HasForeignKey("PaymentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.HasOne("Yavsc.Models.Workflow.PerformerProfile") + b.HasOne("Yavsc.Models.Workflow.PerformerProfile", "PerformerProfile") .WithMany() - .HasForeignKey("PerformerId"); + .HasForeignKey("PerformerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.HasOne("Yavsc.Models.Haircut.HairPrestation") + b.HasOne("Yavsc.Models.Haircut.HairPrestation", "Prestation") .WithMany() - .HasForeignKey("PrestationId"); + .HasForeignKey("PrestationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.HasOne("Yavsc.Models.Haircut.BrusherProfile") + b.HasOne("Yavsc.Models.Haircut.BrusherProfile", "SelectedProfile") .WithMany() .HasForeignKey("SelectedProfileUserId"); + + b.Navigation("Client"); + + b.Navigation("Context"); + + b.Navigation("Location"); + + b.Navigation("PerformerProfile"); + + b.Navigation("Prestation"); + + b.Navigation("Regularisation"); + + b.Navigation("SelectedProfile"); }); modelBuilder.Entity("Yavsc.Models.Haircut.HairMultiCutQuery", b => { - b.HasOne("Yavsc.Models.Workflow.Activity") + b.HasOne("Yavsc.Models.Workflow.Activity", "Context") .WithMany() - .HasForeignKey("ActivityCode"); + .HasForeignKey("ActivityCode") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.HasOne("Yavsc.Models.ApplicationUser") + b.HasOne("Yavsc.Models.ApplicationUser", "Client") .WithMany() - .HasForeignKey("ClientId"); + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.HasOne("Yavsc.Models.Relationship.Location") + b.HasOne("Yavsc.Models.Relationship.Location", "Location") .WithMany() - .HasForeignKey("LocationId"); + .HasForeignKey("LocationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.HasOne("Yavsc.Models.Payment.PayPalPayment") + b.HasOne("Yavsc.Models.Payment.PayPalPayment", "Regularisation") .WithMany() - .HasForeignKey("PaymentId"); + .HasForeignKey("PaymentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.HasOne("Yavsc.Models.Workflow.PerformerProfile") + b.HasOne("Yavsc.Models.Workflow.PerformerProfile", "PerformerProfile") .WithMany() - .HasForeignKey("PerformerId"); + .HasForeignKey("PerformerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Client"); + + b.Navigation("Context"); + + b.Navigation("Location"); + + b.Navigation("PerformerProfile"); + + b.Navigation("Regularisation"); }); modelBuilder.Entity("Yavsc.Models.Haircut.HairPrestationCollectionItem", b => { - b.HasOne("Yavsc.Models.Haircut.HairPrestation") + b.HasOne("Yavsc.Models.Haircut.HairPrestation", "Prestation") .WithMany() - .HasForeignKey("PrestationId"); + .HasForeignKey("PrestationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.HasOne("Yavsc.Models.Haircut.HairMultiCutQuery") - .WithMany() - .HasForeignKey("QueryId"); + b.HasOne("Yavsc.Models.Haircut.HairMultiCutQuery", "Query") + .WithMany("Prestations") + .HasForeignKey("QueryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Prestation"); + + b.Navigation("Query"); }); modelBuilder.Entity("Yavsc.Models.Haircut.HairTaint", b => { - b.HasOne("Yavsc.Models.Drawing.Color") + b.HasOne("Yavsc.Models.Drawing.Color", "Color") .WithMany() - .HasForeignKey("ColorId"); + .HasForeignKey("ColorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Color"); }); modelBuilder.Entity("Yavsc.Models.Haircut.HairTaintInstance", b => { - b.HasOne("Yavsc.Models.Haircut.HairPrestation") - .WithMany() - .HasForeignKey("PrestationId"); + b.HasOne("Yavsc.Models.Haircut.HairPrestation", "Prestation") + .WithMany("Taints") + .HasForeignKey("PrestationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.HasOne("Yavsc.Models.Haircut.HairTaint") + b.HasOne("Yavsc.Models.Haircut.HairTaint", "Taint") .WithMany() - .HasForeignKey("TaintId"); + .HasForeignKey("TaintId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Prestation"); + + b.Navigation("Taint"); }); - modelBuilder.Entity("Yavsc.Models.Identity.DeviceDeclaration", b => + modelBuilder.Entity("Yavsc.Models.IT.Fixing.Bug", b => { - b.HasOne("Yavsc.Models.ApplicationUser") + b.HasOne("Yavsc.Models.IT.Evolution.Feature", "False") .WithMany() - .HasForeignKey("DeviceOwnerId"); + .HasForeignKey("FeatureId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("False"); }); - modelBuilder.Entity("Yavsc.Models.IT.Fixing.Bug", b => + modelBuilder.Entity("Yavsc.Models.Identity.DeviceDeclaration", b => { - b.HasOne("Yavsc.Models.IT.Evolution.Feature") - .WithMany() - .HasForeignKey("FeatureId"); + b.HasOne("Yavsc.Models.ApplicationUser", "DeviceOwner") + .WithMany("DeviceDeclaration") + .HasForeignKey("DeviceOwnerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DeviceOwner"); }); modelBuilder.Entity("Yavsc.Models.Market.Service", b => { - b.HasOne("Yavsc.Models.Workflow.Activity") - .WithMany() - .HasForeignKey("ContextId"); + b.HasOne("Yavsc.Models.Workflow.Activity", "Context") + .WithMany("Services") + .HasForeignKey("ContextId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Context"); }); modelBuilder.Entity("Yavsc.Models.Messaging.Announce", b => { - b.HasOne("Yavsc.Models.ApplicationUser") + b.HasOne("Yavsc.Models.ApplicationUser", "Owner") .WithMany() - .HasForeignKey("OwnerId"); + .HasForeignKey("OwnerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Owner"); }); modelBuilder.Entity("Yavsc.Models.Messaging.DimissClicked", b => { - b.HasOne("Yavsc.Models.Messaging.Notification") + b.HasOne("Yavsc.Models.Messaging.Notification", "Notified") .WithMany() - .HasForeignKey("NotificationId"); + .HasForeignKey("NotificationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.HasOne("Yavsc.Models.ApplicationUser") + b.HasOne("Yavsc.Models.ApplicationUser", "User") .WithMany() - .HasForeignKey("UserId"); + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Notified"); + + b.Navigation("User"); }); modelBuilder.Entity("Yavsc.Models.Musical.InstrumentRating", b => { - b.HasOne("Yavsc.Models.Musical.Instrument") + b.HasOne("Yavsc.Models.Musical.Instrument", "Instrument") .WithMany() - .HasForeignKey("InstrumentId"); + .HasForeignKey("InstrumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.HasOne("Yavsc.Models.Workflow.PerformerProfile") + b.HasOne("Yavsc.Models.Workflow.PerformerProfile", "Profile") .WithMany() - .HasForeignKey("OwnerId"); + .HasForeignKey("OwnerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Instrument"); + + b.Navigation("Profile"); }); modelBuilder.Entity("Yavsc.Models.Musical.MusicalPreference", b => { - b.HasOne("Yavsc.Models.Musical.Profiles.DjSettings") - .WithMany() + b.HasOne("Yavsc.Models.Musical.Profiles.DjSettings", null) + .WithMany("SoundColor") .HasForeignKey("DjSettingsUserId"); - b.HasOne("Yavsc.Models.Musical.Profiles.GeneralSettings") - .WithMany() + b.HasOne("Yavsc.Models.Musical.Profiles.GeneralSettings", null) + .WithMany("SoundColor") .HasForeignKey("GeneralSettingsUserId"); }); modelBuilder.Entity("Yavsc.Models.Musical.Profiles.Instrumentation", b => { - b.HasOne("Yavsc.Models.Musical.Instrument") + b.HasOne("Yavsc.Models.Musical.Instrument", "Tool") .WithMany() - .HasForeignKey("InstrumentId"); + .HasForeignKey("InstrumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.HasOne("Yavsc.Models.Workflow.PerformerProfile") + b.HasOne("Yavsc.Models.Workflow.PerformerProfile", "User") .WithMany() - .HasForeignKey("UserId"); + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Tool"); + + b.Navigation("User"); }); modelBuilder.Entity("Yavsc.Models.Payment.PayPalPayment", b => { - b.HasOne("Yavsc.Models.ApplicationUser") + b.HasOne("Yavsc.Models.ApplicationUser", "Executor") .WithMany() - .HasForeignKey("ExecutorId"); + .HasForeignKey("ExecutorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Executor"); }); modelBuilder.Entity("Yavsc.Models.Relationship.Circle", b => { - b.HasOne("Yavsc.Models.ApplicationUser") - .WithMany() + b.HasOne("Yavsc.Models.ApplicationUser", null) + .WithMany("Circles") .HasForeignKey("ApplicationUserId"); }); modelBuilder.Entity("Yavsc.Models.Relationship.CircleMember", b => { - b.HasOne("Yavsc.Models.Relationship.Circle") - .WithMany() - .HasForeignKey("CircleId"); + b.HasOne("Yavsc.Models.Relationship.Circle", "Circle") + .WithMany("Members") + .HasForeignKey("CircleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.HasOne("Yavsc.Models.ApplicationUser") - .WithMany() - .HasForeignKey("MemberId"); + b.HasOne("Yavsc.Models.ApplicationUser", "Member") + .WithMany("Membership") + .HasForeignKey("MemberId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Circle"); + + b.Navigation("Member"); }); modelBuilder.Entity("Yavsc.Models.Relationship.Contact", b => { - b.HasOne("Yavsc.Models.Relationship.PostalAddress") + b.HasOne("Yavsc.Models.Relationship.PostalAddress", "PostalAddress") .WithMany() - .HasForeignKey("AddressId"); + .HasForeignKey("AddressId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.HasOne("Yavsc.Models.ApplicationUser") - .WithMany() + b.HasOne("Yavsc.Models.ApplicationUser", null) + .WithMany("Book") .HasForeignKey("ApplicationUserId"); + + b.Navigation("PostalAddress"); }); modelBuilder.Entity("Yavsc.Models.Relationship.HyperLink", b => { - b.HasOne("Yavsc.Models.Haircut.BrusherProfile") - .WithMany() + b.HasOne("Yavsc.Models.Haircut.BrusherProfile", null) + .WithMany("Links") .HasForeignKey("BrusherProfileUserId"); - b.HasOne("Yavsc.Models.Payment.PayPalPayment") - .WithMany() + b.HasOne("Yavsc.Models.Payment.PayPalPayment", null) + .WithMany("Links") .HasForeignKey("PayPalPaymentCreationToken"); }); modelBuilder.Entity("Yavsc.Models.Streaming.LiveFlow", b => { - b.HasOne("Yavsc.Models.ApplicationUser") + b.HasOne("Yavsc.Models.ApplicationUser", "Owner") .WithMany() - .HasForeignKey("OwnerId"); + .HasForeignKey("OwnerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Owner"); }); modelBuilder.Entity("Yavsc.Models.Workflow.Activity", b => { - b.HasOne("Yavsc.Models.Workflow.Activity") - .WithMany() - .HasForeignKey("ParentCode"); - }); + b.HasOne("Yavsc.Models.Workflow.Activity", "Parent") + .WithMany("Children") + .HasForeignKey("ParentCode") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - modelBuilder.Entity("Yavsc.Models.Workflow.CommandForm", b => - { - b.HasOne("Yavsc.Models.Workflow.Activity") - .WithMany() - .HasForeignKey("ActivityCode"); + b.Navigation("Parent"); }); modelBuilder.Entity("Yavsc.Models.Workflow.CoWorking", b => { - b.HasOne("Yavsc.Models.Workflow.Profiles.FormationSettings") - .WithMany() + b.HasOne("Yavsc.Models.Workflow.Profiles.FormationSettings", null) + .WithMany("CoWorking") .HasForeignKey("FormationSettingsUserId"); - b.HasOne("Yavsc.Models.Workflow.PerformerProfile") + b.HasOne("Yavsc.Models.Workflow.PerformerProfile", "Performer") .WithMany() - .HasForeignKey("PerformerId"); + .HasForeignKey("PerformerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.HasOne("Yavsc.Models.ApplicationUser") + b.HasOne("Yavsc.Models.ApplicationUser", "WorkingFor") .WithMany() - .HasForeignKey("WorkingForId"); + .HasForeignKey("WorkingForId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Performer"); + + b.Navigation("WorkingFor"); + }); + + modelBuilder.Entity("Yavsc.Models.Workflow.CommandForm", b => + { + b.HasOne("Yavsc.Models.Workflow.Activity", "Context") + .WithMany("Forms") + .HasForeignKey("ActivityCode") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Context"); }); modelBuilder.Entity("Yavsc.Models.Workflow.PerformerProfile", b => { - b.HasOne("Yavsc.Models.Relationship.Location") + b.HasOne("Yavsc.Models.Relationship.Location", "OrganizationAddress") .WithMany() - .HasForeignKey("OrganizationAddressId"); + .HasForeignKey("OrganizationAddressId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.HasOne("Yavsc.Models.ApplicationUser") + b.HasOne("Yavsc.Models.ApplicationUser", "Performer") .WithMany() - .HasForeignKey("PerformerId"); + .HasForeignKey("PerformerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("OrganizationAddress"); + + b.Navigation("Performer"); }); modelBuilder.Entity("Yavsc.Models.Workflow.RdvQuery", b => { - b.HasOne("Yavsc.Models.Workflow.Activity") + b.HasOne("Yavsc.Models.Workflow.Activity", "Context") .WithMany() - .HasForeignKey("ActivityCode"); + .HasForeignKey("ActivityCode") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.HasOne("Yavsc.Models.ApplicationUser") + b.HasOne("Yavsc.Models.ApplicationUser", "Client") .WithMany() - .HasForeignKey("ClientId"); + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.HasOne("Yavsc.Models.Relationship.Location") + b.HasOne("Yavsc.Models.Relationship.Location", "Location") .WithMany() - .HasForeignKey("LocationId"); + .HasForeignKey("LocationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.HasOne("Yavsc.Models.Payment.PayPalPayment") + b.HasOne("Yavsc.Models.Payment.PayPalPayment", "Regularisation") .WithMany() - .HasForeignKey("PaymentId"); + .HasForeignKey("PaymentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.HasOne("Yavsc.Models.Workflow.PerformerProfile") + b.HasOne("Yavsc.Models.Workflow.PerformerProfile", "PerformerProfile") .WithMany() - .HasForeignKey("PerformerId"); + .HasForeignKey("PerformerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Client"); + + b.Navigation("Context"); + + b.Navigation("Location"); + + b.Navigation("PerformerProfile"); + + b.Navigation("Regularisation"); }); modelBuilder.Entity("Yavsc.Models.Workflow.UserActivity", b => { - b.HasOne("Yavsc.Models.Workflow.Activity") + b.HasOne("Yavsc.Models.Workflow.Activity", "Does") .WithMany() - .HasForeignKey("DoesCode"); + .HasForeignKey("DoesCode") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.HasOne("Yavsc.Models.Workflow.PerformerProfile") - .WithMany() - .HasForeignKey("UserId"); + b.HasOne("Yavsc.Models.Workflow.PerformerProfile", "User") + .WithMany("Activity") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Does"); + + b.Navigation("User"); }); modelBuilder.Entity("Yavsc.Server.Models.Blog.BlogTrad", b => { - b.HasOne("Yavsc.Models.ApplicationUser") + b.HasOne("Yavsc.Models.ApplicationUser", "Traducer") .WithMany() - .HasForeignKey("TraducerId"); + .HasForeignKey("TraducerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Traducer"); }); modelBuilder.Entity("Yavsc.Server.Models.IT.Project", b => { - b.HasOne("Yavsc.Models.Workflow.Activity") + b.HasOne("Yavsc.Models.Workflow.Activity", "Context") .WithMany() - .HasForeignKey("ActivityCode"); + .HasForeignKey("ActivityCode") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.HasOne("Yavsc.Models.ApplicationUser") + b.HasOne("Yavsc.Models.ApplicationUser", "Client") .WithMany() - .HasForeignKey("ClientId"); + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.HasOne("Yavsc.Server.Models.IT.SourceCode.GitRepositoryReference") + b.HasOne("Yavsc.Server.Models.IT.SourceCode.GitRepositoryReference", "Repository") .WithMany() - .HasForeignKey("GitId"); + .HasForeignKey("GitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.HasOne("Yavsc.Models.Payment.PayPalPayment") + b.HasOne("Yavsc.Models.Payment.PayPalPayment", "Regularisation") .WithMany() - .HasForeignKey("PaymentId"); + .HasForeignKey("PaymentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.HasOne("Yavsc.Models.Workflow.PerformerProfile") + b.HasOne("Yavsc.Models.Workflow.PerformerProfile", "PerformerProfile") .WithMany() - .HasForeignKey("PerformerId"); + .HasForeignKey("PerformerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Client"); + + b.Navigation("Context"); + + b.Navigation("PerformerProfile"); + + b.Navigation("Regularisation"); + + b.Navigation("Repository"); }); modelBuilder.Entity("Yavsc.Server.Models.IT.ProjectBuildConfiguration", b => { - b.HasOne("Yavsc.Server.Models.IT.Project") - .WithMany() - .HasForeignKey("ProjectId"); + b.HasOne("Yavsc.Server.Models.IT.Project", "TargetProject") + .WithMany("Configurations") + .HasForeignKey("ProjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TargetProject"); }); modelBuilder.Entity("Yavsc.Server.Models.IT.SourceCode.GitRepositoryReference", b => { - b.HasOne("Yavsc.Models.ApplicationUser") + b.HasOne("Yavsc.Models.ApplicationUser", "Owner") .WithMany() - .HasForeignKey("OwnerId"); + .HasForeignKey("OwnerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Owner"); + }); + + modelBuilder.Entity("Yavsc.Models.ApplicationUser", b => + { + b.Navigation("AccountBalance") + .IsRequired(); + + b.Navigation("BlackList"); + + b.Navigation("Book"); + + b.Navigation("Circles"); + + b.Navigation("Connections"); + + b.Navigation("DeviceDeclaration"); + + b.Navigation("Membership"); + + b.Navigation("Posts"); + + b.Navigation("RoomAccess"); + + b.Navigation("Rooms"); + }); + + modelBuilder.Entity("Yavsc.Models.Billing.Estimate", b => + { + b.Navigation("Bill"); + }); + + modelBuilder.Entity("Yavsc.Models.Billing.EstimateTemplate", b => + { + b.Navigation("Bill"); + }); + + modelBuilder.Entity("Yavsc.Models.Blog.BlogPost", b => + { + b.Navigation("ACL"); + + b.Navigation("Comments"); + + b.Navigation("Tags"); + }); + + modelBuilder.Entity("Yavsc.Models.Blog.Comment", b => + { + b.Navigation("Children"); + }); + + modelBuilder.Entity("Yavsc.Models.Calendar.Schedule", b => + { + b.Navigation("Events"); + }); + + modelBuilder.Entity("Yavsc.Models.Chat.ChatRoom", b => + { + b.Navigation("Moderation"); + }); + + modelBuilder.Entity("Yavsc.Models.Haircut.BrusherProfile", b => + { + b.Navigation("Links"); + }); + + modelBuilder.Entity("Yavsc.Models.Haircut.HairMultiCutQuery", b => + { + b.Navigation("Prestations"); + }); + + modelBuilder.Entity("Yavsc.Models.Haircut.HairPrestation", b => + { + b.Navigation("Taints"); + }); + + modelBuilder.Entity("Yavsc.Models.Musical.Profiles.DjSettings", b => + { + b.Navigation("SoundColor"); + }); + + modelBuilder.Entity("Yavsc.Models.Musical.Profiles.GeneralSettings", b => + { + b.Navigation("SoundColor"); + }); + + modelBuilder.Entity("Yavsc.Models.Payment.PayPalPayment", b => + { + b.Navigation("Links"); + }); + + modelBuilder.Entity("Yavsc.Models.Relationship.Circle", b => + { + b.Navigation("Members"); + }); + + modelBuilder.Entity("Yavsc.Models.Workflow.Activity", b => + { + b.Navigation("Children"); + + b.Navigation("Forms"); + + b.Navigation("Services"); + }); + + modelBuilder.Entity("Yavsc.Models.Workflow.PerformerProfile", b => + { + b.Navigation("Activity"); + }); + + modelBuilder.Entity("Yavsc.Models.Workflow.Profiles.FormationSettings", b => + { + b.Navigation("CoWorking"); + }); + + modelBuilder.Entity("Yavsc.Server.Models.IT.Project", b => + { + b.Navigation("Configurations"); }); +#pragma warning restore 612, 618 } } } diff --git a/src/Yavsc/Models/ApplicationDbContext.cs b/src/Yavsc/Models/ApplicationDbContext.cs index 66a48015..5f960398 100644 --- a/src/Yavsc/Models/ApplicationDbContext.cs +++ b/src/Yavsc/Models/ApplicationDbContext.cs @@ -75,6 +75,8 @@ namespace Yavsc.Models if (et.ClrType.GetInterface("IBaseTrackedEntity") != null) et.FindProperty("DateCreated").SetAfterSaveBehavior(Microsoft.EntityFrameworkCore.Metadata.PropertySaveBehavior.Ignore); } + + builder.Entity().Property(a=>a.ParentCode).IsRequired(false); } // this is not a failback procedure. diff --git a/src/Yavsc/Program.cs b/src/Yavsc/Program.cs index 9dbd245a..d965db30 100644 --- a/src/Yavsc/Program.cs +++ b/src/Yavsc/Program.cs @@ -3,7 +3,7 @@ using Microsoft.AspNetCore; namespace Yavsc { - public class Program + public class Program { public static void Main(string[] args) { diff --git a/src/Yavsc/Startup/Startup.cs b/src/Yavsc/Startup/Startup.cs index 32f04b53..c8b59414 100755 --- a/src/Yavsc/Startup/Startup.cs +++ b/src/Yavsc/Startup/Startup.cs @@ -8,20 +8,18 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Razor; using Microsoft.Net.Http.Headers; using Newtonsoft.Json; -using System.Net; using Google.Apis.Util.Store; -using Microsoft.AspNetCore.Identity; using Microsoft.Extensions.Localization; using Yavsc.Helpers; -using static System.Environment; +using Microsoft.AspNetCore.Mvc.Authorization; +using Microsoft.EntityFrameworkCore; +using Microsoft.Extensions.Options; +using Yavsc.Models; +using Yavsc.Services; +using Microsoft.IdentityModel.Tokens; namespace Yavsc { - using Microsoft.AspNetCore.Mvc.Authorization; - using Microsoft.EntityFrameworkCore; - using Microsoft.Extensions.Options; - using Models; - using Services; public partial class Startup { @@ -50,15 +48,16 @@ namespace Yavsc HostingFullName = $"{env.EnvironmentName} [{prodtag}/{devtag}/{stagetag}]"; // Set up configuration sources. var builder = new ConfigurationBuilder() + .AddEnvironmentVariables() .AddJsonFile("appsettings.json") .AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true); - builder.AddEnvironmentVariables(); Configuration = builder.Build(); var auth = Configuration["Site:Authority"]; var cxstr = Configuration["ConnectionStrings:Default"]; + ConnectionString = cxstr; AppDomain.CurrentDomain.SetData(Constants.YavscConnectionStringEnvName, ConnectionString); @@ -185,6 +184,15 @@ namespace Yavsc options.AddPolicy("Authenticated", policy => policy.RequireAuthenticatedUser()); }); + services.AddAuthentication("Bearer").AddJwtBearer("Bearer", options => + { + options.Authority = siteSettings.GetValue("ExternalUrl"); + options.TokenValidationParameters = new TokenValidationParameters + { + ValidateAudience = false + }; + }); + /* FIXME services.AddSingleton(); services.AddSingleton(); services.AddSingleton(); @@ -201,13 +209,14 @@ namespace Yavsc services.AddMvc(config => { - var policy = new AuthorizationPolicyBuilder() + /* var policy = new AuthorizationPolicyBuilder() .RequireAuthenticatedUser() .Build(); - config.Filters.Add(new AuthorizeFilter(policy)); + config.Filters.Add(new AuthorizeFilter(policy)); */ config.Filters.Add(new ProducesAttribute("application/json")); // config.ModelBinders.Insert(0,new MyDateTimeModelBinder()); // config.ModelBinders.Insert(0,new MyDecimalModelBinder()); + config.EnableEndpointRouting = false; }).AddFormatterMappings( config => config.SetMediaTypeMappingForFormat("text/pdf", new MediaTypeHeaderValue("text/pdf")) @@ -298,7 +307,7 @@ namespace Yavsc using (var serviceScope = app.ApplicationServices.GetRequiredService() .CreateScope()) { - serviceScope.ServiceProvider.GetService() + serviceScope.ServiceProvider.GetRequiredService() .Database.Migrate(); } } @@ -328,14 +337,13 @@ namespace Yavsc ConfigureWebSocketsApp(app); - _logger.LogInformation("LocalApplicationData: " + Environment.GetFolderPath(SpecialFolder.LocalApplicationData, SpecialFolderOption.DoNotVerify)); + _logger.LogInformation("LocalApplicationData: " + Environment.GetFolderPath( +Environment.SpecialFolder.LocalApplicationData, Environment.SpecialFolderOption.DoNotVerify)); CheckApp(env, loggerFactory); - app.UseEndpoints(endpoints => - { - endpoints.MapHub("/chat"); - }); - + + app.UseStatusCodePages().UseStaticFiles().UseAuthentication(); + app.UseMvcWithDefaultRoute(); } } diff --git a/src/Yavsc/Views/Home.new/About.cshtml b/src/Yavsc/Views/Home.new/About.cshtml new file mode 100755 index 00000000..75eb6758 --- /dev/null +++ b/src/Yavsc/Views/Home.new/About.cshtml @@ -0,0 +1,159 @@ +@{ + ViewData["Title"] = "About "; +} +

@ViewData["Title"]

+ +**Version de Development** + + +## L'objectif + +Cette application est construite pour mettre en relation des artistes +du domaine musical avec leur public. + +## Le fonctionnement + +Les utilisateurs du site sont soit artiste, soit client, soit administrateur. ils ont tous droit à leur blog. +Pour les artistes, c'est un moyen de promouvoir leur activité. +Ils peuvent y publier des articles, truffés de vidéos et photos. +Pour les clients, c'est un moyen de casser la glace avec leurs idoles, +par la description détaillées de leur centres d'intérêts. + +L'application propulse aussi une messagerie instantanée, disponible depuis +un navigateur Web ou depuis l'appplication mobile, +pouvant garantir la preservation du secret sur toute information personnelle, +du client comme du prestataire. + +Puis viennent (ou pas) une prise commande, un payement du client, +la prestation, une collecte du retour du client, et un paiement du prestataire de services. + +Ni le client ni le prestataire ne sont anonymes pour l'applications, +il sont même formellement authentifies par l'acquitement d'une première +facturation en ligne, ou à l'occasion de la saisie de leur profil proféssionnel. + +Durant la phase de construction d'un contrat de prestation, +le client et l'artiste peuvent profiter d'un canal de communication privé et anonyme, +qui est fermé à la validation définitive du dit contrat. + +Valider un contrat, c'est: + +* Choisir le type de contrat +* Se mettre d'accord sur les paramètres du contrat +* Le faire signer des deux parties +* Mettre en œuvre d'éventuels paiement d'arrhes + +Une fois validé, le contrat est publié à destination des deux parties. la facture est publiée à destination du client, +qui peut l'honorer auprès du système, auquel cas ce client est marqué solvable, et le contrat est marqué approvisionné. + +En cas de défaut d'approvisionnement, le système prendra soin de marquer le contrat comme provisoire, et de prévenir l'artiste +d'effectuer toute prestation en relation tant le paiement associé laisse à douter. + +Une fois sa prestation associée exécutée, les paiements relatifs sont effectués auprès de l'artiste. + +Pour un contrat exécuté et non honoré par le client, le processus de poursuite en recouvrement est engagé, sinon, le contrat est archivé, +des attestations de paiement sont disponibles pour l'artiste et la facture est marquée payée, puis repostée au client. + +### Pour l'artiste + +L'artiste choisit plusieurs paramètres qui vont faire son profil : + +* Le type d'activités qu'il veut promouvoir, le type de prestations qu'il fournit (est-ce un DJ, + un chanteur solo, un musicien solo, un ensemble musical classique, un groupe) +* La tarification de sa mise en contact avec un nouveau client + (combien je reçois par demande client traitée sans lourdeur de plus d'une journée) +* Le lieu où il exerce et, le cas échéant, sur combien de distance il pourrait se déplacer. +* un agenda Google optionnel, à consulter pour établir sa disponibilité +* Des paramètres supplémentaires en fonctions de son type d'activité par exemple, pour + les ensembles, leur taille, le cas échéant, leur répertoire ou des indications sur le style de leur musique) + +### Pour le client + +Il choisit un lieu et une date pour déclarer un événement avenir +(il peut bien-sûr en programmer autant qu'il le veut). + +Il peut, parcourir les publications des artistes, et entamer, +sur la base d'un de ses projets événementiel, la négociation d'un contrat de prestation. + +Il a accès à la connaissance des journées connues comme libres des artistes par le système. + +## La confidentialité + +À aucun moment, aucune adresse postale, aucune adresse e-mail ni aucun numéro de téléphone +ne sont transmis ni aux clients, ni aux artistes. Seul le système a accès à ces informations. + +De plus, le droit de retrait est permanent et sa mise en oeuvre immédiate. +Les artistes comme les clients peuvent demander leur désinscription, +qui désactive immédiatement les publications associées à leurs informations, +et programme la suppression complète de ces dites informations dans les quinze jours +à compter de la demande, sauf demande contradictoire. +L'opération est annulable, jusqu'à deux semaines après sa programmation. + + + + + + +C'est mon site pérso, une configuration de _Yavsc_ (encore une autre très petite entreprise). + +* [README](https://github.com/pazof/yavsc/blob/vnext/README.md) +* [license: GNU GPL v3](https://github.com/pazof/yavsc/blob/vnext/LICENSE) + + + + + + + Yet Another Very Small Company ... + +* [README](https://github.com/pazof/yavsc/blob/vnext/README.md) +* [license: GNU FPL v3](https://github.com/pazof/yavsc/blob/vnext/LICENSE) + + + + + + +## Yet Another Very Small Company : +* [README](https://github.com/pazof/yavsc/blob/vnext/README.md) +* [license: GNU FPL v3](https://github.com/pazof/yavsc/blob/vnext/LICENSE) + +En production: + +* [Lua](http://pschneider.fr:85) +* [Yavsc](http://pschneider.fr:84) + + + + + + + +Vous êtes sur le site de commande en coiffure à domicile de Soraya Boudjouraf, +un as de la coiffure, qui oeuvre en région parisienne. + +En validant un formulaire de commande ici, c'est à elle que vous notifiez votre demande. + +Vous pouvez ![lui laisser votre numéro de téléphone](/HairCutCommand/HairCut?activityCode=Brush&performerId=1bd841ab-c305-4971-940d-7ddca818310c) + et/ou des détails sur votre demande, +elle vous rappelera. + + + + +## Ceci est un site de développement. + +Cette présente ressource ne concerne que le développement du logiciel qui la met en oeuvre. +Elle est éphémère, et pratiquement en permanence force de codes 500. + +Veuillez excuser l'équipe de développement pour vous avoir fait part de cette adresse et pour la gêne occasionnnée. + +La "pré-production" affiche les sites suivants: + +* [Lua](https://pschneider.fr:85) +* [Yavsc](https://pschneider.fr:84) + + + +

+@Model +

diff --git a/src/Yavsc/Views/Home.new/About.pt.cshtml b/src/Yavsc/Views/Home.new/About.pt.cshtml new file mode 100755 index 00000000..1450ef00 --- /dev/null +++ b/src/Yavsc/Views/Home.new/About.pt.cshtml @@ -0,0 +1,163 @@ +@{ + ViewData["Title"] = "About"; +} +

@ViewData["Title"]

+ + + +## O objetivo + +Esta aplicação é construída para conectar artistas +do campo musical com seu público. + +## Operation + +Os usuários do site são artista, cliente ou administrador. Todos eles têm direito ao seu blog. +Para artistas, é uma maneira de promover seus negócios. +Eles podem publicar artigos, cheios de vídeos e fotos. +Para os clientes, é uma maneira de quebrar o gelo com seus ídolos, +pela descrição detalhada de seus centros de interesse. + +O aplicativo também alimenta um mensageiro instantâneo, disponível desde +um navegador da web ou de um aplicativo para dispositivos móveis +pode garantir a preservação do sigilo sobre qualquer informação pessoal, +cliente e provedor. + +Então venha (ou não) um pedido, um pagamento do cliente, +a entrega, uma coleta do retorno do cliente e um pagamento do provedor de serviços. + +Nem o cliente nem o provedor são anônimos para os aplicativos, +eles são até formalmente autenticados pela aquisição de um primeiro +faturamento on-line ou ao entrar em seu perfil profissional. + +Durante a fase de construção de um contrato de serviço, +o cliente e o artista podem se beneficiar de um canal de comunicação privado e anônimo, +que está fechado para a validação final do referido contrato. + +Valide um contrato é: + +* Escolha o tipo de contrato +* Concordo com os parâmetros do contrato +* Faça ambas as partes assinarem +* Implementar qualquer adiantamento + +Uma vez validado, o contrato é publicado para ambas as partes. a fatura é publicada para o cliente, +quem pode homenageá-lo ao sistema, caso em que esse cliente recebe uma pontuação de solvente e o contrato é marcado como provisionado. + +Em caso de falta de fornecimento, o sistema terá o cuidado de marcar o contrato como provisório, e avisar o artista +para executar qualquer serviço relacionado, pois o pagamento associado deixa dúvidas. + +Depois que o serviço associado tiver sido executado, os pagamentos relativos serão feitos ao artista. + +Para um contrato executado e não honrado pelo cliente, o processo de processo de recuperação é contratado, caso contrário, o contrato é arquivado, +Os certificados de pagamento estão disponíveis para o artista e a fatura é marcada como paga e depois repassada ao cliente. + +### Para o artista + +O artista escolhe vários parâmetros que farão o seu perfil: + +* O tipo de atividades que ele quer promover, o tipo de serviços que ele oferece (é um DJ, + um cantor solo, um músico solo, um conjunto musical clássico, uma banda) +* O preço de seu contato com um novo cliente + (quanto recebo por solicitação de cliente processada sem peso de mais de um dia) +* O lugar onde ele pratica e, se sim, até onde ele pode se mover. +* um calendário opcional do Google, para consultar para estabelecer sua disponibilidade +* Parâmetros adicionais dependendo do tipo de atividade, por exemplo, para + conjuntos, seu tamanho, se houver, seu repertório ou indicações do estilo de sua música) + +### Para o cliente + +Ele escolhe um lugar e uma data para declarar um evento futuro +(Ele pode programar o quanto quiser). + +Ele pode, navegar pelas publicações dos artistas e começar, +com base em um de seus projetos de eventos, a negociação de um contrato de serviço. + +Ele tem acesso ao conhecimento de dias conhecidos como artistas livres pelo sistema. + +## Confidencialidade + +Em nenhum momento, nenhum endereço de correspondência, nenhum endereço de e-mail e nenhum número de telefone +não são transmitidos para clientes ou artistas. Apenas o sistema tem acesso a essas informações. + +Além disso, o direito de retirada é permanente e sua implementação imediata. +Artistas e clientes podem solicitar sua desinscrição, +que imediatamente desativa as publicações associadas às suas informações, +e planeia a eliminação completa desta informação no prazo de quinze dias +do aplicativo, a menos que seja um pedido contraditório. +A operação é anulável até duas semanas após a sua programação. + + + + +Este é o meu site perso, uma configuração de _Yavsc_ (outro negócio muito pequeno). + +* [README](https://github.com/pazof/yavsc/blob/vnext/README.md) +* [licença: GNU GPL v3](https://github.com/pazof/yavsc/blob/vnext/LICENSE) + +Outras instalações: + + +* [Coiffure](http://coiffure.pschneider.fr) +* [ZicMoove](http://linkmuse.pschneider.fr) +* [Yavsc](http://yavsc.pschneider.fr) + + + + + + Yet Another Very Small Company ... + +* [README](https://github.com/pazof/yavsc/blob/vnext/README.md) +* [license: GNU FPL v3](https://github.com/pazof/yavsc/blob/vnext/LICENSE) + + + + + + +## Yet Another Very Small Company : +* [README](https://github.com/pazof/yavsc/blob/vnext/README.md) +* [license: GNU FPL v3](https://github.com/pazof/yavsc/blob/vnext/LICENSE) + +En production: + +* [Lua](http://pschneider.fr:85) +* [Yavsc](http://pschneider.fr:84) + + + + + + + +Você está no site da ordem em cabeleireiro em casa de Soraya Boudjouraf, +um ás de cabeleireiro, que trabalha na região de Paris. + +Ao validar um formulário de pedido aqui, é para ela que você notifica sua solicitação. + +Você pode [Deixe-lhe o seu número de telefone] (/ HairCutCommand / HairCut? ActivityCode = Brush & performerId = 1bd841ab-c305-4971-940d-7ddca818310c) + e / ou detalhes sobre o seu pedido, +ela vai ligar de volta. + + + + +## Este é um site de desenvolvimento. + +Este recurso só diz respeito ao desenvolvimento do software que o implementa. +É efêmero e praticamente constantemente força 500 códigos. + +Por favor, desculpe a equipe de desenvolvimento para informá-lo sobre este endereço e pelo inconveniente. + +A "pré-produção" exibe os seguintes sites: + +* [Yavsc](https://yavsc.pschneider.fr) +* [Lua](https://lua.pschneider.fr) + + + + +

+@Model +

diff --git a/src/Yavsc/Views/Home.new/AboutAccess.cshtml b/src/Yavsc/Views/Home.new/AboutAccess.cshtml new file mode 100644 index 00000000..5a41cb74 --- /dev/null +++ b/src/Yavsc/Views/Home.new/AboutAccess.cshtml @@ -0,0 +1,38 @@ +@{ + ViewData["Title"] = "À propos des restrictions d'accès"; +} +

@ViewData["Title"]

+ + + +# Blog et fichiers utilisateurs + +Par défaut, un envoi à destination du serveur est privé, visible seulement pour son possesseur (et l'administration). + +L'utilisateur peu publier chacun de ces derniers à l'adresse : + +* de tout le monde, +* ou d'une liste de cercles d'utilisateurs, +* ou de personne + +Quand il s'agit d'un fichier, son adresse permanente relative à la racine du serveur web est: `/UserFiles/(Nom Utilisateur)/(cheminVersLeFichier)` + +Les restrictions d'accès à ce fichier sont celles associées à tous les fichiers du même dossier. +Il n'y a pas de regle assiciée à chaque fichier individuellement, +elles appartiennent au dossier qui les contient. + +Les billet de blog sont regroupés par utilisateur, à l'Url + + /Blog/(Nom d'Utilisateur) + +Ils sont aussi regroupés par titre : + + /Title/(Titre de post) + +Et ils possèdent une addresse permanente de la forme : + + /Blogspot/Details/(Id Numerique De Post) + + + + diff --git a/src/Yavsc/Views/Home.new/AboutMarkdown.cshtml b/src/Yavsc/Views/Home.new/AboutMarkdown.cshtml new file mode 100644 index 00000000..87a9f939 --- /dev/null +++ b/src/Yavsc/Views/Home.new/AboutMarkdown.cshtml @@ -0,0 +1,19 @@ +@{ + ViewData["Title"] = "À propos de Markdown"; +} +

@ViewData["Title"]

+ + +Quelques extensions à un Markdown de base : + +* les video et audio: `![video: Ep. 28 - La France en commun - Une invitation à écrire un nouveau projet d'émancipation humaine](/images/testVideo.mp4)` + +![video: Ep. 28 - La France en commun - Une invitation à écrire un nouveau projet d'émancipation humaine](/images/testVideo.mp4) + +à faire: + +* le tag "Numéro de ticket": "Ticket#6854" +* le tag "Titre d'article": "#1_great_title" +* le tag "User" = "@@(John Doe)" ou "@@jdoe" + + diff --git a/src/Yavsc/Views/Home.new/Audio.cshtml b/src/Yavsc/Views/Home.new/Audio.cshtml new file mode 100644 index 00000000..bb205fe6 --- /dev/null +++ b/src/Yavsc/Views/Home.new/Audio.cshtml @@ -0,0 +1,9 @@ +@{ + ViewData["Title"] = "Page d'accueil"; +} +@section scripts { + + + +} diff --git a/src/Yavsc/Views/Home.new/Basket.cshtml b/src/Yavsc/Views/Home.new/Basket.cshtml new file mode 100644 index 00000000..d9882ae3 --- /dev/null +++ b/src/Yavsc/Views/Home.new/Basket.cshtml @@ -0,0 +1,10 @@ +@Model BasketView + + + + diff --git a/src/Yavsc/Views/Home.new/CGV.cshtml b/src/Yavsc/Views/Home.new/CGV.cshtml new file mode 100644 index 00000000..6ac548d7 --- /dev/null +++ b/src/Yavsc/Views/Home.new/CGV.cshtml @@ -0,0 +1,13 @@ +@{ + ViewData["Title"] = "Conditions Générales de Vente"; +} +

@ViewData["Title"]

+ + +Le paiement intervient à la commande, quelque soit la date d'intervention. +Vous pouvez annuler votre commande depuis la [liste de vos commande en cours](/HairCutCommand/), + +Vous pouvez demander le remboursement d'un paiement, dans le cadre d'une réclamation sur l'execution +de votre commande, en nous contactant via courrier éléctronique ou postal, [que vour retrouverez sur la page de contact](/Home/Contact), votre demande sera rapidement traitée. + + \ No newline at end of file diff --git a/src/Yavsc/Views/Home.new/Chat.cshtml b/src/Yavsc/Views/Home.new/Chat.cshtml new file mode 100644 index 00000000..3a91f63b --- /dev/null +++ b/src/Yavsc/Views/Home.new/Chat.cshtml @@ -0,0 +1,22 @@ +@{ ViewBag.Title = "Chat"; } +

@ViewBag.Title

+ + + +
+ +@section scripts { + + + + +@if (!ViewBag.IsAuthenticated) { // Get the user name and store it to prepend to messages. + +} + + +} diff --git a/src/Yavsc/Views/Home.new/Contact.cshtml b/src/Yavsc/Views/Home.new/Contact.cshtml new file mode 100755 index 00000000..a00d092d --- /dev/null +++ b/src/Yavsc/Views/Home.new/Contact.cshtml @@ -0,0 +1,17 @@ +@{ + ViewData["Title"] = "Contact"; +} +

@ViewData["Title"].

+

@ViewData["Message"]

+ +
+ Paul Schneider
+ 2 Boulevard Aristide Briand - + 92150 Suresnes (France) + P: +33 6 51 14 15 64 +
+ +
+ Support: contact@pschneider.fr
+ Marketing: paul@pschneider.fr +
diff --git a/src/Yavsc/Views/Home.new/Dash.cshtml b/src/Yavsc/Views/Home.new/Dash.cshtml new file mode 100644 index 00000000..1ff38ac2 --- /dev/null +++ b/src/Yavsc/Views/Home.new/Dash.cshtml @@ -0,0 +1,19 @@ +@{ + ViewData["Title"] = "Dash"; +} + +
+ +
+ +@section scripts { + + +} + diff --git a/src/Yavsc/Views/Home.new/Index.cshtml b/src/Yavsc/Views/Home.new/Index.cshtml new file mode 100644 index 00000000..d2d19bdf --- /dev/null +++ b/src/Yavsc/Views/Home.new/Index.cshtml @@ -0,0 +1,8 @@ +@{ + ViewData["Title"] = "Home Page"; +} + +
+

Welcome

+

Learn about building Web apps with ASP.NET Core.

+
diff --git a/src/Yavsc/Views/Home/Index.cshtml.old b/src/Yavsc/Views/Home.new/Index.cshtml.old similarity index 100% rename from src/Yavsc/Views/Home/Index.cshtml.old rename to src/Yavsc/Views/Home.new/Index.cshtml.old diff --git a/src/Yavsc/Views/Home.new/Privacy.cshtml b/src/Yavsc/Views/Home.new/Privacy.cshtml new file mode 100644 index 00000000..af4fb195 --- /dev/null +++ b/src/Yavsc/Views/Home.new/Privacy.cshtml @@ -0,0 +1,6 @@ +@{ + ViewData["Title"] = "Privacy Policy"; +} +

@ViewData["Title"]

+ +

Use this page to detail your site's privacy policy.

diff --git a/src/Yavsc/Views/Home/Privacy.cshtml.old b/src/Yavsc/Views/Home.new/Privacy.cshtml.old similarity index 100% rename from src/Yavsc/Views/Home/Privacy.cshtml.old rename to src/Yavsc/Views/Home.new/Privacy.cshtml.old diff --git a/src/Yavsc/Views/Home.new/Todo.cshtml b/src/Yavsc/Views/Home.new/Todo.cshtml new file mode 100755 index 00000000..87825377 --- /dev/null +++ b/src/Yavsc/Views/Home.new/Todo.cshtml @@ -0,0 +1,17 @@ +@{ + ViewData["Title"] = "Todo (first)"; +} +

@ViewData["Title"]

+Linkmuse(trox) + + +Les tags. +La librairie, les lives. + +@{ + ViewData["Title"] = "TODO"; +} +

@ViewData["Title"]

+Faster, stronger, shorter + + diff --git a/src/Yavsc/Views/Home.new/VideoChat.cshtml b/src/Yavsc/Views/Home.new/VideoChat.cshtml new file mode 100644 index 00000000..b55e8d2a --- /dev/null +++ b/src/Yavsc/Views/Home.new/VideoChat.cshtml @@ -0,0 +1,76 @@ +@{ ViewBag.Title = "video Chat"; } + + + + + + +@section scripts +{ + + +} diff --git a/src/Yavsc/Views/Home/About.cshtml b/src/Yavsc/Views/Home/About.cshtml index 75eb6758..dc220698 100755 --- a/src/Yavsc/Views/Home/About.cshtml +++ b/src/Yavsc/Views/Home/About.cshtml @@ -1,5 +1,5 @@ @{ - ViewData["Title"] = "About "; + ViewData["Title"] = @SR["About"]+" "+@SiteSettings.Value.Title; }

@ViewData["Title"]

@@ -98,6 +98,10 @@ C'est mon site pérso, une configuration de _Yavsc_ (encore une autre très peti * [README](https://github.com/pazof/yavsc/blob/vnext/README.md) * [license: GNU GPL v3](https://github.com/pazof/yavsc/blob/vnext/LICENSE) +Autres installations: + + +* [Yavsc](http://yavsc.pschneider.fr) @@ -119,8 +123,8 @@ C'est mon site pérso, une configuration de _Yavsc_ (encore une autre très peti En production: -* [Lua](http://pschneider.fr:85) -* [Yavsc](http://pschneider.fr:84) +* [Lua](https://lua.pschneider.fr) +* [Yavsc](https://yavsc.pschneider.fr) @@ -140,7 +144,7 @@ elle vous rappelera. -## Ceci est un site de développement. +## Ceci est un site de développement. Cette présente ressource ne concerne que le développement du logiciel qui la met en oeuvre. Elle est éphémère, et pratiquement en permanence force de codes 500. @@ -149,8 +153,8 @@ Veuillez excuser l'équipe de développement pour vous avoir fait part de cette La "pré-production" affiche les sites suivants: -* [Lua](https://pschneider.fr:85) -* [Yavsc](https://pschneider.fr:84) +* [Yavsc](https://yavsc.pschneider.fr) +* [Lua](https://lua.pschneider.fr) diff --git a/src/Yavsc/Views/Home/About.pt.cshtml b/src/Yavsc/Views/Home/About.pt.cshtml index 1450ef00..26e1495c 100755 --- a/src/Yavsc/Views/Home/About.pt.cshtml +++ b/src/Yavsc/Views/Home/About.pt.cshtml @@ -1,5 +1,5 @@ @{ - ViewData["Title"] = "About"; + ViewData["Title"] = @SR["About"]+" "+@SiteSettings.Value.Title; }

@ViewData["Title"]

@@ -122,8 +122,8 @@ Outras instalações: En production: -* [Lua](http://pschneider.fr:85) -* [Yavsc](http://pschneider.fr:84) +* [Lua](https://lua.pschneider.fr) +* [Yavsc](https://yavsc.pschneider.fr) diff --git a/src/Yavsc/Views/Home/AboutAccess.cshtml b/src/Yavsc/Views/Home/AboutAccess.cshtml index 5a41cb74..663d3cf7 100644 --- a/src/Yavsc/Views/Home/AboutAccess.cshtml +++ b/src/Yavsc/Views/Home/AboutAccess.cshtml @@ -1,5 +1,5 @@ @{ - ViewData["Title"] = "À propos des restrictions d'accès"; + ViewData["Title"] = @SR["À propos des restrictions d'accès"]; }

@ViewData["Title"]

@@ -35,4 +35,4 @@ Et ils possèdent une addresse permanente de la forme : - + \ No newline at end of file diff --git a/src/Yavsc/Views/Home/AboutMarkdown.cshtml b/src/Yavsc/Views/Home/AboutMarkdown.cshtml index 87a9f939..c75ed05c 100644 --- a/src/Yavsc/Views/Home/AboutMarkdown.cshtml +++ b/src/Yavsc/Views/Home/AboutMarkdown.cshtml @@ -1,5 +1,5 @@ @{ - ViewData["Title"] = "À propos de Markdown"; + ViewData["Title"] = @SR["À propos de Markdown"]; }

@ViewData["Title"]

diff --git a/src/Yavsc/Views/Home/Audio.cshtml b/src/Yavsc/Views/Home/Audio.cshtml index bb205fe6..fc55e35a 100644 --- a/src/Yavsc/Views/Home/Audio.cshtml +++ b/src/Yavsc/Views/Home/Audio.cshtml @@ -1,5 +1,5 @@ @{ - ViewData["Title"] = "Page d'accueil"; + ViewData["Title"] = @SR["Page d'accueil"]; } @section scripts { diff --git a/src/Yavsc/Views/Home/Dash.cshtml b/src/Yavsc/Views/Home/Dash.cshtml index 1ff38ac2..e2193ce4 100644 --- a/src/Yavsc/Views/Home/Dash.cshtml +++ b/src/Yavsc/Views/Home/Dash.cshtml @@ -1,5 +1,5 @@ @{ - ViewData["Title"] = "Dash"; + ViewData["Title"] = @SR["Dash"]; }
diff --git a/src/Yavsc/Views/Home/Index.cshtml b/src/Yavsc/Views/Home/Index.cshtml old mode 100644 new mode 100755 index d2d19bdf..ddb63b37 --- a/src/Yavsc/Views/Home/Index.cshtml +++ b/src/Yavsc/Views/Home/Index.cshtml @@ -1,8 +1,103 @@ -@{ - ViewData["Title"] = "Home Page"; +@model IEnumerable + +@{ + ViewData["Title"] = @SR["Page d'accueil"]; + int i=0; + bool multipleact = Model.Count()>1; +} +@section scripts { + } +@section subbanner { + +