Passage à ASP.NET vNext
This commit is contained in:
parent
ea90fefc31
commit
388b004837
1929 changed files with 104611 additions and 235941 deletions
444
Yavsc/Migrations/20160315144017_init.Designer.cs
generated
Normal file
444
Yavsc/Migrations/20160315144017_init.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,444 @@
|
|||
using System;
|
||||
using Microsoft.Data.Entity;
|
||||
using Microsoft.Data.Entity.Infrastructure;
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
using Yavsc.Models;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
[DbContext(typeof(ApplicationDbContext))]
|
||||
[Migration("20160315144017_init")]
|
||||
partial class init
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "7.0.0-rc1-16348");
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRole", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("NormalizedName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedName")
|
||||
.HasAnnotation("Relational:Name", "RoleNameIndex");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<string>("RoleId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetRoleClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.Property<string>("LoginProvider");
|
||||
|
||||
b.Property<string>("ProviderKey");
|
||||
|
||||
b.Property<string>("ProviderDisplayName");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("LoginProvider", "ProviderKey");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserLogins");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("RoleId");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Location", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Address")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<double>("Latitude");
|
||||
|
||||
b.Property<double>("Longitude");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.AccountBalance", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<long>("Credits");
|
||||
|
||||
b.Property<long>("HistoryId");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.AccountHistory", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Activity", b =>
|
||||
{
|
||||
b.Property<string>("Code")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("Photo");
|
||||
|
||||
b.HasKey("Code");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<int>("AccessFailedCount");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<bool>("EmailConfirmed");
|
||||
|
||||
b.Property<bool>("LockoutEnabled");
|
||||
|
||||
b.Property<DateTimeOffset?>("LockoutEnd");
|
||||
|
||||
b.Property<string>("NormalizedEmail")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("NormalizedUserName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("PasswordHash");
|
||||
|
||||
b.Property<string>("PhoneNumber");
|
||||
|
||||
b.Property<bool>("PhoneNumberConfirmed");
|
||||
|
||||
b.Property<string>("SecurityStamp");
|
||||
|
||||
b.Property<bool>("TwoFactorEnabled");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedEmail")
|
||||
.HasAnnotation("Relational:Name", "EmailIndex");
|
||||
|
||||
b.HasIndex("NormalizedUserName")
|
||||
.HasAnnotation("Relational:Name", "UserNameIndex");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUsers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Blog", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AuthorId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("bcontent");
|
||||
|
||||
b.Property<DateTime>("modified");
|
||||
|
||||
b.Property<string>("photo");
|
||||
|
||||
b.Property<DateTime>("posted");
|
||||
|
||||
b.Property<int>("rate");
|
||||
|
||||
b.Property<string>("title");
|
||||
|
||||
b.Property<bool>("visible");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Booking.SimpleBookQuery", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("EventDate");
|
||||
|
||||
b.Property<long?>("LocationId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("PerformerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("ValidationDate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Circle", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CircleMember", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long?>("CircleId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("MemberId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Command", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("PerformerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("ValidationDate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Estimate", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long?>("CommandId");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<int?>("Status");
|
||||
|
||||
b.Property<string>("Title");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.PerformerProfile", b =>
|
||||
{
|
||||
b.Property<string>("PerfomerId");
|
||||
|
||||
b.Property<bool>("AcceptGeoLocalisation");
|
||||
|
||||
b.Property<bool>("AcceptNotifications");
|
||||
|
||||
b.Property<bool>("AcceptPublicContact");
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<string>("ActivityCode")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<int>("DailyCost");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.Property<string>("WebSite");
|
||||
|
||||
b.HasKey("PerfomerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Skill", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.AccountBalance", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.AccountHistory")
|
||||
.WithMany()
|
||||
.HasForeignKey("HistoryId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithOne()
|
||||
.HasForeignKey("YavscWeb.Models.AccountBalance", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Blog", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("AuthorId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Booking.SimpleBookQuery", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId");
|
||||
|
||||
b.HasOne("YavscWeb.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("LocationId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CircleMember", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Circle")
|
||||
.WithMany()
|
||||
.HasForeignKey("CircleId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("MemberId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Command", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Estimate", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Command")
|
||||
.WithMany()
|
||||
.HasForeignKey("CommandId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.PerformerProfile", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ActivityCode");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerfomerId");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
414
Yavsc/Migrations/20160315144017_init.cs
Normal file
414
Yavsc/Migrations/20160315144017_init.cs
Normal file
|
|
@ -0,0 +1,414 @@
|
|||
using System;
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
public partial class init : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "AspNetRoles",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<string>(nullable: false),
|
||||
ConcurrencyStamp = table.Column<string>(nullable: true),
|
||||
Name = table.Column<string>(nullable: true),
|
||||
NormalizedName = table.Column<string>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_IdentityRole", x => x.Id);
|
||||
});
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Location",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<long>(nullable: false)
|
||||
.Annotation("Npgsql:Serial", true),
|
||||
Address = table.Column<string>(nullable: false),
|
||||
Latitude = table.Column<double>(nullable: false),
|
||||
Longitude = table.Column<double>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Location", x => x.Id);
|
||||
});
|
||||
migrationBuilder.CreateTable(
|
||||
name: "AccountHistory",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<long>(nullable: false)
|
||||
.Annotation("Npgsql:Serial", true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_AccountHistory", x => x.Id);
|
||||
});
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Activity",
|
||||
columns: table => new
|
||||
{
|
||||
Code = table.Column<string>(nullable: false),
|
||||
Description = table.Column<string>(nullable: true),
|
||||
Name = table.Column<string>(nullable: false),
|
||||
Photo = table.Column<string>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Activity", x => x.Code);
|
||||
});
|
||||
migrationBuilder.CreateTable(
|
||||
name: "AspNetUsers",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<string>(nullable: false),
|
||||
AccessFailedCount = table.Column<int>(nullable: false),
|
||||
ConcurrencyStamp = table.Column<string>(nullable: true),
|
||||
Email = table.Column<string>(nullable: true),
|
||||
EmailConfirmed = table.Column<bool>(nullable: false),
|
||||
LockoutEnabled = table.Column<bool>(nullable: false),
|
||||
LockoutEnd = table.Column<DateTimeOffset>(nullable: true),
|
||||
NormalizedEmail = table.Column<string>(nullable: true),
|
||||
NormalizedUserName = table.Column<string>(nullable: true),
|
||||
PasswordHash = table.Column<string>(nullable: true),
|
||||
PhoneNumber = table.Column<string>(nullable: true),
|
||||
PhoneNumberConfirmed = table.Column<bool>(nullable: false),
|
||||
SecurityStamp = table.Column<string>(nullable: true),
|
||||
TwoFactorEnabled = table.Column<bool>(nullable: false),
|
||||
UserName = table.Column<string>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ApplicationUser", x => x.Id);
|
||||
});
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Circle",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<long>(nullable: false)
|
||||
.Annotation("Npgsql:Serial", true),
|
||||
Name = table.Column<string>(nullable: true),
|
||||
UserId = table.Column<string>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Circle", x => x.Id);
|
||||
});
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Skill",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<long>(nullable: false)
|
||||
.Annotation("Npgsql:Serial", true),
|
||||
Name = table.Column<string>(nullable: true),
|
||||
Rate = table.Column<int>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Skill", x => x.Id);
|
||||
});
|
||||
migrationBuilder.CreateTable(
|
||||
name: "AspNetRoleClaims",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("Npgsql:Serial", true),
|
||||
ClaimType = table.Column<string>(nullable: true),
|
||||
ClaimValue = table.Column<string>(nullable: true),
|
||||
RoleId = table.Column<string>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_IdentityRoleClaim<string>", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId",
|
||||
column: x => x.RoleId,
|
||||
principalTable: "AspNetRoles",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
migrationBuilder.CreateTable(
|
||||
name: "AspNetUserClaims",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("Npgsql:Serial", true),
|
||||
ClaimType = table.Column<string>(nullable: true),
|
||||
ClaimValue = table.Column<string>(nullable: true),
|
||||
UserId = table.Column<string>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_IdentityUserClaim<string>", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId",
|
||||
column: x => x.UserId,
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
migrationBuilder.CreateTable(
|
||||
name: "AspNetUserLogins",
|
||||
columns: table => new
|
||||
{
|
||||
LoginProvider = table.Column<string>(nullable: false),
|
||||
ProviderKey = table.Column<string>(nullable: false),
|
||||
ProviderDisplayName = table.Column<string>(nullable: true),
|
||||
UserId = table.Column<string>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_IdentityUserLogin<string>", x => new { x.LoginProvider, x.ProviderKey });
|
||||
table.ForeignKey(
|
||||
name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId",
|
||||
column: x => x.UserId,
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
migrationBuilder.CreateTable(
|
||||
name: "AspNetUserRoles",
|
||||
columns: table => new
|
||||
{
|
||||
UserId = table.Column<string>(nullable: false),
|
||||
RoleId = table.Column<string>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_IdentityUserRole<string>", x => new { x.UserId, x.RoleId });
|
||||
table.ForeignKey(
|
||||
name: "FK_IdentityUserRole<string>_IdentityRole_RoleId",
|
||||
column: x => x.RoleId,
|
||||
principalTable: "AspNetRoles",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_IdentityUserRole<string>_ApplicationUser_UserId",
|
||||
column: x => x.UserId,
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
migrationBuilder.CreateTable(
|
||||
name: "AccountBalance",
|
||||
columns: table => new
|
||||
{
|
||||
UserId = table.Column<string>(nullable: false),
|
||||
Credits = table.Column<long>(nullable: false),
|
||||
HistoryId = table.Column<long>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_AccountBalance", x => x.UserId);
|
||||
table.ForeignKey(
|
||||
name: "FK_AccountBalance_AccountHistory_HistoryId",
|
||||
column: x => x.HistoryId,
|
||||
principalTable: "AccountHistory",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_AccountBalance_ApplicationUser_UserId",
|
||||
column: x => x.UserId,
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Blog",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<long>(nullable: false)
|
||||
.Annotation("Npgsql:Serial", true),
|
||||
AuthorId = table.Column<string>(nullable: false),
|
||||
bcontent = table.Column<string>(nullable: true),
|
||||
modified = table.Column<DateTime>(nullable: false),
|
||||
photo = table.Column<string>(nullable: true),
|
||||
posted = table.Column<DateTime>(nullable: false),
|
||||
rate = table.Column<int>(nullable: false),
|
||||
title = table.Column<string>(nullable: true),
|
||||
visible = table.Column<bool>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Blog", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Blog_ApplicationUser_AuthorId",
|
||||
column: x => x.AuthorId,
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
migrationBuilder.CreateTable(
|
||||
name: "SimpleBookQuery",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<long>(nullable: false)
|
||||
.Annotation("Npgsql:Serial", true),
|
||||
ClientId = table.Column<string>(nullable: false),
|
||||
EventDate = table.Column<DateTime>(nullable: false),
|
||||
LocationId = table.Column<long>(nullable: false),
|
||||
PerformerId = table.Column<string>(nullable: false),
|
||||
ValidationDate = table.Column<DateTime>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_SimpleBookQuery", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_SimpleBookQuery_ApplicationUser_ClientId",
|
||||
column: x => x.ClientId,
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_SimpleBookQuery_Location_LocationId",
|
||||
column: x => x.LocationId,
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_SimpleBookQuery_ApplicationUser_PerformerId",
|
||||
column: x => x.PerformerId,
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Command",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<long>(nullable: false)
|
||||
.Annotation("Npgsql:Serial", true),
|
||||
ClientId = table.Column<string>(nullable: false),
|
||||
PerformerId = table.Column<string>(nullable: false),
|
||||
ValidationDate = table.Column<DateTime>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Command", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Command_ApplicationUser_ClientId",
|
||||
column: x => x.ClientId,
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_Command_ApplicationUser_PerformerId",
|
||||
column: x => x.PerformerId,
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PerformerProfile",
|
||||
columns: table => new
|
||||
{
|
||||
PerfomerId = table.Column<string>(nullable: false),
|
||||
AcceptGeoLocalisation = table.Column<bool>(nullable: false),
|
||||
AcceptNotifications = table.Column<bool>(nullable: false),
|
||||
AcceptPublicContact = table.Column<bool>(nullable: false),
|
||||
Active = table.Column<bool>(nullable: false),
|
||||
ActivityCode = table.Column<string>(nullable: false),
|
||||
DailyCost = table.Column<int>(nullable: false),
|
||||
Rate = table.Column<int>(nullable: false),
|
||||
WebSite = table.Column<string>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_PerformerProfile", x => x.PerfomerId);
|
||||
table.ForeignKey(
|
||||
name: "FK_PerformerProfile_Activity_ActivityCode",
|
||||
column: x => x.ActivityCode,
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_PerformerProfile_ApplicationUser_PerfomerId",
|
||||
column: x => x.PerfomerId,
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
migrationBuilder.CreateTable(
|
||||
name: "CircleMember",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<long>(nullable: false)
|
||||
.Annotation("Npgsql:Serial", true),
|
||||
CircleId = table.Column<long>(nullable: false),
|
||||
MemberId = table.Column<string>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_CircleMember", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_CircleMember_Circle_CircleId",
|
||||
column: x => x.CircleId,
|
||||
principalTable: "Circle",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_CircleMember_ApplicationUser_MemberId",
|
||||
column: x => x.MemberId,
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Estimate",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<long>(nullable: false)
|
||||
.Annotation("Npgsql:Serial", true),
|
||||
CommandId = table.Column<long>(nullable: true),
|
||||
Description = table.Column<string>(nullable: true),
|
||||
Status = table.Column<int>(nullable: true),
|
||||
Title = table.Column<string>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Estimate", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Estimate_Command_CommandId",
|
||||
column: x => x.CommandId,
|
||||
principalTable: "Command",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "RoleNameIndex",
|
||||
table: "AspNetRoles",
|
||||
column: "NormalizedName");
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "EmailIndex",
|
||||
table: "AspNetUsers",
|
||||
column: "NormalizedEmail");
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "UserNameIndex",
|
||||
table: "AspNetUsers",
|
||||
column: "NormalizedUserName");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable("AspNetRoleClaims");
|
||||
migrationBuilder.DropTable("AspNetUserClaims");
|
||||
migrationBuilder.DropTable("AspNetUserLogins");
|
||||
migrationBuilder.DropTable("AspNetUserRoles");
|
||||
migrationBuilder.DropTable("AccountBalance");
|
||||
migrationBuilder.DropTable("Blog");
|
||||
migrationBuilder.DropTable("SimpleBookQuery");
|
||||
migrationBuilder.DropTable("CircleMember");
|
||||
migrationBuilder.DropTable("Estimate");
|
||||
migrationBuilder.DropTable("PerformerProfile");
|
||||
migrationBuilder.DropTable("Skill");
|
||||
migrationBuilder.DropTable("AspNetRoles");
|
||||
migrationBuilder.DropTable("AccountHistory");
|
||||
migrationBuilder.DropTable("Location");
|
||||
migrationBuilder.DropTable("Circle");
|
||||
migrationBuilder.DropTable("Command");
|
||||
migrationBuilder.DropTable("Activity");
|
||||
migrationBuilder.DropTable("AspNetUsers");
|
||||
}
|
||||
}
|
||||
}
|
||||
452
Yavsc/Migrations/20160317215718_command.Designer.cs
generated
Normal file
452
Yavsc/Migrations/20160317215718_command.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,452 @@
|
|||
using System;
|
||||
using Microsoft.Data.Entity;
|
||||
using Microsoft.Data.Entity.Infrastructure;
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
using Yavsc.Models;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
[DbContext(typeof(ApplicationDbContext))]
|
||||
[Migration("20160317215718_command")]
|
||||
partial class command
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "7.0.0-rc1-16348");
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRole", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("NormalizedName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedName")
|
||||
.HasAnnotation("Relational:Name", "RoleNameIndex");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<string>("RoleId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetRoleClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.Property<string>("LoginProvider");
|
||||
|
||||
b.Property<string>("ProviderKey");
|
||||
|
||||
b.Property<string>("ProviderDisplayName");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("LoginProvider", "ProviderKey");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserLogins");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("RoleId");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Location", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Address")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<double>("Latitude");
|
||||
|
||||
b.Property<double>("Longitude");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.AccountBalance", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<long>("Credits");
|
||||
|
||||
b.Property<long>("HistoryId");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.AccountHistory", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Activity", b =>
|
||||
{
|
||||
b.Property<string>("Code")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("Photo");
|
||||
|
||||
b.HasKey("Code");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<int>("AccessFailedCount");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<bool>("EmailConfirmed");
|
||||
|
||||
b.Property<bool>("LockoutEnabled");
|
||||
|
||||
b.Property<DateTimeOffset?>("LockoutEnd");
|
||||
|
||||
b.Property<string>("NormalizedEmail")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("NormalizedUserName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("PasswordHash");
|
||||
|
||||
b.Property<string>("PhoneNumber");
|
||||
|
||||
b.Property<bool>("PhoneNumberConfirmed");
|
||||
|
||||
b.Property<string>("SecurityStamp");
|
||||
|
||||
b.Property<bool>("TwoFactorEnabled");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedEmail")
|
||||
.HasAnnotation("Relational:Name", "EmailIndex");
|
||||
|
||||
b.HasIndex("NormalizedUserName")
|
||||
.HasAnnotation("Relational:Name", "UserNameIndex");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUsers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Blog", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AuthorId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("bcontent");
|
||||
|
||||
b.Property<DateTime>("modified");
|
||||
|
||||
b.Property<string>("photo");
|
||||
|
||||
b.Property<DateTime>("posted");
|
||||
|
||||
b.Property<int>("rate");
|
||||
|
||||
b.Property<string>("title");
|
||||
|
||||
b.Property<bool>("visible");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Book.Query", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("EventDate");
|
||||
|
||||
b.Property<decimal?>("Final");
|
||||
|
||||
b.Property<long?>("LocationId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("PerformerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<decimal?>("Previsional");
|
||||
|
||||
b.Property<DateTime?>("ValidationDate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Circle", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CircleMember", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long?>("CircleId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("MemberId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Command", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<decimal?>("Final");
|
||||
|
||||
b.Property<string>("PerformerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<decimal?>("Previsional");
|
||||
|
||||
b.Property<DateTime?>("ValidationDate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Estimate", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long?>("CommandId");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<int?>("Status");
|
||||
|
||||
b.Property<string>("Title");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.PerformerProfile", b =>
|
||||
{
|
||||
b.Property<string>("PerfomerId");
|
||||
|
||||
b.Property<bool>("AcceptGeoLocalisation");
|
||||
|
||||
b.Property<bool>("AcceptNotifications");
|
||||
|
||||
b.Property<bool>("AcceptPublicContact");
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<string>("ActivityCode")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<int>("DailyCost");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.Property<string>("WebSite");
|
||||
|
||||
b.HasKey("PerfomerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Skill", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.AccountBalance", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.AccountHistory")
|
||||
.WithMany()
|
||||
.HasForeignKey("HistoryId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithOne()
|
||||
.HasForeignKey("YavscWeb.Models.AccountBalance", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Blog", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("AuthorId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Book.Query", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId");
|
||||
|
||||
b.HasOne("YavscWeb.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("LocationId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CircleMember", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Circle")
|
||||
.WithMany()
|
||||
.HasForeignKey("CircleId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("MemberId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Command", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Estimate", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Command")
|
||||
.WithMany()
|
||||
.HasForeignKey("CommandId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.PerformerProfile", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ActivityCode");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerfomerId");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
330
Yavsc/Migrations/20160317215718_command.cs
Normal file
330
Yavsc/Migrations/20160317215718_command.cs
Normal file
|
|
@ -0,0 +1,330 @@
|
|||
using System;
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
public partial class command : 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_AccountBalance_AccountHistory_HistoryId", table: "AccountBalance");
|
||||
migrationBuilder.DropForeignKey(name: "FK_AccountBalance_ApplicationUser_UserId", table: "AccountBalance");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Blog_ApplicationUser_AuthorId", table: "Blog");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_ApplicationUser_ClientId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_ApplicationUser_PerformerId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Activity_ActivityCode", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerfomerId", table: "PerformerProfile");
|
||||
migrationBuilder.DropTable("SimpleBookQuery");
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Query",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<long>(nullable: false)
|
||||
.Annotation("Npgsql:Serial", true),
|
||||
ClientId = table.Column<string>(nullable: false),
|
||||
EventDate = table.Column<DateTime>(nullable: false),
|
||||
Final = table.Column<decimal>(nullable: true),
|
||||
LocationId = table.Column<long>(nullable: false),
|
||||
PerformerId = table.Column<string>(nullable: false),
|
||||
Previsional = table.Column<decimal>(nullable: true),
|
||||
ValidationDate = table.Column<DateTime>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Query", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Query_ApplicationUser_ClientId",
|
||||
column: x => x.ClientId,
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_Query_Location_LocationId",
|
||||
column: x => x.LocationId,
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_Query_ApplicationUser_PerformerId",
|
||||
column: x => x.PerformerId,
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
migrationBuilder.AlterColumn<DateTime>(
|
||||
name: "ValidationDate",
|
||||
table: "Command",
|
||||
nullable: true);
|
||||
migrationBuilder.AddColumn<decimal>(
|
||||
name: "Final",
|
||||
table: "Command",
|
||||
nullable: true);
|
||||
migrationBuilder.AddColumn<decimal>(
|
||||
name: "Previsional",
|
||||
table: "Command",
|
||||
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_AccountBalance_AccountHistory_HistoryId",
|
||||
table: "AccountBalance",
|
||||
column: "HistoryId",
|
||||
principalTable: "AccountHistory",
|
||||
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_Blog_ApplicationUser_AuthorId",
|
||||
table: "Blog",
|
||||
column: "AuthorId",
|
||||
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_Command_ApplicationUser_ClientId",
|
||||
table: "Command",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Command_ApplicationUser_PerformerId",
|
||||
table: "Command",
|
||||
column: "PerformerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Activity_ActivityCode",
|
||||
table: "PerformerProfile",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_ApplicationUser_PerfomerId",
|
||||
table: "PerformerProfile",
|
||||
column: "PerfomerId",
|
||||
principalTable: "AspNetUsers",
|
||||
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_AccountBalance_AccountHistory_HistoryId", table: "AccountBalance");
|
||||
migrationBuilder.DropForeignKey(name: "FK_AccountBalance_ApplicationUser_UserId", table: "AccountBalance");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Blog_ApplicationUser_AuthorId", table: "Blog");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_ApplicationUser_ClientId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_ApplicationUser_PerformerId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Activity_ActivityCode", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerfomerId", table: "PerformerProfile");
|
||||
migrationBuilder.DropColumn(name: "Final", table: "Command");
|
||||
migrationBuilder.DropColumn(name: "Previsional", table: "Command");
|
||||
migrationBuilder.DropTable("Query");
|
||||
migrationBuilder.CreateTable(
|
||||
name: "SimpleBookQuery",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<long>(nullable: false)
|
||||
.Annotation("Npgsql:Serial", true),
|
||||
ClientId = table.Column<string>(nullable: false),
|
||||
EventDate = table.Column<DateTime>(nullable: false),
|
||||
LocationId = table.Column<long>(nullable: false),
|
||||
PerformerId = table.Column<string>(nullable: false),
|
||||
ValidationDate = table.Column<DateTime>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_SimpleBookQuery", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_SimpleBookQuery_ApplicationUser_ClientId",
|
||||
column: x => x.ClientId,
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_SimpleBookQuery_Location_LocationId",
|
||||
column: x => x.LocationId,
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_SimpleBookQuery_ApplicationUser_PerformerId",
|
||||
column: x => x.PerformerId,
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
migrationBuilder.AlterColumn<DateTime>(
|
||||
name: "ValidationDate",
|
||||
table: "Command",
|
||||
nullable: false);
|
||||
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_AccountBalance_AccountHistory_HistoryId",
|
||||
table: "AccountBalance",
|
||||
column: "HistoryId",
|
||||
principalTable: "AccountHistory",
|
||||
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_Blog_ApplicationUser_AuthorId",
|
||||
table: "Blog",
|
||||
column: "AuthorId",
|
||||
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_Command_ApplicationUser_ClientId",
|
||||
table: "Command",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Command_ApplicationUser_PerformerId",
|
||||
table: "Command",
|
||||
column: "PerformerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Activity_ActivityCode",
|
||||
table: "PerformerProfile",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_ApplicationUser_PerfomerId",
|
||||
table: "PerformerProfile",
|
||||
column: "PerfomerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
}
|
||||
}
|
||||
485
Yavsc/Migrations/20160320170252_bank.Designer.cs
generated
Normal file
485
Yavsc/Migrations/20160320170252_bank.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,485 @@
|
|||
using System;
|
||||
using Microsoft.Data.Entity;
|
||||
using Microsoft.Data.Entity.Infrastructure;
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
using Yavsc.Models;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
[DbContext(typeof(ApplicationDbContext))]
|
||||
[Migration("20160320170252_bank")]
|
||||
partial class bank
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "7.0.0-rc1-16348");
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRole", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("NormalizedName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedName")
|
||||
.HasAnnotation("Relational:Name", "RoleNameIndex");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<string>("RoleId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetRoleClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.Property<string>("LoginProvider");
|
||||
|
||||
b.Property<string>("ProviderKey");
|
||||
|
||||
b.Property<string>("ProviderDisplayName");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("LoginProvider", "ProviderKey");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserLogins");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("RoleId");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Location", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Address")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<double>("Latitude");
|
||||
|
||||
b.Property<double>("Longitude");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.AccountBalance", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<long>("Credits");
|
||||
|
||||
b.Property<long>("HistoryId");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.AccountHistory", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Activity", b =>
|
||||
{
|
||||
b.Property<string>("Code")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("Photo");
|
||||
|
||||
b.HasKey("Code");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<int>("AccessFailedCount");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<bool>("EmailConfirmed");
|
||||
|
||||
b.Property<bool>("LockoutEnabled");
|
||||
|
||||
b.Property<DateTimeOffset?>("LockoutEnd");
|
||||
|
||||
b.Property<string>("NormalizedEmail")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("NormalizedUserName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("PasswordHash");
|
||||
|
||||
b.Property<string>("PhoneNumber");
|
||||
|
||||
b.Property<bool>("PhoneNumberConfirmed");
|
||||
|
||||
b.Property<string>("SecurityStamp");
|
||||
|
||||
b.Property<bool>("TwoFactorEnabled");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedEmail")
|
||||
.HasAnnotation("Relational:Name", "EmailIndex");
|
||||
|
||||
b.HasIndex("NormalizedUserName")
|
||||
.HasAnnotation("Relational:Name", "UserNameIndex");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUsers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.BalanceImpact", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<DateTime>("ExecDate");
|
||||
|
||||
b.Property<long>("Impact");
|
||||
|
||||
b.Property<string>("Reason")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<long>("TargetId");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Blog", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AuthorId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("bcontent");
|
||||
|
||||
b.Property<DateTime>("modified");
|
||||
|
||||
b.Property<string>("photo");
|
||||
|
||||
b.Property<DateTime>("posted");
|
||||
|
||||
b.Property<int>("rate");
|
||||
|
||||
b.Property<string>("title");
|
||||
|
||||
b.Property<bool>("visible");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Book.Query", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("EventDate");
|
||||
|
||||
b.Property<decimal?>("Final");
|
||||
|
||||
b.Property<long>("LocationId");
|
||||
|
||||
b.Property<string>("PerformerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<decimal?>("Previsional");
|
||||
|
||||
b.Property<DateTime?>("ValidationDate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Circle", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CircleMember", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long?>("CircleId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("MemberId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Command", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<decimal?>("Final");
|
||||
|
||||
b.Property<string>("PerformerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<decimal?>("Previsional");
|
||||
|
||||
b.Property<DateTime?>("ValidationDate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Estimate", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long?>("CommandId");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<int?>("Status");
|
||||
|
||||
b.Property<string>("Title");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.PerformerProfile", b =>
|
||||
{
|
||||
b.Property<string>("PerfomerId");
|
||||
|
||||
b.Property<bool>("AcceptGeoLocalisation");
|
||||
|
||||
b.Property<bool>("AcceptNotifications");
|
||||
|
||||
b.Property<bool>("AcceptPublicContact");
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<string>("ActivityCode")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<int>("DailyCost");
|
||||
|
||||
b.Property<long>("OrganisationAddressId");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.Property<string>("SIRET")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 14);
|
||||
|
||||
b.Property<string>("WebSite");
|
||||
|
||||
b.HasKey("PerfomerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Skill", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.AccountBalance", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.AccountHistory")
|
||||
.WithMany()
|
||||
.HasForeignKey("HistoryId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithOne()
|
||||
.HasForeignKey("YavscWeb.Models.AccountBalance", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.BalanceImpact", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.AccountHistory")
|
||||
.WithMany()
|
||||
.HasForeignKey("TargetId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Blog", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("AuthorId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Book.Query", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId");
|
||||
|
||||
b.HasOne("YavscWeb.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("LocationId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CircleMember", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Circle")
|
||||
.WithMany()
|
||||
.HasForeignKey("CircleId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("MemberId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Command", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Estimate", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Command")
|
||||
.WithMany()
|
||||
.HasForeignKey("CommandId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.PerformerProfile", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ActivityCode");
|
||||
|
||||
b.HasOne("YavscWeb.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("OrganisationAddressId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerfomerId");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
334
Yavsc/Migrations/20160320170252_bank.cs
Normal file
334
Yavsc/Migrations/20160320170252_bank.cs
Normal file
|
|
@ -0,0 +1,334 @@
|
|||
using System;
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
public partial class bank : 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_AccountBalance_AccountHistory_HistoryId", table: "AccountBalance");
|
||||
migrationBuilder.DropForeignKey(name: "FK_AccountBalance_ApplicationUser_UserId", table: "AccountBalance");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Blog_ApplicationUser_AuthorId", table: "Blog");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Query_ApplicationUser_ClientId", table: "Query");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Query_Location_LocationId", table: "Query");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Query_ApplicationUser_PerformerId", table: "Query");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_ApplicationUser_ClientId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_ApplicationUser_PerformerId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Activity_ActivityCode", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerfomerId", table: "PerformerProfile");
|
||||
migrationBuilder.CreateTable(
|
||||
name: "BalanceImpact",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<long>(nullable: false)
|
||||
.Annotation("Npgsql:Serial", true),
|
||||
ExecDate = table.Column<DateTime>(nullable: false),
|
||||
Impact = table.Column<long>(nullable: false),
|
||||
Reason = table.Column<string>(nullable: false),
|
||||
TargetId = table.Column<long>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_BalanceImpact", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_BalanceImpact_AccountHistory_TargetId",
|
||||
column: x => x.TargetId,
|
||||
principalTable: "AccountHistory",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
migrationBuilder.AddColumn<long>(
|
||||
name: "OrganisationAddressId",
|
||||
table: "PerformerProfile",
|
||||
nullable: false,
|
||||
defaultValue: 0L);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "SIRET",
|
||||
table: "PerformerProfile",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
|
||||
migrationBuilder.Sql("delete from \"PerformerProfile\"" );
|
||||
|
||||
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_AccountBalance_AccountHistory_HistoryId",
|
||||
table: "AccountBalance",
|
||||
column: "HistoryId",
|
||||
principalTable: "AccountHistory",
|
||||
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_Blog_ApplicationUser_AuthorId",
|
||||
table: "Blog",
|
||||
column: "AuthorId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Query_ApplicationUser_ClientId",
|
||||
table: "Query",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Query_Location_LocationId",
|
||||
table: "Query",
|
||||
column: "LocationId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Query_ApplicationUser_PerformerId",
|
||||
table: "Query",
|
||||
column: "PerformerId",
|
||||
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_Command_ApplicationUser_ClientId",
|
||||
table: "Command",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Command_ApplicationUser_PerformerId",
|
||||
table: "Command",
|
||||
column: "PerformerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Activity_ActivityCode",
|
||||
table: "PerformerProfile",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Location_OrganisationAddressId",
|
||||
table: "PerformerProfile",
|
||||
column: "OrganisationAddressId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_ApplicationUser_PerfomerId",
|
||||
table: "PerformerProfile",
|
||||
column: "PerfomerId",
|
||||
principalTable: "AspNetUsers",
|
||||
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_AccountBalance_AccountHistory_HistoryId", table: "AccountBalance");
|
||||
migrationBuilder.DropForeignKey(name: "FK_AccountBalance_ApplicationUser_UserId", table: "AccountBalance");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Blog_ApplicationUser_AuthorId", table: "Blog");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Query_ApplicationUser_ClientId", table: "Query");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Query_Location_LocationId", table: "Query");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Query_ApplicationUser_PerformerId", table: "Query");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_ApplicationUser_ClientId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_ApplicationUser_PerformerId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Activity_ActivityCode", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganisationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerfomerId", table: "PerformerProfile");
|
||||
migrationBuilder.DropColumn(name: "OrganisationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropColumn(name: "SIRET", table: "PerformerProfile");
|
||||
migrationBuilder.DropTable("BalanceImpact");
|
||||
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_AccountBalance_AccountHistory_HistoryId",
|
||||
table: "AccountBalance",
|
||||
column: "HistoryId",
|
||||
principalTable: "AccountHistory",
|
||||
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_Blog_ApplicationUser_AuthorId",
|
||||
table: "Blog",
|
||||
column: "AuthorId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Query_ApplicationUser_ClientId",
|
||||
table: "Query",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Query_Location_LocationId",
|
||||
table: "Query",
|
||||
column: "LocationId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Query_ApplicationUser_PerformerId",
|
||||
table: "Query",
|
||||
column: "PerformerId",
|
||||
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_Command_ApplicationUser_ClientId",
|
||||
table: "Command",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Command_ApplicationUser_PerformerId",
|
||||
table: "Command",
|
||||
column: "PerformerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Activity_ActivityCode",
|
||||
table: "PerformerProfile",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_ApplicationUser_PerfomerId",
|
||||
table: "PerformerProfile",
|
||||
column: "PerfomerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
}
|
||||
}
|
||||
592
Yavsc/Migrations/20160322144500_contact.Designer.cs
generated
Normal file
592
Yavsc/Migrations/20160322144500_contact.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,592 @@
|
|||
using System;
|
||||
using Microsoft.Data.Entity;
|
||||
using Microsoft.Data.Entity.Infrastructure;
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
using Yavsc.Models;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
[DbContext(typeof(ApplicationDbContext))]
|
||||
[Migration("20160322144500_contact")]
|
||||
partial class contact
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "7.0.0-rc1-16348");
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRole", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("NormalizedName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedName")
|
||||
.HasAnnotation("Relational:Name", "RoleNameIndex");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<string>("RoleId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetRoleClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.Property<string>("LoginProvider");
|
||||
|
||||
b.Property<string>("ProviderKey");
|
||||
|
||||
b.Property<string>("ProviderDisplayName");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("LoginProvider", "ProviderKey");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserLogins");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("RoleId");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Location", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Address")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<double>("Latitude");
|
||||
|
||||
b.Property<double>("Longitude");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.AccountBalance", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<long>("Credits");
|
||||
|
||||
b.Property<long>("HistoryId");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.AccountHistory", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Activity", b =>
|
||||
{
|
||||
b.Property<string>("Code")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("Photo");
|
||||
|
||||
b.HasKey("Code");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<int>("AccessFailedCount");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<bool>("EmailConfirmed");
|
||||
|
||||
b.Property<bool>("LockoutEnabled");
|
||||
|
||||
b.Property<DateTimeOffset?>("LockoutEnd");
|
||||
|
||||
b.Property<string>("NormalizedEmail")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("NormalizedUserName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("PasswordHash");
|
||||
|
||||
b.Property<string>("PhoneNumber");
|
||||
|
||||
b.Property<bool>("PhoneNumberConfirmed");
|
||||
|
||||
b.Property<long?>("PostalAddressId");
|
||||
|
||||
b.Property<string>("SecurityStamp");
|
||||
|
||||
b.Property<bool>("TwoFactorEnabled");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedEmail")
|
||||
.HasAnnotation("Relational:Name", "EmailIndex");
|
||||
|
||||
b.HasIndex("NormalizedUserName")
|
||||
.HasAnnotation("Relational:Name", "UserNameIndex");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUsers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.BalanceImpact", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<DateTime>("ExecDate");
|
||||
|
||||
b.Property<long>("Impact");
|
||||
|
||||
b.Property<string>("Reason")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<long>("TargetId");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.BaseProduct", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Blog", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AuthorId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("bcontent");
|
||||
|
||||
b.Property<DateTime>("modified");
|
||||
|
||||
b.Property<string>("photo");
|
||||
|
||||
b.Property<DateTime>("posted");
|
||||
|
||||
b.Property<int>("rate");
|
||||
|
||||
b.Property<string>("title");
|
||||
|
||||
b.Property<bool>("visible");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Book.Query", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("EventDate");
|
||||
|
||||
b.Property<int>("Lag");
|
||||
|
||||
b.Property<long>("LocationId");
|
||||
|
||||
b.Property<string>("PerformerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<decimal?>("Previsional");
|
||||
|
||||
b.Property<DateTime?>("ValidationDate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Circle", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CircleMember", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long?>("CircleId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("MemberId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Command", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<int>("Lag");
|
||||
|
||||
b.Property<string>("PerformerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<decimal?>("Previsional");
|
||||
|
||||
b.Property<DateTime?>("ValidationDate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CommandLine", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long?>("ArticleId");
|
||||
|
||||
b.Property<long?>("CommandId");
|
||||
|
||||
b.Property<string>("Comment");
|
||||
|
||||
b.Property<int>("Count");
|
||||
|
||||
b.Property<long?>("EstimateId");
|
||||
|
||||
b.Property<long?>("QueryId");
|
||||
|
||||
b.Property<decimal>("UnitaryCost");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Contact", b =>
|
||||
{
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.HasKey("OwnerId", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Estimate", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long?>("CommandId");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<int?>("Status");
|
||||
|
||||
b.Property<string>("Title");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.PerformerProfile", b =>
|
||||
{
|
||||
b.Property<string>("PerfomerId");
|
||||
|
||||
b.Property<bool>("AcceptGeoLocalisation");
|
||||
|
||||
b.Property<bool>("AcceptNotifications");
|
||||
|
||||
b.Property<bool>("AcceptPublicContact");
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<string>("ActivityCode")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<int>("DailyCost");
|
||||
|
||||
b.Property<long>("OrganisationAddressId");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.Property<string>("SIRET")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 14);
|
||||
|
||||
b.Property<string>("WebSite");
|
||||
|
||||
b.HasKey("PerfomerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Service", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ContextId");
|
||||
|
||||
b.Property<decimal>("Depth");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<decimal>("Height");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<decimal>("Weight");
|
||||
|
||||
b.Property<decimal>("Width");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Skill", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.AccountBalance", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.AccountHistory")
|
||||
.WithMany()
|
||||
.HasForeignKey("HistoryId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithOne()
|
||||
.HasForeignKey("YavscWeb.Models.AccountBalance", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("PostalAddressId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.BalanceImpact", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.AccountHistory")
|
||||
.WithMany()
|
||||
.HasForeignKey("TargetId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Blog", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("AuthorId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Book.Query", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId");
|
||||
|
||||
b.HasOne("YavscWeb.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("LocationId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.PerformerProfile")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CircleMember", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Circle")
|
||||
.WithMany()
|
||||
.HasForeignKey("CircleId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("MemberId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Command", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.PerformerProfile")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CommandLine", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.BaseProduct")
|
||||
.WithMany()
|
||||
.HasForeignKey("ArticleId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.Command")
|
||||
.WithMany()
|
||||
.HasForeignKey("CommandId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.Estimate")
|
||||
.WithMany()
|
||||
.HasForeignKey("EstimateId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.Book.Query")
|
||||
.WithMany()
|
||||
.HasForeignKey("QueryId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Contact", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Estimate", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Command")
|
||||
.WithMany()
|
||||
.HasForeignKey("CommandId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.PerformerProfile", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ActivityCode");
|
||||
|
||||
b.HasOne("YavscWeb.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("OrganisationAddressId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerfomerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Service", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ContextId");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
455
Yavsc/Migrations/20160322144500_contact.cs
Normal file
455
Yavsc/Migrations/20160322144500_contact.cs
Normal file
|
|
@ -0,0 +1,455 @@
|
|||
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
public partial class contact : 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_AccountBalance_AccountHistory_HistoryId", table: "AccountBalance");
|
||||
migrationBuilder.DropForeignKey(name: "FK_AccountBalance_ApplicationUser_UserId", table: "AccountBalance");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BalanceImpact_AccountHistory_TargetId", table: "BalanceImpact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Blog_ApplicationUser_AuthorId", table: "Blog");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Query_ApplicationUser_ClientId", table: "Query");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Query_Location_LocationId", table: "Query");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Query_ApplicationUser_PerformerId", table: "Query");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_ApplicationUser_ClientId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_ApplicationUser_PerformerId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Activity_ActivityCode", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganisationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerfomerId", table: "PerformerProfile");
|
||||
migrationBuilder.DropColumn(name: "Final", table: "Command");
|
||||
migrationBuilder.DropColumn(name: "Final", table: "Query");
|
||||
migrationBuilder.CreateTable(
|
||||
name: "BaseProduct",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<long>(nullable: false)
|
||||
.Annotation("Npgsql:Serial", true),
|
||||
Description = table.Column<string>(nullable: true),
|
||||
Name = table.Column<string>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_BaseProduct", x => x.Id);
|
||||
});
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Contact",
|
||||
columns: table => new
|
||||
{
|
||||
OwnerId = table.Column<string>(nullable: false),
|
||||
UserId = table.Column<string>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Contact", x => new { x.OwnerId, x.UserId });
|
||||
table.ForeignKey(
|
||||
name: "FK_Contact_ApplicationUser_OwnerId",
|
||||
column: x => x.OwnerId,
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Service",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<long>(nullable: false)
|
||||
.Annotation("Npgsql:Serial", true),
|
||||
ContextId = table.Column<string>(nullable: true),
|
||||
Depth = table.Column<decimal>(nullable: false),
|
||||
Description = table.Column<string>(nullable: true),
|
||||
Height = table.Column<decimal>(nullable: false),
|
||||
Name = table.Column<string>(nullable: true),
|
||||
Weight = table.Column<decimal>(nullable: false),
|
||||
Width = table.Column<decimal>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Service", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Service_Activity_ContextId",
|
||||
column: x => x.ContextId,
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
migrationBuilder.CreateTable(
|
||||
name: "CommandLine",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<long>(nullable: false)
|
||||
.Annotation("Npgsql:Serial", true),
|
||||
ArticleId = table.Column<long>(nullable: true),
|
||||
CommandId = table.Column<long>(nullable: true),
|
||||
Comment = table.Column<string>(nullable: true),
|
||||
Count = table.Column<int>(nullable: false),
|
||||
EstimateId = table.Column<long>(nullable: true),
|
||||
QueryId = table.Column<long>(nullable: true),
|
||||
UnitaryCost = table.Column<decimal>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_CommandLine", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_CommandLine_BaseProduct_ArticleId",
|
||||
column: x => x.ArticleId,
|
||||
principalTable: "BaseProduct",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_CommandLine_Command_CommandId",
|
||||
column: x => x.CommandId,
|
||||
principalTable: "Command",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_CommandLine_Estimate_EstimateId",
|
||||
column: x => x.EstimateId,
|
||||
principalTable: "Estimate",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_CommandLine_Query_QueryId",
|
||||
column: x => x.QueryId,
|
||||
principalTable: "Query",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "Lag",
|
||||
table: "Command",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "Lag",
|
||||
table: "Query",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
migrationBuilder.AddColumn<long>(
|
||||
name: "PostalAddressId",
|
||||
table: "AspNetUsers",
|
||||
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_AccountBalance_AccountHistory_HistoryId",
|
||||
table: "AccountBalance",
|
||||
column: "HistoryId",
|
||||
principalTable: "AccountHistory",
|
||||
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_ApplicationUser_Location_PostalAddressId",
|
||||
table: "AspNetUsers",
|
||||
column: "PostalAddressId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BalanceImpact_AccountHistory_TargetId",
|
||||
table: "BalanceImpact",
|
||||
column: "TargetId",
|
||||
principalTable: "AccountHistory",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Blog_ApplicationUser_AuthorId",
|
||||
table: "Blog",
|
||||
column: "AuthorId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Query_ApplicationUser_ClientId",
|
||||
table: "Query",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Query_Location_LocationId",
|
||||
table: "Query",
|
||||
column: "LocationId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Query_PerformerProfile_PerformerId",
|
||||
table: "Query",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerfomerId",
|
||||
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_Command_ApplicationUser_ClientId",
|
||||
table: "Command",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Command_PerformerProfile_PerformerId",
|
||||
table: "Command",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerfomerId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Activity_ActivityCode",
|
||||
table: "PerformerProfile",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Location_OrganisationAddressId",
|
||||
table: "PerformerProfile",
|
||||
column: "OrganisationAddressId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_ApplicationUser_PerfomerId",
|
||||
table: "PerformerProfile",
|
||||
column: "PerfomerId",
|
||||
principalTable: "AspNetUsers",
|
||||
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_AccountBalance_AccountHistory_HistoryId", table: "AccountBalance");
|
||||
migrationBuilder.DropForeignKey(name: "FK_AccountBalance_ApplicationUser_UserId", table: "AccountBalance");
|
||||
migrationBuilder.DropForeignKey(name: "FK_ApplicationUser_Location_PostalAddressId", table: "AspNetUsers");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BalanceImpact_AccountHistory_TargetId", table: "BalanceImpact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Blog_ApplicationUser_AuthorId", table: "Blog");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Query_ApplicationUser_ClientId", table: "Query");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Query_Location_LocationId", table: "Query");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Query_PerformerProfile_PerformerId", table: "Query");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_ApplicationUser_ClientId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_PerformerProfile_PerformerId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Activity_ActivityCode", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganisationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerfomerId", table: "PerformerProfile");
|
||||
migrationBuilder.DropColumn(name: "Lag", table: "Command");
|
||||
migrationBuilder.DropColumn(name: "Lag", table: "Query");
|
||||
migrationBuilder.DropColumn(name: "PostalAddressId", table: "AspNetUsers");
|
||||
migrationBuilder.DropTable("CommandLine");
|
||||
migrationBuilder.DropTable("Contact");
|
||||
migrationBuilder.DropTable("Service");
|
||||
migrationBuilder.DropTable("BaseProduct");
|
||||
migrationBuilder.AddColumn<decimal>(
|
||||
name: "Final",
|
||||
table: "Command",
|
||||
nullable: true);
|
||||
migrationBuilder.AddColumn<decimal>(
|
||||
name: "Final",
|
||||
table: "Query",
|
||||
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_AccountBalance_AccountHistory_HistoryId",
|
||||
table: "AccountBalance",
|
||||
column: "HistoryId",
|
||||
principalTable: "AccountHistory",
|
||||
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_AccountHistory_TargetId",
|
||||
table: "BalanceImpact",
|
||||
column: "TargetId",
|
||||
principalTable: "AccountHistory",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Blog_ApplicationUser_AuthorId",
|
||||
table: "Blog",
|
||||
column: "AuthorId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Query_ApplicationUser_ClientId",
|
||||
table: "Query",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Query_Location_LocationId",
|
||||
table: "Query",
|
||||
column: "LocationId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Query_ApplicationUser_PerformerId",
|
||||
table: "Query",
|
||||
column: "PerformerId",
|
||||
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_Command_ApplicationUser_ClientId",
|
||||
table: "Command",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Command_ApplicationUser_PerformerId",
|
||||
table: "Command",
|
||||
column: "PerformerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Activity_ActivityCode",
|
||||
table: "PerformerProfile",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Location_OrganisationAddressId",
|
||||
table: "PerformerProfile",
|
||||
column: "OrganisationAddressId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_ApplicationUser_PerfomerId",
|
||||
table: "PerformerProfile",
|
||||
column: "PerfomerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
}
|
||||
}
|
||||
579
Yavsc/Migrations/20160322152206_balance.Designer.cs
generated
Normal file
579
Yavsc/Migrations/20160322152206_balance.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,579 @@
|
|||
using System;
|
||||
using Microsoft.Data.Entity;
|
||||
using Microsoft.Data.Entity.Infrastructure;
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
using Yavsc.Models;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
[DbContext(typeof(ApplicationDbContext))]
|
||||
[Migration("20160322152206_balance")]
|
||||
partial class balance
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "7.0.0-rc1-16348");
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRole", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("NormalizedName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedName")
|
||||
.HasAnnotation("Relational:Name", "RoleNameIndex");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<string>("RoleId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetRoleClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.Property<string>("LoginProvider");
|
||||
|
||||
b.Property<string>("ProviderKey");
|
||||
|
||||
b.Property<string>("ProviderDisplayName");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("LoginProvider", "ProviderKey");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserLogins");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("RoleId");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Location", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Address")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<double>("Latitude");
|
||||
|
||||
b.Property<double>("Longitude");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.AccountBalance", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<decimal>("Credits");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Activity", b =>
|
||||
{
|
||||
b.Property<string>("Code")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("Photo");
|
||||
|
||||
b.HasKey("Code");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<int>("AccessFailedCount");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<bool>("EmailConfirmed");
|
||||
|
||||
b.Property<bool>("LockoutEnabled");
|
||||
|
||||
b.Property<DateTimeOffset?>("LockoutEnd");
|
||||
|
||||
b.Property<string>("NormalizedEmail")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("NormalizedUserName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("PasswordHash");
|
||||
|
||||
b.Property<string>("PhoneNumber");
|
||||
|
||||
b.Property<bool>("PhoneNumberConfirmed");
|
||||
|
||||
b.Property<long?>("PostalAddressId");
|
||||
|
||||
b.Property<string>("SecurityStamp");
|
||||
|
||||
b.Property<bool>("TwoFactorEnabled");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedEmail")
|
||||
.HasAnnotation("Relational:Name", "EmailIndex");
|
||||
|
||||
b.HasIndex("NormalizedUserName")
|
||||
.HasAnnotation("Relational:Name", "UserNameIndex");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUsers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.BalanceImpact", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("BalanceId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("ExecDate");
|
||||
|
||||
b.Property<decimal>("Impact");
|
||||
|
||||
b.Property<string>("Reason")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.BaseProduct", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Blog", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AuthorId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("bcontent");
|
||||
|
||||
b.Property<DateTime>("modified");
|
||||
|
||||
b.Property<string>("photo");
|
||||
|
||||
b.Property<DateTime>("posted");
|
||||
|
||||
b.Property<int>("rate");
|
||||
|
||||
b.Property<string>("title");
|
||||
|
||||
b.Property<bool>("visible");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Book.Query", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("EventDate");
|
||||
|
||||
b.Property<int>("Lag");
|
||||
|
||||
b.Property<long>("LocationId");
|
||||
|
||||
b.Property<string>("PerformerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<decimal?>("Previsional");
|
||||
|
||||
b.Property<DateTime?>("ValidationDate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Circle", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CircleMember", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long?>("CircleId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("MemberId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Command", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<int>("Lag");
|
||||
|
||||
b.Property<string>("PerformerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<decimal?>("Previsional");
|
||||
|
||||
b.Property<DateTime?>("ValidationDate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CommandLine", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long?>("ArticleId");
|
||||
|
||||
b.Property<long?>("CommandId");
|
||||
|
||||
b.Property<string>("Comment");
|
||||
|
||||
b.Property<int>("Count");
|
||||
|
||||
b.Property<long?>("EstimateId");
|
||||
|
||||
b.Property<long?>("QueryId");
|
||||
|
||||
b.Property<decimal>("UnitaryCost");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Contact", b =>
|
||||
{
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.HasKey("OwnerId", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Estimate", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long?>("CommandId");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<int?>("Status");
|
||||
|
||||
b.Property<string>("Title");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.PerformerProfile", b =>
|
||||
{
|
||||
b.Property<string>("PerfomerId");
|
||||
|
||||
b.Property<bool>("AcceptGeoLocalisation");
|
||||
|
||||
b.Property<bool>("AcceptNotifications");
|
||||
|
||||
b.Property<bool>("AcceptPublicContact");
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<string>("ActivityCode")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<int>("DailyCost");
|
||||
|
||||
b.Property<long>("OrganisationAddressId");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.Property<string>("SIRET")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 14);
|
||||
|
||||
b.Property<string>("WebSite");
|
||||
|
||||
b.HasKey("PerfomerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Service", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ContextId");
|
||||
|
||||
b.Property<decimal>("Depth");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<decimal>("Height");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<decimal>("Weight");
|
||||
|
||||
b.Property<decimal>("Width");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Skill", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.AccountBalance", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithOne()
|
||||
.HasForeignKey("YavscWeb.Models.AccountBalance", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("PostalAddressId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.BalanceImpact", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.AccountBalance")
|
||||
.WithMany()
|
||||
.HasForeignKey("BalanceId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Blog", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("AuthorId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Book.Query", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId");
|
||||
|
||||
b.HasOne("YavscWeb.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("LocationId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.PerformerProfile")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CircleMember", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Circle")
|
||||
.WithMany()
|
||||
.HasForeignKey("CircleId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("MemberId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Command", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.PerformerProfile")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CommandLine", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.BaseProduct")
|
||||
.WithMany()
|
||||
.HasForeignKey("ArticleId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.Command")
|
||||
.WithMany()
|
||||
.HasForeignKey("CommandId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.Estimate")
|
||||
.WithMany()
|
||||
.HasForeignKey("EstimateId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.Book.Query")
|
||||
.WithMany()
|
||||
.HasForeignKey("QueryId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Contact", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Estimate", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Command")
|
||||
.WithMany()
|
||||
.HasForeignKey("CommandId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.PerformerProfile", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ActivityCode");
|
||||
|
||||
b.HasOne("YavscWeb.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("OrganisationAddressId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerfomerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Service", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ContextId");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
373
Yavsc/Migrations/20160322152206_balance.cs
Normal file
373
Yavsc/Migrations/20160322152206_balance.cs
Normal file
|
|
@ -0,0 +1,373 @@
|
|||
using Microsoft.Data.Entity.Migrations;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
public partial class balance : 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_AccountBalance_AccountHistory_HistoryId", table: "AccountBalance");
|
||||
migrationBuilder.DropForeignKey(name: "FK_AccountBalance_ApplicationUser_UserId", table: "AccountBalance");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BalanceImpact_AccountHistory_TargetId", table: "BalanceImpact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Blog_ApplicationUser_AuthorId", table: "Blog");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Query_ApplicationUser_ClientId", table: "Query");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Query_Location_LocationId", table: "Query");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Query_PerformerProfile_PerformerId", table: "Query");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_ApplicationUser_ClientId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_PerformerProfile_PerformerId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Contact_ApplicationUser_OwnerId", table: "Contact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Activity_ActivityCode", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganisationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerfomerId", table: "PerformerProfile");
|
||||
migrationBuilder.DropColumn(name: "TargetId", table: "BalanceImpact");
|
||||
migrationBuilder.DropColumn(name: "HistoryId", table: "AccountBalance");
|
||||
migrationBuilder.DropTable("AccountHistory");
|
||||
migrationBuilder.AlterColumn<decimal>(
|
||||
name: "Impact",
|
||||
table: "BalanceImpact",
|
||||
nullable: false);
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "BalanceId",
|
||||
table: "BalanceImpact",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
migrationBuilder.AlterColumn<decimal>(
|
||||
name: "Credits",
|
||||
table: "AccountBalance",
|
||||
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_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_Blog_ApplicationUser_AuthorId",
|
||||
table: "Blog",
|
||||
column: "AuthorId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Query_ApplicationUser_ClientId",
|
||||
table: "Query",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Query_Location_LocationId",
|
||||
table: "Query",
|
||||
column: "LocationId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Query_PerformerProfile_PerformerId",
|
||||
table: "Query",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerfomerId",
|
||||
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_Command_ApplicationUser_ClientId",
|
||||
table: "Command",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Command_PerformerProfile_PerformerId",
|
||||
table: "Command",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerfomerId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Contact_ApplicationUser_OwnerId",
|
||||
table: "Contact",
|
||||
column: "OwnerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Activity_ActivityCode",
|
||||
table: "PerformerProfile",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Location_OrganisationAddressId",
|
||||
table: "PerformerProfile",
|
||||
column: "OrganisationAddressId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_ApplicationUser_PerfomerId",
|
||||
table: "PerformerProfile",
|
||||
column: "PerfomerId",
|
||||
principalTable: "AspNetUsers",
|
||||
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_AccountBalance_ApplicationUser_UserId", table: "AccountBalance");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BalanceImpact_AccountBalance_BalanceId", table: "BalanceImpact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Blog_ApplicationUser_AuthorId", table: "Blog");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Query_ApplicationUser_ClientId", table: "Query");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Query_Location_LocationId", table: "Query");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Query_PerformerProfile_PerformerId", table: "Query");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_ApplicationUser_ClientId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_PerformerProfile_PerformerId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Contact_ApplicationUser_OwnerId", table: "Contact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Activity_ActivityCode", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganisationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerfomerId", table: "PerformerProfile");
|
||||
migrationBuilder.DropColumn(name: "BalanceId", table: "BalanceImpact");
|
||||
migrationBuilder.CreateTable(
|
||||
name: "AccountHistory",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<long>(nullable: false)
|
||||
.Annotation("Npgsql:Serial", true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_AccountHistory", x => x.Id);
|
||||
});
|
||||
migrationBuilder.AlterColumn<long>(
|
||||
name: "Impact",
|
||||
table: "BalanceImpact",
|
||||
nullable: false);
|
||||
migrationBuilder.AddColumn<long>(
|
||||
name: "TargetId",
|
||||
table: "BalanceImpact",
|
||||
nullable: false,
|
||||
defaultValue: 0L);
|
||||
migrationBuilder.AlterColumn<long>(
|
||||
name: "Credits",
|
||||
table: "AccountBalance",
|
||||
nullable: false);
|
||||
migrationBuilder.AddColumn<long>(
|
||||
name: "HistoryId",
|
||||
table: "AccountBalance",
|
||||
nullable: false,
|
||||
defaultValue: 0L);
|
||||
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_AccountBalance_AccountHistory_HistoryId",
|
||||
table: "AccountBalance",
|
||||
column: "HistoryId",
|
||||
principalTable: "AccountHistory",
|
||||
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_AccountHistory_TargetId",
|
||||
table: "BalanceImpact",
|
||||
column: "TargetId",
|
||||
principalTable: "AccountHistory",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Blog_ApplicationUser_AuthorId",
|
||||
table: "Blog",
|
||||
column: "AuthorId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Query_ApplicationUser_ClientId",
|
||||
table: "Query",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Query_Location_LocationId",
|
||||
table: "Query",
|
||||
column: "LocationId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Query_PerformerProfile_PerformerId",
|
||||
table: "Query",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerfomerId",
|
||||
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_Command_ApplicationUser_ClientId",
|
||||
table: "Command",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Command_PerformerProfile_PerformerId",
|
||||
table: "Command",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerfomerId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Contact_ApplicationUser_OwnerId",
|
||||
table: "Contact",
|
||||
column: "OwnerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Activity_ActivityCode",
|
||||
table: "PerformerProfile",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Location_OrganisationAddressId",
|
||||
table: "PerformerProfile",
|
||||
column: "OrganisationAddressId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_ApplicationUser_PerfomerId",
|
||||
table: "PerformerProfile",
|
||||
column: "PerfomerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
}
|
||||
}
|
||||
603
Yavsc/Migrations/20160401233357_circle.Designer.cs
generated
Normal file
603
Yavsc/Migrations/20160401233357_circle.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,603 @@
|
|||
using System;
|
||||
using Microsoft.Data.Entity;
|
||||
using Microsoft.Data.Entity.Infrastructure;
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
using Yavsc.Models;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
[DbContext(typeof(ApplicationDbContext))]
|
||||
[Migration("20160401233357_circle")]
|
||||
partial class circle
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "7.0.0-rc1-16348");
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRole", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("NormalizedName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedName")
|
||||
.HasAnnotation("Relational:Name", "RoleNameIndex");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<string>("RoleId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetRoleClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.Property<string>("LoginProvider");
|
||||
|
||||
b.Property<string>("ProviderKey");
|
||||
|
||||
b.Property<string>("ProviderDisplayName");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("LoginProvider", "ProviderKey");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserLogins");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("RoleId");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Location", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Address")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<double>("Latitude");
|
||||
|
||||
b.Property<double>("Longitude");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.AccountBalance", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<decimal>("Credits");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Activity", b =>
|
||||
{
|
||||
b.Property<string>("Code")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("Photo");
|
||||
|
||||
b.HasKey("Code");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<int>("AccessFailedCount");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<bool>("EmailConfirmed");
|
||||
|
||||
b.Property<string>("GoogleRegId");
|
||||
|
||||
b.Property<bool>("LockoutEnabled");
|
||||
|
||||
b.Property<DateTimeOffset?>("LockoutEnd");
|
||||
|
||||
b.Property<string>("NormalizedEmail")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("NormalizedUserName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("PasswordHash");
|
||||
|
||||
b.Property<string>("PhoneNumber");
|
||||
|
||||
b.Property<bool>("PhoneNumberConfirmed");
|
||||
|
||||
b.Property<long?>("PostalAddressId");
|
||||
|
||||
b.Property<string>("SecurityStamp");
|
||||
|
||||
b.Property<bool>("TwoFactorEnabled");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedEmail")
|
||||
.HasAnnotation("Relational:Name", "EmailIndex");
|
||||
|
||||
b.HasIndex("NormalizedUserName")
|
||||
.HasAnnotation("Relational:Name", "UserNameIndex");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUsers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.BalanceImpact", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("BalanceId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("ExecDate");
|
||||
|
||||
b.Property<decimal>("Impact");
|
||||
|
||||
b.Property<string>("Reason")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.BaseProduct", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Blog", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AuthorId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("bcontent");
|
||||
|
||||
b.Property<DateTime>("modified");
|
||||
|
||||
b.Property<string>("photo");
|
||||
|
||||
b.Property<DateTime>("posted");
|
||||
|
||||
b.Property<int>("rate");
|
||||
|
||||
b.Property<string>("title");
|
||||
|
||||
b.Property<bool>("visible");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Book.Query", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("EventDate");
|
||||
|
||||
b.Property<int>("Lag");
|
||||
|
||||
b.Property<long>("LocationId");
|
||||
|
||||
b.Property<string>("PerformerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<decimal?>("Previsional");
|
||||
|
||||
b.Property<DateTime?>("ValidationDate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Circle", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CircleMember", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long?>("CircleId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("MemberId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Command", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<int>("Lag");
|
||||
|
||||
b.Property<string>("PerformerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<decimal?>("Previsional");
|
||||
|
||||
b.Property<DateTime?>("ValidationDate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CommandLine", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long?>("ArticleId");
|
||||
|
||||
b.Property<long?>("CommandId");
|
||||
|
||||
b.Property<string>("Comment");
|
||||
|
||||
b.Property<int>("Count");
|
||||
|
||||
b.Property<long?>("EstimateId");
|
||||
|
||||
b.Property<long?>("QueryId");
|
||||
|
||||
b.Property<decimal>("UnitaryCost");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Contact", b =>
|
||||
{
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.HasKey("OwnerId", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Estimate", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long?>("CommandId");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<int?>("Status");
|
||||
|
||||
b.Property<string>("Title");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.OAuth2Tokens", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("AccessToken");
|
||||
|
||||
b.Property<DateTime>("Expiration");
|
||||
|
||||
b.Property<string>("RefreshToken");
|
||||
|
||||
b.Property<string>("TokenType");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.PerformerProfile", b =>
|
||||
{
|
||||
b.Property<string>("PerfomerId");
|
||||
|
||||
b.Property<bool>("AcceptGeoLocalisation");
|
||||
|
||||
b.Property<bool>("AcceptNotifications");
|
||||
|
||||
b.Property<bool>("AcceptPublicContact");
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<string>("ActivityCode")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<int>("DailyCost");
|
||||
|
||||
b.Property<long>("OrganisationAddressId");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.Property<string>("SIRET")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 14);
|
||||
|
||||
b.Property<string>("WebSite");
|
||||
|
||||
b.HasKey("PerfomerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Service", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ContextId");
|
||||
|
||||
b.Property<decimal>("Depth");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<decimal>("Height");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<decimal>("Weight");
|
||||
|
||||
b.Property<decimal>("Width");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Skill", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.AccountBalance", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithOne()
|
||||
.HasForeignKey("YavscWeb.Models.AccountBalance", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("PostalAddressId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.BalanceImpact", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.AccountBalance")
|
||||
.WithMany()
|
||||
.HasForeignKey("BalanceId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Blog", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("AuthorId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Book.Query", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId");
|
||||
|
||||
b.HasOne("YavscWeb.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("LocationId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.PerformerProfile")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Circle", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CircleMember", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Circle")
|
||||
.WithMany()
|
||||
.HasForeignKey("CircleId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("MemberId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Command", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.PerformerProfile")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CommandLine", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.BaseProduct")
|
||||
.WithMany()
|
||||
.HasForeignKey("ArticleId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.Command")
|
||||
.WithMany()
|
||||
.HasForeignKey("CommandId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.Estimate")
|
||||
.WithMany()
|
||||
.HasForeignKey("EstimateId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.Book.Query")
|
||||
.WithMany()
|
||||
.HasForeignKey("QueryId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Contact", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Estimate", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Command")
|
||||
.WithMany()
|
||||
.HasForeignKey("CommandId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.PerformerProfile", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ActivityCode");
|
||||
|
||||
b.HasOne("YavscWeb.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("OrganisationAddressId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerfomerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Service", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ContextId");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
358
Yavsc/Migrations/20160401233357_circle.cs
Normal file
358
Yavsc/Migrations/20160401233357_circle.cs
Normal file
|
|
@ -0,0 +1,358 @@
|
|||
using System;
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
public partial class circle : 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_AccountBalance_ApplicationUser_UserId", table: "AccountBalance");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BalanceImpact_AccountBalance_BalanceId", table: "BalanceImpact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Blog_ApplicationUser_AuthorId", table: "Blog");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Query_ApplicationUser_ClientId", table: "Query");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Query_Location_LocationId", table: "Query");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Query_PerformerProfile_PerformerId", table: "Query");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_ApplicationUser_ClientId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_PerformerProfile_PerformerId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Contact_ApplicationUser_OwnerId", table: "Contact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Activity_ActivityCode", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganisationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerfomerId", table: "PerformerProfile");
|
||||
migrationBuilder.DropColumn(name: "UserId", table: "Circle");
|
||||
migrationBuilder.CreateTable(
|
||||
name: "OAuth2Tokens",
|
||||
columns: table => new
|
||||
{
|
||||
UserId = table.Column<string>(nullable: false),
|
||||
AccessToken = table.Column<string>(nullable: true),
|
||||
Expiration = table.Column<DateTime>(nullable: false),
|
||||
RefreshToken = table.Column<string>(nullable: true),
|
||||
TokenType = table.Column<string>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_OAuth2Tokens", x => x.UserId);
|
||||
});
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "OwnerId",
|
||||
table: "Circle",
|
||||
nullable: true);
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "GoogleRegId",
|
||||
table: "AspNetUsers",
|
||||
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_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_Blog_ApplicationUser_AuthorId",
|
||||
table: "Blog",
|
||||
column: "AuthorId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Query_ApplicationUser_ClientId",
|
||||
table: "Query",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Query_Location_LocationId",
|
||||
table: "Query",
|
||||
column: "LocationId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Query_PerformerProfile_PerformerId",
|
||||
table: "Query",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerfomerId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Circle_ApplicationUser_OwnerId",
|
||||
table: "Circle",
|
||||
column: "OwnerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
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_Command_ApplicationUser_ClientId",
|
||||
table: "Command",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Command_PerformerProfile_PerformerId",
|
||||
table: "Command",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerfomerId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Contact_ApplicationUser_OwnerId",
|
||||
table: "Contact",
|
||||
column: "OwnerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Activity_ActivityCode",
|
||||
table: "PerformerProfile",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Location_OrganisationAddressId",
|
||||
table: "PerformerProfile",
|
||||
column: "OrganisationAddressId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_ApplicationUser_PerfomerId",
|
||||
table: "PerformerProfile",
|
||||
column: "PerfomerId",
|
||||
principalTable: "AspNetUsers",
|
||||
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_AccountBalance_ApplicationUser_UserId", table: "AccountBalance");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BalanceImpact_AccountBalance_BalanceId", table: "BalanceImpact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Blog_ApplicationUser_AuthorId", table: "Blog");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Query_ApplicationUser_ClientId", table: "Query");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Query_Location_LocationId", table: "Query");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Query_PerformerProfile_PerformerId", table: "Query");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Circle_ApplicationUser_OwnerId", table: "Circle");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_ApplicationUser_ClientId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_PerformerProfile_PerformerId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Contact_ApplicationUser_OwnerId", table: "Contact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Activity_ActivityCode", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganisationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerfomerId", table: "PerformerProfile");
|
||||
migrationBuilder.DropColumn(name: "OwnerId", table: "Circle");
|
||||
migrationBuilder.DropColumn(name: "GoogleRegId", table: "AspNetUsers");
|
||||
migrationBuilder.DropTable("OAuth2Tokens");
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "UserId",
|
||||
table: "Circle",
|
||||
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_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_Blog_ApplicationUser_AuthorId",
|
||||
table: "Blog",
|
||||
column: "AuthorId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Query_ApplicationUser_ClientId",
|
||||
table: "Query",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Query_Location_LocationId",
|
||||
table: "Query",
|
||||
column: "LocationId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Query_PerformerProfile_PerformerId",
|
||||
table: "Query",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerfomerId",
|
||||
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_Command_ApplicationUser_ClientId",
|
||||
table: "Command",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Command_PerformerProfile_PerformerId",
|
||||
table: "Command",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerfomerId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Contact_ApplicationUser_OwnerId",
|
||||
table: "Contact",
|
||||
column: "OwnerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Activity_ActivityCode",
|
||||
table: "PerformerProfile",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Location_OrganisationAddressId",
|
||||
table: "PerformerProfile",
|
||||
column: "OrganisationAddressId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_ApplicationUser_PerfomerId",
|
||||
table: "PerformerProfile",
|
||||
column: "PerfomerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
}
|
||||
}
|
||||
607
Yavsc/Migrations/20160402135146_calendar.Designer.cs
generated
Normal file
607
Yavsc/Migrations/20160402135146_calendar.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,607 @@
|
|||
using System;
|
||||
using Microsoft.Data.Entity;
|
||||
using Microsoft.Data.Entity.Infrastructure;
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
using Yavsc.Models;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
[DbContext(typeof(ApplicationDbContext))]
|
||||
[Migration("20160402135146_calendar")]
|
||||
partial class calendar
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "7.0.0-rc1-16348");
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRole", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("NormalizedName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedName")
|
||||
.HasAnnotation("Relational:Name", "RoleNameIndex");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<string>("RoleId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetRoleClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.Property<string>("LoginProvider");
|
||||
|
||||
b.Property<string>("ProviderKey");
|
||||
|
||||
b.Property<string>("ProviderDisplayName");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("LoginProvider", "ProviderKey");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserLogins");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("RoleId");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Location", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Address")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<double>("Latitude");
|
||||
|
||||
b.Property<double>("Longitude");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.AccountBalance", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<long>("ContactCredits");
|
||||
|
||||
b.Property<decimal>("Credits");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Activity", b =>
|
||||
{
|
||||
b.Property<string>("Code")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("Photo");
|
||||
|
||||
b.HasKey("Code");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<int>("AccessFailedCount");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("DedicatedGoogleCalendar");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<bool>("EmailConfirmed");
|
||||
|
||||
b.Property<string>("GoogleRegId");
|
||||
|
||||
b.Property<bool>("LockoutEnabled");
|
||||
|
||||
b.Property<DateTimeOffset?>("LockoutEnd");
|
||||
|
||||
b.Property<string>("NormalizedEmail")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("NormalizedUserName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("PasswordHash");
|
||||
|
||||
b.Property<string>("PhoneNumber");
|
||||
|
||||
b.Property<bool>("PhoneNumberConfirmed");
|
||||
|
||||
b.Property<long?>("PostalAddressId");
|
||||
|
||||
b.Property<string>("SecurityStamp");
|
||||
|
||||
b.Property<bool>("TwoFactorEnabled");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedEmail")
|
||||
.HasAnnotation("Relational:Name", "EmailIndex");
|
||||
|
||||
b.HasIndex("NormalizedUserName")
|
||||
.HasAnnotation("Relational:Name", "UserNameIndex");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUsers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.BalanceImpact", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("BalanceId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("ExecDate");
|
||||
|
||||
b.Property<decimal>("Impact");
|
||||
|
||||
b.Property<string>("Reason")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.BaseProduct", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Blog", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AuthorId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("bcontent");
|
||||
|
||||
b.Property<DateTime>("modified");
|
||||
|
||||
b.Property<string>("photo");
|
||||
|
||||
b.Property<DateTime>("posted");
|
||||
|
||||
b.Property<int>("rate");
|
||||
|
||||
b.Property<string>("title");
|
||||
|
||||
b.Property<bool>("visible");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Book.Query", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("EventDate");
|
||||
|
||||
b.Property<int>("Lag");
|
||||
|
||||
b.Property<long>("LocationId");
|
||||
|
||||
b.Property<string>("PerformerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<decimal?>("Previsional");
|
||||
|
||||
b.Property<DateTime?>("ValidationDate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Circle", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CircleMember", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long?>("CircleId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("MemberId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Command", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<int>("Lag");
|
||||
|
||||
b.Property<string>("PerformerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<decimal?>("Previsional");
|
||||
|
||||
b.Property<DateTime?>("ValidationDate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CommandLine", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long?>("ArticleId");
|
||||
|
||||
b.Property<long?>("CommandId");
|
||||
|
||||
b.Property<string>("Comment");
|
||||
|
||||
b.Property<int>("Count");
|
||||
|
||||
b.Property<long?>("EstimateId");
|
||||
|
||||
b.Property<long?>("QueryId");
|
||||
|
||||
b.Property<decimal>("UnitaryCost");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Contact", b =>
|
||||
{
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.HasKey("OwnerId", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Estimate", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long?>("CommandId");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<int?>("Status");
|
||||
|
||||
b.Property<string>("Title");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.OAuth2Tokens", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("AccessToken");
|
||||
|
||||
b.Property<DateTime>("Expiration");
|
||||
|
||||
b.Property<string>("RefreshToken");
|
||||
|
||||
b.Property<string>("TokenType");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.PerformerProfile", b =>
|
||||
{
|
||||
b.Property<string>("PerfomerId");
|
||||
|
||||
b.Property<bool>("AcceptGeoLocalisation");
|
||||
|
||||
b.Property<bool>("AcceptNotifications");
|
||||
|
||||
b.Property<bool>("AcceptPublicContact");
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<string>("ActivityCode")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<int>("DailyCost");
|
||||
|
||||
b.Property<long>("OrganisationAddressId");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.Property<string>("SIRET")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 14);
|
||||
|
||||
b.Property<string>("WebSite");
|
||||
|
||||
b.HasKey("PerfomerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Service", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ContextId");
|
||||
|
||||
b.Property<decimal>("Depth");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<decimal>("Height");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<decimal>("Weight");
|
||||
|
||||
b.Property<decimal>("Width");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Skill", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.AccountBalance", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithOne()
|
||||
.HasForeignKey("YavscWeb.Models.AccountBalance", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("PostalAddressId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.BalanceImpact", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.AccountBalance")
|
||||
.WithMany()
|
||||
.HasForeignKey("BalanceId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Blog", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("AuthorId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Book.Query", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId");
|
||||
|
||||
b.HasOne("YavscWeb.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("LocationId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.PerformerProfile")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Circle", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CircleMember", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Circle")
|
||||
.WithMany()
|
||||
.HasForeignKey("CircleId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("MemberId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Command", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.PerformerProfile")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CommandLine", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.BaseProduct")
|
||||
.WithMany()
|
||||
.HasForeignKey("ArticleId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.Command")
|
||||
.WithMany()
|
||||
.HasForeignKey("CommandId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.Estimate")
|
||||
.WithMany()
|
||||
.HasForeignKey("EstimateId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.Book.Query")
|
||||
.WithMany()
|
||||
.HasForeignKey("QueryId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Contact", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Estimate", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Command")
|
||||
.WithMany()
|
||||
.HasForeignKey("CommandId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.PerformerProfile", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ActivityCode");
|
||||
|
||||
b.HasOne("YavscWeb.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("OrganisationAddressId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerfomerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Service", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ContextId");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
330
Yavsc/Migrations/20160402135146_calendar.cs
Normal file
330
Yavsc/Migrations/20160402135146_calendar.cs
Normal file
|
|
@ -0,0 +1,330 @@
|
|||
using Microsoft.Data.Entity.Migrations;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
public partial class calendar : 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_AccountBalance_ApplicationUser_UserId", table: "AccountBalance");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BalanceImpact_AccountBalance_BalanceId", table: "BalanceImpact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Blog_ApplicationUser_AuthorId", table: "Blog");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Query_ApplicationUser_ClientId", table: "Query");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Query_Location_LocationId", table: "Query");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Query_PerformerProfile_PerformerId", table: "Query");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_ApplicationUser_ClientId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_PerformerProfile_PerformerId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Contact_ApplicationUser_OwnerId", table: "Contact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Activity_ActivityCode", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganisationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerfomerId", table: "PerformerProfile");
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "DedicatedGoogleCalendar",
|
||||
table: "AspNetUsers",
|
||||
nullable: true);
|
||||
migrationBuilder.AddColumn<long>(
|
||||
name: "ContactCredits",
|
||||
table: "AccountBalance",
|
||||
nullable: false,
|
||||
defaultValue: 0L);
|
||||
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_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_Blog_ApplicationUser_AuthorId",
|
||||
table: "Blog",
|
||||
column: "AuthorId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Query_ApplicationUser_ClientId",
|
||||
table: "Query",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Query_Location_LocationId",
|
||||
table: "Query",
|
||||
column: "LocationId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Query_PerformerProfile_PerformerId",
|
||||
table: "Query",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerfomerId",
|
||||
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_Command_ApplicationUser_ClientId",
|
||||
table: "Command",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Command_PerformerProfile_PerformerId",
|
||||
table: "Command",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerfomerId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Contact_ApplicationUser_OwnerId",
|
||||
table: "Contact",
|
||||
column: "OwnerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Activity_ActivityCode",
|
||||
table: "PerformerProfile",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Location_OrganisationAddressId",
|
||||
table: "PerformerProfile",
|
||||
column: "OrganisationAddressId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_ApplicationUser_PerfomerId",
|
||||
table: "PerformerProfile",
|
||||
column: "PerfomerId",
|
||||
principalTable: "AspNetUsers",
|
||||
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_AccountBalance_ApplicationUser_UserId", table: "AccountBalance");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BalanceImpact_AccountBalance_BalanceId", table: "BalanceImpact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Blog_ApplicationUser_AuthorId", table: "Blog");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Query_ApplicationUser_ClientId", table: "Query");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Query_Location_LocationId", table: "Query");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Query_PerformerProfile_PerformerId", table: "Query");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_ApplicationUser_ClientId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_PerformerProfile_PerformerId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Contact_ApplicationUser_OwnerId", table: "Contact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Activity_ActivityCode", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganisationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerfomerId", table: "PerformerProfile");
|
||||
migrationBuilder.DropColumn(name: "DedicatedGoogleCalendar", table: "AspNetUsers");
|
||||
migrationBuilder.DropColumn(name: "ContactCredits", table: "AccountBalance");
|
||||
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_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_Blog_ApplicationUser_AuthorId",
|
||||
table: "Blog",
|
||||
column: "AuthorId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Query_ApplicationUser_ClientId",
|
||||
table: "Query",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Query_Location_LocationId",
|
||||
table: "Query",
|
||||
column: "LocationId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Query_PerformerProfile_PerformerId",
|
||||
table: "Query",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerfomerId",
|
||||
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_Command_ApplicationUser_ClientId",
|
||||
table: "Command",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Command_PerformerProfile_PerformerId",
|
||||
table: "Command",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerfomerId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Contact_ApplicationUser_OwnerId",
|
||||
table: "Contact",
|
||||
column: "OwnerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Activity_ActivityCode",
|
||||
table: "PerformerProfile",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Location_OrganisationAddressId",
|
||||
table: "PerformerProfile",
|
||||
column: "OrganisationAddressId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_ApplicationUser_PerfomerId",
|
||||
table: "PerformerProfile",
|
||||
column: "PerfomerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
}
|
||||
}
|
||||
611
Yavsc/Migrations/20160404110708_files.Designer.cs
generated
Normal file
611
Yavsc/Migrations/20160404110708_files.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,611 @@
|
|||
using System;
|
||||
using Microsoft.Data.Entity;
|
||||
using Microsoft.Data.Entity.Infrastructure;
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
using Yavsc.Models;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
[DbContext(typeof(ApplicationDbContext))]
|
||||
[Migration("20160404110708_files")]
|
||||
partial class files
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "7.0.0-rc1-16348");
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRole", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("NormalizedName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedName")
|
||||
.HasAnnotation("Relational:Name", "RoleNameIndex");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<string>("RoleId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetRoleClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.Property<string>("LoginProvider");
|
||||
|
||||
b.Property<string>("ProviderKey");
|
||||
|
||||
b.Property<string>("ProviderDisplayName");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("LoginProvider", "ProviderKey");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserLogins");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("RoleId");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Location", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Address")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<double>("Latitude");
|
||||
|
||||
b.Property<double>("Longitude");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.AccountBalance", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<long>("ContactCredits");
|
||||
|
||||
b.Property<decimal>("Credits");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Activity", b =>
|
||||
{
|
||||
b.Property<string>("Code")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("Photo");
|
||||
|
||||
b.HasKey("Code");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<int>("AccessFailedCount");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("DedicatedGoogleCalendar");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<bool>("EmailConfirmed");
|
||||
|
||||
b.Property<string>("GoogleRegId");
|
||||
|
||||
b.Property<bool>("LockoutEnabled");
|
||||
|
||||
b.Property<DateTimeOffset?>("LockoutEnd");
|
||||
|
||||
b.Property<string>("NormalizedEmail")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("NormalizedUserName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("PasswordHash");
|
||||
|
||||
b.Property<string>("PhoneNumber");
|
||||
|
||||
b.Property<bool>("PhoneNumberConfirmed");
|
||||
|
||||
b.Property<long?>("PostalAddressId");
|
||||
|
||||
b.Property<string>("SecurityStamp");
|
||||
|
||||
b.Property<bool>("TwoFactorEnabled");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedEmail")
|
||||
.HasAnnotation("Relational:Name", "EmailIndex");
|
||||
|
||||
b.HasIndex("NormalizedUserName")
|
||||
.HasAnnotation("Relational:Name", "UserNameIndex");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUsers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.BalanceImpact", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("BalanceId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("ExecDate");
|
||||
|
||||
b.Property<decimal>("Impact");
|
||||
|
||||
b.Property<string>("Reason")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.BaseProduct", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Blog", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AuthorId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("bcontent");
|
||||
|
||||
b.Property<DateTime>("modified");
|
||||
|
||||
b.Property<string>("photo");
|
||||
|
||||
b.Property<DateTime>("posted");
|
||||
|
||||
b.Property<int>("rate");
|
||||
|
||||
b.Property<string>("title");
|
||||
|
||||
b.Property<bool>("visible");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Book.Query", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("EventDate");
|
||||
|
||||
b.Property<int>("Lag");
|
||||
|
||||
b.Property<long>("LocationId");
|
||||
|
||||
b.Property<string>("PerformerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<decimal?>("Previsional");
|
||||
|
||||
b.Property<DateTime?>("ValidationDate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Circle", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CircleMember", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long?>("CircleId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("MemberId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Command", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<int>("Lag");
|
||||
|
||||
b.Property<string>("PerformerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<decimal?>("Previsional");
|
||||
|
||||
b.Property<DateTime?>("ValidationDate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CommandLine", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long?>("ArticleId");
|
||||
|
||||
b.Property<long?>("CommandId");
|
||||
|
||||
b.Property<string>("Comment");
|
||||
|
||||
b.Property<int>("Count");
|
||||
|
||||
b.Property<long?>("EstimateId");
|
||||
|
||||
b.Property<long?>("QueryId");
|
||||
|
||||
b.Property<decimal>("UnitaryCost");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Contact", b =>
|
||||
{
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.HasKey("OwnerId", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Estimate", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AttachedFiles");
|
||||
|
||||
b.Property<string>("AttachedGraphics");
|
||||
|
||||
b.Property<long?>("CommandId");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<int?>("Status");
|
||||
|
||||
b.Property<string>("Title");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.OAuth2Tokens", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("AccessToken");
|
||||
|
||||
b.Property<DateTime>("Expiration");
|
||||
|
||||
b.Property<string>("RefreshToken");
|
||||
|
||||
b.Property<string>("TokenType");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.PerformerProfile", b =>
|
||||
{
|
||||
b.Property<string>("PerfomerId");
|
||||
|
||||
b.Property<bool>("AcceptGeoLocalisation");
|
||||
|
||||
b.Property<bool>("AcceptNotifications");
|
||||
|
||||
b.Property<bool>("AcceptPublicContact");
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<string>("ActivityCode")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<int>("DailyCost");
|
||||
|
||||
b.Property<long>("OrganisationAddressId");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.Property<string>("SIRET")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 14);
|
||||
|
||||
b.Property<string>("WebSite");
|
||||
|
||||
b.HasKey("PerfomerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Service", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ContextId");
|
||||
|
||||
b.Property<decimal>("Depth");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<decimal>("Height");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<decimal>("Weight");
|
||||
|
||||
b.Property<decimal>("Width");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Skill", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.AccountBalance", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithOne()
|
||||
.HasForeignKey("YavscWeb.Models.AccountBalance", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("PostalAddressId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.BalanceImpact", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.AccountBalance")
|
||||
.WithMany()
|
||||
.HasForeignKey("BalanceId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Blog", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("AuthorId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Book.Query", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId");
|
||||
|
||||
b.HasOne("YavscWeb.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("LocationId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.PerformerProfile")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Circle", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CircleMember", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Circle")
|
||||
.WithMany()
|
||||
.HasForeignKey("CircleId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("MemberId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Command", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.PerformerProfile")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CommandLine", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.BaseProduct")
|
||||
.WithMany()
|
||||
.HasForeignKey("ArticleId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.Command")
|
||||
.WithMany()
|
||||
.HasForeignKey("CommandId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.Estimate")
|
||||
.WithMany()
|
||||
.HasForeignKey("EstimateId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.Book.Query")
|
||||
.WithMany()
|
||||
.HasForeignKey("QueryId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Contact", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Estimate", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Command")
|
||||
.WithMany()
|
||||
.HasForeignKey("CommandId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.PerformerProfile", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ActivityCode");
|
||||
|
||||
b.HasOne("YavscWeb.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("OrganisationAddressId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerfomerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Service", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ContextId");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
330
Yavsc/Migrations/20160404110708_files.cs
Normal file
330
Yavsc/Migrations/20160404110708_files.cs
Normal file
|
|
@ -0,0 +1,330 @@
|
|||
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
public partial class files : 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_AccountBalance_ApplicationUser_UserId", table: "AccountBalance");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BalanceImpact_AccountBalance_BalanceId", table: "BalanceImpact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Blog_ApplicationUser_AuthorId", table: "Blog");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Query_ApplicationUser_ClientId", table: "Query");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Query_Location_LocationId", table: "Query");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Query_PerformerProfile_PerformerId", table: "Query");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_ApplicationUser_ClientId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_PerformerProfile_PerformerId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Contact_ApplicationUser_OwnerId", table: "Contact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Activity_ActivityCode", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganisationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerfomerId", table: "PerformerProfile");
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "AttachedFiles",
|
||||
table: "Estimate",
|
||||
nullable: true);
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "AttachedGraphics",
|
||||
table: "Estimate",
|
||||
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_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_Blog_ApplicationUser_AuthorId",
|
||||
table: "Blog",
|
||||
column: "AuthorId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Query_ApplicationUser_ClientId",
|
||||
table: "Query",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Query_Location_LocationId",
|
||||
table: "Query",
|
||||
column: "LocationId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Query_PerformerProfile_PerformerId",
|
||||
table: "Query",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerfomerId",
|
||||
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_Command_ApplicationUser_ClientId",
|
||||
table: "Command",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Command_PerformerProfile_PerformerId",
|
||||
table: "Command",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerfomerId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Contact_ApplicationUser_OwnerId",
|
||||
table: "Contact",
|
||||
column: "OwnerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Activity_ActivityCode",
|
||||
table: "PerformerProfile",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Location_OrganisationAddressId",
|
||||
table: "PerformerProfile",
|
||||
column: "OrganisationAddressId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_ApplicationUser_PerfomerId",
|
||||
table: "PerformerProfile",
|
||||
column: "PerfomerId",
|
||||
principalTable: "AspNetUsers",
|
||||
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_AccountBalance_ApplicationUser_UserId", table: "AccountBalance");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BalanceImpact_AccountBalance_BalanceId", table: "BalanceImpact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Blog_ApplicationUser_AuthorId", table: "Blog");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Query_ApplicationUser_ClientId", table: "Query");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Query_Location_LocationId", table: "Query");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Query_PerformerProfile_PerformerId", table: "Query");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_ApplicationUser_ClientId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_PerformerProfile_PerformerId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Contact_ApplicationUser_OwnerId", table: "Contact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Activity_ActivityCode", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganisationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerfomerId", table: "PerformerProfile");
|
||||
migrationBuilder.DropColumn(name: "AttachedFiles", table: "Estimate");
|
||||
migrationBuilder.DropColumn(name: "AttachedGraphics", table: "Estimate");
|
||||
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_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_Blog_ApplicationUser_AuthorId",
|
||||
table: "Blog",
|
||||
column: "AuthorId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Query_ApplicationUser_ClientId",
|
||||
table: "Query",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Query_Location_LocationId",
|
||||
table: "Query",
|
||||
column: "LocationId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Query_PerformerProfile_PerformerId",
|
||||
table: "Query",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerfomerId",
|
||||
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_Command_ApplicationUser_ClientId",
|
||||
table: "Command",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Command_PerformerProfile_PerformerId",
|
||||
table: "Command",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerfomerId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Contact_ApplicationUser_OwnerId",
|
||||
table: "Contact",
|
||||
column: "OwnerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Activity_ActivityCode",
|
||||
table: "PerformerProfile",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Location_OrganisationAddressId",
|
||||
table: "PerformerProfile",
|
||||
column: "OrganisationAddressId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_ApplicationUser_PerfomerId",
|
||||
table: "PerformerProfile",
|
||||
column: "PerfomerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
}
|
||||
}
|
||||
611
Yavsc/Migrations/20160404121446_estimate.Designer.cs
generated
Normal file
611
Yavsc/Migrations/20160404121446_estimate.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,611 @@
|
|||
using System;
|
||||
using Microsoft.Data.Entity;
|
||||
using Microsoft.Data.Entity.Infrastructure;
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
using Yavsc.Models;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
[DbContext(typeof(ApplicationDbContext))]
|
||||
[Migration("20160404121446_estimate")]
|
||||
partial class estimate
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "7.0.0-rc1-16348");
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRole", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("NormalizedName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedName")
|
||||
.HasAnnotation("Relational:Name", "RoleNameIndex");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<string>("RoleId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetRoleClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.Property<string>("LoginProvider");
|
||||
|
||||
b.Property<string>("ProviderKey");
|
||||
|
||||
b.Property<string>("ProviderDisplayName");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("LoginProvider", "ProviderKey");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserLogins");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("RoleId");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Location", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Address")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<double>("Latitude");
|
||||
|
||||
b.Property<double>("Longitude");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.AccountBalance", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<long>("ContactCredits");
|
||||
|
||||
b.Property<decimal>("Credits");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Activity", b =>
|
||||
{
|
||||
b.Property<string>("Code")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("Photo");
|
||||
|
||||
b.HasKey("Code");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<int>("AccessFailedCount");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("DedicatedGoogleCalendar");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<bool>("EmailConfirmed");
|
||||
|
||||
b.Property<string>("GoogleRegId");
|
||||
|
||||
b.Property<bool>("LockoutEnabled");
|
||||
|
||||
b.Property<DateTimeOffset?>("LockoutEnd");
|
||||
|
||||
b.Property<string>("NormalizedEmail")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("NormalizedUserName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("PasswordHash");
|
||||
|
||||
b.Property<string>("PhoneNumber");
|
||||
|
||||
b.Property<bool>("PhoneNumberConfirmed");
|
||||
|
||||
b.Property<long?>("PostalAddressId");
|
||||
|
||||
b.Property<string>("SecurityStamp");
|
||||
|
||||
b.Property<bool>("TwoFactorEnabled");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedEmail")
|
||||
.HasAnnotation("Relational:Name", "EmailIndex");
|
||||
|
||||
b.HasIndex("NormalizedUserName")
|
||||
.HasAnnotation("Relational:Name", "UserNameIndex");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUsers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.BalanceImpact", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("BalanceId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("ExecDate");
|
||||
|
||||
b.Property<decimal>("Impact");
|
||||
|
||||
b.Property<string>("Reason")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.BaseProduct", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Blog", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AuthorId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("bcontent");
|
||||
|
||||
b.Property<DateTime>("modified");
|
||||
|
||||
b.Property<string>("photo");
|
||||
|
||||
b.Property<DateTime>("posted");
|
||||
|
||||
b.Property<int>("rate");
|
||||
|
||||
b.Property<string>("title");
|
||||
|
||||
b.Property<bool>("visible");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Book.Query", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("EventDate");
|
||||
|
||||
b.Property<int>("Lag");
|
||||
|
||||
b.Property<long>("LocationId");
|
||||
|
||||
b.Property<string>("PerformerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<decimal?>("Previsional");
|
||||
|
||||
b.Property<DateTime?>("ValidationDate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Circle", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CircleMember", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long?>("CircleId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("MemberId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Command", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<int>("Lag");
|
||||
|
||||
b.Property<string>("PerformerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<decimal?>("Previsional");
|
||||
|
||||
b.Property<DateTime?>("ValidationDate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CommandLine", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long?>("ArticleId");
|
||||
|
||||
b.Property<long?>("CommandId");
|
||||
|
||||
b.Property<string>("Comment");
|
||||
|
||||
b.Property<int>("Count");
|
||||
|
||||
b.Property<long?>("EstimateId");
|
||||
|
||||
b.Property<long?>("QueryId");
|
||||
|
||||
b.Property<decimal>("UnitaryCost");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Contact", b =>
|
||||
{
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.HasKey("OwnerId", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Estimate", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AttachedFilesString");
|
||||
|
||||
b.Property<string>("AttachedGraphicsString");
|
||||
|
||||
b.Property<long?>("CommandId");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<int?>("Status");
|
||||
|
||||
b.Property<string>("Title");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.OAuth2Tokens", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("AccessToken");
|
||||
|
||||
b.Property<DateTime>("Expiration");
|
||||
|
||||
b.Property<string>("RefreshToken");
|
||||
|
||||
b.Property<string>("TokenType");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.PerformerProfile", b =>
|
||||
{
|
||||
b.Property<string>("PerfomerId");
|
||||
|
||||
b.Property<bool>("AcceptGeoLocalisation");
|
||||
|
||||
b.Property<bool>("AcceptNotifications");
|
||||
|
||||
b.Property<bool>("AcceptPublicContact");
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<string>("ActivityCode")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<int>("DailyCost");
|
||||
|
||||
b.Property<long>("OrganisationAddressId");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.Property<string>("SIRET")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 14);
|
||||
|
||||
b.Property<string>("WebSite");
|
||||
|
||||
b.HasKey("PerfomerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Service", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ContextId");
|
||||
|
||||
b.Property<decimal>("Depth");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<decimal>("Height");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<decimal>("Weight");
|
||||
|
||||
b.Property<decimal>("Width");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Skill", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.AccountBalance", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithOne()
|
||||
.HasForeignKey("YavscWeb.Models.AccountBalance", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("PostalAddressId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.BalanceImpact", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.AccountBalance")
|
||||
.WithMany()
|
||||
.HasForeignKey("BalanceId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Blog", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("AuthorId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Book.Query", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId");
|
||||
|
||||
b.HasOne("YavscWeb.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("LocationId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.PerformerProfile")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Circle", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CircleMember", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Circle")
|
||||
.WithMany()
|
||||
.HasForeignKey("CircleId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("MemberId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Command", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.PerformerProfile")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CommandLine", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.BaseProduct")
|
||||
.WithMany()
|
||||
.HasForeignKey("ArticleId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.Command")
|
||||
.WithMany()
|
||||
.HasForeignKey("CommandId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.Estimate")
|
||||
.WithMany()
|
||||
.HasForeignKey("EstimateId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.Book.Query")
|
||||
.WithMany()
|
||||
.HasForeignKey("QueryId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Contact", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Estimate", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Command")
|
||||
.WithMany()
|
||||
.HasForeignKey("CommandId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.PerformerProfile", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ActivityCode");
|
||||
|
||||
b.HasOne("YavscWeb.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("OrganisationAddressId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerfomerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Service", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ContextId");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
339
Yavsc/Migrations/20160404121446_estimate.cs
Normal file
339
Yavsc/Migrations/20160404121446_estimate.cs
Normal file
|
|
@ -0,0 +1,339 @@
|
|||
using Microsoft.Data.Entity.Migrations;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
public partial class estimate : 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_AccountBalance_ApplicationUser_UserId", table: "AccountBalance");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BalanceImpact_AccountBalance_BalanceId", table: "BalanceImpact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Blog_ApplicationUser_AuthorId", table: "Blog");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Query_ApplicationUser_ClientId", table: "Query");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Query_Location_LocationId", table: "Query");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Query_PerformerProfile_PerformerId", table: "Query");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_ApplicationUser_ClientId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_PerformerProfile_PerformerId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Contact_ApplicationUser_OwnerId", table: "Contact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Activity_ActivityCode", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganisationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerfomerId", table: "PerformerProfile");
|
||||
migrationBuilder.DropColumn(name: "AttachedFiles", table: "Estimate");
|
||||
migrationBuilder.DropColumn(name: "AttachedGraphics", table: "Estimate");
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "AttachedFilesString",
|
||||
table: "Estimate",
|
||||
nullable: true);
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "AttachedGraphicsString",
|
||||
table: "Estimate",
|
||||
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_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_Blog_ApplicationUser_AuthorId",
|
||||
table: "Blog",
|
||||
column: "AuthorId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Query_ApplicationUser_ClientId",
|
||||
table: "Query",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Query_Location_LocationId",
|
||||
table: "Query",
|
||||
column: "LocationId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Query_PerformerProfile_PerformerId",
|
||||
table: "Query",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerfomerId",
|
||||
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_Command_ApplicationUser_ClientId",
|
||||
table: "Command",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Command_PerformerProfile_PerformerId",
|
||||
table: "Command",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerfomerId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Contact_ApplicationUser_OwnerId",
|
||||
table: "Contact",
|
||||
column: "OwnerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Activity_ActivityCode",
|
||||
table: "PerformerProfile",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Location_OrganisationAddressId",
|
||||
table: "PerformerProfile",
|
||||
column: "OrganisationAddressId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_ApplicationUser_PerfomerId",
|
||||
table: "PerformerProfile",
|
||||
column: "PerfomerId",
|
||||
principalTable: "AspNetUsers",
|
||||
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_AccountBalance_ApplicationUser_UserId", table: "AccountBalance");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BalanceImpact_AccountBalance_BalanceId", table: "BalanceImpact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Blog_ApplicationUser_AuthorId", table: "Blog");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Query_ApplicationUser_ClientId", table: "Query");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Query_Location_LocationId", table: "Query");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Query_PerformerProfile_PerformerId", table: "Query");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_ApplicationUser_ClientId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_PerformerProfile_PerformerId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Contact_ApplicationUser_OwnerId", table: "Contact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Activity_ActivityCode", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganisationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerfomerId", table: "PerformerProfile");
|
||||
migrationBuilder.DropColumn(name: "AttachedFilesString", table: "Estimate");
|
||||
migrationBuilder.DropColumn(name: "AttachedGraphicsString", table: "Estimate");
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "AttachedFiles",
|
||||
table: "Estimate",
|
||||
nullable: true);
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "AttachedGraphics",
|
||||
table: "Estimate",
|
||||
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_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_Blog_ApplicationUser_AuthorId",
|
||||
table: "Blog",
|
||||
column: "AuthorId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Query_ApplicationUser_ClientId",
|
||||
table: "Query",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Query_Location_LocationId",
|
||||
table: "Query",
|
||||
column: "LocationId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Query_PerformerProfile_PerformerId",
|
||||
table: "Query",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerfomerId",
|
||||
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_Command_ApplicationUser_ClientId",
|
||||
table: "Command",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Command_PerformerProfile_PerformerId",
|
||||
table: "Command",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerfomerId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Contact_ApplicationUser_OwnerId",
|
||||
table: "Contact",
|
||||
column: "OwnerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Activity_ActivityCode",
|
||||
table: "PerformerProfile",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Location_OrganisationAddressId",
|
||||
table: "PerformerProfile",
|
||||
column: "OrganisationAddressId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_ApplicationUser_PerfomerId",
|
||||
table: "PerformerProfile",
|
||||
column: "PerfomerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
}
|
||||
}
|
||||
611
Yavsc/Migrations/20160404130359_estimateCommand.Designer.cs
generated
Normal file
611
Yavsc/Migrations/20160404130359_estimateCommand.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,611 @@
|
|||
using System;
|
||||
using Microsoft.Data.Entity;
|
||||
using Microsoft.Data.Entity.Infrastructure;
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
using Yavsc.Models;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
[DbContext(typeof(ApplicationDbContext))]
|
||||
[Migration("20160404130359_estimateCommand")]
|
||||
partial class estimateCommand
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "7.0.0-rc1-16348");
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRole", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("NormalizedName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedName")
|
||||
.HasAnnotation("Relational:Name", "RoleNameIndex");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<string>("RoleId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetRoleClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.Property<string>("LoginProvider");
|
||||
|
||||
b.Property<string>("ProviderKey");
|
||||
|
||||
b.Property<string>("ProviderDisplayName");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("LoginProvider", "ProviderKey");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserLogins");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("RoleId");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Location", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Address")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<double>("Latitude");
|
||||
|
||||
b.Property<double>("Longitude");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.AccountBalance", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<long>("ContactCredits");
|
||||
|
||||
b.Property<decimal>("Credits");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Activity", b =>
|
||||
{
|
||||
b.Property<string>("Code")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("Photo");
|
||||
|
||||
b.HasKey("Code");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<int>("AccessFailedCount");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("DedicatedGoogleCalendar");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<bool>("EmailConfirmed");
|
||||
|
||||
b.Property<string>("GoogleRegId");
|
||||
|
||||
b.Property<bool>("LockoutEnabled");
|
||||
|
||||
b.Property<DateTimeOffset?>("LockoutEnd");
|
||||
|
||||
b.Property<string>("NormalizedEmail")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("NormalizedUserName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("PasswordHash");
|
||||
|
||||
b.Property<string>("PhoneNumber");
|
||||
|
||||
b.Property<bool>("PhoneNumberConfirmed");
|
||||
|
||||
b.Property<long?>("PostalAddressId");
|
||||
|
||||
b.Property<string>("SecurityStamp");
|
||||
|
||||
b.Property<bool>("TwoFactorEnabled");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedEmail")
|
||||
.HasAnnotation("Relational:Name", "EmailIndex");
|
||||
|
||||
b.HasIndex("NormalizedUserName")
|
||||
.HasAnnotation("Relational:Name", "UserNameIndex");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUsers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.BalanceImpact", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("BalanceId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("ExecDate");
|
||||
|
||||
b.Property<decimal>("Impact");
|
||||
|
||||
b.Property<string>("Reason")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.BaseProduct", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Blog", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AuthorId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("bcontent");
|
||||
|
||||
b.Property<DateTime>("modified");
|
||||
|
||||
b.Property<string>("photo");
|
||||
|
||||
b.Property<DateTime>("posted");
|
||||
|
||||
b.Property<int>("rate");
|
||||
|
||||
b.Property<string>("title");
|
||||
|
||||
b.Property<bool>("visible");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Book.Query", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("EventDate");
|
||||
|
||||
b.Property<int>("Lag");
|
||||
|
||||
b.Property<long>("LocationId");
|
||||
|
||||
b.Property<string>("PerformerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<decimal?>("Previsional");
|
||||
|
||||
b.Property<DateTime?>("ValidationDate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Circle", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CircleMember", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long?>("CircleId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("MemberId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Command", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<int>("Lag");
|
||||
|
||||
b.Property<string>("PerformerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<decimal?>("Previsional");
|
||||
|
||||
b.Property<DateTime?>("ValidationDate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CommandLine", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long?>("ArticleId");
|
||||
|
||||
b.Property<long?>("CommandId");
|
||||
|
||||
b.Property<string>("Comment");
|
||||
|
||||
b.Property<int>("Count");
|
||||
|
||||
b.Property<long?>("EstimateId");
|
||||
|
||||
b.Property<long?>("QueryId");
|
||||
|
||||
b.Property<decimal>("UnitaryCost");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Contact", b =>
|
||||
{
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.HasKey("OwnerId", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Estimate", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AttachedFilesString");
|
||||
|
||||
b.Property<string>("AttachedGraphicsString");
|
||||
|
||||
b.Property<long?>("CommandId");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<int?>("Status");
|
||||
|
||||
b.Property<string>("Title");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.OAuth2Tokens", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("AccessToken");
|
||||
|
||||
b.Property<DateTime>("Expiration");
|
||||
|
||||
b.Property<string>("RefreshToken");
|
||||
|
||||
b.Property<string>("TokenType");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.PerformerProfile", b =>
|
||||
{
|
||||
b.Property<string>("PerfomerId");
|
||||
|
||||
b.Property<bool>("AcceptGeoLocalisation");
|
||||
|
||||
b.Property<bool>("AcceptNotifications");
|
||||
|
||||
b.Property<bool>("AcceptPublicContact");
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<string>("ActivityCode")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<int>("DailyCost");
|
||||
|
||||
b.Property<long>("OrganisationAddressId");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.Property<string>("SIRET")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 14);
|
||||
|
||||
b.Property<string>("WebSite");
|
||||
|
||||
b.HasKey("PerfomerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Service", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ContextId");
|
||||
|
||||
b.Property<decimal>("Depth");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<decimal>("Height");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<decimal>("Weight");
|
||||
|
||||
b.Property<decimal>("Width");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Skill", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.AccountBalance", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithOne()
|
||||
.HasForeignKey("YavscWeb.Models.AccountBalance", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("PostalAddressId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.BalanceImpact", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.AccountBalance")
|
||||
.WithMany()
|
||||
.HasForeignKey("BalanceId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Blog", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("AuthorId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Book.Query", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId");
|
||||
|
||||
b.HasOne("YavscWeb.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("LocationId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.PerformerProfile")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Circle", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CircleMember", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Circle")
|
||||
.WithMany()
|
||||
.HasForeignKey("CircleId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("MemberId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Command", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.PerformerProfile")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CommandLine", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.BaseProduct")
|
||||
.WithMany()
|
||||
.HasForeignKey("ArticleId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.Command")
|
||||
.WithMany()
|
||||
.HasForeignKey("CommandId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.Estimate")
|
||||
.WithMany()
|
||||
.HasForeignKey("EstimateId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.Book.Query")
|
||||
.WithMany()
|
||||
.HasForeignKey("QueryId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Contact", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Estimate", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Command")
|
||||
.WithMany()
|
||||
.HasForeignKey("CommandId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.PerformerProfile", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ActivityCode");
|
||||
|
||||
b.HasOne("YavscWeb.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("OrganisationAddressId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerfomerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Service", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ContextId");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
319
Yavsc/Migrations/20160404130359_estimateCommand.cs
Normal file
319
Yavsc/Migrations/20160404130359_estimateCommand.cs
Normal file
|
|
@ -0,0 +1,319 @@
|
|||
using Microsoft.Data.Entity.Migrations;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
public partial class estimateCommand : 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_AccountBalance_ApplicationUser_UserId", table: "AccountBalance");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BalanceImpact_AccountBalance_BalanceId", table: "BalanceImpact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Blog_ApplicationUser_AuthorId", table: "Blog");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Query_ApplicationUser_ClientId", table: "Query");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Query_Location_LocationId", table: "Query");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Query_PerformerProfile_PerformerId", table: "Query");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_ApplicationUser_ClientId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_PerformerProfile_PerformerId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Contact_ApplicationUser_OwnerId", table: "Contact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Activity_ActivityCode", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganisationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerfomerId", table: "PerformerProfile");
|
||||
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_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_Blog_ApplicationUser_AuthorId",
|
||||
table: "Blog",
|
||||
column: "AuthorId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Query_ApplicationUser_ClientId",
|
||||
table: "Query",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Query_Location_LocationId",
|
||||
table: "Query",
|
||||
column: "LocationId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Query_PerformerProfile_PerformerId",
|
||||
table: "Query",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerfomerId",
|
||||
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_Command_ApplicationUser_ClientId",
|
||||
table: "Command",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Command_PerformerProfile_PerformerId",
|
||||
table: "Command",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerfomerId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Contact_ApplicationUser_OwnerId",
|
||||
table: "Contact",
|
||||
column: "OwnerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Activity_ActivityCode",
|
||||
table: "PerformerProfile",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Location_OrganisationAddressId",
|
||||
table: "PerformerProfile",
|
||||
column: "OrganisationAddressId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_ApplicationUser_PerfomerId",
|
||||
table: "PerformerProfile",
|
||||
column: "PerfomerId",
|
||||
principalTable: "AspNetUsers",
|
||||
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_AccountBalance_ApplicationUser_UserId", table: "AccountBalance");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BalanceImpact_AccountBalance_BalanceId", table: "BalanceImpact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Blog_ApplicationUser_AuthorId", table: "Blog");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Query_ApplicationUser_ClientId", table: "Query");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Query_Location_LocationId", table: "Query");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Query_PerformerProfile_PerformerId", table: "Query");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_ApplicationUser_ClientId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_PerformerProfile_PerformerId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Contact_ApplicationUser_OwnerId", table: "Contact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Activity_ActivityCode", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganisationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerfomerId", table: "PerformerProfile");
|
||||
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_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_Blog_ApplicationUser_AuthorId",
|
||||
table: "Blog",
|
||||
column: "AuthorId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Query_ApplicationUser_ClientId",
|
||||
table: "Query",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Query_Location_LocationId",
|
||||
table: "Query",
|
||||
column: "LocationId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Query_PerformerProfile_PerformerId",
|
||||
table: "Query",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerfomerId",
|
||||
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_Command_ApplicationUser_ClientId",
|
||||
table: "Command",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Command_PerformerProfile_PerformerId",
|
||||
table: "Command",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerfomerId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Contact_ApplicationUser_OwnerId",
|
||||
table: "Contact",
|
||||
column: "OwnerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Activity_ActivityCode",
|
||||
table: "PerformerProfile",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Location_OrganisationAddressId",
|
||||
table: "PerformerProfile",
|
||||
column: "OrganisationAddressId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_ApplicationUser_PerfomerId",
|
||||
table: "PerformerProfile",
|
||||
column: "PerfomerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
}
|
||||
}
|
||||
611
Yavsc/Migrations/20160405091432_booking.Designer.cs
generated
Normal file
611
Yavsc/Migrations/20160405091432_booking.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,611 @@
|
|||
using System;
|
||||
using Microsoft.Data.Entity;
|
||||
using Microsoft.Data.Entity.Infrastructure;
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
using Yavsc.Models;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
[DbContext(typeof(ApplicationDbContext))]
|
||||
[Migration("20160405091432_booking")]
|
||||
partial class booking
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "7.0.0-rc1-16348");
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRole", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("NormalizedName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedName")
|
||||
.HasAnnotation("Relational:Name", "RoleNameIndex");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<string>("RoleId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetRoleClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.Property<string>("LoginProvider");
|
||||
|
||||
b.Property<string>("ProviderKey");
|
||||
|
||||
b.Property<string>("ProviderDisplayName");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("LoginProvider", "ProviderKey");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserLogins");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("RoleId");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Location", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Address")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<double>("Latitude");
|
||||
|
||||
b.Property<double>("Longitude");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.AccountBalance", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<long>("ContactCredits");
|
||||
|
||||
b.Property<decimal>("Credits");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Activity", b =>
|
||||
{
|
||||
b.Property<string>("Code")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("Photo");
|
||||
|
||||
b.HasKey("Code");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<int>("AccessFailedCount");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("DedicatedGoogleCalendar");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<bool>("EmailConfirmed");
|
||||
|
||||
b.Property<string>("GoogleRegId");
|
||||
|
||||
b.Property<bool>("LockoutEnabled");
|
||||
|
||||
b.Property<DateTimeOffset?>("LockoutEnd");
|
||||
|
||||
b.Property<string>("NormalizedEmail")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("NormalizedUserName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("PasswordHash");
|
||||
|
||||
b.Property<string>("PhoneNumber");
|
||||
|
||||
b.Property<bool>("PhoneNumberConfirmed");
|
||||
|
||||
b.Property<long?>("PostalAddressId");
|
||||
|
||||
b.Property<string>("SecurityStamp");
|
||||
|
||||
b.Property<bool>("TwoFactorEnabled");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedEmail")
|
||||
.HasAnnotation("Relational:Name", "EmailIndex");
|
||||
|
||||
b.HasIndex("NormalizedUserName")
|
||||
.HasAnnotation("Relational:Name", "UserNameIndex");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUsers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.BalanceImpact", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("BalanceId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("ExecDate");
|
||||
|
||||
b.Property<decimal>("Impact");
|
||||
|
||||
b.Property<string>("Reason")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.BaseProduct", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Blog", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AuthorId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("bcontent");
|
||||
|
||||
b.Property<DateTime>("modified");
|
||||
|
||||
b.Property<string>("photo");
|
||||
|
||||
b.Property<DateTime>("posted");
|
||||
|
||||
b.Property<int>("rate");
|
||||
|
||||
b.Property<string>("title");
|
||||
|
||||
b.Property<bool>("visible");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Book.BookQuery", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("EventDate");
|
||||
|
||||
b.Property<int>("Lag");
|
||||
|
||||
b.Property<long>("LocationId");
|
||||
|
||||
b.Property<string>("PerformerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<decimal?>("Previsional");
|
||||
|
||||
b.Property<DateTime?>("ValidationDate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Circle", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CircleMember", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long?>("CircleId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("MemberId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Command", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<int>("Lag");
|
||||
|
||||
b.Property<string>("PerformerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<decimal?>("Previsional");
|
||||
|
||||
b.Property<DateTime?>("ValidationDate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CommandLine", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long?>("ArticleId");
|
||||
|
||||
b.Property<long?>("BookQueryId");
|
||||
|
||||
b.Property<long?>("CommandId");
|
||||
|
||||
b.Property<string>("Comment");
|
||||
|
||||
b.Property<int>("Count");
|
||||
|
||||
b.Property<long?>("EstimateId");
|
||||
|
||||
b.Property<decimal>("UnitaryCost");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Contact", b =>
|
||||
{
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.HasKey("OwnerId", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Estimate", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AttachedFilesString");
|
||||
|
||||
b.Property<string>("AttachedGraphicsString");
|
||||
|
||||
b.Property<long?>("CommandId");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<int?>("Status");
|
||||
|
||||
b.Property<string>("Title");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.OAuth2Tokens", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("AccessToken");
|
||||
|
||||
b.Property<DateTime>("Expiration");
|
||||
|
||||
b.Property<string>("RefreshToken");
|
||||
|
||||
b.Property<string>("TokenType");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.PerformerProfile", b =>
|
||||
{
|
||||
b.Property<string>("PerfomerId");
|
||||
|
||||
b.Property<bool>("AcceptGeoLocalisation");
|
||||
|
||||
b.Property<bool>("AcceptNotifications");
|
||||
|
||||
b.Property<bool>("AcceptPublicContact");
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<string>("ActivityCode")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<int>("DailyCost");
|
||||
|
||||
b.Property<long>("OrganisationAddressId");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.Property<string>("SIRET")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 14);
|
||||
|
||||
b.Property<string>("WebSite");
|
||||
|
||||
b.HasKey("PerfomerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Service", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ContextId");
|
||||
|
||||
b.Property<decimal>("Depth");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<decimal>("Height");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<decimal>("Weight");
|
||||
|
||||
b.Property<decimal>("Width");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Skill", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.AccountBalance", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithOne()
|
||||
.HasForeignKey("YavscWeb.Models.AccountBalance", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("PostalAddressId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.BalanceImpact", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.AccountBalance")
|
||||
.WithMany()
|
||||
.HasForeignKey("BalanceId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Blog", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("AuthorId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Book.BookQuery", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId");
|
||||
|
||||
b.HasOne("YavscWeb.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("LocationId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.PerformerProfile")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Circle", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CircleMember", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Circle")
|
||||
.WithMany()
|
||||
.HasForeignKey("CircleId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("MemberId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Command", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.PerformerProfile")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CommandLine", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.BaseProduct")
|
||||
.WithMany()
|
||||
.HasForeignKey("ArticleId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.Book.BookQuery")
|
||||
.WithMany()
|
||||
.HasForeignKey("BookQueryId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.Command")
|
||||
.WithMany()
|
||||
.HasForeignKey("CommandId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.Estimate")
|
||||
.WithMany()
|
||||
.HasForeignKey("EstimateId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Contact", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Estimate", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Command")
|
||||
.WithMany()
|
||||
.HasForeignKey("CommandId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.PerformerProfile", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ActivityCode");
|
||||
|
||||
b.HasOne("YavscWeb.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("OrganisationAddressId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerfomerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Service", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ContextId");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
372
Yavsc/Migrations/20160405091432_booking.cs
Normal file
372
Yavsc/Migrations/20160405091432_booking.cs
Normal file
|
|
@ -0,0 +1,372 @@
|
|||
using System;
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
public partial class booking : 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_AccountBalance_ApplicationUser_UserId", table: "AccountBalance");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BalanceImpact_AccountBalance_BalanceId", table: "BalanceImpact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Blog_ApplicationUser_AuthorId", table: "Blog");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_ApplicationUser_ClientId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_PerformerProfile_PerformerId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CommandLine_Query_QueryId", table: "CommandLine");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Contact_ApplicationUser_OwnerId", table: "Contact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Activity_ActivityCode", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganisationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerfomerId", table: "PerformerProfile");
|
||||
migrationBuilder.DropColumn(name: "QueryId", table: "CommandLine");
|
||||
migrationBuilder.DropTable("Query");
|
||||
migrationBuilder.CreateTable(
|
||||
name: "BookQuery",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<long>(nullable: false)
|
||||
.Annotation("Npgsql:Serial", true),
|
||||
ClientId = table.Column<string>(nullable: false),
|
||||
EventDate = table.Column<DateTime>(nullable: false),
|
||||
Lag = table.Column<int>(nullable: false),
|
||||
LocationId = table.Column<long>(nullable: false),
|
||||
PerformerId = table.Column<string>(nullable: false),
|
||||
Previsional = table.Column<decimal>(nullable: true),
|
||||
ValidationDate = table.Column<DateTime>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_BookQuery", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_BookQuery_ApplicationUser_ClientId",
|
||||
column: x => x.ClientId,
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_BookQuery_Location_LocationId",
|
||||
column: x => x.LocationId,
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_BookQuery_PerformerProfile_PerformerId",
|
||||
column: x => x.PerformerId,
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerfomerId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
migrationBuilder.AddColumn<long>(
|
||||
name: "BookQueryId",
|
||||
table: "CommandLine",
|
||||
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_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_Blog_ApplicationUser_AuthorId",
|
||||
table: "Blog",
|
||||
column: "AuthorId",
|
||||
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_Command_ApplicationUser_ClientId",
|
||||
table: "Command",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Command_PerformerProfile_PerformerId",
|
||||
table: "Command",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerfomerId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CommandLine_BookQuery_BookQueryId",
|
||||
table: "CommandLine",
|
||||
column: "BookQueryId",
|
||||
principalTable: "BookQuery",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Contact_ApplicationUser_OwnerId",
|
||||
table: "Contact",
|
||||
column: "OwnerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Activity_ActivityCode",
|
||||
table: "PerformerProfile",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Location_OrganisationAddressId",
|
||||
table: "PerformerProfile",
|
||||
column: "OrganisationAddressId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_ApplicationUser_PerfomerId",
|
||||
table: "PerformerProfile",
|
||||
column: "PerfomerId",
|
||||
principalTable: "AspNetUsers",
|
||||
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_AccountBalance_ApplicationUser_UserId", table: "AccountBalance");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BalanceImpact_AccountBalance_BalanceId", table: "BalanceImpact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Blog_ApplicationUser_AuthorId", table: "Blog");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_ApplicationUser_ClientId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_PerformerProfile_PerformerId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CommandLine_BookQuery_BookQueryId", table: "CommandLine");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Contact_ApplicationUser_OwnerId", table: "Contact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Activity_ActivityCode", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganisationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerfomerId", table: "PerformerProfile");
|
||||
migrationBuilder.DropColumn(name: "BookQueryId", table: "CommandLine");
|
||||
migrationBuilder.DropTable("BookQuery");
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Query",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<long>(nullable: false)
|
||||
.Annotation("Npgsql:Serial", true),
|
||||
ClientId = table.Column<string>(nullable: false),
|
||||
EventDate = table.Column<DateTime>(nullable: false),
|
||||
Lag = table.Column<int>(nullable: false),
|
||||
LocationId = table.Column<long>(nullable: false),
|
||||
PerformerId = table.Column<string>(nullable: false),
|
||||
Previsional = table.Column<decimal>(nullable: true),
|
||||
ValidationDate = table.Column<DateTime>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Query", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Query_ApplicationUser_ClientId",
|
||||
column: x => x.ClientId,
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_Query_Location_LocationId",
|
||||
column: x => x.LocationId,
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_Query_PerformerProfile_PerformerId",
|
||||
column: x => x.PerformerId,
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerfomerId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
migrationBuilder.AddColumn<long>(
|
||||
name: "QueryId",
|
||||
table: "CommandLine",
|
||||
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_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_Blog_ApplicationUser_AuthorId",
|
||||
table: "Blog",
|
||||
column: "AuthorId",
|
||||
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_Command_ApplicationUser_ClientId",
|
||||
table: "Command",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Command_PerformerProfile_PerformerId",
|
||||
table: "Command",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerfomerId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CommandLine_Query_QueryId",
|
||||
table: "CommandLine",
|
||||
column: "QueryId",
|
||||
principalTable: "Query",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Contact_ApplicationUser_OwnerId",
|
||||
table: "Contact",
|
||||
column: "OwnerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Activity_ActivityCode",
|
||||
table: "PerformerProfile",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Location_OrganisationAddressId",
|
||||
table: "PerformerProfile",
|
||||
column: "OrganisationAddressId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_ApplicationUser_PerfomerId",
|
||||
table: "PerformerProfile",
|
||||
column: "PerfomerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
}
|
||||
}
|
||||
613
Yavsc/Migrations/20160407112403_dailycost.Designer.cs
generated
Normal file
613
Yavsc/Migrations/20160407112403_dailycost.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,613 @@
|
|||
using System;
|
||||
using Microsoft.Data.Entity;
|
||||
using Microsoft.Data.Entity.Infrastructure;
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
using Yavsc.Models;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
[DbContext(typeof(ApplicationDbContext))]
|
||||
[Migration("20160407112403_dailycost")]
|
||||
partial class dailycost
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "7.0.0-rc1-16348");
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRole", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("NormalizedName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedName")
|
||||
.HasAnnotation("Relational:Name", "RoleNameIndex");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<string>("RoleId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetRoleClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.Property<string>("LoginProvider");
|
||||
|
||||
b.Property<string>("ProviderKey");
|
||||
|
||||
b.Property<string>("ProviderDisplayName");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("LoginProvider", "ProviderKey");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserLogins");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("RoleId");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Location", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Address")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<double>("Latitude");
|
||||
|
||||
b.Property<double>("Longitude");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.AccountBalance", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<long>("ContactCredits");
|
||||
|
||||
b.Property<decimal>("Credits");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Activity", b =>
|
||||
{
|
||||
b.Property<string>("Code")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("Photo");
|
||||
|
||||
b.HasKey("Code");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<int>("AccessFailedCount");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("DedicatedGoogleCalendar");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<bool>("EmailConfirmed");
|
||||
|
||||
b.Property<string>("GoogleRegId");
|
||||
|
||||
b.Property<bool>("LockoutEnabled");
|
||||
|
||||
b.Property<DateTimeOffset?>("LockoutEnd");
|
||||
|
||||
b.Property<string>("NormalizedEmail")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("NormalizedUserName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("PasswordHash");
|
||||
|
||||
b.Property<string>("PhoneNumber");
|
||||
|
||||
b.Property<bool>("PhoneNumberConfirmed");
|
||||
|
||||
b.Property<long?>("PostalAddressId");
|
||||
|
||||
b.Property<string>("SecurityStamp");
|
||||
|
||||
b.Property<bool>("TwoFactorEnabled");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedEmail")
|
||||
.HasAnnotation("Relational:Name", "EmailIndex");
|
||||
|
||||
b.HasIndex("NormalizedUserName")
|
||||
.HasAnnotation("Relational:Name", "UserNameIndex");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUsers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.BalanceImpact", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("BalanceId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("ExecDate");
|
||||
|
||||
b.Property<decimal>("Impact");
|
||||
|
||||
b.Property<string>("Reason")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.BaseProduct", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Blog", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AuthorId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("bcontent");
|
||||
|
||||
b.Property<DateTime>("modified");
|
||||
|
||||
b.Property<string>("photo");
|
||||
|
||||
b.Property<DateTime>("posted");
|
||||
|
||||
b.Property<int>("rate");
|
||||
|
||||
b.Property<string>("title");
|
||||
|
||||
b.Property<bool>("visible");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Book.BookQuery", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("EventDate");
|
||||
|
||||
b.Property<int>("Lag");
|
||||
|
||||
b.Property<long>("LocationId");
|
||||
|
||||
b.Property<string>("PerformerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<decimal?>("Previsional");
|
||||
|
||||
b.Property<DateTime?>("ValidationDate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Circle", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CircleMember", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long?>("CircleId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("MemberId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Command", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<int>("Lag");
|
||||
|
||||
b.Property<string>("PerformerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<decimal?>("Previsional");
|
||||
|
||||
b.Property<DateTime?>("ValidationDate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CommandLine", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long?>("ArticleId");
|
||||
|
||||
b.Property<long?>("BookQueryId");
|
||||
|
||||
b.Property<long?>("CommandId");
|
||||
|
||||
b.Property<string>("Comment");
|
||||
|
||||
b.Property<int>("Count");
|
||||
|
||||
b.Property<long?>("EstimateId");
|
||||
|
||||
b.Property<decimal>("UnitaryCost");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Contact", b =>
|
||||
{
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.HasKey("OwnerId", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Estimate", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AttachedFilesString");
|
||||
|
||||
b.Property<string>("AttachedGraphicsString");
|
||||
|
||||
b.Property<long?>("CommandId");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<int?>("Status");
|
||||
|
||||
b.Property<string>("Title");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.OAuth2Tokens", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("AccessToken");
|
||||
|
||||
b.Property<DateTime>("Expiration");
|
||||
|
||||
b.Property<string>("RefreshToken");
|
||||
|
||||
b.Property<string>("TokenType");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.PerformerProfile", b =>
|
||||
{
|
||||
b.Property<string>("PerfomerId");
|
||||
|
||||
b.Property<bool>("AcceptGeoLocalisation");
|
||||
|
||||
b.Property<bool>("AcceptNotifications");
|
||||
|
||||
b.Property<bool>("AcceptPublicContact");
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<string>("ActivityCode")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<int?>("MaxDailyCost");
|
||||
|
||||
b.Property<int?>("MinDailyCost");
|
||||
|
||||
b.Property<long>("OrganisationAddressId");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.Property<string>("SIRET")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 14);
|
||||
|
||||
b.Property<string>("WebSite");
|
||||
|
||||
b.HasKey("PerfomerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Service", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ContextId");
|
||||
|
||||
b.Property<decimal>("Depth");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<decimal>("Height");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<decimal>("Weight");
|
||||
|
||||
b.Property<decimal>("Width");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Skill", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.AccountBalance", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithOne()
|
||||
.HasForeignKey("YavscWeb.Models.AccountBalance", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("PostalAddressId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.BalanceImpact", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.AccountBalance")
|
||||
.WithMany()
|
||||
.HasForeignKey("BalanceId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Blog", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("AuthorId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Book.BookQuery", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId");
|
||||
|
||||
b.HasOne("YavscWeb.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("LocationId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.PerformerProfile")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Circle", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CircleMember", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Circle")
|
||||
.WithMany()
|
||||
.HasForeignKey("CircleId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("MemberId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Command", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.PerformerProfile")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CommandLine", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.BaseProduct")
|
||||
.WithMany()
|
||||
.HasForeignKey("ArticleId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.Book.BookQuery")
|
||||
.WithMany()
|
||||
.HasForeignKey("BookQueryId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.Command")
|
||||
.WithMany()
|
||||
.HasForeignKey("CommandId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.Estimate")
|
||||
.WithMany()
|
||||
.HasForeignKey("EstimateId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Contact", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Estimate", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Command")
|
||||
.WithMany()
|
||||
.HasForeignKey("CommandId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.PerformerProfile", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ActivityCode");
|
||||
|
||||
b.HasOne("YavscWeb.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("OrganisationAddressId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerfomerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Service", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ContextId");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
335
Yavsc/Migrations/20160407112403_dailycost.cs
Normal file
335
Yavsc/Migrations/20160407112403_dailycost.cs
Normal file
|
|
@ -0,0 +1,335 @@
|
|||
using Microsoft.Data.Entity.Migrations;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
public partial class dailycost : 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_AccountBalance_ApplicationUser_UserId", table: "AccountBalance");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BalanceImpact_AccountBalance_BalanceId", table: "BalanceImpact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Blog_ApplicationUser_AuthorId", table: "Blog");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_ApplicationUser_ClientId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_Location_LocationId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_PerformerProfile_PerformerId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_ApplicationUser_ClientId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_PerformerProfile_PerformerId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Contact_ApplicationUser_OwnerId", table: "Contact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Activity_ActivityCode", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganisationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerfomerId", table: "PerformerProfile");
|
||||
migrationBuilder.DropColumn(name: "DailyCost", table: "PerformerProfile");
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "MaxDailyCost",
|
||||
table: "PerformerProfile",
|
||||
nullable: true);
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "MinDailyCost",
|
||||
table: "PerformerProfile",
|
||||
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_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_Blog_ApplicationUser_AuthorId",
|
||||
table: "Blog",
|
||||
column: "AuthorId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_ApplicationUser_ClientId",
|
||||
table: "BookQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_Location_LocationId",
|
||||
table: "BookQuery",
|
||||
column: "LocationId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_PerformerProfile_PerformerId",
|
||||
table: "BookQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerfomerId",
|
||||
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_Command_ApplicationUser_ClientId",
|
||||
table: "Command",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Command_PerformerProfile_PerformerId",
|
||||
table: "Command",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerfomerId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Contact_ApplicationUser_OwnerId",
|
||||
table: "Contact",
|
||||
column: "OwnerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Activity_ActivityCode",
|
||||
table: "PerformerProfile",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Location_OrganisationAddressId",
|
||||
table: "PerformerProfile",
|
||||
column: "OrganisationAddressId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_ApplicationUser_PerfomerId",
|
||||
table: "PerformerProfile",
|
||||
column: "PerfomerId",
|
||||
principalTable: "AspNetUsers",
|
||||
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_AccountBalance_ApplicationUser_UserId", table: "AccountBalance");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BalanceImpact_AccountBalance_BalanceId", table: "BalanceImpact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Blog_ApplicationUser_AuthorId", table: "Blog");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_ApplicationUser_ClientId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_Location_LocationId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_PerformerProfile_PerformerId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_ApplicationUser_ClientId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_PerformerProfile_PerformerId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Contact_ApplicationUser_OwnerId", table: "Contact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Activity_ActivityCode", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganisationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerfomerId", table: "PerformerProfile");
|
||||
migrationBuilder.DropColumn(name: "MaxDailyCost", table: "PerformerProfile");
|
||||
migrationBuilder.DropColumn(name: "MinDailyCost", table: "PerformerProfile");
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "DailyCost",
|
||||
table: "PerformerProfile",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
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_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_Blog_ApplicationUser_AuthorId",
|
||||
table: "Blog",
|
||||
column: "AuthorId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_ApplicationUser_ClientId",
|
||||
table: "BookQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_Location_LocationId",
|
||||
table: "BookQuery",
|
||||
column: "LocationId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_PerformerProfile_PerformerId",
|
||||
table: "BookQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerfomerId",
|
||||
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_Command_ApplicationUser_ClientId",
|
||||
table: "Command",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Command_PerformerProfile_PerformerId",
|
||||
table: "Command",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerfomerId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Contact_ApplicationUser_OwnerId",
|
||||
table: "Contact",
|
||||
column: "OwnerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Activity_ActivityCode",
|
||||
table: "PerformerProfile",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Location_OrganisationAddressId",
|
||||
table: "PerformerProfile",
|
||||
column: "OrganisationAddressId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_ApplicationUser_PerfomerId",
|
||||
table: "PerformerProfile",
|
||||
column: "PerfomerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
}
|
||||
}
|
||||
619
Yavsc/Migrations/20160418114001_commandCreation.Designer.cs
generated
Normal file
619
Yavsc/Migrations/20160418114001_commandCreation.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,619 @@
|
|||
using System;
|
||||
using Microsoft.Data.Entity;
|
||||
using Microsoft.Data.Entity.Infrastructure;
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
using Yavsc.Models;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
[DbContext(typeof(ApplicationDbContext))]
|
||||
[Migration("20160418114001_commandCreation")]
|
||||
partial class commandCreation
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "7.0.0-rc1-16348");
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRole", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("NormalizedName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedName")
|
||||
.HasAnnotation("Relational:Name", "RoleNameIndex");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<string>("RoleId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetRoleClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.Property<string>("LoginProvider");
|
||||
|
||||
b.Property<string>("ProviderKey");
|
||||
|
||||
b.Property<string>("ProviderDisplayName");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("LoginProvider", "ProviderKey");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserLogins");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("RoleId");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Location", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Address")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<double>("Latitude");
|
||||
|
||||
b.Property<double>("Longitude");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.AccountBalance", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<long>("ContactCredits");
|
||||
|
||||
b.Property<decimal>("Credits");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Activity", b =>
|
||||
{
|
||||
b.Property<string>("Code")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("Photo");
|
||||
|
||||
b.HasKey("Code");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<int>("AccessFailedCount");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("DedicatedGoogleCalendar");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<bool>("EmailConfirmed");
|
||||
|
||||
b.Property<string>("GoogleRegId");
|
||||
|
||||
b.Property<bool>("LockoutEnabled");
|
||||
|
||||
b.Property<DateTimeOffset?>("LockoutEnd");
|
||||
|
||||
b.Property<string>("NormalizedEmail")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("NormalizedUserName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("PasswordHash");
|
||||
|
||||
b.Property<string>("PhoneNumber");
|
||||
|
||||
b.Property<bool>("PhoneNumberConfirmed");
|
||||
|
||||
b.Property<long?>("PostalAddressId");
|
||||
|
||||
b.Property<string>("SecurityStamp");
|
||||
|
||||
b.Property<bool>("TwoFactorEnabled");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedEmail")
|
||||
.HasAnnotation("Relational:Name", "EmailIndex");
|
||||
|
||||
b.HasIndex("NormalizedUserName")
|
||||
.HasAnnotation("Relational:Name", "UserNameIndex");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUsers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.BalanceImpact", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("BalanceId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("ExecDate");
|
||||
|
||||
b.Property<decimal>("Impact");
|
||||
|
||||
b.Property<string>("Reason")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.BaseProduct", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Blog", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AuthorId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("bcontent");
|
||||
|
||||
b.Property<DateTime>("modified");
|
||||
|
||||
b.Property<string>("photo");
|
||||
|
||||
b.Property<DateTime>("posted");
|
||||
|
||||
b.Property<int>("rate");
|
||||
|
||||
b.Property<string>("title");
|
||||
|
||||
b.Property<bool>("visible");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Booking.BookQuery", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasAnnotation("Relational:GeneratedValueSql", "LOCALTIMESTAMP");
|
||||
|
||||
b.Property<DateTime>("EventDate");
|
||||
|
||||
b.Property<int>("Lag");
|
||||
|
||||
b.Property<long>("LocationId");
|
||||
|
||||
b.Property<string>("PerformerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<decimal?>("Previsional");
|
||||
|
||||
b.Property<DateTime?>("ValidationDate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Circle", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CircleMember", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long?>("CircleId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("MemberId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Command", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("CreationDate");
|
||||
|
||||
b.Property<int>("Lag");
|
||||
|
||||
b.Property<string>("PerformerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<decimal?>("Previsional");
|
||||
|
||||
b.Property<DateTime?>("ValidationDate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CommandLine", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long?>("ArticleId");
|
||||
|
||||
b.Property<long?>("BookQueryId");
|
||||
|
||||
b.Property<long?>("CommandId");
|
||||
|
||||
b.Property<string>("Comment");
|
||||
|
||||
b.Property<int>("Count");
|
||||
|
||||
b.Property<long?>("EstimateId");
|
||||
|
||||
b.Property<decimal>("UnitaryCost");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Contact", b =>
|
||||
{
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.HasKey("OwnerId", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Estimate", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AttachedFilesString");
|
||||
|
||||
b.Property<string>("AttachedGraphicsString");
|
||||
|
||||
b.Property<long?>("CommandId");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<int?>("Status");
|
||||
|
||||
b.Property<string>("Title");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.OAuth2Tokens", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("AccessToken");
|
||||
|
||||
b.Property<DateTime>("Expiration");
|
||||
|
||||
b.Property<string>("RefreshToken");
|
||||
|
||||
b.Property<string>("TokenType");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.PerformerProfile", b =>
|
||||
{
|
||||
b.Property<string>("PerfomerId");
|
||||
|
||||
b.Property<bool>("AcceptGeoLocalisation");
|
||||
|
||||
b.Property<bool>("AcceptNotifications");
|
||||
|
||||
b.Property<bool>("AcceptPublicContact");
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<string>("ActivityCode")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<int?>("MaxDailyCost");
|
||||
|
||||
b.Property<int?>("MinDailyCost");
|
||||
|
||||
b.Property<long>("OrganisationAddressId");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.Property<string>("SIRET")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 14);
|
||||
|
||||
b.Property<string>("WebSite");
|
||||
|
||||
b.HasKey("PerfomerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Service", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ContextId");
|
||||
|
||||
b.Property<decimal>("Depth");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<decimal>("Height");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<decimal>("Weight");
|
||||
|
||||
b.Property<decimal>("Width");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Skill", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.AccountBalance", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithOne()
|
||||
.HasForeignKey("YavscWeb.Models.AccountBalance", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("PostalAddressId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.BalanceImpact", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.AccountBalance")
|
||||
.WithMany()
|
||||
.HasForeignKey("BalanceId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Blog", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("AuthorId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Booking.BookQuery", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId");
|
||||
|
||||
b.HasOne("YavscWeb.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("LocationId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.PerformerProfile")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Circle", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CircleMember", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Circle")
|
||||
.WithMany()
|
||||
.HasForeignKey("CircleId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("MemberId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Command", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.PerformerProfile")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CommandLine", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.BaseProduct")
|
||||
.WithMany()
|
||||
.HasForeignKey("ArticleId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.Booking.BookQuery")
|
||||
.WithMany()
|
||||
.HasForeignKey("BookQueryId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.Command")
|
||||
.WithMany()
|
||||
.HasForeignKey("CommandId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.Estimate")
|
||||
.WithMany()
|
||||
.HasForeignKey("EstimateId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Contact", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Estimate", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Command")
|
||||
.WithMany()
|
||||
.HasForeignKey("CommandId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.PerformerProfile", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ActivityCode");
|
||||
|
||||
b.HasOne("YavscWeb.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("OrganisationAddressId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerfomerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Service", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ContextId");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
332
Yavsc/Migrations/20160418114001_commandCreation.cs
Normal file
332
Yavsc/Migrations/20160418114001_commandCreation.cs
Normal file
|
|
@ -0,0 +1,332 @@
|
|||
using System;
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
public partial class commandCreation : 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_AccountBalance_ApplicationUser_UserId", table: "AccountBalance");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BalanceImpact_AccountBalance_BalanceId", table: "BalanceImpact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Blog_ApplicationUser_AuthorId", table: "Blog");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_ApplicationUser_ClientId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_Location_LocationId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_PerformerProfile_PerformerId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_ApplicationUser_ClientId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_PerformerProfile_PerformerId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Contact_ApplicationUser_OwnerId", table: "Contact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Activity_ActivityCode", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganisationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerfomerId", table: "PerformerProfile");
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "CreationDate",
|
||||
table: "Command",
|
||||
nullable: false,
|
||||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "CreationDate",
|
||||
table: "BookQuery",
|
||||
nullable: false,
|
||||
defaultValueSql: "LOCALTIMESTAMP");
|
||||
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_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_Blog_ApplicationUser_AuthorId",
|
||||
table: "Blog",
|
||||
column: "AuthorId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_ApplicationUser_ClientId",
|
||||
table: "BookQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_Location_LocationId",
|
||||
table: "BookQuery",
|
||||
column: "LocationId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_PerformerProfile_PerformerId",
|
||||
table: "BookQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerfomerId",
|
||||
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_Command_ApplicationUser_ClientId",
|
||||
table: "Command",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Command_PerformerProfile_PerformerId",
|
||||
table: "Command",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerfomerId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Contact_ApplicationUser_OwnerId",
|
||||
table: "Contact",
|
||||
column: "OwnerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Activity_ActivityCode",
|
||||
table: "PerformerProfile",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Location_OrganisationAddressId",
|
||||
table: "PerformerProfile",
|
||||
column: "OrganisationAddressId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_ApplicationUser_PerfomerId",
|
||||
table: "PerformerProfile",
|
||||
column: "PerfomerId",
|
||||
principalTable: "AspNetUsers",
|
||||
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_AccountBalance_ApplicationUser_UserId", table: "AccountBalance");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BalanceImpact_AccountBalance_BalanceId", table: "BalanceImpact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Blog_ApplicationUser_AuthorId", table: "Blog");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_ApplicationUser_ClientId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_Location_LocationId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_PerformerProfile_PerformerId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_ApplicationUser_ClientId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_PerformerProfile_PerformerId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Contact_ApplicationUser_OwnerId", table: "Contact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Activity_ActivityCode", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganisationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerfomerId", table: "PerformerProfile");
|
||||
migrationBuilder.DropColumn(name: "CreationDate", table: "Command");
|
||||
migrationBuilder.DropColumn(name: "CreationDate", table: "BookQuery");
|
||||
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_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_Blog_ApplicationUser_AuthorId",
|
||||
table: "Blog",
|
||||
column: "AuthorId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_ApplicationUser_ClientId",
|
||||
table: "BookQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_Location_LocationId",
|
||||
table: "BookQuery",
|
||||
column: "LocationId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_PerformerProfile_PerformerId",
|
||||
table: "BookQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerfomerId",
|
||||
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_Command_ApplicationUser_ClientId",
|
||||
table: "Command",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Command_PerformerProfile_PerformerId",
|
||||
table: "Command",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerfomerId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Contact_ApplicationUser_OwnerId",
|
||||
table: "Contact",
|
||||
column: "OwnerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Activity_ActivityCode",
|
||||
table: "PerformerProfile",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Location_OrganisationAddressId",
|
||||
table: "PerformerProfile",
|
||||
column: "OrganisationAddressId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_ApplicationUser_PerfomerId",
|
||||
table: "PerformerProfile",
|
||||
column: "PerfomerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
}
|
||||
}
|
||||
619
Yavsc/Migrations/20160427123737_perfoffer.Designer.cs
generated
Normal file
619
Yavsc/Migrations/20160427123737_perfoffer.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,619 @@
|
|||
using System;
|
||||
using Microsoft.Data.Entity;
|
||||
using Microsoft.Data.Entity.Infrastructure;
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
using Yavsc.Models;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
[DbContext(typeof(ApplicationDbContext))]
|
||||
[Migration("20160427123737_perfoffer")]
|
||||
partial class perfoffer
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "7.0.0-rc1-16348");
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRole", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("NormalizedName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedName")
|
||||
.HasAnnotation("Relational:Name", "RoleNameIndex");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<string>("RoleId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetRoleClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.Property<string>("LoginProvider");
|
||||
|
||||
b.Property<string>("ProviderKey");
|
||||
|
||||
b.Property<string>("ProviderDisplayName");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("LoginProvider", "ProviderKey");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserLogins");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("RoleId");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Location", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Address")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<double>("Latitude");
|
||||
|
||||
b.Property<double>("Longitude");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.AccountBalance", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<long>("ContactCredits");
|
||||
|
||||
b.Property<decimal>("Credits");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Activity", b =>
|
||||
{
|
||||
b.Property<string>("Code")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("ActorDenomination");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("Photo");
|
||||
|
||||
b.HasKey("Code");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<int>("AccessFailedCount");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("DedicatedGoogleCalendar");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<bool>("EmailConfirmed");
|
||||
|
||||
b.Property<string>("GoogleRegId");
|
||||
|
||||
b.Property<bool>("LockoutEnabled");
|
||||
|
||||
b.Property<DateTimeOffset?>("LockoutEnd");
|
||||
|
||||
b.Property<string>("NormalizedEmail")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("NormalizedUserName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("PasswordHash");
|
||||
|
||||
b.Property<string>("PhoneNumber");
|
||||
|
||||
b.Property<bool>("PhoneNumberConfirmed");
|
||||
|
||||
b.Property<long?>("PostalAddressId");
|
||||
|
||||
b.Property<string>("SecurityStamp");
|
||||
|
||||
b.Property<bool>("TwoFactorEnabled");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedEmail")
|
||||
.HasAnnotation("Relational:Name", "EmailIndex");
|
||||
|
||||
b.HasIndex("NormalizedUserName")
|
||||
.HasAnnotation("Relational:Name", "UserNameIndex");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUsers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.BalanceImpact", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("BalanceId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("ExecDate");
|
||||
|
||||
b.Property<decimal>("Impact");
|
||||
|
||||
b.Property<string>("Reason")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.BaseProduct", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Blog", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AuthorId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("bcontent");
|
||||
|
||||
b.Property<DateTime>("modified");
|
||||
|
||||
b.Property<string>("photo");
|
||||
|
||||
b.Property<DateTime>("posted");
|
||||
|
||||
b.Property<int>("rate");
|
||||
|
||||
b.Property<string>("title");
|
||||
|
||||
b.Property<bool>("visible");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Booking.BookQuery", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasAnnotation("Relational:GeneratedValueSql", "LOCALTIMESTAMP");
|
||||
|
||||
b.Property<DateTime>("EventDate");
|
||||
|
||||
b.Property<int>("Lag");
|
||||
|
||||
b.Property<long>("LocationId");
|
||||
|
||||
b.Property<string>("PerformerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<decimal?>("Previsional");
|
||||
|
||||
b.Property<DateTime?>("ValidationDate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Circle", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CircleMember", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long?>("CircleId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("MemberId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Command", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("CreationDate");
|
||||
|
||||
b.Property<int>("Lag");
|
||||
|
||||
b.Property<string>("PerformerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<decimal?>("Previsional");
|
||||
|
||||
b.Property<DateTime?>("ValidationDate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CommandLine", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long?>("ArticleId");
|
||||
|
||||
b.Property<long?>("BookQueryId");
|
||||
|
||||
b.Property<long?>("CommandId");
|
||||
|
||||
b.Property<string>("Comment");
|
||||
|
||||
b.Property<int>("Count");
|
||||
|
||||
b.Property<long?>("EstimateId");
|
||||
|
||||
b.Property<decimal>("UnitaryCost");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Contact", b =>
|
||||
{
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.HasKey("OwnerId", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Estimate", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AttachedFilesString");
|
||||
|
||||
b.Property<string>("AttachedGraphicsString");
|
||||
|
||||
b.Property<long?>("CommandId");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<int?>("Status");
|
||||
|
||||
b.Property<string>("Title");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.OAuth2Tokens", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("AccessToken");
|
||||
|
||||
b.Property<DateTime>("Expiration");
|
||||
|
||||
b.Property<string>("RefreshToken");
|
||||
|
||||
b.Property<string>("TokenType");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.PerformerProfile", b =>
|
||||
{
|
||||
b.Property<string>("PerfomerId");
|
||||
|
||||
b.Property<bool>("AcceptGeoLocalisation");
|
||||
|
||||
b.Property<bool>("AcceptNotifications");
|
||||
|
||||
b.Property<bool>("AcceptPublicContact");
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<string>("ActivityCode")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<int?>("MaxDailyCost");
|
||||
|
||||
b.Property<int?>("MinDailyCost");
|
||||
|
||||
b.Property<long?>("OfferId");
|
||||
|
||||
b.Property<long>("OrganisationAddressId");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.Property<string>("SIRET")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 14);
|
||||
|
||||
b.Property<string>("WebSite");
|
||||
|
||||
b.HasKey("PerfomerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Service", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ContextId");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Skill", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.AccountBalance", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithOne()
|
||||
.HasForeignKey("YavscWeb.Models.AccountBalance", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("PostalAddressId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.BalanceImpact", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.AccountBalance")
|
||||
.WithMany()
|
||||
.HasForeignKey("BalanceId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Blog", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("AuthorId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Booking.BookQuery", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId");
|
||||
|
||||
b.HasOne("YavscWeb.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("LocationId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.PerformerProfile")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Circle", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CircleMember", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Circle")
|
||||
.WithMany()
|
||||
.HasForeignKey("CircleId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("MemberId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Command", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.PerformerProfile")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CommandLine", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.BaseProduct")
|
||||
.WithMany()
|
||||
.HasForeignKey("ArticleId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.Booking.BookQuery")
|
||||
.WithMany()
|
||||
.HasForeignKey("BookQueryId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.Command")
|
||||
.WithMany()
|
||||
.HasForeignKey("CommandId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.Estimate")
|
||||
.WithMany()
|
||||
.HasForeignKey("EstimateId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Contact", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Estimate", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Command")
|
||||
.WithMany()
|
||||
.HasForeignKey("CommandId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.PerformerProfile", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ActivityCode");
|
||||
|
||||
b.HasOne("YavscWeb.Models.Service")
|
||||
.WithMany()
|
||||
.HasForeignKey("OfferId");
|
||||
|
||||
b.HasOne("YavscWeb.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("OrganisationAddressId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerfomerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Service", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ContextId");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
361
Yavsc/Migrations/20160427123737_perfoffer.cs
Normal file
361
Yavsc/Migrations/20160427123737_perfoffer.cs
Normal file
|
|
@ -0,0 +1,361 @@
|
|||
using Microsoft.Data.Entity.Migrations;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
public partial class perfoffer : 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_AccountBalance_ApplicationUser_UserId", table: "AccountBalance");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BalanceImpact_AccountBalance_BalanceId", table: "BalanceImpact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Blog_ApplicationUser_AuthorId", table: "Blog");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_ApplicationUser_ClientId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_Location_LocationId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_PerformerProfile_PerformerId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_ApplicationUser_ClientId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_PerformerProfile_PerformerId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Contact_ApplicationUser_OwnerId", table: "Contact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Activity_ActivityCode", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganisationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerfomerId", table: "PerformerProfile");
|
||||
migrationBuilder.DropColumn(name: "Depth", table: "Service");
|
||||
migrationBuilder.DropColumn(name: "Height", table: "Service");
|
||||
migrationBuilder.DropColumn(name: "Weight", table: "Service");
|
||||
migrationBuilder.DropColumn(name: "Width", table: "Service");
|
||||
migrationBuilder.AddColumn<long>(
|
||||
name: "OfferId",
|
||||
table: "PerformerProfile",
|
||||
nullable: true);
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "ActorDenomination",
|
||||
table: "Activity",
|
||||
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_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_Blog_ApplicationUser_AuthorId",
|
||||
table: "Blog",
|
||||
column: "AuthorId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_ApplicationUser_ClientId",
|
||||
table: "BookQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_Location_LocationId",
|
||||
table: "BookQuery",
|
||||
column: "LocationId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_PerformerProfile_PerformerId",
|
||||
table: "BookQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerfomerId",
|
||||
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_Command_ApplicationUser_ClientId",
|
||||
table: "Command",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Command_PerformerProfile_PerformerId",
|
||||
table: "Command",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerfomerId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Contact_ApplicationUser_OwnerId",
|
||||
table: "Contact",
|
||||
column: "OwnerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Activity_ActivityCode",
|
||||
table: "PerformerProfile",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Service_OfferId",
|
||||
table: "PerformerProfile",
|
||||
column: "OfferId",
|
||||
principalTable: "Service",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Location_OrganisationAddressId",
|
||||
table: "PerformerProfile",
|
||||
column: "OrganisationAddressId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_ApplicationUser_PerfomerId",
|
||||
table: "PerformerProfile",
|
||||
column: "PerfomerId",
|
||||
principalTable: "AspNetUsers",
|
||||
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_AccountBalance_ApplicationUser_UserId", table: "AccountBalance");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BalanceImpact_AccountBalance_BalanceId", table: "BalanceImpact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Blog_ApplicationUser_AuthorId", table: "Blog");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_ApplicationUser_ClientId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_Location_LocationId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_PerformerProfile_PerformerId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_ApplicationUser_ClientId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_PerformerProfile_PerformerId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Contact_ApplicationUser_OwnerId", table: "Contact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Activity_ActivityCode", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Service_OfferId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganisationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerfomerId", table: "PerformerProfile");
|
||||
migrationBuilder.DropColumn(name: "OfferId", table: "PerformerProfile");
|
||||
migrationBuilder.DropColumn(name: "ActorDenomination", table: "Activity");
|
||||
migrationBuilder.AddColumn<decimal>(
|
||||
name: "Depth",
|
||||
table: "Service",
|
||||
nullable: false,
|
||||
defaultValue: 0m);
|
||||
migrationBuilder.AddColumn<decimal>(
|
||||
name: "Height",
|
||||
table: "Service",
|
||||
nullable: false,
|
||||
defaultValue: 0m);
|
||||
migrationBuilder.AddColumn<decimal>(
|
||||
name: "Weight",
|
||||
table: "Service",
|
||||
nullable: false,
|
||||
defaultValue: 0m);
|
||||
migrationBuilder.AddColumn<decimal>(
|
||||
name: "Width",
|
||||
table: "Service",
|
||||
nullable: false,
|
||||
defaultValue: 0m);
|
||||
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_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_Blog_ApplicationUser_AuthorId",
|
||||
table: "Blog",
|
||||
column: "AuthorId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_ApplicationUser_ClientId",
|
||||
table: "BookQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_Location_LocationId",
|
||||
table: "BookQuery",
|
||||
column: "LocationId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_PerformerProfile_PerformerId",
|
||||
table: "BookQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerfomerId",
|
||||
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_Command_ApplicationUser_ClientId",
|
||||
table: "Command",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Command_PerformerProfile_PerformerId",
|
||||
table: "Command",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerfomerId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Contact_ApplicationUser_OwnerId",
|
||||
table: "Contact",
|
||||
column: "OwnerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Activity_ActivityCode",
|
||||
table: "PerformerProfile",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Location_OrganisationAddressId",
|
||||
table: "PerformerProfile",
|
||||
column: "OrganisationAddressId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_ApplicationUser_PerfomerId",
|
||||
table: "PerformerProfile",
|
||||
column: "PerfomerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
}
|
||||
}
|
||||
623
Yavsc/Migrations/20160506154628_siren.Designer.cs
generated
Normal file
623
Yavsc/Migrations/20160506154628_siren.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,623 @@
|
|||
using System;
|
||||
using Microsoft.Data.Entity;
|
||||
using Microsoft.Data.Entity.Infrastructure;
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
using Yavsc.Models;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
[DbContext(typeof(ApplicationDbContext))]
|
||||
[Migration("20160506154628_siren")]
|
||||
partial class siren
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "7.0.0-rc1-16348");
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRole", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("NormalizedName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedName")
|
||||
.HasAnnotation("Relational:Name", "RoleNameIndex");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<string>("RoleId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetRoleClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.Property<string>("LoginProvider");
|
||||
|
||||
b.Property<string>("ProviderKey");
|
||||
|
||||
b.Property<string>("ProviderDisplayName");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("LoginProvider", "ProviderKey");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserLogins");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("RoleId");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Location", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Address")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<double>("Latitude");
|
||||
|
||||
b.Property<double>("Longitude");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.AccountBalance", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<long>("ContactCredits");
|
||||
|
||||
b.Property<decimal>("Credits");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Activity", b =>
|
||||
{
|
||||
b.Property<string>("Code")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("ActorDenomination");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("Photo");
|
||||
|
||||
b.HasKey("Code");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<int>("AccessFailedCount");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("DedicatedGoogleCalendar");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<bool>("EmailConfirmed");
|
||||
|
||||
b.Property<string>("GoogleRegId");
|
||||
|
||||
b.Property<bool>("LockoutEnabled");
|
||||
|
||||
b.Property<DateTimeOffset?>("LockoutEnd");
|
||||
|
||||
b.Property<string>("NormalizedEmail")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("NormalizedUserName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("PasswordHash");
|
||||
|
||||
b.Property<string>("PhoneNumber");
|
||||
|
||||
b.Property<bool>("PhoneNumberConfirmed");
|
||||
|
||||
b.Property<long?>("PostalAddressId");
|
||||
|
||||
b.Property<string>("SecurityStamp");
|
||||
|
||||
b.Property<bool>("TwoFactorEnabled");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedEmail")
|
||||
.HasAnnotation("Relational:Name", "EmailIndex");
|
||||
|
||||
b.HasIndex("NormalizedUserName")
|
||||
.HasAnnotation("Relational:Name", "UserNameIndex");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUsers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.BalanceImpact", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("BalanceId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("ExecDate");
|
||||
|
||||
b.Property<decimal>("Impact");
|
||||
|
||||
b.Property<string>("Reason")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.BaseProduct", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Blog", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AuthorId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("bcontent");
|
||||
|
||||
b.Property<DateTime>("modified");
|
||||
|
||||
b.Property<string>("photo");
|
||||
|
||||
b.Property<DateTime>("posted");
|
||||
|
||||
b.Property<int>("rate");
|
||||
|
||||
b.Property<string>("title");
|
||||
|
||||
b.Property<bool>("visible");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Booking.BookQuery", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasAnnotation("Relational:GeneratedValueSql", "LOCALTIMESTAMP");
|
||||
|
||||
b.Property<DateTime>("EventDate");
|
||||
|
||||
b.Property<int>("Lag");
|
||||
|
||||
b.Property<long>("LocationId");
|
||||
|
||||
b.Property<string>("PerformerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<decimal?>("Previsional");
|
||||
|
||||
b.Property<DateTime?>("ValidationDate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Circle", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CircleMember", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long?>("CircleId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("MemberId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Command", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("CreationDate");
|
||||
|
||||
b.Property<int>("Lag");
|
||||
|
||||
b.Property<string>("PerformerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<decimal?>("Previsional");
|
||||
|
||||
b.Property<DateTime?>("ValidationDate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CommandLine", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long?>("ArticleId");
|
||||
|
||||
b.Property<long?>("BookQueryId");
|
||||
|
||||
b.Property<long?>("CommandId");
|
||||
|
||||
b.Property<string>("Comment");
|
||||
|
||||
b.Property<int>("Count");
|
||||
|
||||
b.Property<long?>("EstimateId");
|
||||
|
||||
b.Property<decimal>("UnitaryCost");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Contact", b =>
|
||||
{
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.HasKey("OwnerId", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Estimate", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AttachedFilesString");
|
||||
|
||||
b.Property<string>("AttachedGraphicsString");
|
||||
|
||||
b.Property<long?>("CommandId");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<int?>("Status");
|
||||
|
||||
b.Property<string>("Title");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.OAuth2Tokens", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("AccessToken");
|
||||
|
||||
b.Property<DateTime>("Expiration");
|
||||
|
||||
b.Property<string>("RefreshToken");
|
||||
|
||||
b.Property<string>("TokenType");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.PerformerProfile", b =>
|
||||
{
|
||||
b.Property<string>("PerfomerId");
|
||||
|
||||
b.Property<bool>("AcceptGeoLocalisation");
|
||||
|
||||
b.Property<bool>("AcceptNotifications");
|
||||
|
||||
b.Property<bool>("AcceptPublicContact");
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<string>("ActivityCode")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<int?>("MaxDailyCost");
|
||||
|
||||
b.Property<int?>("MinDailyCost");
|
||||
|
||||
b.Property<long?>("OfferId");
|
||||
|
||||
b.Property<long>("OrganisationAddressId");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.Property<string>("SIREN")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 14);
|
||||
|
||||
b.Property<string>("WebSite");
|
||||
|
||||
b.HasKey("PerfomerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Service", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<int?>("Billing");
|
||||
|
||||
b.Property<string>("ContextId");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<decimal?>("Pricing");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Skill", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.AccountBalance", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithOne()
|
||||
.HasForeignKey("YavscWeb.Models.AccountBalance", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("PostalAddressId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.BalanceImpact", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.AccountBalance")
|
||||
.WithMany()
|
||||
.HasForeignKey("BalanceId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Blog", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("AuthorId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Booking.BookQuery", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId");
|
||||
|
||||
b.HasOne("YavscWeb.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("LocationId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.PerformerProfile")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Circle", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CircleMember", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Circle")
|
||||
.WithMany()
|
||||
.HasForeignKey("CircleId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("MemberId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Command", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.PerformerProfile")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CommandLine", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.BaseProduct")
|
||||
.WithMany()
|
||||
.HasForeignKey("ArticleId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.Booking.BookQuery")
|
||||
.WithMany()
|
||||
.HasForeignKey("BookQueryId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.Command")
|
||||
.WithMany()
|
||||
.HasForeignKey("CommandId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.Estimate")
|
||||
.WithMany()
|
||||
.HasForeignKey("EstimateId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Contact", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Estimate", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Command")
|
||||
.WithMany()
|
||||
.HasForeignKey("CommandId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.PerformerProfile", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ActivityCode");
|
||||
|
||||
b.HasOne("YavscWeb.Models.Service")
|
||||
.WithMany()
|
||||
.HasForeignKey("OfferId");
|
||||
|
||||
b.HasOne("YavscWeb.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("OrganisationAddressId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerfomerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Service", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ContextId");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
341
Yavsc/Migrations/20160506154628_siren.cs
Normal file
341
Yavsc/Migrations/20160506154628_siren.cs
Normal file
|
|
@ -0,0 +1,341 @@
|
|||
using Microsoft.Data.Entity.Migrations;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
public partial class siren : 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_AccountBalance_ApplicationUser_UserId", table: "AccountBalance");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BalanceImpact_AccountBalance_BalanceId", table: "BalanceImpact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Blog_ApplicationUser_AuthorId", table: "Blog");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_ApplicationUser_ClientId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_Location_LocationId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_PerformerProfile_PerformerId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_ApplicationUser_ClientId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_PerformerProfile_PerformerId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Contact_ApplicationUser_OwnerId", table: "Contact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Activity_ActivityCode", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganisationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerfomerId", table: "PerformerProfile");
|
||||
migrationBuilder.DropColumn(name: "SIRET", table: "PerformerProfile");
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "Billing",
|
||||
table: "Service",
|
||||
nullable: true);
|
||||
migrationBuilder.AddColumn<decimal>(
|
||||
name: "Pricing",
|
||||
table: "Service",
|
||||
nullable: true);
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "SIREN",
|
||||
table: "PerformerProfile",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
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_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_Blog_ApplicationUser_AuthorId",
|
||||
table: "Blog",
|
||||
column: "AuthorId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_ApplicationUser_ClientId",
|
||||
table: "BookQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_Location_LocationId",
|
||||
table: "BookQuery",
|
||||
column: "LocationId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_PerformerProfile_PerformerId",
|
||||
table: "BookQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerfomerId",
|
||||
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_Command_ApplicationUser_ClientId",
|
||||
table: "Command",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Command_PerformerProfile_PerformerId",
|
||||
table: "Command",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerfomerId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Contact_ApplicationUser_OwnerId",
|
||||
table: "Contact",
|
||||
column: "OwnerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Activity_ActivityCode",
|
||||
table: "PerformerProfile",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Location_OrganisationAddressId",
|
||||
table: "PerformerProfile",
|
||||
column: "OrganisationAddressId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_ApplicationUser_PerfomerId",
|
||||
table: "PerformerProfile",
|
||||
column: "PerfomerId",
|
||||
principalTable: "AspNetUsers",
|
||||
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_AccountBalance_ApplicationUser_UserId", table: "AccountBalance");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BalanceImpact_AccountBalance_BalanceId", table: "BalanceImpact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Blog_ApplicationUser_AuthorId", table: "Blog");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_ApplicationUser_ClientId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_Location_LocationId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_PerformerProfile_PerformerId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_ApplicationUser_ClientId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_PerformerProfile_PerformerId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Contact_ApplicationUser_OwnerId", table: "Contact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Activity_ActivityCode", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganisationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerfomerId", table: "PerformerProfile");
|
||||
migrationBuilder.DropColumn(name: "Billing", table: "Service");
|
||||
migrationBuilder.DropColumn(name: "Pricing", table: "Service");
|
||||
migrationBuilder.DropColumn(name: "SIREN", table: "PerformerProfile");
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "SIRET",
|
||||
table: "PerformerProfile",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
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_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_Blog_ApplicationUser_AuthorId",
|
||||
table: "Blog",
|
||||
column: "AuthorId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_ApplicationUser_ClientId",
|
||||
table: "BookQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_Location_LocationId",
|
||||
table: "BookQuery",
|
||||
column: "LocationId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_PerformerProfile_PerformerId",
|
||||
table: "BookQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerfomerId",
|
||||
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_Command_ApplicationUser_ClientId",
|
||||
table: "Command",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Command_PerformerProfile_PerformerId",
|
||||
table: "Command",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerfomerId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Contact_ApplicationUser_OwnerId",
|
||||
table: "Contact",
|
||||
column: "OwnerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Activity_ActivityCode",
|
||||
table: "PerformerProfile",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Location_OrganisationAddressId",
|
||||
table: "PerformerProfile",
|
||||
column: "OrganisationAddressId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_ApplicationUser_PerfomerId",
|
||||
table: "PerformerProfile",
|
||||
column: "PerfomerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
}
|
||||
}
|
||||
644
Yavsc/Migrations/20160515142434_tokenExpiresIn.Designer.cs
generated
Normal file
644
Yavsc/Migrations/20160515142434_tokenExpiresIn.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,644 @@
|
|||
using System;
|
||||
using Microsoft.Data.Entity;
|
||||
using Microsoft.Data.Entity.Infrastructure;
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
using Yavsc.Models;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
[DbContext(typeof(ApplicationDbContext))]
|
||||
[Migration("20160515142434_tokenExpiresIn")]
|
||||
partial class tokenExpiresIn
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "7.0.0-rc1-16348");
|
||||
|
||||
modelBuilder.Entity("Application", b =>
|
||||
{
|
||||
b.Property<string>("ApplicationID");
|
||||
|
||||
b.Property<string>("DisplayName");
|
||||
|
||||
b.Property<string>("LogoutRedirectUri");
|
||||
|
||||
b.Property<string>("RedirectUri");
|
||||
|
||||
b.Property<string>("Secret");
|
||||
|
||||
b.HasKey("ApplicationID");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRole", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("NormalizedName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedName")
|
||||
.HasAnnotation("Relational:Name", "RoleNameIndex");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<string>("RoleId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetRoleClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.Property<string>("LoginProvider");
|
||||
|
||||
b.Property<string>("ProviderKey");
|
||||
|
||||
b.Property<string>("ProviderDisplayName");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("LoginProvider", "ProviderKey");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserLogins");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("RoleId");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Location", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Address")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<double>("Latitude");
|
||||
|
||||
b.Property<double>("Longitude");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.AccountBalance", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<long>("ContactCredits");
|
||||
|
||||
b.Property<decimal>("Credits");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Activity", b =>
|
||||
{
|
||||
b.Property<string>("Code")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("ActorDenomination");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("Photo");
|
||||
|
||||
b.HasKey("Code");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<int>("AccessFailedCount");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("DedicatedGoogleCalendar");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<bool>("EmailConfirmed");
|
||||
|
||||
b.Property<string>("GoogleRegId");
|
||||
|
||||
b.Property<bool>("LockoutEnabled");
|
||||
|
||||
b.Property<DateTimeOffset?>("LockoutEnd");
|
||||
|
||||
b.Property<string>("NormalizedEmail")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("NormalizedUserName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("PasswordHash");
|
||||
|
||||
b.Property<string>("PhoneNumber");
|
||||
|
||||
b.Property<bool>("PhoneNumberConfirmed");
|
||||
|
||||
b.Property<long?>("PostalAddressId");
|
||||
|
||||
b.Property<string>("SecurityStamp");
|
||||
|
||||
b.Property<bool>("TwoFactorEnabled");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedEmail")
|
||||
.HasAnnotation("Relational:Name", "EmailIndex");
|
||||
|
||||
b.HasIndex("NormalizedUserName")
|
||||
.HasAnnotation("Relational:Name", "UserNameIndex");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUsers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.BalanceImpact", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("BalanceId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("ExecDate");
|
||||
|
||||
b.Property<decimal>("Impact");
|
||||
|
||||
b.Property<string>("Reason")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.BaseProduct", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<bool>("Public");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Blog", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AuthorId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("bcontent");
|
||||
|
||||
b.Property<DateTime>("modified");
|
||||
|
||||
b.Property<string>("photo");
|
||||
|
||||
b.Property<DateTime>("posted");
|
||||
|
||||
b.Property<int>("rate");
|
||||
|
||||
b.Property<string>("title");
|
||||
|
||||
b.Property<bool>("visible");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Booking.BookQuery", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasAnnotation("Relational:GeneratedValueSql", "LOCALTIMESTAMP");
|
||||
|
||||
b.Property<DateTime>("EventDate");
|
||||
|
||||
b.Property<int>("Lag");
|
||||
|
||||
b.Property<long>("LocationId");
|
||||
|
||||
b.Property<string>("PerformerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<decimal?>("Previsional");
|
||||
|
||||
b.Property<DateTime?>("ValidationDate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Circle", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CircleMember", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long?>("CircleId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("MemberId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Command", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("CreationDate");
|
||||
|
||||
b.Property<int>("Lag");
|
||||
|
||||
b.Property<string>("PerformerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<decimal?>("Previsional");
|
||||
|
||||
b.Property<DateTime?>("ValidationDate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CommandLine", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long?>("ArticleId");
|
||||
|
||||
b.Property<long?>("BookQueryId");
|
||||
|
||||
b.Property<long?>("CommandId");
|
||||
|
||||
b.Property<string>("Comment");
|
||||
|
||||
b.Property<int>("Count");
|
||||
|
||||
b.Property<long?>("EstimateId");
|
||||
|
||||
b.Property<decimal>("UnitaryCost");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Contact", b =>
|
||||
{
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.HasKey("OwnerId", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Estimate", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AttachedFilesString");
|
||||
|
||||
b.Property<string>("AttachedGraphicsString");
|
||||
|
||||
b.Property<long?>("CommandId");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<int?>("Status");
|
||||
|
||||
b.Property<string>("Title");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.OAuth2Tokens", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("AccessToken");
|
||||
|
||||
b.Property<DateTime>("Expiration");
|
||||
|
||||
b.Property<string>("ExpiresIn");
|
||||
|
||||
b.Property<string>("RefreshToken");
|
||||
|
||||
b.Property<string>("TokenType");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.PerformerProfile", b =>
|
||||
{
|
||||
b.Property<string>("PerfomerId");
|
||||
|
||||
b.Property<bool>("AcceptGeoLocalisation");
|
||||
|
||||
b.Property<bool>("AcceptNotifications");
|
||||
|
||||
b.Property<bool>("AcceptPublicContact");
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<string>("ActivityCode")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<int?>("MaxDailyCost");
|
||||
|
||||
b.Property<int?>("MinDailyCost");
|
||||
|
||||
b.Property<long?>("OfferId");
|
||||
|
||||
b.Property<long>("OrganisationAddressId");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.Property<string>("SIREN")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 14);
|
||||
|
||||
b.Property<string>("WebSite");
|
||||
|
||||
b.HasKey("PerfomerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Service", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<int?>("Billing");
|
||||
|
||||
b.Property<string>("ContextId");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<decimal?>("Pricing");
|
||||
|
||||
b.Property<bool>("Public");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Skill", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.AccountBalance", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithOne()
|
||||
.HasForeignKey("YavscWeb.Models.AccountBalance", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("PostalAddressId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.BalanceImpact", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.AccountBalance")
|
||||
.WithMany()
|
||||
.HasForeignKey("BalanceId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Blog", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("AuthorId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Booking.BookQuery", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId");
|
||||
|
||||
b.HasOne("YavscWeb.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("LocationId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.PerformerProfile")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Circle", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CircleMember", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Circle")
|
||||
.WithMany()
|
||||
.HasForeignKey("CircleId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("MemberId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Command", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.PerformerProfile")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CommandLine", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.BaseProduct")
|
||||
.WithMany()
|
||||
.HasForeignKey("ArticleId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.Booking.BookQuery")
|
||||
.WithMany()
|
||||
.HasForeignKey("BookQueryId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.Command")
|
||||
.WithMany()
|
||||
.HasForeignKey("CommandId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.Estimate")
|
||||
.WithMany()
|
||||
.HasForeignKey("EstimateId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Contact", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Estimate", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Command")
|
||||
.WithMany()
|
||||
.HasForeignKey("CommandId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.PerformerProfile", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ActivityCode");
|
||||
|
||||
b.HasOne("YavscWeb.Models.Service")
|
||||
.WithMany()
|
||||
.HasForeignKey("OfferId");
|
||||
|
||||
b.HasOne("YavscWeb.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("OrganisationAddressId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerfomerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Service", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ContextId");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
351
Yavsc/Migrations/20160515142434_tokenExpiresIn.cs
Normal file
351
Yavsc/Migrations/20160515142434_tokenExpiresIn.cs
Normal file
|
|
@ -0,0 +1,351 @@
|
|||
using Microsoft.Data.Entity.Migrations;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
public partial class tokenExpiresIn : 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_AccountBalance_ApplicationUser_UserId", table: "AccountBalance");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BalanceImpact_AccountBalance_BalanceId", table: "BalanceImpact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Blog_ApplicationUser_AuthorId", table: "Blog");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_ApplicationUser_ClientId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_Location_LocationId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_PerformerProfile_PerformerId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_ApplicationUser_ClientId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_PerformerProfile_PerformerId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Contact_ApplicationUser_OwnerId", table: "Contact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Activity_ActivityCode", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganisationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerfomerId", table: "PerformerProfile");
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Application",
|
||||
columns: table => new
|
||||
{
|
||||
ApplicationID = table.Column<string>(nullable: false),
|
||||
DisplayName = table.Column<string>(nullable: true),
|
||||
LogoutRedirectUri = table.Column<string>(nullable: true),
|
||||
RedirectUri = table.Column<string>(nullable: true),
|
||||
Secret = table.Column<string>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Application", x => x.ApplicationID);
|
||||
});
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "Public",
|
||||
table: "Service",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "ExpiresIn",
|
||||
table: "OAuth2Tokens",
|
||||
nullable: true);
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "Public",
|
||||
table: "BaseProduct",
|
||||
nullable: false,
|
||||
defaultValue: 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_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_Blog_ApplicationUser_AuthorId",
|
||||
table: "Blog",
|
||||
column: "AuthorId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_ApplicationUser_ClientId",
|
||||
table: "BookQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_Location_LocationId",
|
||||
table: "BookQuery",
|
||||
column: "LocationId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_PerformerProfile_PerformerId",
|
||||
table: "BookQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerfomerId",
|
||||
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_Command_ApplicationUser_ClientId",
|
||||
table: "Command",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Command_PerformerProfile_PerformerId",
|
||||
table: "Command",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerfomerId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Contact_ApplicationUser_OwnerId",
|
||||
table: "Contact",
|
||||
column: "OwnerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Activity_ActivityCode",
|
||||
table: "PerformerProfile",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Location_OrganisationAddressId",
|
||||
table: "PerformerProfile",
|
||||
column: "OrganisationAddressId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_ApplicationUser_PerfomerId",
|
||||
table: "PerformerProfile",
|
||||
column: "PerfomerId",
|
||||
principalTable: "AspNetUsers",
|
||||
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_AccountBalance_ApplicationUser_UserId", table: "AccountBalance");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BalanceImpact_AccountBalance_BalanceId", table: "BalanceImpact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Blog_ApplicationUser_AuthorId", table: "Blog");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_ApplicationUser_ClientId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_Location_LocationId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_PerformerProfile_PerformerId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_ApplicationUser_ClientId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Command_PerformerProfile_PerformerId", table: "Command");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Contact_ApplicationUser_OwnerId", table: "Contact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Activity_ActivityCode", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganisationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerfomerId", table: "PerformerProfile");
|
||||
migrationBuilder.DropColumn(name: "Public", table: "Service");
|
||||
migrationBuilder.DropColumn(name: "ExpiresIn", table: "OAuth2Tokens");
|
||||
migrationBuilder.DropColumn(name: "Public", table: "BaseProduct");
|
||||
migrationBuilder.DropTable("Application");
|
||||
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_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_Blog_ApplicationUser_AuthorId",
|
||||
table: "Blog",
|
||||
column: "AuthorId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_ApplicationUser_ClientId",
|
||||
table: "BookQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_Location_LocationId",
|
||||
table: "BookQuery",
|
||||
column: "LocationId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_PerformerProfile_PerformerId",
|
||||
table: "BookQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerfomerId",
|
||||
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_Command_ApplicationUser_ClientId",
|
||||
table: "Command",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Command_PerformerProfile_PerformerId",
|
||||
table: "Command",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerfomerId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Contact_ApplicationUser_OwnerId",
|
||||
table: "Contact",
|
||||
column: "OwnerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Activity_ActivityCode",
|
||||
table: "PerformerProfile",
|
||||
column: "ActivityCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Location_OrganisationAddressId",
|
||||
table: "PerformerProfile",
|
||||
column: "OrganisationAddressId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_ApplicationUser_PerfomerId",
|
||||
table: "PerformerProfile",
|
||||
column: "PerfomerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
}
|
||||
}
|
||||
642
Yavsc/Migrations/ApplicationDbContextModelSnapshot.cs
Normal file
642
Yavsc/Migrations/ApplicationDbContextModelSnapshot.cs
Normal file
|
|
@ -0,0 +1,642 @@
|
|||
using System;
|
||||
using Microsoft.Data.Entity;
|
||||
using Microsoft.Data.Entity.Infrastructure;
|
||||
using Yavsc.Models;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
[DbContext(typeof(ApplicationDbContext))]
|
||||
partial class ApplicationDbContextModelSnapshot : ModelSnapshot
|
||||
{
|
||||
protected override void BuildModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "7.0.0-rc1-16348");
|
||||
|
||||
modelBuilder.Entity("Application", b =>
|
||||
{
|
||||
b.Property<string>("ApplicationID");
|
||||
|
||||
b.Property<string>("DisplayName");
|
||||
|
||||
b.Property<string>("LogoutRedirectUri");
|
||||
|
||||
b.Property<string>("RedirectUri");
|
||||
|
||||
b.Property<string>("Secret");
|
||||
|
||||
b.HasKey("ApplicationID");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRole", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("NormalizedName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedName")
|
||||
.HasAnnotation("Relational:Name", "RoleNameIndex");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<string>("RoleId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetRoleClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.Property<string>("LoginProvider");
|
||||
|
||||
b.Property<string>("ProviderKey");
|
||||
|
||||
b.Property<string>("ProviderDisplayName");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("LoginProvider", "ProviderKey");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserLogins");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("RoleId");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Location", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Address")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<double>("Latitude");
|
||||
|
||||
b.Property<double>("Longitude");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.AccountBalance", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<long>("ContactCredits");
|
||||
|
||||
b.Property<decimal>("Credits");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Activity", b =>
|
||||
{
|
||||
b.Property<string>("Code")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("ActorDenomination");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("Photo");
|
||||
|
||||
b.HasKey("Code");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<int>("AccessFailedCount");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("DedicatedGoogleCalendar");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<bool>("EmailConfirmed");
|
||||
|
||||
b.Property<string>("GoogleRegId");
|
||||
|
||||
b.Property<bool>("LockoutEnabled");
|
||||
|
||||
b.Property<DateTimeOffset?>("LockoutEnd");
|
||||
|
||||
b.Property<string>("NormalizedEmail")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("NormalizedUserName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("PasswordHash");
|
||||
|
||||
b.Property<string>("PhoneNumber");
|
||||
|
||||
b.Property<bool>("PhoneNumberConfirmed");
|
||||
|
||||
b.Property<long?>("PostalAddressId");
|
||||
|
||||
b.Property<string>("SecurityStamp");
|
||||
|
||||
b.Property<bool>("TwoFactorEnabled");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedEmail")
|
||||
.HasAnnotation("Relational:Name", "EmailIndex");
|
||||
|
||||
b.HasIndex("NormalizedUserName")
|
||||
.HasAnnotation("Relational:Name", "UserNameIndex");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUsers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.BalanceImpact", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("BalanceId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("ExecDate");
|
||||
|
||||
b.Property<decimal>("Impact");
|
||||
|
||||
b.Property<string>("Reason")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.BaseProduct", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<bool>("Public");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Blog", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AuthorId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("bcontent");
|
||||
|
||||
b.Property<DateTime>("modified");
|
||||
|
||||
b.Property<string>("photo");
|
||||
|
||||
b.Property<DateTime>("posted");
|
||||
|
||||
b.Property<int>("rate");
|
||||
|
||||
b.Property<string>("title");
|
||||
|
||||
b.Property<bool>("visible");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Booking.BookQuery", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasAnnotation("Relational:GeneratedValueSql", "LOCALTIMESTAMP");
|
||||
|
||||
b.Property<DateTime>("EventDate");
|
||||
|
||||
b.Property<int>("Lag");
|
||||
|
||||
b.Property<long>("LocationId");
|
||||
|
||||
b.Property<string>("PerformerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<decimal?>("Previsional");
|
||||
|
||||
b.Property<DateTime?>("ValidationDate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Circle", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CircleMember", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long?>("CircleId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("MemberId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Command", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("CreationDate");
|
||||
|
||||
b.Property<int>("Lag");
|
||||
|
||||
b.Property<string>("PerformerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<decimal?>("Previsional");
|
||||
|
||||
b.Property<DateTime?>("ValidationDate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CommandLine", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long?>("ArticleId");
|
||||
|
||||
b.Property<long?>("BookQueryId");
|
||||
|
||||
b.Property<long?>("CommandId");
|
||||
|
||||
b.Property<string>("Comment");
|
||||
|
||||
b.Property<int>("Count");
|
||||
|
||||
b.Property<long?>("EstimateId");
|
||||
|
||||
b.Property<decimal>("UnitaryCost");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Contact", b =>
|
||||
{
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.HasKey("OwnerId", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Estimate", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AttachedFilesString");
|
||||
|
||||
b.Property<string>("AttachedGraphicsString");
|
||||
|
||||
b.Property<long?>("CommandId");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<int?>("Status");
|
||||
|
||||
b.Property<string>("Title");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.OAuth2Tokens", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("AccessToken");
|
||||
|
||||
b.Property<DateTime>("Expiration");
|
||||
|
||||
b.Property<string>("ExpiresIn");
|
||||
|
||||
b.Property<string>("RefreshToken");
|
||||
|
||||
b.Property<string>("TokenType");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.PerformerProfile", b =>
|
||||
{
|
||||
b.Property<string>("PerfomerId");
|
||||
|
||||
b.Property<bool>("AcceptGeoLocalisation");
|
||||
|
||||
b.Property<bool>("AcceptNotifications");
|
||||
|
||||
b.Property<bool>("AcceptPublicContact");
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<string>("ActivityCode")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<int?>("MaxDailyCost");
|
||||
|
||||
b.Property<int?>("MinDailyCost");
|
||||
|
||||
b.Property<long?>("OfferId");
|
||||
|
||||
b.Property<long>("OrganisationAddressId");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.Property<string>("SIREN")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 14);
|
||||
|
||||
b.Property<string>("WebSite");
|
||||
|
||||
b.HasKey("PerfomerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Service", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<int?>("Billing");
|
||||
|
||||
b.Property<string>("ContextId");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<decimal?>("Pricing");
|
||||
|
||||
b.Property<bool>("Public");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Skill", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.AccountBalance", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithOne()
|
||||
.HasForeignKey("YavscWeb.Models.AccountBalance", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("PostalAddressId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.BalanceImpact", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.AccountBalance")
|
||||
.WithMany()
|
||||
.HasForeignKey("BalanceId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Blog", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("AuthorId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Booking.BookQuery", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId");
|
||||
|
||||
b.HasOne("YavscWeb.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("LocationId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.PerformerProfile")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Circle", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CircleMember", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Circle")
|
||||
.WithMany()
|
||||
.HasForeignKey("CircleId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("MemberId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Command", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.PerformerProfile")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.CommandLine", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.BaseProduct")
|
||||
.WithMany()
|
||||
.HasForeignKey("ArticleId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.Booking.BookQuery")
|
||||
.WithMany()
|
||||
.HasForeignKey("BookQueryId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.Command")
|
||||
.WithMany()
|
||||
.HasForeignKey("CommandId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.Estimate")
|
||||
.WithMany()
|
||||
.HasForeignKey("EstimateId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Contact", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Estimate", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Command")
|
||||
.WithMany()
|
||||
.HasForeignKey("CommandId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.PerformerProfile", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ActivityCode");
|
||||
|
||||
b.HasOne("YavscWeb.Models.Service")
|
||||
.WithMany()
|
||||
.HasForeignKey("OfferId");
|
||||
|
||||
b.HasOne("YavscWeb.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("OrganisationAddressId");
|
||||
|
||||
b.HasOne("YavscWeb.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerfomerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("YavscWeb.Models.Service", b =>
|
||||
{
|
||||
b.HasOne("YavscWeb.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ContextId");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue