instruments & global positioning
This commit is contained in:
@ -8,7 +8,14 @@ namespace Yavsc.Models.Musical
|
||||
{
|
||||
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public long Id {get; set; }
|
||||
public Instrument Instrument { get; set; }
|
||||
|
||||
[Required]
|
||||
public long InstrumentId { get; set; }
|
||||
|
||||
[ForeignKey("InstrumentId")]
|
||||
public virtual Instrument Instrument { get; set; }
|
||||
|
||||
[Range(-100,100)]
|
||||
public int Rate { get; set; }
|
||||
|
||||
public string OwnerId { get; set; }
|
||||
|
@ -9,4 +9,4 @@ namespace Yavsc.Models.Musical.Profiles
|
||||
[InverseProperty("WorkingFor")]
|
||||
public virtual List<CoWorking> CoWorking { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Yavsc.Attributes.Validation;
|
||||
|
||||
namespace Yavsc.Models.Workflow.Profiles
|
||||
{
|
||||
@ -15,5 +16,8 @@ namespace Yavsc.Models.Workflow.Profiles
|
||||
get; set;
|
||||
}
|
||||
|
||||
[YaStringLength(1024)]
|
||||
public string DisplayName { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -163,6 +163,7 @@ namespace Yavsc.Controllers
|
||||
|
||||
if (result.Succeeded)
|
||||
{
|
||||
// FIXME should be done at granting resources
|
||||
await _userManager.AddClaimsAsync(user, user.Membership.Select(
|
||||
m => new Claim(YavscClaimTypes.CircleMembership, m.CircleId.ToString())
|
||||
));
|
||||
|
148
src/Yavsc/Controllers/InstrumentRatingController.cs
Normal file
148
src/Yavsc/Controllers/InstrumentRatingController.cs
Normal file
@ -0,0 +1,148 @@
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Security.Claims;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNet.Mvc;
|
||||
using Microsoft.AspNet.Mvc.Rendering;
|
||||
using Microsoft.Data.Entity;
|
||||
using Yavsc.Models;
|
||||
using Yavsc.Models.Musical;
|
||||
|
||||
namespace Yavsc.Controllers
|
||||
{
|
||||
public class InstrumentRatingController : Controller
|
||||
{
|
||||
private ApplicationDbContext _context;
|
||||
|
||||
public InstrumentRatingController(ApplicationDbContext context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
|
||||
// GET: InstrumentRating
|
||||
public async Task<IActionResult> Index()
|
||||
{
|
||||
var uid = User.GetUserId();
|
||||
var applicationDbContext =
|
||||
_context.InstrumentRating
|
||||
.Include(i => i.Profile)
|
||||
.Include(i => i.Instrument)
|
||||
.Where(i => i.OwnerId == uid);
|
||||
|
||||
return View(await applicationDbContext.ToListAsync());
|
||||
}
|
||||
|
||||
// GET: InstrumentRating/Details/5
|
||||
public async Task<IActionResult> Details(long? id)
|
||||
{
|
||||
if (id == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
var uid = User.GetUserId();
|
||||
|
||||
InstrumentRating instrumentRating = await _context.InstrumentRating
|
||||
.Include(i => i.Instrument).SingleAsync(m => m.Id == id);
|
||||
if (instrumentRating == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
return View(instrumentRating);
|
||||
}
|
||||
|
||||
// GET: InstrumentRating/Create
|
||||
public async Task<IActionResult> Create()
|
||||
{
|
||||
var uid = User.GetUserId();
|
||||
|
||||
var actual = await _context.InstrumentRating
|
||||
.Where(m => m.OwnerId == uid). Select( r => r.InstrumentId ).ToArrayAsync();
|
||||
|
||||
|
||||
ViewBag.YetAvailableInstruments = _context.Instrument.Select(k=>new SelectListItem
|
||||
{ Text = k.Name, Value = k.Id.ToString(), Disabled = actual.Contains(k.Id) });
|
||||
|
||||
if (User.IsInRole("Administrator"))
|
||||
ViewBag.OwnerIds = new SelectList(_context.Performers, "PerformerId", "Profile");
|
||||
return View();
|
||||
}
|
||||
|
||||
// POST: InstrumentRating/Create
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Create(InstrumentRating instrumentRating)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
_context.InstrumentRating.Add(instrumentRating);
|
||||
await _context.SaveChangesAsync();
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
ViewData["OwnerId"] = new SelectList(_context.Performers, "PerformerId", "Profile", instrumentRating.OwnerId);
|
||||
return View(instrumentRating);
|
||||
}
|
||||
|
||||
// GET: InstrumentRating/Edit/5
|
||||
public async Task<IActionResult> Edit(long? id)
|
||||
{
|
||||
if (id == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
InstrumentRating instrumentRating = await _context.InstrumentRating.SingleAsync(m => m.Id == id);
|
||||
if (instrumentRating == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
ViewData["OwnerId"] = new SelectList(_context.Performers, "PerformerId", "Profile", instrumentRating.OwnerId);
|
||||
return View(instrumentRating);
|
||||
}
|
||||
|
||||
// POST: InstrumentRating/Edit/5
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Edit(InstrumentRating instrumentRating)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
_context.Update(instrumentRating);
|
||||
await _context.SaveChangesAsync();
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
ViewData["OwnerId"] = new SelectList(_context.Performers, "PerformerId", "Profile", instrumentRating.OwnerId);
|
||||
return View(instrumentRating);
|
||||
}
|
||||
|
||||
// GET: InstrumentRating/Delete/5
|
||||
[ActionName("Delete")]
|
||||
public async Task<IActionResult> Delete(long? id)
|
||||
{
|
||||
if (id == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
InstrumentRating instrumentRating = await _context.InstrumentRating
|
||||
.Include(i => i.Instrument).SingleAsync(m => m.Id == id);
|
||||
if (instrumentRating == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
return View(instrumentRating);
|
||||
}
|
||||
|
||||
// POST: InstrumentRating/Delete/5
|
||||
[HttpPost, ActionName("Delete")]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> DeleteConfirmed(long id)
|
||||
{
|
||||
InstrumentRating instrumentRating = await _context.InstrumentRating.SingleAsync(m => m.Id == id);
|
||||
_context.InstrumentRating.Remove(instrumentRating);
|
||||
await _context.SaveChangesAsync();
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
}
|
||||
}
|
@ -24,14 +24,11 @@ namespace Yavsc.Helpers
|
||||
.Include(p=>p.Performer.DeviceDeclaration)
|
||||
.Where(p => p.Active && p.Activity.Any(u=>u.DoesCode==actCode)).OrderBy( x => x.Rate )
|
||||
.ToArray();
|
||||
List<PerformerProfileViewModel> result = new List<PerformerProfileViewModel> ();
|
||||
List<PerformerProfileViewModel> result = new List<PerformerProfileViewModel> ();
|
||||
result.AddRange(
|
||||
actors.Select(a=> new PerformerProfileViewModel(a, actCode, settings?.FirstOrDefault(s => s.UserId == a.PerformerId))));
|
||||
|
||||
foreach (var perfer in actors)
|
||||
{
|
||||
var view = new PerformerProfileViewModel(perfer, actCode, settings?.FirstOrDefault(s => s.UserId == perfer.PerformerId));
|
||||
result.Add(view);
|
||||
}
|
||||
return result;
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -10,6 +10,8 @@ BASERESX= Resources/Yavsc.ChatHub.resx\
|
||||
Resources/Yavsc.ViewModels.EnrolerViewModel.resx\
|
||||
Resources/Yavsc.YavscLocalisation.resx
|
||||
BASERESXGEN=$(BASERESX:.resx=.Designer.cs)
|
||||
MCS_OPTIONS=--debug
|
||||
MONO_OPTIONS=--debug
|
||||
|
||||
include $(MAKEFILE_DIR)/versioning.mk
|
||||
include $(MAKEFILE_DIR)/dnx.mk
|
||||
@ -19,7 +21,7 @@ MINJS=wwwroot/js/bootstrap.min.js wwwroot/js/input-lib.min.js w
|
||||
MINCSS=wwwroot/css/coiffure.min.css wwwroot/css/dev.min.css wwwroot/css/freespeech.min.css wwwroot/css/yavsc.min.css wwwroot/css/default.min.css wwwroot/css/font-awesome.min.css wwwroot/css/lua.min.css wwwroot/css/yavscpre.min.css wwwroot/css/clear/site.min.css wwwroot/css/main/bootstrap.min.css wwwroot/css/main/jquery-ui.min.css wwwroot/css/main/site.min.css wwwroot/css/dark/site.min.css wwwroot/css/main/dropzone.min.css wwwroot/css/main/quill.snow.min.css
|
||||
|
||||
web: project.lock.json
|
||||
ASPNET_LOG_LEVEL=$(ASPNET_LOG_LEVEL) ASPNET_ENV=$(ASPNET_ENV) dnx web --configuration=$(CONFIGURATION)
|
||||
MCS_OPTIONS=$(MCS_OPTIONS) MONO_OPTIONS=$(MONO_OPTIONS) ASPNET_LOG_LEVEL=$(ASPNET_LOG_LEVEL) ASPNET_ENV=$(ASPNET_ENV) dnx web --configuration=$(CONFIGURATION)
|
||||
|
||||
showConfig:
|
||||
@echo HOSTING: $(USER)@$(HOSTING)
|
||||
|
2107
src/Yavsc/Migrations/20190819220343_intrumentRatingConstraint.Designer.cs
generated
Normal file
2107
src/Yavsc/Migrations/20190819220343_intrumentRatingConstraint.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
977
src/Yavsc/Migrations/20190819220343_intrumentRatingConstraint.cs
Normal file
977
src/Yavsc/Migrations/20190819220343_intrumentRatingConstraint.cs
Normal file
@ -0,0 +1,977 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
public partial class intrumentRatingConstraint : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId", table: "AspNetRoleClaims");
|
||||
migrationBuilder.DropForeignKey(name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId", table: "AspNetUserClaims");
|
||||
migrationBuilder.DropForeignKey(name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId", table: "AspNetUserLogins");
|
||||
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_IdentityRole_RoleId", table: "AspNetUserRoles");
|
||||
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_ApplicationUser_UserId", table: "AspNetUserRoles");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Ban_ApplicationUser_TargetId", table: "Ban");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BlackListed_ApplicationUser_OwnerId", table: "BlackListed");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BlackListed_ApplicationUser_UserId", table: "BlackListed");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleAuthorizationToBlogPost_BlogPost_BlogPostId", table: "CircleAuthorizationToBlogPost");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleAuthorizationToBlogPost_Circle_CircleId", table: "CircleAuthorizationToBlogPost");
|
||||
migrationBuilder.DropForeignKey(name: "FK_AccountBalance_ApplicationUser_UserId", table: "AccountBalance");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BalanceImpact_AccountBalance_BalanceId", table: "BalanceImpact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CommandLine_Estimate_EstimateId", table: "CommandLine");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Estimate_ApplicationUser_ClientId", table: "Estimate");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BlogTag_BlogPost_PostId", table: "BlogTag");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BlogTag_Tag_TagId", table: "BlogTag");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Comment_ApplicationUser_AuthorId", table: "Comment");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Comment_BlogPost_PostId", table: "Comment");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Schedule_ApplicationUser_OwnerId", table: "Schedule");
|
||||
migrationBuilder.DropForeignKey(name: "FK_ChatConnection_ApplicationUser_ApplicationUserId", table: "ChatConnection");
|
||||
migrationBuilder.DropForeignKey(name: "FK_ChatRoomAccess_ApplicationUser_UserId", table: "ChatRoomAccess");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BrusherProfile_PerformerProfile_UserId", table: "BrusherProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_Activity_ActivityCode", table: "HairCutQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_ApplicationUser_ClientId", table: "HairCutQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_PerformerProfile_PerformerId", table: "HairCutQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_HairPrestation_PrestationId", table: "HairCutQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairMultiCutQuery_Activity_ActivityCode", table: "HairMultiCutQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairMultiCutQuery_ApplicationUser_ClientId", table: "HairMultiCutQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairMultiCutQuery_PerformerProfile_PerformerId", table: "HairMultiCutQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairPrestationCollectionItem_HairPrestation_PrestationId", table: "HairPrestationCollectionItem");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairPrestationCollectionItem_HairMultiCutQuery_QueryId", 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_DimissClicked_Notification_NotificationId", table: "DimissClicked");
|
||||
migrationBuilder.DropForeignKey(name: "FK_DimissClicked_ApplicationUser_UserId", table: "DimissClicked");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Instrumentation_Instrument_InstrumentId", table: "Instrumentation");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PayPalPayment_ApplicationUser_ExecutorId", table: "PayPalPayment");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Contact_PostalAddress_AddressId", table: "Contact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_LiveFlow_ApplicationUser_OwnerId", table: "LiveFlow");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CommandForm_Activity_ActivityCode", table: "CommandForm");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_RdvQuery_Activity_ActivityCode", table: "RdvQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_RdvQuery_ApplicationUser_ClientId", table: "RdvQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_RdvQuery_PerformerProfile_PerformerId", table: "RdvQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_UserActivity_Activity_DoesCode", table: "UserActivity");
|
||||
migrationBuilder.DropForeignKey(name: "FK_UserActivity_PerformerProfile_UserId", table: "UserActivity");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleAuthorizationToFile_Circle_CircleId", table: "CircleAuthorizationToFile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_MailingTemplate_ApplicationUser_ManagerId", table: "MailingTemplate");
|
||||
migrationBuilder.DropForeignKey(name: "FK_MailingTemplate_ApplicationUser_SuccessorId", table: "MailingTemplate");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Project_Activity_ActivityCode", table: "Project");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Project_ApplicationUser_ClientId", table: "Project");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Project_GitRepositoryReference_GitId", table: "Project");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Project_PerformerProfile_PerformerId", table: "Project");
|
||||
migrationBuilder.DropForeignKey(name: "FK_ProjectBuildConfiguration_Project_ProjectId", table: "ProjectBuildConfiguration");
|
||||
migrationBuilder.CreateTable(
|
||||
name: "InstrumentRating",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<long>(nullable: false)
|
||||
.Annotation("Npgsql:Serial", true),
|
||||
InstrumentId = table.Column<long>(nullable: true),
|
||||
OwnerId = table.Column<string>(nullable: true),
|
||||
Rate = table.Column<int>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_InstrumentRating", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_InstrumentRating_Instrument_InstrumentId",
|
||||
column: x => x.InstrumentId,
|
||||
principalTable: "Instrument",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_InstrumentRating_PerformerProfile_OwnerId",
|
||||
column: x => x.OwnerId,
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "DisplayName",
|
||||
table: "FormationSettings",
|
||||
nullable: true);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId",
|
||||
table: "AspNetRoleClaims",
|
||||
column: "RoleId",
|
||||
principalTable: "AspNetRoles",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId",
|
||||
table: "AspNetUserClaims",
|
||||
column: "UserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId",
|
||||
table: "AspNetUserLogins",
|
||||
column: "UserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IdentityUserRole<string>_IdentityRole_RoleId",
|
||||
table: "AspNetUserRoles",
|
||||
column: "RoleId",
|
||||
principalTable: "AspNetRoles",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IdentityUserRole<string>_ApplicationUser_UserId",
|
||||
table: "AspNetUserRoles",
|
||||
column: "UserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Ban_ApplicationUser_TargetId",
|
||||
table: "Ban",
|
||||
column: "TargetId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BlackListed_ApplicationUser_OwnerId",
|
||||
table: "BlackListed",
|
||||
column: "OwnerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BlackListed_ApplicationUser_UserId",
|
||||
table: "BlackListed",
|
||||
column: "UserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CircleAuthorizationToBlogPost_BlogPost_BlogPostId",
|
||||
table: "CircleAuthorizationToBlogPost",
|
||||
column: "BlogPostId",
|
||||
principalTable: "BlogPost",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CircleAuthorizationToBlogPost_Circle_CircleId",
|
||||
table: "CircleAuthorizationToBlogPost",
|
||||
column: "CircleId",
|
||||
principalTable: "Circle",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_AccountBalance_ApplicationUser_UserId",
|
||||
table: "AccountBalance",
|
||||
column: "UserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BalanceImpact_AccountBalance_BalanceId",
|
||||
table: "BalanceImpact",
|
||||
column: "BalanceId",
|
||||
principalTable: "AccountBalance",
|
||||
principalColumn: "UserId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CommandLine_Estimate_EstimateId",
|
||||
table: "CommandLine",
|
||||
column: "EstimateId",
|
||||
principalTable: "Estimate",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Estimate_ApplicationUser_ClientId",
|
||||
table: "Estimate",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BlogTag_BlogPost_PostId",
|
||||
table: "BlogTag",
|
||||
column: "PostId",
|
||||
principalTable: "BlogPost",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BlogTag_Tag_TagId",
|
||||
table: "BlogTag",
|
||||
column: "TagId",
|
||||
principalTable: "Tag",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Comment_ApplicationUser_AuthorId",
|
||||
table: "Comment",
|
||||
column: "AuthorId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Comment_BlogPost_PostId",
|
||||
table: "Comment",
|
||||
column: "PostId",
|
||||
principalTable: "BlogPost",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Schedule_ApplicationUser_OwnerId",
|
||||
table: "Schedule",
|
||||
column: "OwnerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ChatConnection_ApplicationUser_ApplicationUserId",
|
||||
table: "ChatConnection",
|
||||
column: "ApplicationUserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ChatRoomAccess_ApplicationUser_UserId",
|
||||
table: "ChatRoomAccess",
|
||||
column: "UserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BrusherProfile_PerformerProfile_UserId",
|
||||
table: "BrusherProfile",
|
||||
column: "UserId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairCutQuery_Activity_ActivityCode",
|
||||
table: "HairCutQuery",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairCutQuery_ApplicationUser_ClientId",
|
||||
table: "HairCutQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairCutQuery_PerformerProfile_PerformerId",
|
||||
table: "HairCutQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairCutQuery_HairPrestation_PrestationId",
|
||||
table: "HairCutQuery",
|
||||
column: "PrestationId",
|
||||
principalTable: "HairPrestation",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairMultiCutQuery_Activity_ActivityCode",
|
||||
table: "HairMultiCutQuery",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairMultiCutQuery_ApplicationUser_ClientId",
|
||||
table: "HairMultiCutQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairMultiCutQuery_PerformerProfile_PerformerId",
|
||||
table: "HairMultiCutQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
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_HairPrestationCollectionItem_HairMultiCutQuery_QueryId",
|
||||
table: "HairPrestationCollectionItem",
|
||||
column: "QueryId",
|
||||
principalTable: "HairMultiCutQuery",
|
||||
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_DimissClicked_Notification_NotificationId",
|
||||
table: "DimissClicked",
|
||||
column: "NotificationId",
|
||||
principalTable: "Notification",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_DimissClicked_ApplicationUser_UserId",
|
||||
table: "DimissClicked",
|
||||
column: "UserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Instrumentation_Instrument_InstrumentId",
|
||||
table: "Instrumentation",
|
||||
column: "InstrumentId",
|
||||
principalTable: "Instrument",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PayPalPayment_ApplicationUser_ExecutorId",
|
||||
table: "PayPalPayment",
|
||||
column: "ExecutorId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CircleMember_Circle_CircleId",
|
||||
table: "CircleMember",
|
||||
column: "CircleId",
|
||||
principalTable: "Circle",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CircleMember_ApplicationUser_MemberId",
|
||||
table: "CircleMember",
|
||||
column: "MemberId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Contact_PostalAddress_AddressId",
|
||||
table: "Contact",
|
||||
column: "AddressId",
|
||||
principalTable: "PostalAddress",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_LiveFlow_ApplicationUser_OwnerId",
|
||||
table: "LiveFlow",
|
||||
column: "OwnerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CommandForm_Activity_ActivityCode",
|
||||
table: "CommandForm",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Location_OrganizationAddressId",
|
||||
table: "PerformerProfile",
|
||||
column: "OrganizationAddressId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_ApplicationUser_PerformerId",
|
||||
table: "PerformerProfile",
|
||||
column: "PerformerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_RdvQuery_Activity_ActivityCode",
|
||||
table: "RdvQuery",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_RdvQuery_ApplicationUser_ClientId",
|
||||
table: "RdvQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_RdvQuery_PerformerProfile_PerformerId",
|
||||
table: "RdvQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_UserActivity_Activity_DoesCode",
|
||||
table: "UserActivity",
|
||||
column: "DoesCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_UserActivity_PerformerProfile_UserId",
|
||||
table: "UserActivity",
|
||||
column: "UserId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CircleAuthorizationToFile_Circle_CircleId",
|
||||
table: "CircleAuthorizationToFile",
|
||||
column: "CircleId",
|
||||
principalTable: "Circle",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_MailingTemplate_ApplicationUser_ManagerId",
|
||||
table: "MailingTemplate",
|
||||
column: "ManagerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_MailingTemplate_ApplicationUser_SuccessorId",
|
||||
table: "MailingTemplate",
|
||||
column: "SuccessorId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Project_Activity_ActivityCode",
|
||||
table: "Project",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Project_ApplicationUser_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_PerformerProfile_PerformerId",
|
||||
table: "Project",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ProjectBuildConfiguration_Project_ProjectId",
|
||||
table: "ProjectBuildConfiguration",
|
||||
column: "ProjectId",
|
||||
principalTable: "Project",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId", table: "AspNetRoleClaims");
|
||||
migrationBuilder.DropForeignKey(name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId", table: "AspNetUserClaims");
|
||||
migrationBuilder.DropForeignKey(name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId", table: "AspNetUserLogins");
|
||||
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_IdentityRole_RoleId", table: "AspNetUserRoles");
|
||||
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_ApplicationUser_UserId", table: "AspNetUserRoles");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Ban_ApplicationUser_TargetId", table: "Ban");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BlackListed_ApplicationUser_OwnerId", table: "BlackListed");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BlackListed_ApplicationUser_UserId", table: "BlackListed");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleAuthorizationToBlogPost_BlogPost_BlogPostId", table: "CircleAuthorizationToBlogPost");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleAuthorizationToBlogPost_Circle_CircleId", table: "CircleAuthorizationToBlogPost");
|
||||
migrationBuilder.DropForeignKey(name: "FK_AccountBalance_ApplicationUser_UserId", table: "AccountBalance");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BalanceImpact_AccountBalance_BalanceId", table: "BalanceImpact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CommandLine_Estimate_EstimateId", table: "CommandLine");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Estimate_ApplicationUser_ClientId", table: "Estimate");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BlogTag_BlogPost_PostId", table: "BlogTag");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BlogTag_Tag_TagId", table: "BlogTag");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Comment_ApplicationUser_AuthorId", table: "Comment");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Comment_BlogPost_PostId", table: "Comment");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Schedule_ApplicationUser_OwnerId", table: "Schedule");
|
||||
migrationBuilder.DropForeignKey(name: "FK_ChatConnection_ApplicationUser_ApplicationUserId", table: "ChatConnection");
|
||||
migrationBuilder.DropForeignKey(name: "FK_ChatRoomAccess_ApplicationUser_UserId", table: "ChatRoomAccess");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BrusherProfile_PerformerProfile_UserId", table: "BrusherProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_Activity_ActivityCode", table: "HairCutQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_ApplicationUser_ClientId", table: "HairCutQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_PerformerProfile_PerformerId", table: "HairCutQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_HairPrestation_PrestationId", table: "HairCutQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairMultiCutQuery_Activity_ActivityCode", table: "HairMultiCutQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairMultiCutQuery_ApplicationUser_ClientId", table: "HairMultiCutQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairMultiCutQuery_PerformerProfile_PerformerId", table: "HairMultiCutQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairPrestationCollectionItem_HairPrestation_PrestationId", table: "HairPrestationCollectionItem");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairPrestationCollectionItem_HairMultiCutQuery_QueryId", 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_DimissClicked_Notification_NotificationId", table: "DimissClicked");
|
||||
migrationBuilder.DropForeignKey(name: "FK_DimissClicked_ApplicationUser_UserId", table: "DimissClicked");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Instrumentation_Instrument_InstrumentId", table: "Instrumentation");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PayPalPayment_ApplicationUser_ExecutorId", table: "PayPalPayment");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Contact_PostalAddress_AddressId", table: "Contact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_LiveFlow_ApplicationUser_OwnerId", table: "LiveFlow");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CommandForm_Activity_ActivityCode", table: "CommandForm");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_RdvQuery_Activity_ActivityCode", table: "RdvQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_RdvQuery_ApplicationUser_ClientId", table: "RdvQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_RdvQuery_PerformerProfile_PerformerId", table: "RdvQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_UserActivity_Activity_DoesCode", table: "UserActivity");
|
||||
migrationBuilder.DropForeignKey(name: "FK_UserActivity_PerformerProfile_UserId", table: "UserActivity");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleAuthorizationToFile_Circle_CircleId", table: "CircleAuthorizationToFile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_MailingTemplate_ApplicationUser_ManagerId", table: "MailingTemplate");
|
||||
migrationBuilder.DropForeignKey(name: "FK_MailingTemplate_ApplicationUser_SuccessorId", table: "MailingTemplate");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Project_Activity_ActivityCode", table: "Project");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Project_ApplicationUser_ClientId", table: "Project");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Project_GitRepositoryReference_GitId", table: "Project");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Project_PerformerProfile_PerformerId", table: "Project");
|
||||
migrationBuilder.DropForeignKey(name: "FK_ProjectBuildConfiguration_Project_ProjectId", table: "ProjectBuildConfiguration");
|
||||
migrationBuilder.DropColumn(name: "DisplayName", table: "FormationSettings");
|
||||
migrationBuilder.DropTable("InstrumentRating");
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId",
|
||||
table: "AspNetRoleClaims",
|
||||
column: "RoleId",
|
||||
principalTable: "AspNetRoles",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId",
|
||||
table: "AspNetUserClaims",
|
||||
column: "UserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId",
|
||||
table: "AspNetUserLogins",
|
||||
column: "UserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IdentityUserRole<string>_IdentityRole_RoleId",
|
||||
table: "AspNetUserRoles",
|
||||
column: "RoleId",
|
||||
principalTable: "AspNetRoles",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IdentityUserRole<string>_ApplicationUser_UserId",
|
||||
table: "AspNetUserRoles",
|
||||
column: "UserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Ban_ApplicationUser_TargetId",
|
||||
table: "Ban",
|
||||
column: "TargetId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BlackListed_ApplicationUser_OwnerId",
|
||||
table: "BlackListed",
|
||||
column: "OwnerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BlackListed_ApplicationUser_UserId",
|
||||
table: "BlackListed",
|
||||
column: "UserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CircleAuthorizationToBlogPost_BlogPost_BlogPostId",
|
||||
table: "CircleAuthorizationToBlogPost",
|
||||
column: "BlogPostId",
|
||||
principalTable: "BlogPost",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CircleAuthorizationToBlogPost_Circle_CircleId",
|
||||
table: "CircleAuthorizationToBlogPost",
|
||||
column: "CircleId",
|
||||
principalTable: "Circle",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_AccountBalance_ApplicationUser_UserId",
|
||||
table: "AccountBalance",
|
||||
column: "UserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BalanceImpact_AccountBalance_BalanceId",
|
||||
table: "BalanceImpact",
|
||||
column: "BalanceId",
|
||||
principalTable: "AccountBalance",
|
||||
principalColumn: "UserId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CommandLine_Estimate_EstimateId",
|
||||
table: "CommandLine",
|
||||
column: "EstimateId",
|
||||
principalTable: "Estimate",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Estimate_ApplicationUser_ClientId",
|
||||
table: "Estimate",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BlogTag_BlogPost_PostId",
|
||||
table: "BlogTag",
|
||||
column: "PostId",
|
||||
principalTable: "BlogPost",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BlogTag_Tag_TagId",
|
||||
table: "BlogTag",
|
||||
column: "TagId",
|
||||
principalTable: "Tag",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Comment_ApplicationUser_AuthorId",
|
||||
table: "Comment",
|
||||
column: "AuthorId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Comment_BlogPost_PostId",
|
||||
table: "Comment",
|
||||
column: "PostId",
|
||||
principalTable: "BlogPost",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Schedule_ApplicationUser_OwnerId",
|
||||
table: "Schedule",
|
||||
column: "OwnerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ChatConnection_ApplicationUser_ApplicationUserId",
|
||||
table: "ChatConnection",
|
||||
column: "ApplicationUserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ChatRoomAccess_ApplicationUser_UserId",
|
||||
table: "ChatRoomAccess",
|
||||
column: "UserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BrusherProfile_PerformerProfile_UserId",
|
||||
table: "BrusherProfile",
|
||||
column: "UserId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairCutQuery_Activity_ActivityCode",
|
||||
table: "HairCutQuery",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairCutQuery_ApplicationUser_ClientId",
|
||||
table: "HairCutQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairCutQuery_PerformerProfile_PerformerId",
|
||||
table: "HairCutQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairCutQuery_HairPrestation_PrestationId",
|
||||
table: "HairCutQuery",
|
||||
column: "PrestationId",
|
||||
principalTable: "HairPrestation",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairMultiCutQuery_Activity_ActivityCode",
|
||||
table: "HairMultiCutQuery",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairMultiCutQuery_ApplicationUser_ClientId",
|
||||
table: "HairMultiCutQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairMultiCutQuery_PerformerProfile_PerformerId",
|
||||
table: "HairMultiCutQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairPrestationCollectionItem_HairPrestation_PrestationId",
|
||||
table: "HairPrestationCollectionItem",
|
||||
column: "PrestationId",
|
||||
principalTable: "HairPrestation",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairPrestationCollectionItem_HairMultiCutQuery_QueryId",
|
||||
table: "HairPrestationCollectionItem",
|
||||
column: "QueryId",
|
||||
principalTable: "HairMultiCutQuery",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairTaint_Color_ColorId",
|
||||
table: "HairTaint",
|
||||
column: "ColorId",
|
||||
principalTable: "Color",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairTaintInstance_HairPrestation_PrestationId",
|
||||
table: "HairTaintInstance",
|
||||
column: "PrestationId",
|
||||
principalTable: "HairPrestation",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairTaintInstance_HairTaint_TaintId",
|
||||
table: "HairTaintInstance",
|
||||
column: "TaintId",
|
||||
principalTable: "HairTaint",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_DimissClicked_Notification_NotificationId",
|
||||
table: "DimissClicked",
|
||||
column: "NotificationId",
|
||||
principalTable: "Notification",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_DimissClicked_ApplicationUser_UserId",
|
||||
table: "DimissClicked",
|
||||
column: "UserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Instrumentation_Instrument_InstrumentId",
|
||||
table: "Instrumentation",
|
||||
column: "InstrumentId",
|
||||
principalTable: "Instrument",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PayPalPayment_ApplicationUser_ExecutorId",
|
||||
table: "PayPalPayment",
|
||||
column: "ExecutorId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CircleMember_Circle_CircleId",
|
||||
table: "CircleMember",
|
||||
column: "CircleId",
|
||||
principalTable: "Circle",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CircleMember_ApplicationUser_MemberId",
|
||||
table: "CircleMember",
|
||||
column: "MemberId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Contact_PostalAddress_AddressId",
|
||||
table: "Contact",
|
||||
column: "AddressId",
|
||||
principalTable: "PostalAddress",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_LiveFlow_ApplicationUser_OwnerId",
|
||||
table: "LiveFlow",
|
||||
column: "OwnerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CommandForm_Activity_ActivityCode",
|
||||
table: "CommandForm",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Location_OrganizationAddressId",
|
||||
table: "PerformerProfile",
|
||||
column: "OrganizationAddressId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_ApplicationUser_PerformerId",
|
||||
table: "PerformerProfile",
|
||||
column: "PerformerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_RdvQuery_Activity_ActivityCode",
|
||||
table: "RdvQuery",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_RdvQuery_ApplicationUser_ClientId",
|
||||
table: "RdvQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_RdvQuery_PerformerProfile_PerformerId",
|
||||
table: "RdvQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_UserActivity_Activity_DoesCode",
|
||||
table: "UserActivity",
|
||||
column: "DoesCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_UserActivity_PerformerProfile_UserId",
|
||||
table: "UserActivity",
|
||||
column: "UserId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CircleAuthorizationToFile_Circle_CircleId",
|
||||
table: "CircleAuthorizationToFile",
|
||||
column: "CircleId",
|
||||
principalTable: "Circle",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_MailingTemplate_ApplicationUser_ManagerId",
|
||||
table: "MailingTemplate",
|
||||
column: "ManagerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_MailingTemplate_ApplicationUser_SuccessorId",
|
||||
table: "MailingTemplate",
|
||||
column: "SuccessorId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Project_Activity_ActivityCode",
|
||||
table: "Project",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Project_ApplicationUser_ClientId",
|
||||
table: "Project",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Project_GitRepositoryReference_GitId",
|
||||
table: "Project",
|
||||
column: "GitId",
|
||||
principalTable: "GitRepositoryReference",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Project_PerformerProfile_PerformerId",
|
||||
table: "Project",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ProjectBuildConfiguration_Project_ProjectId",
|
||||
table: "ProjectBuildConfiguration",
|
||||
column: "ProjectId",
|
||||
principalTable: "Project",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
}
|
||||
}
|
2107
src/Yavsc/Migrations/20190819221632_instRateWInst.Designer.cs
generated
Normal file
2107
src/Yavsc/Migrations/20190819221632_instRateWInst.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
970
src/Yavsc/Migrations/20190819221632_instRateWInst.cs
Normal file
970
src/Yavsc/Migrations/20190819221632_instRateWInst.cs
Normal file
@ -0,0 +1,970 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
public partial class instRateWInst : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId", table: "AspNetRoleClaims");
|
||||
migrationBuilder.DropForeignKey(name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId", table: "AspNetUserClaims");
|
||||
migrationBuilder.DropForeignKey(name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId", table: "AspNetUserLogins");
|
||||
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_IdentityRole_RoleId", table: "AspNetUserRoles");
|
||||
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_ApplicationUser_UserId", table: "AspNetUserRoles");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Ban_ApplicationUser_TargetId", table: "Ban");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BlackListed_ApplicationUser_OwnerId", table: "BlackListed");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BlackListed_ApplicationUser_UserId", table: "BlackListed");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleAuthorizationToBlogPost_BlogPost_BlogPostId", table: "CircleAuthorizationToBlogPost");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleAuthorizationToBlogPost_Circle_CircleId", table: "CircleAuthorizationToBlogPost");
|
||||
migrationBuilder.DropForeignKey(name: "FK_AccountBalance_ApplicationUser_UserId", table: "AccountBalance");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BalanceImpact_AccountBalance_BalanceId", table: "BalanceImpact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CommandLine_Estimate_EstimateId", table: "CommandLine");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Estimate_ApplicationUser_ClientId", table: "Estimate");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BlogTag_BlogPost_PostId", table: "BlogTag");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BlogTag_Tag_TagId", table: "BlogTag");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Comment_ApplicationUser_AuthorId", table: "Comment");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Comment_BlogPost_PostId", table: "Comment");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Schedule_ApplicationUser_OwnerId", table: "Schedule");
|
||||
migrationBuilder.DropForeignKey(name: "FK_ChatConnection_ApplicationUser_ApplicationUserId", table: "ChatConnection");
|
||||
migrationBuilder.DropForeignKey(name: "FK_ChatRoomAccess_ApplicationUser_UserId", table: "ChatRoomAccess");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BrusherProfile_PerformerProfile_UserId", table: "BrusherProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_Activity_ActivityCode", table: "HairCutQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_ApplicationUser_ClientId", table: "HairCutQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_PerformerProfile_PerformerId", table: "HairCutQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_HairPrestation_PrestationId", table: "HairCutQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairMultiCutQuery_Activity_ActivityCode", table: "HairMultiCutQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairMultiCutQuery_ApplicationUser_ClientId", table: "HairMultiCutQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairMultiCutQuery_PerformerProfile_PerformerId", table: "HairMultiCutQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairPrestationCollectionItem_HairPrestation_PrestationId", table: "HairPrestationCollectionItem");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairPrestationCollectionItem_HairMultiCutQuery_QueryId", 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_DimissClicked_Notification_NotificationId", table: "DimissClicked");
|
||||
migrationBuilder.DropForeignKey(name: "FK_DimissClicked_ApplicationUser_UserId", table: "DimissClicked");
|
||||
migrationBuilder.DropForeignKey(name: "FK_InstrumentRating_Instrument_InstrumentId", table: "InstrumentRating");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Instrumentation_Instrument_InstrumentId", table: "Instrumentation");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PayPalPayment_ApplicationUser_ExecutorId", table: "PayPalPayment");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Contact_PostalAddress_AddressId", table: "Contact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_LiveFlow_ApplicationUser_OwnerId", table: "LiveFlow");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CommandForm_Activity_ActivityCode", table: "CommandForm");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_RdvQuery_Activity_ActivityCode", table: "RdvQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_RdvQuery_ApplicationUser_ClientId", table: "RdvQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_RdvQuery_PerformerProfile_PerformerId", table: "RdvQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_UserActivity_Activity_DoesCode", table: "UserActivity");
|
||||
migrationBuilder.DropForeignKey(name: "FK_UserActivity_PerformerProfile_UserId", table: "UserActivity");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleAuthorizationToFile_Circle_CircleId", table: "CircleAuthorizationToFile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_MailingTemplate_ApplicationUser_ManagerId", table: "MailingTemplate");
|
||||
migrationBuilder.DropForeignKey(name: "FK_MailingTemplate_ApplicationUser_SuccessorId", table: "MailingTemplate");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Project_Activity_ActivityCode", table: "Project");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Project_ApplicationUser_ClientId", table: "Project");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Project_GitRepositoryReference_GitId", table: "Project");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Project_PerformerProfile_PerformerId", table: "Project");
|
||||
migrationBuilder.DropForeignKey(name: "FK_ProjectBuildConfiguration_Project_ProjectId", table: "ProjectBuildConfiguration");
|
||||
migrationBuilder.Sql("delete from \"InstrumentRating\" where \"InstrumentId\" is null" );
|
||||
migrationBuilder.AlterColumn<long>(
|
||||
name: "InstrumentId",
|
||||
table: "InstrumentRating",
|
||||
nullable: false);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId",
|
||||
table: "AspNetRoleClaims",
|
||||
column: "RoleId",
|
||||
principalTable: "AspNetRoles",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId",
|
||||
table: "AspNetUserClaims",
|
||||
column: "UserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId",
|
||||
table: "AspNetUserLogins",
|
||||
column: "UserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IdentityUserRole<string>_IdentityRole_RoleId",
|
||||
table: "AspNetUserRoles",
|
||||
column: "RoleId",
|
||||
principalTable: "AspNetRoles",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IdentityUserRole<string>_ApplicationUser_UserId",
|
||||
table: "AspNetUserRoles",
|
||||
column: "UserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Ban_ApplicationUser_TargetId",
|
||||
table: "Ban",
|
||||
column: "TargetId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BlackListed_ApplicationUser_OwnerId",
|
||||
table: "BlackListed",
|
||||
column: "OwnerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BlackListed_ApplicationUser_UserId",
|
||||
table: "BlackListed",
|
||||
column: "UserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CircleAuthorizationToBlogPost_BlogPost_BlogPostId",
|
||||
table: "CircleAuthorizationToBlogPost",
|
||||
column: "BlogPostId",
|
||||
principalTable: "BlogPost",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CircleAuthorizationToBlogPost_Circle_CircleId",
|
||||
table: "CircleAuthorizationToBlogPost",
|
||||
column: "CircleId",
|
||||
principalTable: "Circle",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_AccountBalance_ApplicationUser_UserId",
|
||||
table: "AccountBalance",
|
||||
column: "UserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BalanceImpact_AccountBalance_BalanceId",
|
||||
table: "BalanceImpact",
|
||||
column: "BalanceId",
|
||||
principalTable: "AccountBalance",
|
||||
principalColumn: "UserId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CommandLine_Estimate_EstimateId",
|
||||
table: "CommandLine",
|
||||
column: "EstimateId",
|
||||
principalTable: "Estimate",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Estimate_ApplicationUser_ClientId",
|
||||
table: "Estimate",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BlogTag_BlogPost_PostId",
|
||||
table: "BlogTag",
|
||||
column: "PostId",
|
||||
principalTable: "BlogPost",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BlogTag_Tag_TagId",
|
||||
table: "BlogTag",
|
||||
column: "TagId",
|
||||
principalTable: "Tag",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Comment_ApplicationUser_AuthorId",
|
||||
table: "Comment",
|
||||
column: "AuthorId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Comment_BlogPost_PostId",
|
||||
table: "Comment",
|
||||
column: "PostId",
|
||||
principalTable: "BlogPost",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Schedule_ApplicationUser_OwnerId",
|
||||
table: "Schedule",
|
||||
column: "OwnerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ChatConnection_ApplicationUser_ApplicationUserId",
|
||||
table: "ChatConnection",
|
||||
column: "ApplicationUserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ChatRoomAccess_ApplicationUser_UserId",
|
||||
table: "ChatRoomAccess",
|
||||
column: "UserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BrusherProfile_PerformerProfile_UserId",
|
||||
table: "BrusherProfile",
|
||||
column: "UserId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairCutQuery_Activity_ActivityCode",
|
||||
table: "HairCutQuery",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairCutQuery_ApplicationUser_ClientId",
|
||||
table: "HairCutQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairCutQuery_PerformerProfile_PerformerId",
|
||||
table: "HairCutQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairCutQuery_HairPrestation_PrestationId",
|
||||
table: "HairCutQuery",
|
||||
column: "PrestationId",
|
||||
principalTable: "HairPrestation",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairMultiCutQuery_Activity_ActivityCode",
|
||||
table: "HairMultiCutQuery",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairMultiCutQuery_ApplicationUser_ClientId",
|
||||
table: "HairMultiCutQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairMultiCutQuery_PerformerProfile_PerformerId",
|
||||
table: "HairMultiCutQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
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_HairPrestationCollectionItem_HairMultiCutQuery_QueryId",
|
||||
table: "HairPrestationCollectionItem",
|
||||
column: "QueryId",
|
||||
principalTable: "HairMultiCutQuery",
|
||||
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_DimissClicked_Notification_NotificationId",
|
||||
table: "DimissClicked",
|
||||
column: "NotificationId",
|
||||
principalTable: "Notification",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_DimissClicked_ApplicationUser_UserId",
|
||||
table: "DimissClicked",
|
||||
column: "UserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_InstrumentRating_Instrument_InstrumentId",
|
||||
table: "InstrumentRating",
|
||||
column: "InstrumentId",
|
||||
principalTable: "Instrument",
|
||||
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_PayPalPayment_ApplicationUser_ExecutorId",
|
||||
table: "PayPalPayment",
|
||||
column: "ExecutorId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CircleMember_Circle_CircleId",
|
||||
table: "CircleMember",
|
||||
column: "CircleId",
|
||||
principalTable: "Circle",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CircleMember_ApplicationUser_MemberId",
|
||||
table: "CircleMember",
|
||||
column: "MemberId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Contact_PostalAddress_AddressId",
|
||||
table: "Contact",
|
||||
column: "AddressId",
|
||||
principalTable: "PostalAddress",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_LiveFlow_ApplicationUser_OwnerId",
|
||||
table: "LiveFlow",
|
||||
column: "OwnerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CommandForm_Activity_ActivityCode",
|
||||
table: "CommandForm",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Location_OrganizationAddressId",
|
||||
table: "PerformerProfile",
|
||||
column: "OrganizationAddressId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_ApplicationUser_PerformerId",
|
||||
table: "PerformerProfile",
|
||||
column: "PerformerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_RdvQuery_Activity_ActivityCode",
|
||||
table: "RdvQuery",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_RdvQuery_ApplicationUser_ClientId",
|
||||
table: "RdvQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_RdvQuery_PerformerProfile_PerformerId",
|
||||
table: "RdvQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_UserActivity_Activity_DoesCode",
|
||||
table: "UserActivity",
|
||||
column: "DoesCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_UserActivity_PerformerProfile_UserId",
|
||||
table: "UserActivity",
|
||||
column: "UserId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CircleAuthorizationToFile_Circle_CircleId",
|
||||
table: "CircleAuthorizationToFile",
|
||||
column: "CircleId",
|
||||
principalTable: "Circle",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_MailingTemplate_ApplicationUser_ManagerId",
|
||||
table: "MailingTemplate",
|
||||
column: "ManagerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_MailingTemplate_ApplicationUser_SuccessorId",
|
||||
table: "MailingTemplate",
|
||||
column: "SuccessorId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Project_Activity_ActivityCode",
|
||||
table: "Project",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Project_ApplicationUser_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_PerformerProfile_PerformerId",
|
||||
table: "Project",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ProjectBuildConfiguration_Project_ProjectId",
|
||||
table: "ProjectBuildConfiguration",
|
||||
column: "ProjectId",
|
||||
principalTable: "Project",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId", table: "AspNetRoleClaims");
|
||||
migrationBuilder.DropForeignKey(name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId", table: "AspNetUserClaims");
|
||||
migrationBuilder.DropForeignKey(name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId", table: "AspNetUserLogins");
|
||||
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_IdentityRole_RoleId", table: "AspNetUserRoles");
|
||||
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_ApplicationUser_UserId", table: "AspNetUserRoles");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Ban_ApplicationUser_TargetId", table: "Ban");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BlackListed_ApplicationUser_OwnerId", table: "BlackListed");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BlackListed_ApplicationUser_UserId", table: "BlackListed");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleAuthorizationToBlogPost_BlogPost_BlogPostId", table: "CircleAuthorizationToBlogPost");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleAuthorizationToBlogPost_Circle_CircleId", table: "CircleAuthorizationToBlogPost");
|
||||
migrationBuilder.DropForeignKey(name: "FK_AccountBalance_ApplicationUser_UserId", table: "AccountBalance");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BalanceImpact_AccountBalance_BalanceId", table: "BalanceImpact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CommandLine_Estimate_EstimateId", table: "CommandLine");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Estimate_ApplicationUser_ClientId", table: "Estimate");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BlogTag_BlogPost_PostId", table: "BlogTag");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BlogTag_Tag_TagId", table: "BlogTag");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Comment_ApplicationUser_AuthorId", table: "Comment");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Comment_BlogPost_PostId", table: "Comment");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Schedule_ApplicationUser_OwnerId", table: "Schedule");
|
||||
migrationBuilder.DropForeignKey(name: "FK_ChatConnection_ApplicationUser_ApplicationUserId", table: "ChatConnection");
|
||||
migrationBuilder.DropForeignKey(name: "FK_ChatRoomAccess_ApplicationUser_UserId", table: "ChatRoomAccess");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BrusherProfile_PerformerProfile_UserId", table: "BrusherProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_Activity_ActivityCode", table: "HairCutQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_ApplicationUser_ClientId", table: "HairCutQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_PerformerProfile_PerformerId", table: "HairCutQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_HairPrestation_PrestationId", table: "HairCutQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairMultiCutQuery_Activity_ActivityCode", table: "HairMultiCutQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairMultiCutQuery_ApplicationUser_ClientId", table: "HairMultiCutQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairMultiCutQuery_PerformerProfile_PerformerId", table: "HairMultiCutQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairPrestationCollectionItem_HairPrestation_PrestationId", table: "HairPrestationCollectionItem");
|
||||
migrationBuilder.DropForeignKey(name: "FK_HairPrestationCollectionItem_HairMultiCutQuery_QueryId", 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_DimissClicked_Notification_NotificationId", table: "DimissClicked");
|
||||
migrationBuilder.DropForeignKey(name: "FK_DimissClicked_ApplicationUser_UserId", table: "DimissClicked");
|
||||
migrationBuilder.DropForeignKey(name: "FK_InstrumentRating_Instrument_InstrumentId", table: "InstrumentRating");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Instrumentation_Instrument_InstrumentId", table: "Instrumentation");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PayPalPayment_ApplicationUser_ExecutorId", table: "PayPalPayment");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Contact_PostalAddress_AddressId", table: "Contact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_LiveFlow_ApplicationUser_OwnerId", table: "LiveFlow");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CommandForm_Activity_ActivityCode", table: "CommandForm");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_RdvQuery_Activity_ActivityCode", table: "RdvQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_RdvQuery_ApplicationUser_ClientId", table: "RdvQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_RdvQuery_PerformerProfile_PerformerId", table: "RdvQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_UserActivity_Activity_DoesCode", table: "UserActivity");
|
||||
migrationBuilder.DropForeignKey(name: "FK_UserActivity_PerformerProfile_UserId", table: "UserActivity");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleAuthorizationToFile_Circle_CircleId", table: "CircleAuthorizationToFile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_MailingTemplate_ApplicationUser_ManagerId", table: "MailingTemplate");
|
||||
migrationBuilder.DropForeignKey(name: "FK_MailingTemplate_ApplicationUser_SuccessorId", table: "MailingTemplate");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Project_Activity_ActivityCode", table: "Project");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Project_ApplicationUser_ClientId", table: "Project");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Project_GitRepositoryReference_GitId", table: "Project");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Project_PerformerProfile_PerformerId", table: "Project");
|
||||
migrationBuilder.DropForeignKey(name: "FK_ProjectBuildConfiguration_Project_ProjectId", table: "ProjectBuildConfiguration");
|
||||
migrationBuilder.AlterColumn<long>(
|
||||
name: "InstrumentId",
|
||||
table: "InstrumentRating",
|
||||
nullable: true);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId",
|
||||
table: "AspNetRoleClaims",
|
||||
column: "RoleId",
|
||||
principalTable: "AspNetRoles",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId",
|
||||
table: "AspNetUserClaims",
|
||||
column: "UserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId",
|
||||
table: "AspNetUserLogins",
|
||||
column: "UserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IdentityUserRole<string>_IdentityRole_RoleId",
|
||||
table: "AspNetUserRoles",
|
||||
column: "RoleId",
|
||||
principalTable: "AspNetRoles",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IdentityUserRole<string>_ApplicationUser_UserId",
|
||||
table: "AspNetUserRoles",
|
||||
column: "UserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Ban_ApplicationUser_TargetId",
|
||||
table: "Ban",
|
||||
column: "TargetId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BlackListed_ApplicationUser_OwnerId",
|
||||
table: "BlackListed",
|
||||
column: "OwnerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BlackListed_ApplicationUser_UserId",
|
||||
table: "BlackListed",
|
||||
column: "UserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CircleAuthorizationToBlogPost_BlogPost_BlogPostId",
|
||||
table: "CircleAuthorizationToBlogPost",
|
||||
column: "BlogPostId",
|
||||
principalTable: "BlogPost",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CircleAuthorizationToBlogPost_Circle_CircleId",
|
||||
table: "CircleAuthorizationToBlogPost",
|
||||
column: "CircleId",
|
||||
principalTable: "Circle",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_AccountBalance_ApplicationUser_UserId",
|
||||
table: "AccountBalance",
|
||||
column: "UserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BalanceImpact_AccountBalance_BalanceId",
|
||||
table: "BalanceImpact",
|
||||
column: "BalanceId",
|
||||
principalTable: "AccountBalance",
|
||||
principalColumn: "UserId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CommandLine_Estimate_EstimateId",
|
||||
table: "CommandLine",
|
||||
column: "EstimateId",
|
||||
principalTable: "Estimate",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Estimate_ApplicationUser_ClientId",
|
||||
table: "Estimate",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BlogTag_BlogPost_PostId",
|
||||
table: "BlogTag",
|
||||
column: "PostId",
|
||||
principalTable: "BlogPost",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BlogTag_Tag_TagId",
|
||||
table: "BlogTag",
|
||||
column: "TagId",
|
||||
principalTable: "Tag",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Comment_ApplicationUser_AuthorId",
|
||||
table: "Comment",
|
||||
column: "AuthorId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Comment_BlogPost_PostId",
|
||||
table: "Comment",
|
||||
column: "PostId",
|
||||
principalTable: "BlogPost",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Schedule_ApplicationUser_OwnerId",
|
||||
table: "Schedule",
|
||||
column: "OwnerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ChatConnection_ApplicationUser_ApplicationUserId",
|
||||
table: "ChatConnection",
|
||||
column: "ApplicationUserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ChatRoomAccess_ApplicationUser_UserId",
|
||||
table: "ChatRoomAccess",
|
||||
column: "UserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BrusherProfile_PerformerProfile_UserId",
|
||||
table: "BrusherProfile",
|
||||
column: "UserId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairCutQuery_Activity_ActivityCode",
|
||||
table: "HairCutQuery",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairCutQuery_ApplicationUser_ClientId",
|
||||
table: "HairCutQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairCutQuery_PerformerProfile_PerformerId",
|
||||
table: "HairCutQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairCutQuery_HairPrestation_PrestationId",
|
||||
table: "HairCutQuery",
|
||||
column: "PrestationId",
|
||||
principalTable: "HairPrestation",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairMultiCutQuery_Activity_ActivityCode",
|
||||
table: "HairMultiCutQuery",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairMultiCutQuery_ApplicationUser_ClientId",
|
||||
table: "HairMultiCutQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairMultiCutQuery_PerformerProfile_PerformerId",
|
||||
table: "HairMultiCutQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairPrestationCollectionItem_HairPrestation_PrestationId",
|
||||
table: "HairPrestationCollectionItem",
|
||||
column: "PrestationId",
|
||||
principalTable: "HairPrestation",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairPrestationCollectionItem_HairMultiCutQuery_QueryId",
|
||||
table: "HairPrestationCollectionItem",
|
||||
column: "QueryId",
|
||||
principalTable: "HairMultiCutQuery",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairTaint_Color_ColorId",
|
||||
table: "HairTaint",
|
||||
column: "ColorId",
|
||||
principalTable: "Color",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairTaintInstance_HairPrestation_PrestationId",
|
||||
table: "HairTaintInstance",
|
||||
column: "PrestationId",
|
||||
principalTable: "HairPrestation",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_HairTaintInstance_HairTaint_TaintId",
|
||||
table: "HairTaintInstance",
|
||||
column: "TaintId",
|
||||
principalTable: "HairTaint",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_DimissClicked_Notification_NotificationId",
|
||||
table: "DimissClicked",
|
||||
column: "NotificationId",
|
||||
principalTable: "Notification",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_DimissClicked_ApplicationUser_UserId",
|
||||
table: "DimissClicked",
|
||||
column: "UserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_InstrumentRating_Instrument_InstrumentId",
|
||||
table: "InstrumentRating",
|
||||
column: "InstrumentId",
|
||||
principalTable: "Instrument",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Instrumentation_Instrument_InstrumentId",
|
||||
table: "Instrumentation",
|
||||
column: "InstrumentId",
|
||||
principalTable: "Instrument",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PayPalPayment_ApplicationUser_ExecutorId",
|
||||
table: "PayPalPayment",
|
||||
column: "ExecutorId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CircleMember_Circle_CircleId",
|
||||
table: "CircleMember",
|
||||
column: "CircleId",
|
||||
principalTable: "Circle",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CircleMember_ApplicationUser_MemberId",
|
||||
table: "CircleMember",
|
||||
column: "MemberId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Contact_PostalAddress_AddressId",
|
||||
table: "Contact",
|
||||
column: "AddressId",
|
||||
principalTable: "PostalAddress",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_LiveFlow_ApplicationUser_OwnerId",
|
||||
table: "LiveFlow",
|
||||
column: "OwnerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CommandForm_Activity_ActivityCode",
|
||||
table: "CommandForm",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Location_OrganizationAddressId",
|
||||
table: "PerformerProfile",
|
||||
column: "OrganizationAddressId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_ApplicationUser_PerformerId",
|
||||
table: "PerformerProfile",
|
||||
column: "PerformerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_RdvQuery_Activity_ActivityCode",
|
||||
table: "RdvQuery",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_RdvQuery_ApplicationUser_ClientId",
|
||||
table: "RdvQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_RdvQuery_PerformerProfile_PerformerId",
|
||||
table: "RdvQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_UserActivity_Activity_DoesCode",
|
||||
table: "UserActivity",
|
||||
column: "DoesCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_UserActivity_PerformerProfile_UserId",
|
||||
table: "UserActivity",
|
||||
column: "UserId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CircleAuthorizationToFile_Circle_CircleId",
|
||||
table: "CircleAuthorizationToFile",
|
||||
column: "CircleId",
|
||||
principalTable: "Circle",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_MailingTemplate_ApplicationUser_ManagerId",
|
||||
table: "MailingTemplate",
|
||||
column: "ManagerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_MailingTemplate_ApplicationUser_SuccessorId",
|
||||
table: "MailingTemplate",
|
||||
column: "SuccessorId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Project_Activity_ActivityCode",
|
||||
table: "Project",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Project_ApplicationUser_ClientId",
|
||||
table: "Project",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Project_GitRepositoryReference_GitId",
|
||||
table: "Project",
|
||||
column: "GitId",
|
||||
principalTable: "GitRepositoryReference",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Project_PerformerProfile_PerformerId",
|
||||
table: "Project",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ProjectBuildConfiguration_Project_ProjectId",
|
||||
table: "ProjectBuildConfiguration",
|
||||
column: "ProjectId",
|
||||
principalTable: "Project",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
}
|
||||
}
|
@ -1020,6 +1020,20 @@ namespace Yavsc.Migrations
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Musical.InstrumentRating", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long>("InstrumentId");
|
||||
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Musical.MusicalPreference", b =>
|
||||
{
|
||||
b.Property<string>("OwnerProfileId");
|
||||
@ -1340,6 +1354,8 @@ namespace Yavsc.Migrations
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("DisplayName");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
@ -1863,6 +1879,17 @@ namespace Yavsc.Migrations
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Musical.InstrumentRating", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Musical.Instrument")
|
||||
.WithMany()
|
||||
.HasForeignKey("InstrumentId");
|
||||
|
||||
b.HasOne("Yavsc.Models.Workflow.PerformerProfile")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Musical.MusicalPreference", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Musical.Profiles.DjSettings")
|
||||
|
@ -12,6 +12,7 @@ using Yavsc.Server.Models.EMailing;
|
||||
using Yavsc.Server.Models.IT.SourceCode;
|
||||
using Yavsc.Server.Models.IT;
|
||||
using Yavsc.Models.Streaming;
|
||||
using Yavsc.Models.Musical;
|
||||
|
||||
namespace Yavsc.Models
|
||||
{
|
||||
@ -68,7 +69,7 @@ namespace Yavsc.Models
|
||||
builder.Entity<BlackListed>().HasOne<ApplicationUser>(bl => bl.Owner);
|
||||
builder.Entity<BlogTrad>().HasKey(tr => new { post = tr.PostId, lang = tr.Lang });
|
||||
builder.Entity<CircleAuthorizationToFile>().HasKey(a => new { cid=a.CircleId, path=a.FullPath });
|
||||
|
||||
builder.Entity<InstrumentRating>().HasAlternateKey(i => new { Instrument= i.InstrumentId, owner = i.OwnerId });
|
||||
|
||||
foreach (var et in builder.Model.GetEntityTypes())
|
||||
{
|
||||
@ -282,5 +283,7 @@ namespace Yavsc.Models
|
||||
|
||||
public DbSet<CircleAuthorizationToFile> CircleAuthorizationToFile { get; set; }
|
||||
|
||||
public DbSet<InstrumentRating> InstrumentRating { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -784,4 +784,5 @@ Thanks.
|
||||
--
|
||||
{0} - {2} <https://{3}></value>
|
||||
</data>
|
||||
<data name="Instrumentation"><value>Instrumentation</value></data>
|
||||
</root>
|
||||
|
@ -483,5 +483,6 @@ Conjunto de faturas: {5}</value></data>
|
||||
<data name="HairCutQueryValidation"><value>Um pedido (de {0}) em cabeleireiro em casa acaba de ser validado</value></data>
|
||||
<data name="Kid"><value>criança</value></data>
|
||||
<data name="Mech"><value>Meches</value></data>
|
||||
<data name="Instrumentation"><value>Instrumentação</value></data>
|
||||
|
||||
</root>
|
||||
|
@ -502,4 +502,6 @@ Facture réglée: {5}</value></data>
|
||||
<data name="Enroll"><value>Enrôler</value></data>
|
||||
<data name="Fire"><value>Licencier</value></data>
|
||||
<data name="LiveFlow"><value>Flux live</value></data>
|
||||
<data name="Instrumentation"><value>Instrumentation</value></data>
|
||||
|
||||
</root>
|
||||
|
@ -42,11 +42,21 @@ Nombre </dt><dd> @Model.AdminCount</dd>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<h3>Musical</h3>
|
||||
|
||||
<a asp-controller="Instruments" class="btn btn-primary">
|
||||
Gestion des Instruments
|
||||
</a>
|
||||
|
||||
<environment names="coiffure">
|
||||
|
||||
<h3>Coiffure</h3>
|
||||
|
||||
<a asp-controller="HairTaints" class="btn btn-primary">
|
||||
Gestion des couleurs
|
||||
</a>
|
||||
</environment>
|
||||
|
||||
<h3>Devices</h3>
|
||||
<a asp-controller="Devices" class="btn btn-primary">
|
||||
|
@ -4,7 +4,6 @@
|
||||
<script type="text/javascript" src="~/lib/moment/moment-with-locales.min.js"></script>
|
||||
<script type="text/javascript" src="~/lib/eonasdan-bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
|
||||
<link rel="stylesheet" href="~/lib/eonasdan-bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" />
|
||||
<link rel="stylesheet" href="~/lib/eonasdan-bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" />
|
||||
<style>
|
||||
#map {
|
||||
width: 100%;
|
||||
@ -83,8 +82,16 @@
|
||||
<div id='reason1'>
|
||||
<textarea rows="15" asp-for="Reason" type="text" name="Reason" id="Reason" maxlength="4096" class="form-control"></textarea>
|
||||
<span asp-validation-for="Reason" class="text-danger"></span>
|
||||
@Html.HiddenFor(model=>model.Location.Latitude)
|
||||
@Html.HiddenFor(model=>model.Location.Longitude)
|
||||
|
||||
<dl>
|
||||
<dt>@SR["Coordonées GPS"]
|
||||
</dt>
|
||||
<dd>
|
||||
<input class="text-box" id="Location_Latitude" name="Location.Latitude" type="text" value="@Model.Location.Latitude" readonly/>
|
||||
<input class="text-box" id="Location_Longitude" name="Location.Longitude" type="text" value="@Model.Location.Longitude" readonly/>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@ -96,7 +103,7 @@
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
|
||||
<input type="submit" class="btn btn-default" value="Créer"></input>
|
||||
<input type="submit" class="btn btn-default" value="Créer" />
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -0,0 +1,26 @@
|
||||
@model Yavsc.Models.Musical.Profiles.FormationSettings
|
||||
|
||||
|
||||
@if (Model == null) {
|
||||
<p>@SR["ENOFORMATIONSETTINGS"]</p>
|
||||
}
|
||||
@if (Model != null) {
|
||||
<fieldset>
|
||||
<legend>@SR["Formation"] @Model.DisplayName</legend>
|
||||
<p>@Model.Summary</p>
|
||||
|
||||
<h2>
|
||||
|
||||
@foreach(var inst in Model.Instruments) {
|
||||
@Html.DisplayNameFor(model => model.Tool)
|
||||
}
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Tool)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Tool)
|
||||
</dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
}
|
42
src/Yavsc/Views/InstrumentRating/Create.cshtml
Normal file
42
src/Yavsc/Views/InstrumentRating/Create.cshtml
Normal file
@ -0,0 +1,42 @@
|
||||
@model Yavsc.Models.Musical.InstrumentRating
|
||||
|
||||
@{
|
||||
ViewData["Title"] = @SR["Create"];
|
||||
}
|
||||
|
||||
<h2>@SR["Create"]</h2>
|
||||
|
||||
<form asp-action="Create">
|
||||
<div class="form-horizontal">
|
||||
<h4>@SR["InstrumentRating"]</h4>
|
||||
<hr />
|
||||
<div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div>
|
||||
|
||||
<input asp-for="OwnerId" type="hidden" Value="@User.GetUserId()" />
|
||||
<div class="form-group">
|
||||
<label asp-for="Rate" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<select asp-for="InstrumentId" asp-items=@ViewBag.YetAvailableInstruments>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label asp-for="Rate" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Rate" class="form-control" />
|
||||
<span asp-validation-for="Rate" class="text-danger" ></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<input type="submit" value="Create" class="btn btn-default" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div>
|
||||
<a asp-action="Index">@SR["Back to List"]</a>
|
||||
</div>
|
||||
|
34
src/Yavsc/Views/InstrumentRating/Delete.cshtml
Normal file
34
src/Yavsc/Views/InstrumentRating/Delete.cshtml
Normal file
@ -0,0 +1,34 @@
|
||||
@model Yavsc.Models.Musical.InstrumentRating
|
||||
|
||||
@{
|
||||
ViewData["Title"] = @SR["Delete"];
|
||||
}
|
||||
|
||||
<h2>@SR["Delete"]</h2>
|
||||
|
||||
<h3>@SR["AreYourSureYouWantToDeleteThis"]</h3>
|
||||
<div>
|
||||
<h4>@SR["InstrumentRating"]</h4>
|
||||
<hr />
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Rate)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Rate)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Instrument.Name)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Instrument.Name)
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<form asp-action="Delete">
|
||||
<div class="form-actions no-color">
|
||||
<input type="submit" value="@SR["Delete"]" class="btn btn-default" /> |
|
||||
<a asp-action="Index">@SR["Back to List"]</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
30
src/Yavsc/Views/InstrumentRating/Details.cshtml
Normal file
30
src/Yavsc/Views/InstrumentRating/Details.cshtml
Normal file
@ -0,0 +1,30 @@
|
||||
@model Yavsc.Models.Musical.InstrumentRating
|
||||
|
||||
@{
|
||||
ViewData["Title"] = @SR["Details"];
|
||||
}
|
||||
|
||||
<h2>@SR["Details"]</h2>
|
||||
|
||||
<div>
|
||||
<h4>InstrumentRating</h4>
|
||||
<hr />
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Rate)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Rate)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Instrument.Name)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Instrument.Name)
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<p>
|
||||
<a asp-action="Edit" asp-route-id="@Model.Id">@SR["Edit"]</a> |
|
||||
<a asp-action="Index">@SR["Back to List"]</a>
|
||||
</p>
|
40
src/Yavsc/Views/InstrumentRating/Edit.cshtml
Normal file
40
src/Yavsc/Views/InstrumentRating/Edit.cshtml
Normal file
@ -0,0 +1,40 @@
|
||||
@model Yavsc.Models.Musical.InstrumentRating
|
||||
|
||||
@{
|
||||
ViewData["Title"] = @SR["Edit"];
|
||||
}
|
||||
|
||||
<h2>@SR["Edit"]</h2>
|
||||
|
||||
<form asp-action="Edit">
|
||||
<div class="form-horizontal">
|
||||
<h4>InstrumentRating</h4>
|
||||
<hr />
|
||||
<div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div>
|
||||
<input type="hidden" asp-for="Id" />
|
||||
<div class="form-group">
|
||||
<label asp-for="OwnerId" class="control-label col-md-2">OwnerId</label>
|
||||
<div class="col-md-10">
|
||||
<select asp-for="OwnerId" class="form-control" ></select>
|
||||
<span asp-validation-for="OwnerId" class="text-danger" ></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Rate" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Rate" class="form-control" />
|
||||
<span asp-validation-for="Rate" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<input type="submit" value="Save" class="btn btn-default" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div>
|
||||
<a asp-action="Index">@SR["Back to List"]</a>
|
||||
</div>
|
||||
|
39
src/Yavsc/Views/InstrumentRating/Index.cshtml
Normal file
39
src/Yavsc/Views/InstrumentRating/Index.cshtml
Normal file
@ -0,0 +1,39 @@
|
||||
@model IEnumerable<Yavsc.Models.Musical.InstrumentRating>
|
||||
|
||||
@{
|
||||
ViewData["Title"] = @SR["Index"];
|
||||
}
|
||||
|
||||
<h2>@SR["Index"]</h2>
|
||||
|
||||
<p>
|
||||
<a asp-action="Create">@SR["Create New"]</a>
|
||||
</p>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Rate)
|
||||
</th>
|
||||
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Instrument.Name)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
@foreach (var item in Model) {
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Rate)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Instrument.Name)
|
||||
</td>
|
||||
<td>
|
||||
<a asp-action="Edit" asp-route-id="@item.Id">@SR["Edit"]</a> |
|
||||
<a asp-action="Details" asp-route-id="@item.Id">@SR["Details"]</a> |
|
||||
<a asp-action="Delete" asp-route-id="@item.Id">@SR["Delete"]</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
@ -15,7 +15,7 @@
|
||||
<hr />
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Instruments</dt>
|
||||
<dd>@Html.DisplayFor(m=>m.Instrumentation)</dd>
|
||||
<dd>@Html.DisplayFor(m=>m)</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<p>
|
||||
|
@ -7,99 +7,8 @@
|
||||
height: 250px;
|
||||
}
|
||||
</style>
|
||||
}
|
||||
@section scripts {
|
||||
<script src="https://maps.googleapis.com/maps/api/js?key=@ViewBag.GoogleSettings.BrowserApiKey"></script>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
var config = {
|
||||
mapId: 'map',
|
||||
addrId: 'OrganizationAddress_Address',
|
||||
longId: 'OrganizationAddress_Longitude',
|
||||
latId: 'OrganizationAddress_Latitude',
|
||||
addrValidationId: 'AddressError',
|
||||
formValidId: 'valsum',
|
||||
locComboId: 'loccomb'
|
||||
};
|
||||
$.validator.setDefaults({
|
||||
messages: {
|
||||
remote: "Ce lieu n'est pas identifié par les services de géo-localisation Google",
|
||||
required: "Veuillez renseigner ce champ"
|
||||
}
|
||||
});
|
||||
|
||||
var gmap = new google.maps.Map(document.getElementById('map'), {
|
||||
zoom: 16,
|
||||
center: { lat: 48.862854, lng: 2.2056466 }
|
||||
});
|
||||
var marker;
|
||||
|
||||
function chooseLoc(sender,loc) {
|
||||
if (sender === 'user') $('#'+config.addrId).val(loc.formatted_address);
|
||||
var pos = loc.geometry.location;
|
||||
var lat = new Number(pos.lat);
|
||||
var lng = new Number(pos.lng);
|
||||
gmap.setCenter(pos);
|
||||
if (marker) {
|
||||
marker.setMap(null);
|
||||
}
|
||||
marker = new google.maps.Marker({
|
||||
map: gmap,
|
||||
draggable: true,
|
||||
animation: google.maps.Animation.DROP,
|
||||
position: pos
|
||||
});
|
||||
google.maps.event.addListener(marker, 'dragend', function() {
|
||||
// TODO reverse geo code
|
||||
var pos = marker.getPosition();
|
||||
$('#'+config.latId).val(pos.lat);
|
||||
$('#'+config.longId).val(pos.lng);
|
||||
});
|
||||
$('#'+config.addrId).valid();
|
||||
$('#'+config.addrValidationId).empty();
|
||||
$('#'+config.formValidId).empty();
|
||||
return true;
|
||||
}
|
||||
|
||||
$('#'+config.addrId).rules("add",
|
||||
{
|
||||
remote: {
|
||||
url: 'https://maps.googleapis.com/maps/api/geocode/json',
|
||||
type: 'get',
|
||||
data: {
|
||||
key: '@Startup.GoogleSettings.BrowserApiKey',
|
||||
sensor: false,
|
||||
address: function () { return $('#'+config.addrId).val() }
|
||||
},
|
||||
dataType: 'json',
|
||||
dataFilter: function(datastr,type) {
|
||||
$('#'+config.locComboId).html("");
|
||||
var data = JSON.parse(datastr);
|
||||
data.results.forEach(function(element) {
|
||||
if (element.formatted_address !== $('#'+config.addrId).val()) {
|
||||
$('<li>'+element.formatted_address+'</li>')
|
||||
.data("geoloc",element)
|
||||
.click(function() { chooseLoc('user',$(this).data("geoloc")) })
|
||||
.appendTo($('#'+config.locComboId));}
|
||||
else { }
|
||||
});
|
||||
if ((data.status === 'OK') && (data.results.length == 1))
|
||||
{
|
||||
chooseLoc('google',data.results[0]);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
error: function(xhr, textStatus, errorThrown)
|
||||
{
|
||||
console.log('ajax loading error ... '+textStatus+' ... '+ errorThrown);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
}
|
||||
|
||||
<h2>@ViewData["Title"]</h2>
|
||||
|
||||
@Html.DisplayFor(model => model)
|
||||
@ -192,19 +101,25 @@
|
||||
<span id="AddressError" asp-validation-for="OrganizationAddress.Address" class="text-danger"></span>
|
||||
<ul id="loccomb" >
|
||||
</ul>
|
||||
<div id="map"></div>
|
||||
<div id="map" class="map" data-val="valloc" data-addr="OrganizationAddress_Address" data-loccombo="loccomb" data-lat="OrganizationAddress_Latitude" data-lon="OrganizationAddress_Longitude" data-val-slat="@Model.OrganizationAddress.Latitude" data-val-slon="@Model.OrganizationAddress.Longitude" ></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@Html.Hidden("OrganizationAddress.Latitude") @Html.Hidden("OrganizationAddress.Longitude") @Html.Hidden("PerformerId")
|
||||
@Html.Hidden("OrganizationAddress.Latitude")
|
||||
@Html.Hidden("OrganizationAddress.Longitude")
|
||||
@Html.Hidden("PerformerId")
|
||||
<button type="submit" class="btn btn-default">@SR["Save these settings"]</button>
|
||||
|
||||
</form>
|
||||
|
||||
<a asp-controller="InstrumentRating" asp-action="Index">@SR["Instrumentation"]</a>
|
||||
|
||||
<form asp-controller="Manage" asp-action="UnsetActivity" method="post" class="form-horizontal" role="form">
|
||||
@Html.Hidden("PerfomerId")
|
||||
<button type="submit" class="btn btn-default">@SR["UnsetActivity"]</button>
|
||||
</form>
|
||||
|
||||
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
|
||||
|
||||
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
|
||||
@{ await Html.RenderPartialAsync("_MapScriptsPartial"); }
|
||||
|
||||
|
@ -3,15 +3,13 @@
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
|
||||
|
||||
function setCoord(config, pos)
|
||||
{
|
||||
var culture = '@System.Globalization.CultureInfo.CurrentCulture.Name';
|
||||
var lat = new Number(pos.lat);
|
||||
var lng = new Number(pos.lng);
|
||||
$('#'+config.latId).val(lat.toLocaleString(culture));
|
||||
$('#'+config.lonId).val(lng.toLocaleString(culture));
|
||||
$('#'+config.latId).val(pos.lat.toLocaleString(culture, { minimumFractionDigits: 7 }));
|
||||
$('#'+config.lonId).val(pos.lng.toLocaleString(culture, { minimumFractionDigits: 7 }));
|
||||
}
|
||||
var marker=null;
|
||||
function chooseLoc(config, sender, loc) {
|
||||
if (sender === 'user') $('#'+config.addrId).val(loc.formatted_address);
|
||||
var pos = loc.geometry.location;
|
||||
@ -19,18 +17,23 @@
|
||||
var gmap = config.gmap;
|
||||
gmap.setCenter(pos);
|
||||
setCoord(config, pos);
|
||||
var marker = new google.maps.Marker({
|
||||
map: gmap,
|
||||
draggable: true,
|
||||
animation: google.maps.Animation.DROP,
|
||||
position: pos
|
||||
if (marker!=null) {
|
||||
marker.position = pos;
|
||||
}
|
||||
else {
|
||||
marker = new google.maps.Marker({
|
||||
map: gmap,
|
||||
draggable: true,
|
||||
animation: google.maps.Animation.DROP,
|
||||
position: pos
|
||||
});
|
||||
google.maps.event.addListener(marker, 'dragend', function() {
|
||||
var pos = marker.getPosition();
|
||||
setCoord(config, { lat: pos.lat(), lng: pos.lng() });
|
||||
});
|
||||
}
|
||||
|
||||
$('#'+config.addrId).valid();
|
||||
$('#'+config.valId).empty();
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -41,10 +44,9 @@
|
||||
addrId: $(mapDiv).data('addr'),
|
||||
lonId: $(mapDiv).data('lon'),
|
||||
latId: $(mapDiv).data('lat'),
|
||||
valId: $(mapDiv).data('val'),
|
||||
locComboId: $(mapDiv).data('loccombo')
|
||||
};
|
||||
|
||||
var scenter = { lat: parseFloat($('#'+config.latId).val().replace(',','.')), lng: parseFloat($('#'+config.lonId).val().replace(',','.')) } ;
|
||||
var input = '#'+config.addrId;
|
||||
$(input).data("val-required", '@SR["SpecifyPlace"]') ;
|
||||
$(input).data("val-remote", '@SR[ "GoogleDidntGeoLocalized"]') ;
|
||||
@ -85,9 +87,18 @@
|
||||
});
|
||||
|
||||
var gmap = new google.maps.Map(document.getElementById(config.mapId), {
|
||||
zoom: 8
|
||||
zoom: 8,
|
||||
center: scenter
|
||||
});
|
||||
|
||||
config.gmap = gmap;
|
||||
marker = new google.maps.Marker({
|
||||
map: gmap,
|
||||
draggable: true,
|
||||
animation: google.maps.Animation.DROP,
|
||||
position: scenter
|
||||
});
|
||||
|
||||
}
|
||||
$("div.map").each(function(indexMap){
|
||||
setupInputAddress(this)
|
||||
|
Reference in New Issue
Block a user