refactoring
parent
52d12985c7
commit
76889c82c5
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,759 @@
|
|||||||
|
using System;
|
||||||
|
using Microsoft.Data.Entity.Migrations;
|
||||||
|
|
||||||
|
namespace Yavsc.Migrations
|
||||||
|
{
|
||||||
|
public partial class BrusherCalendarModel : 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_BlackListed_ApplicationUser_OwnerId", table: "BlackListed");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_CircleAuthorizationToBlogPost_Blog_BlogPostId", table: "CircleAuthorizationToBlogPost");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_CircleAuthorizationToBlogPost_Circle_CircleId", table: "CircleAuthorizationToBlogPost");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_AccountBalance_ApplicationUser_UserId", table: "AccountBalance");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_BalanceImpact_AccountBalance_BalanceId", table: "BalanceImpact");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_CommandLine_Estimate_EstimateId", table: "CommandLine");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_Estimate_ApplicationUser_ClientId", table: "Estimate");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_Estimate_PerformerProfile_OwnerId", table: "Estimate");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_Period_BrusherProfile_BrusherProfileUserId", table: "Period");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_Connection_ApplicationUser_ApplicationUserId", table: "Connection");
|
||||||
|
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_PostTag_Blog_PostId", table: "PostTag");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_CommandForm_Activity_ActivityCode", table: "CommandForm");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_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.DropColumn(name: "BrusherProfileUserId", table: "Period");
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "Schedule",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
OwnerId = table.Column<string>(nullable: false)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_Schedule", x => x.OwnerId);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_Schedule_ApplicationUser_OwnerId",
|
||||||
|
column: x => x.OwnerId,
|
||||||
|
principalTable: "AspNetUsers",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
});
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "ScheduledEvent",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<long>(nullable: false)
|
||||||
|
.Annotation("Npgsql:Serial", true),
|
||||||
|
PeriodEnd = table.Column<DateTime>(nullable: true),
|
||||||
|
PeriodStart = table.Column<DateTime>(nullable: true),
|
||||||
|
Reccurence = table.Column<int>(nullable: false),
|
||||||
|
ScheduleOwnerId = table.Column<string>(nullable: true)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_ScheduledEvent", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_ScheduledEvent_Schedule_ScheduleOwnerId",
|
||||||
|
column: x => x.ScheduleOwnerId,
|
||||||
|
principalTable: "Schedule",
|
||||||
|
principalColumn: "OwnerId",
|
||||||
|
onDelete: ReferentialAction.Restrict);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_ScheduledEvent_Period_PeriodStart_PeriodEnd",
|
||||||
|
columns: x => new { x.PeriodStart, x.PeriodEnd },
|
||||||
|
principalTable: "Period",
|
||||||
|
principalColumns: new[] { "Start", "End" },
|
||||||
|
onDelete: ReferentialAction.Restrict);
|
||||||
|
});
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "ScheduleOwnerId",
|
||||||
|
table: "BrusherProfile",
|
||||||
|
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_BlackListed_ApplicationUser_OwnerId",
|
||||||
|
table: "BlackListed",
|
||||||
|
column: "OwnerId",
|
||||||
|
principalTable: "AspNetUsers",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_CircleAuthorizationToBlogPost_Blog_BlogPostId",
|
||||||
|
table: "CircleAuthorizationToBlogPost",
|
||||||
|
column: "BlogPostId",
|
||||||
|
principalTable: "Blog",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_CircleAuthorizationToBlogPost_Circle_CircleId",
|
||||||
|
table: "CircleAuthorizationToBlogPost",
|
||||||
|
column: "CircleId",
|
||||||
|
principalTable: "Circle",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_AccountBalance_ApplicationUser_UserId",
|
||||||
|
table: "AccountBalance",
|
||||||
|
column: "UserId",
|
||||||
|
principalTable: "AspNetUsers",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_BalanceImpact_AccountBalance_BalanceId",
|
||||||
|
table: "BalanceImpact",
|
||||||
|
column: "BalanceId",
|
||||||
|
principalTable: "AccountBalance",
|
||||||
|
principalColumn: "UserId",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_CommandLine_Estimate_EstimateId",
|
||||||
|
table: "CommandLine",
|
||||||
|
column: "EstimateId",
|
||||||
|
principalTable: "Estimate",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_Estimate_ApplicationUser_ClientId",
|
||||||
|
table: "Estimate",
|
||||||
|
column: "ClientId",
|
||||||
|
principalTable: "AspNetUsers",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_Estimate_PerformerProfile_OwnerId",
|
||||||
|
table: "Estimate",
|
||||||
|
column: "OwnerId",
|
||||||
|
principalTable: "PerformerProfile",
|
||||||
|
principalColumn: "PerformerId",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_Connection_ApplicationUser_ApplicationUserId",
|
||||||
|
table: "Connection",
|
||||||
|
column: "ApplicationUserId",
|
||||||
|
principalTable: "AspNetUsers",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_BrusherProfile_Schedule_ScheduleOwnerId",
|
||||||
|
table: "BrusherProfile",
|
||||||
|
column: "ScheduleOwnerId",
|
||||||
|
principalTable: "Schedule",
|
||||||
|
principalColumn: "OwnerId",
|
||||||
|
onDelete: ReferentialAction.Restrict);
|
||||||
|
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_PostTag_Blog_PostId",
|
||||||
|
table: "PostTag",
|
||||||
|
column: "PostId",
|
||||||
|
principalTable: "Blog",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_CommandForm_Activity_ActivityCode",
|
||||||
|
table: "CommandForm",
|
||||||
|
column: "ActivityCode",
|
||||||
|
principalTable: "Activity",
|
||||||
|
principalColumn: "Code",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_PerformerProfile_Location_OrganizationAddressId",
|
||||||
|
table: "PerformerProfile",
|
||||||
|
column: "OrganizationAddressId",
|
||||||
|
principalTable: "Location",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_PerformerProfile_ApplicationUser_PerformerId",
|
||||||
|
table: "PerformerProfile",
|
||||||
|
column: "PerformerId",
|
||||||
|
principalTable: "AspNetUsers",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_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);
|
||||||
|
}
|
||||||
|
|
||||||
|
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_BlackListed_ApplicationUser_OwnerId", table: "BlackListed");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_CircleAuthorizationToBlogPost_Blog_BlogPostId", table: "CircleAuthorizationToBlogPost");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_CircleAuthorizationToBlogPost_Circle_CircleId", table: "CircleAuthorizationToBlogPost");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_AccountBalance_ApplicationUser_UserId", table: "AccountBalance");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_BalanceImpact_AccountBalance_BalanceId", table: "BalanceImpact");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_CommandLine_Estimate_EstimateId", table: "CommandLine");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_Estimate_ApplicationUser_ClientId", table: "Estimate");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_Estimate_PerformerProfile_OwnerId", table: "Estimate");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_Connection_ApplicationUser_ApplicationUserId", table: "Connection");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_BrusherProfile_Schedule_ScheduleOwnerId", table: "BrusherProfile");
|
||||||
|
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_PostTag_Blog_PostId", table: "PostTag");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_CommandForm_Activity_ActivityCode", table: "CommandForm");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_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.DropColumn(name: "ScheduleOwnerId", table: "BrusherProfile");
|
||||||
|
migrationBuilder.DropTable("ScheduledEvent");
|
||||||
|
migrationBuilder.DropTable("Schedule");
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "BrusherProfileUserId",
|
||||||
|
table: "Period",
|
||||||
|
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_BlackListed_ApplicationUser_OwnerId",
|
||||||
|
table: "BlackListed",
|
||||||
|
column: "OwnerId",
|
||||||
|
principalTable: "AspNetUsers",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Restrict);
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_CircleAuthorizationToBlogPost_Blog_BlogPostId",
|
||||||
|
table: "CircleAuthorizationToBlogPost",
|
||||||
|
column: "BlogPostId",
|
||||||
|
principalTable: "Blog",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Restrict);
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_CircleAuthorizationToBlogPost_Circle_CircleId",
|
||||||
|
table: "CircleAuthorizationToBlogPost",
|
||||||
|
column: "CircleId",
|
||||||
|
principalTable: "Circle",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Restrict);
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_AccountBalance_ApplicationUser_UserId",
|
||||||
|
table: "AccountBalance",
|
||||||
|
column: "UserId",
|
||||||
|
principalTable: "AspNetUsers",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Restrict);
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_BalanceImpact_AccountBalance_BalanceId",
|
||||||
|
table: "BalanceImpact",
|
||||||
|
column: "BalanceId",
|
||||||
|
principalTable: "AccountBalance",
|
||||||
|
principalColumn: "UserId",
|
||||||
|
onDelete: ReferentialAction.Restrict);
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_CommandLine_Estimate_EstimateId",
|
||||||
|
table: "CommandLine",
|
||||||
|
column: "EstimateId",
|
||||||
|
principalTable: "Estimate",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Restrict);
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_Estimate_ApplicationUser_ClientId",
|
||||||
|
table: "Estimate",
|
||||||
|
column: "ClientId",
|
||||||
|
principalTable: "AspNetUsers",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Restrict);
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_Estimate_PerformerProfile_OwnerId",
|
||||||
|
table: "Estimate",
|
||||||
|
column: "OwnerId",
|
||||||
|
principalTable: "PerformerProfile",
|
||||||
|
principalColumn: "PerformerId",
|
||||||
|
onDelete: ReferentialAction.Restrict);
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_Period_BrusherProfile_BrusherProfileUserId",
|
||||||
|
table: "Period",
|
||||||
|
column: "BrusherProfileUserId",
|
||||||
|
principalTable: "BrusherProfile",
|
||||||
|
principalColumn: "UserId",
|
||||||
|
onDelete: ReferentialAction.Restrict);
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_Connection_ApplicationUser_ApplicationUserId",
|
||||||
|
table: "Connection",
|
||||||
|
column: "ApplicationUserId",
|
||||||
|
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_PostTag_Blog_PostId",
|
||||||
|
table: "PostTag",
|
||||||
|
column: "PostId",
|
||||||
|
principalTable: "Blog",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Restrict);
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_CommandForm_Activity_ActivityCode",
|
||||||
|
table: "CommandForm",
|
||||||
|
column: "ActivityCode",
|
||||||
|
principalTable: "Activity",
|
||||||
|
principalColumn: "Code",
|
||||||
|
onDelete: ReferentialAction.Restrict);
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_PerformerProfile_Location_OrganizationAddressId",
|
||||||
|
table: "PerformerProfile",
|
||||||
|
column: "OrganizationAddressId",
|
||||||
|
principalTable: "Location",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Restrict);
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_PerformerProfile_ApplicationUser_PerformerId",
|
||||||
|
table: "PerformerProfile",
|
||||||
|
column: "PerformerId",
|
||||||
|
principalTable: "AspNetUsers",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Restrict);
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,9 +0,0 @@
|
|||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace Yavsc.Models.Calendar
|
|
||||||
{
|
|
||||||
public class Availability: List<Period>
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
@ -0,0 +1,34 @@
|
|||||||
|
//
|
||||||
|
// IScheduledEvent.cs
|
||||||
|
//
|
||||||
|
// Author:
|
||||||
|
// Paul Schneider <paulschneider@free.fr>
|
||||||
|
//
|
||||||
|
// Copyright (c) 2015 - 2017 Paul Schneider
|
||||||
|
//
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
|
// (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public License
|
||||||
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
namespace Yavsc.Models.Calendar
|
||||||
|
{
|
||||||
|
public interface IScheduledEvent
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the period.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The period.</value>
|
||||||
|
Periodicity Reccurence { get; set; }
|
||||||
|
Period Period { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,45 @@
|
|||||||
|
//
|
||||||
|
// ScheduledEvent.cs
|
||||||
|
//
|
||||||
|
// Author:
|
||||||
|
// Paul Schneider <paulschneider@free.fr>
|
||||||
|
//
|
||||||
|
// Copyright (c) 2015 - 2017 Paul Schneider
|
||||||
|
//
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
|
// (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public License
|
||||||
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
|
namespace Yavsc.Models.Calendar
|
||||||
|
{
|
||||||
|
public class ScheduledEvent : IScheduledEvent
|
||||||
|
{
|
||||||
|
[Key,DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||||
|
public long Id { get; set; }
|
||||||
|
public Period Period
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Periodicity Reccurence
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
namespace Yavsc.Models.Google.Calendar
|
||||||
|
{
|
||||||
|
public class Reminder {
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the method.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The method.</value>
|
||||||
|
public string method { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the minutes.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The minutes.</value>
|
||||||
|
public int minutes { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,51 @@
|
|||||||
|
using System;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.AspNet.Mvc;
|
||||||
|
using Yavsc.Models;
|
||||||
|
using Yavsc.Models.Calendar;
|
||||||
|
using Yavsc.ViewModels.Calendar;
|
||||||
|
|
||||||
|
namespace Yavsc.ViewComponents
|
||||||
|
{
|
||||||
|
public class CalendarViewComponent : ViewComponent
|
||||||
|
{
|
||||||
|
ApplicationDbContext _dbContext;
|
||||||
|
ICalendarManager _manager;
|
||||||
|
|
||||||
|
public CalendarViewComponent (
|
||||||
|
ApplicationDbContext dbContext,
|
||||||
|
ICalendarManager manager)
|
||||||
|
{
|
||||||
|
_manager = manager;
|
||||||
|
_dbContext = dbContext;
|
||||||
|
}
|
||||||
|
/* ,
|
||||||
|
Google.Apis Google.Apis.Core
|
||||||
|
"Google.Apis.Auth": "1.27.1",
|
||||||
|
"Google.Apis.Calendar.v3": "1.27.1.878"
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
public async Task<IViewComponentResult> InvokeAsync (
|
||||||
|
string templateName,
|
||||||
|
string htmlFieldName,
|
||||||
|
string userId, string calId )
|
||||||
|
{
|
||||||
|
var minDate = DateTime.Now;
|
||||||
|
var maxDate = minDate.AddDays(20);
|
||||||
|
|
||||||
|
var cal = await _manager.GetCalendarAsync(
|
||||||
|
calId, minDate, maxDate, userId
|
||||||
|
);
|
||||||
|
|
||||||
|
ViewData["Calendar"] = cal;
|
||||||
|
|
||||||
|
return View(templateName, new DateTimeChooserViewModel {
|
||||||
|
InputId = htmlFieldName,
|
||||||
|
MinDate = minDate,
|
||||||
|
MaxDate = maxDate
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
using System;
|
||||||
|
using Yavsc.Models.Calendar;
|
||||||
|
|
||||||
|
|
||||||
|
namespace Yavsc.ViewModels.Calendar
|
||||||
|
{
|
||||||
|
public class DateTimeChooserViewModel
|
||||||
|
{
|
||||||
|
public string InputId { get; set; }
|
||||||
|
public DateTime MinDate { get; set; }
|
||||||
|
public DateTime MaxDate { get; set; }
|
||||||
|
public Period [] DisabledTimeIntervals { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,13 @@
|
|||||||
|
@{
|
||||||
|
ViewData["Title"] = "Conditions Générales de Vente";
|
||||||
|
}
|
||||||
|
<h2>@ViewData["Title"]</h2>
|
||||||
|
<markdown>
|
||||||
|
|
||||||
|
Le paiement intervient à la commande, quelque soit la date d'intervention.
|
||||||
|
Vous pouvez annuler votre commande depuis la [liste de vos commande en cours](/HairCutCommand/),
|
||||||
|
|
||||||
|
Vous pouvez demander le remboursement d'un paiement, dans le cadre d'une réclamation sur l'execution
|
||||||
|
de votre commande, en nous contactant via courrier éléctronique ou postal, [que vour retrouverez sur la page de contact](/Home/Contact), votre demande sera rapidement traitée.
|
||||||
|
|
||||||
|
</markdown>
|
@ -0,0 +1,14 @@
|
|||||||
|
@{
|
||||||
|
ViewData["Title"] = @SR["Confidentialité"]+" "+@SiteSettings.Value.Title;
|
||||||
|
}
|
||||||
|
<h1>@ViewData["Title"]</h1>
|
||||||
|
|
||||||
|
<markdown>
|
||||||
|
## La confidentialité
|
||||||
|
|
||||||
|
À aucun moment, aucune adresse postale, aucune adresse e-mail ni aucun numéro de téléphone
|
||||||
|
ne sont transmis à personne. Seul le système et son [possesseur](/Home/Contact) a accès à ces informations.
|
||||||
|
|
||||||
|
De plus, le droit de retrait est permanent et sa mise en oeuvre [immédiate](/Account/Delete).
|
||||||
|
|
||||||
|
</markdown>
|
@ -0,0 +1,11 @@
|
|||||||
|
@model DateTimeChooserViewModel
|
||||||
|
|
||||||
|
|
||||||
|
@Newtonsoft.Json.JsonConvert.SerializeObject(ViewData["Calendar"])
|
||||||
|
|
||||||
|
<div class='input-group date'>
|
||||||
|
<input class="form-control" name="@Model.InputId" />
|
||||||
|
<span class="input-group-addon">
|
||||||
|
<span class="glyphicon glyphicon-calendar"></span>
|
||||||
|
</span>
|
||||||
|
</div>
|
@ -1,3 +1,2 @@
|
|||||||
@model Availability
|
@model Availability
|
||||||
|
|
||||||
L'index des periodes ...
|
|
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
@ -0,0 +1,28 @@
|
|||||||
|
+(function($) {
|
||||||
|
var allowCircleToBlog = function(e) {
|
||||||
|
var allow = $(this).prop('checked');
|
||||||
|
var circleid = $(this).data('circle-id');
|
||||||
|
var targetid = $(this).data('target-id');
|
||||||
|
var auth = { CircleId: circleid, BlogPostId: targetid };
|
||||||
|
var url = '/api/blogacl';
|
||||||
|
if (!allow) url += '/' + circleid;
|
||||||
|
console.log(auth);
|
||||||
|
$.ajax({
|
||||||
|
url: url,
|
||||||
|
type: allow ? 'POST' : 'DELETE',
|
||||||
|
data: JSON.stringify(auth),
|
||||||
|
contentType: "application/json;charset=utf-8",
|
||||||
|
success: function(data) {
|
||||||
|
console.log('auth ' + allow ? 'POSTED' : 'DELETED' + data);
|
||||||
|
},
|
||||||
|
error: function() {
|
||||||
|
console.log('Error @' + allow ? 'POSTed' : 'DELETEd');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
e.preventDefault();
|
||||||
|
};
|
||||||
|
$(document).ready(function() {
|
||||||
|
$('input.Blogcirle[type=checkbox]').on('change', allowCircleToBlog);
|
||||||
|
$('.input-group.date').datetimepicker();
|
||||||
|
});
|
||||||
|
})(jQuery);
|
Loading…
Reference in New Issue