fixes the db migration
This commit is contained in:
@ -11,8 +11,8 @@ namespace Yavsc.Server.Models.IT
|
|||||||
{
|
{
|
||||||
public class Project : NominativeServiceCommand, IProject
|
public class Project : NominativeServiceCommand, IProject
|
||||||
{
|
{
|
||||||
[Key]
|
[Key,DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||||
public override long Id { get; set; }
|
public override long Id { get; set; }
|
||||||
public string OwnerId { get; set; }
|
public string OwnerId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -31,7 +31,11 @@ namespace Yavsc.Server.Models.IT
|
|||||||
[InverseProperty("TargetProject")]
|
[InverseProperty("TargetProject")]
|
||||||
public virtual List<ProjectBuildConfiguration> Configurations { get; set; }
|
public virtual List<ProjectBuildConfiguration> Configurations { get; set; }
|
||||||
|
|
||||||
[ForeignKey("Name")]
|
|
||||||
|
[Required]
|
||||||
|
public long GitId { get; set; }
|
||||||
|
|
||||||
|
[ForeignKey("GitId")]
|
||||||
public virtual GitRepositoryReference Repository { get; set; }
|
public virtual GitRepositoryReference Repository { get; set; }
|
||||||
|
|
||||||
List<IBillItem> bill = new List<IBillItem>();
|
List<IBillItem> bill = new List<IBillItem>();
|
||||||
@ -57,10 +61,6 @@ namespace Yavsc.Server.Models.IT
|
|||||||
set { description = value; }
|
set { description = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public Project()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ namespace Yavsc.Server.Models.IT
|
|||||||
/// A Numerical Id
|
/// A Numerical Id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value></value>
|
/// <value></value>
|
||||||
[Key]
|
[Key,DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
|
@ -5,8 +5,11 @@ using Yavsc.Models;
|
|||||||
namespace Yavsc.Server.Models.IT.SourceCode
|
namespace Yavsc.Server.Models.IT.SourceCode
|
||||||
{
|
{
|
||||||
public class GitRepositoryReference
|
public class GitRepositoryReference
|
||||||
{
|
{
|
||||||
[Key]
|
[Key,DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||||
|
public long Id { get; set; }
|
||||||
|
|
||||||
|
[Required]
|
||||||
public string Path { get; set; }
|
public string Path { get; set; }
|
||||||
|
|
||||||
[StringLength(2048)]
|
[StringLength(2048)]
|
||||||
|
@ -31,14 +31,14 @@ namespace Yavsc.Controllers
|
|||||||
|
|
||||||
// GET: api/GitRefsApi/5
|
// GET: api/GitRefsApi/5
|
||||||
[HttpGet("{id}", Name = "GetGitRepositoryReference")]
|
[HttpGet("{id}", Name = "GetGitRepositoryReference")]
|
||||||
public async Task<IActionResult> GetGitRepositoryReference([FromRoute] string id)
|
public async Task<IActionResult> GetGitRepositoryReference([FromRoute] long id)
|
||||||
{
|
{
|
||||||
if (!ModelState.IsValid)
|
if (!ModelState.IsValid)
|
||||||
{
|
{
|
||||||
return HttpBadRequest(ModelState);
|
return HttpBadRequest(ModelState);
|
||||||
}
|
}
|
||||||
|
|
||||||
GitRepositoryReference gitRepositoryReference = await _context.GitRepositoryReference.SingleAsync(m => m.Path == id);
|
GitRepositoryReference gitRepositoryReference = await _context.GitRepositoryReference.SingleAsync(m => m.Id == id);
|
||||||
|
|
||||||
if (gitRepositoryReference == null)
|
if (gitRepositoryReference == null)
|
||||||
{
|
{
|
||||||
@ -50,18 +50,13 @@ namespace Yavsc.Controllers
|
|||||||
|
|
||||||
// PUT: api/GitRefsApi/5
|
// PUT: api/GitRefsApi/5
|
||||||
[HttpPut("{id}")]
|
[HttpPut("{id}")]
|
||||||
public async Task<IActionResult> PutGitRepositoryReference([FromRoute] string id, [FromBody] GitRepositoryReference gitRepositoryReference)
|
public async Task<IActionResult> PutGitRepositoryReference([FromRoute] long id, [FromBody] GitRepositoryReference gitRepositoryReference)
|
||||||
{
|
{
|
||||||
if (!ModelState.IsValid)
|
if (!ModelState.IsValid)
|
||||||
{
|
{
|
||||||
return HttpBadRequest(ModelState);
|
return HttpBadRequest(ModelState);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (id != gitRepositoryReference.Path)
|
|
||||||
{
|
|
||||||
return HttpBadRequest();
|
|
||||||
}
|
|
||||||
|
|
||||||
_context.Entry(gitRepositoryReference).State = EntityState.Modified;
|
_context.Entry(gitRepositoryReference).State = EntityState.Modified;
|
||||||
|
|
||||||
try
|
try
|
||||||
@ -99,7 +94,7 @@ namespace Yavsc.Controllers
|
|||||||
}
|
}
|
||||||
catch (DbUpdateException)
|
catch (DbUpdateException)
|
||||||
{
|
{
|
||||||
if (GitRepositoryReferenceExists(gitRepositoryReference.Path))
|
if (GitRepositoryReferenceExists(gitRepositoryReference.Id))
|
||||||
{
|
{
|
||||||
return new HttpStatusCodeResult(StatusCodes.Status409Conflict);
|
return new HttpStatusCodeResult(StatusCodes.Status409Conflict);
|
||||||
}
|
}
|
||||||
@ -114,14 +109,14 @@ namespace Yavsc.Controllers
|
|||||||
|
|
||||||
// DELETE: api/GitRefsApi/5
|
// DELETE: api/GitRefsApi/5
|
||||||
[HttpDelete("{id}")]
|
[HttpDelete("{id}")]
|
||||||
public async Task<IActionResult> DeleteGitRepositoryReference([FromRoute] string id)
|
public async Task<IActionResult> DeleteGitRepositoryReference([FromRoute] long id)
|
||||||
{
|
{
|
||||||
if (!ModelState.IsValid)
|
if (!ModelState.IsValid)
|
||||||
{
|
{
|
||||||
return HttpBadRequest(ModelState);
|
return HttpBadRequest(ModelState);
|
||||||
}
|
}
|
||||||
|
|
||||||
GitRepositoryReference gitRepositoryReference = await _context.GitRepositoryReference.SingleAsync(m => m.Path == id);
|
GitRepositoryReference gitRepositoryReference = await _context.GitRepositoryReference.SingleAsync(m => m.Id == id);
|
||||||
if (gitRepositoryReference == null)
|
if (gitRepositoryReference == null)
|
||||||
{
|
{
|
||||||
return HttpNotFound();
|
return HttpNotFound();
|
||||||
@ -142,9 +137,9 @@ namespace Yavsc.Controllers
|
|||||||
base.Dispose(disposing);
|
base.Dispose(disposing);
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool GitRepositoryReferenceExists(string id)
|
private bool GitRepositoryReferenceExists(long id)
|
||||||
{
|
{
|
||||||
return _context.GitRepositoryReference.Count(e => e.Path == id) > 0;
|
return _context.GitRepositoryReference.Count(e => e.Id == id) > 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -20,7 +20,6 @@ using Newtonsoft.Json;
|
|||||||
|
|
||||||
namespace Yavsc.Controllers
|
namespace Yavsc.Controllers
|
||||||
{
|
{
|
||||||
using System.Text;
|
|
||||||
using Yavsc.Abstract.Manage;
|
using Yavsc.Abstract.Manage;
|
||||||
using Yavsc.Helpers;
|
using Yavsc.Helpers;
|
||||||
|
|
||||||
|
@ -63,14 +63,10 @@ namespace Yavsc.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GET: Git/Details/5
|
// GET: Git/Details/5
|
||||||
public async Task<IActionResult> Details(string id)
|
public async Task<IActionResult> Details(long id)
|
||||||
{
|
{
|
||||||
if (id == null)
|
|
||||||
{
|
|
||||||
return HttpNotFound();
|
|
||||||
}
|
|
||||||
|
|
||||||
GitRepositoryReference gitRepositoryReference = await _context.GitRepositoryReference.SingleAsync(m => m.Path == id);
|
GitRepositoryReference gitRepositoryReference = await _context.GitRepositoryReference.SingleAsync(m => m.Id == id);
|
||||||
if (gitRepositoryReference == null)
|
if (gitRepositoryReference == null)
|
||||||
{
|
{
|
||||||
return HttpNotFound();
|
return HttpNotFound();
|
||||||
@ -103,14 +99,9 @@ namespace Yavsc.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GET: Git/Edit/5
|
// GET: Git/Edit/5
|
||||||
public async Task<IActionResult> Edit(string id)
|
public async Task<IActionResult> Edit(long id)
|
||||||
{
|
{
|
||||||
if (id == null)
|
GitRepositoryReference gitRepositoryReference = await _context.GitRepositoryReference.SingleAsync(m => m.Id == id);
|
||||||
{
|
|
||||||
return HttpNotFound();
|
|
||||||
}
|
|
||||||
|
|
||||||
GitRepositoryReference gitRepositoryReference = await _context.GitRepositoryReference.SingleAsync(m => m.Path == id);
|
|
||||||
if (gitRepositoryReference == null)
|
if (gitRepositoryReference == null)
|
||||||
{
|
{
|
||||||
return HttpNotFound();
|
return HttpNotFound();
|
||||||
|
@ -71,7 +71,7 @@ namespace Yavsc.Controllers
|
|||||||
|
|
||||||
ViewBag.Status = typeof(Yavsc.QueryStatus).CreateSelectListItems(null);
|
ViewBag.Status = typeof(Yavsc.QueryStatus).CreateSelectListItems(null);
|
||||||
ViewBag.RepositoryItems = _context.GitRepositoryReference.CreateSelectListItems<GitRepositoryReference>(
|
ViewBag.RepositoryItems = _context.GitRepositoryReference.CreateSelectListItems<GitRepositoryReference>(
|
||||||
u => u.Path, u => u.ToString());
|
u => u.Id.ToString(), u => u.ToString());
|
||||||
|
|
||||||
return View();
|
return View();
|
||||||
}
|
}
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
using System;
|
using System;
|
||||||
using Microsoft.Data.Entity;
|
using Microsoft.Data.Entity;
|
||||||
using Microsoft.Data.Entity.Infrastructure;
|
using Microsoft.Data.Entity.Infrastructure;
|
||||||
|
using Microsoft.Data.Entity.Metadata;
|
||||||
using Microsoft.Data.Entity.Migrations;
|
using Microsoft.Data.Entity.Migrations;
|
||||||
using Yavsc.Models;
|
using Yavsc.Models;
|
||||||
|
|
||||||
namespace Yavsc.Migrations
|
namespace Yavsc.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(ApplicationDbContext))]
|
[DbContext(typeof(ApplicationDbContext))]
|
||||||
[Migration("20180722232456_gitrepo")]
|
[Migration("20180805122812_gitprojectref")]
|
||||||
partial class gitrepo
|
partial class gitprojectref
|
||||||
{
|
{
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||||
{
|
{
|
||||||
@ -680,6 +681,8 @@ namespace Yavsc.Migrations
|
|||||||
|
|
||||||
b.Property<DateTime>("DateModified");
|
b.Property<DateTime>("DateModified");
|
||||||
|
|
||||||
|
b.Property<string>("Description");
|
||||||
|
|
||||||
b.Property<DateTime?>("EventDate");
|
b.Property<DateTime?>("EventDate");
|
||||||
|
|
||||||
b.Property<long?>("LocationId");
|
b.Property<long?>("LocationId");
|
||||||
@ -727,6 +730,8 @@ namespace Yavsc.Migrations
|
|||||||
|
|
||||||
b.Property<DateTime>("DateModified");
|
b.Property<DateTime>("DateModified");
|
||||||
|
|
||||||
|
b.Property<string>("Description");
|
||||||
|
|
||||||
b.Property<DateTime>("EventDate");
|
b.Property<DateTime>("EventDate");
|
||||||
|
|
||||||
b.Property<long?>("LocationId");
|
b.Property<long?>("LocationId");
|
||||||
@ -1268,6 +1273,8 @@ namespace Yavsc.Migrations
|
|||||||
|
|
||||||
b.Property<DateTime>("DateModified");
|
b.Property<DateTime>("DateModified");
|
||||||
|
|
||||||
|
b.Property<string>("Description");
|
||||||
|
|
||||||
b.Property<DateTime>("EventDate");
|
b.Property<DateTime>("EventDate");
|
||||||
|
|
||||||
b.Property<long?>("LocationId");
|
b.Property<long?>("LocationId");
|
||||||
@ -1356,6 +1363,8 @@ namespace Yavsc.Migrations
|
|||||||
|
|
||||||
b.Property<string>("Description");
|
b.Property<string>("Description");
|
||||||
|
|
||||||
|
b.Property<long>("GitId");
|
||||||
|
|
||||||
b.Property<string>("Name")
|
b.Property<string>("Name")
|
||||||
.IsRequired();
|
.IsRequired();
|
||||||
|
|
||||||
@ -1400,7 +1409,8 @@ namespace Yavsc.Migrations
|
|||||||
|
|
||||||
modelBuilder.Entity("Yavsc.Server.Models.IT.SourceCode.GitRepositoryReference", b =>
|
modelBuilder.Entity("Yavsc.Server.Models.IT.SourceCode.GitRepositoryReference", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("Path");
|
b.Property<long>("Id")
|
||||||
|
.ValueGeneratedOnAdd();
|
||||||
|
|
||||||
b.Property<string>("Branch")
|
b.Property<string>("Branch")
|
||||||
.HasAnnotation("MaxLength", 512);
|
.HasAnnotation("MaxLength", 512);
|
||||||
@ -1408,10 +1418,13 @@ namespace Yavsc.Migrations
|
|||||||
b.Property<string>("OwnerId")
|
b.Property<string>("OwnerId")
|
||||||
.HasAnnotation("MaxLength", 1024);
|
.HasAnnotation("MaxLength", 1024);
|
||||||
|
|
||||||
|
b.Property<string>("Path")
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
b.Property<string>("Url")
|
b.Property<string>("Url")
|
||||||
.HasAnnotation("MaxLength", 2048);
|
.HasAnnotation("MaxLength", 2048);
|
||||||
|
|
||||||
b.HasKey("Path");
|
b.HasKey("Id");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||||
@ -1882,7 +1895,7 @@ namespace Yavsc.Migrations
|
|||||||
|
|
||||||
b.HasOne("Yavsc.Server.Models.IT.SourceCode.GitRepositoryReference")
|
b.HasOne("Yavsc.Server.Models.IT.SourceCode.GitRepositoryReference")
|
||||||
.WithMany()
|
.WithMany()
|
||||||
.HasForeignKey("Name");
|
.HasForeignKey("GitId");
|
||||||
|
|
||||||
b.HasOne("Yavsc.Models.Payment.PayPalPayment")
|
b.HasOne("Yavsc.Models.Payment.PayPalPayment")
|
||||||
.WithMany()
|
.WithMany()
|
@ -1,8 +1,10 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using Microsoft.Data.Entity.Migrations;
|
using Microsoft.Data.Entity.Migrations;
|
||||||
|
|
||||||
namespace Yavsc.Migrations
|
namespace Yavsc.Migrations
|
||||||
{
|
{
|
||||||
public partial class gitrepo : Migration
|
public partial class gitprojectref : Migration
|
||||||
{
|
{
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
{
|
{
|
||||||
@ -54,20 +56,20 @@ namespace Yavsc.Migrations
|
|||||||
migrationBuilder.DropForeignKey(name: "FK_Project_Activity_ActivityCode", table: "Project");
|
migrationBuilder.DropForeignKey(name: "FK_Project_Activity_ActivityCode", table: "Project");
|
||||||
migrationBuilder.DropForeignKey(name: "FK_Project_ApplicationUser_ClientId", table: "Project");
|
migrationBuilder.DropForeignKey(name: "FK_Project_ApplicationUser_ClientId", table: "Project");
|
||||||
migrationBuilder.DropForeignKey(name: "FK_Project_PerformerProfile_PerformerId", table: "Project");
|
migrationBuilder.DropForeignKey(name: "FK_Project_PerformerProfile_PerformerId", table: "Project");
|
||||||
migrationBuilder.DropForeignKey(name: "FK_ProjectBuildConfiguration_Project_ProjectId", table: "ProjectBuildConfiguration");
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
migrationBuilder.CreateTable(
|
||||||
name: "GitRepositoryReference",
|
name: "GitRepositoryReference",
|
||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
Path = table.Column<string>(nullable: false),
|
Id = table.Column<long>(nullable: false)
|
||||||
|
.Annotation("Npgsql:Serial", true),
|
||||||
Branch = table.Column<string>(nullable: true),
|
Branch = table.Column<string>(nullable: true),
|
||||||
OwnerId = table.Column<string>(nullable: true),
|
OwnerId = table.Column<string>(nullable: true),
|
||||||
|
Path = table.Column<string>(nullable: false),
|
||||||
Url = table.Column<string>(nullable: true)
|
Url = table.Column<string>(nullable: true)
|
||||||
},
|
},
|
||||||
constraints: table =>
|
constraints: table =>
|
||||||
{
|
{
|
||||||
table.PrimaryKey("PK_GitRepositoryReference", x => x.Path);
|
table.PrimaryKey("PK_GitRepositoryReference", x => x.Id);
|
||||||
table.ForeignKey(
|
table.ForeignKey(
|
||||||
name: "FK_GitRepositoryReference_ApplicationUser_OwnerId",
|
name: "FK_GitRepositoryReference_ApplicationUser_OwnerId",
|
||||||
column: x => x.OwnerId,
|
column: x => x.OwnerId,
|
||||||
@ -75,6 +77,23 @@ namespace Yavsc.Migrations
|
|||||||
principalColumn: "Id",
|
principalColumn: "Id",
|
||||||
onDelete: ReferentialAction.Restrict);
|
onDelete: ReferentialAction.Restrict);
|
||||||
});
|
});
|
||||||
|
migrationBuilder.AddColumn<long>(
|
||||||
|
name: "GitId",
|
||||||
|
table: "Project",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0L);
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "Description",
|
||||||
|
table: "RdvQuery",
|
||||||
|
nullable: true);
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "Description",
|
||||||
|
table: "HairMultiCutQuery",
|
||||||
|
nullable: true);
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "Description",
|
||||||
|
table: "HairCutQuery",
|
||||||
|
nullable: true);
|
||||||
migrationBuilder.AddForeignKey(
|
migrationBuilder.AddForeignKey(
|
||||||
name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId",
|
name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId",
|
||||||
table: "AspNetRoleClaims",
|
table: "AspNetRoleClaims",
|
||||||
@ -405,11 +424,11 @@ namespace Yavsc.Migrations
|
|||||||
principalColumn: "Id",
|
principalColumn: "Id",
|
||||||
onDelete: ReferentialAction.Cascade);
|
onDelete: ReferentialAction.Cascade);
|
||||||
migrationBuilder.AddForeignKey(
|
migrationBuilder.AddForeignKey(
|
||||||
name: "FK_Project_GitRepositoryReference_Name",
|
name: "FK_Project_GitRepositoryReference_GitId",
|
||||||
table: "Project",
|
table: "Project",
|
||||||
column: "Name",
|
column: "GitId",
|
||||||
principalTable: "GitRepositoryReference",
|
principalTable: "GitRepositoryReference",
|
||||||
principalColumn: "Path",
|
principalColumn: "Id",
|
||||||
onDelete: ReferentialAction.Cascade);
|
onDelete: ReferentialAction.Cascade);
|
||||||
migrationBuilder.AddForeignKey(
|
migrationBuilder.AddForeignKey(
|
||||||
name: "FK_Project_PerformerProfile_PerformerId",
|
name: "FK_Project_PerformerProfile_PerformerId",
|
||||||
@ -418,13 +437,6 @@ namespace Yavsc.Migrations
|
|||||||
principalTable: "PerformerProfile",
|
principalTable: "PerformerProfile",
|
||||||
principalColumn: "PerformerId",
|
principalColumn: "PerformerId",
|
||||||
onDelete: ReferentialAction.Cascade);
|
onDelete: ReferentialAction.Cascade);
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_ProjectBuildConfiguration_Project_ProjectId",
|
|
||||||
table: "ProjectBuildConfiguration",
|
|
||||||
column: "ProjectId",
|
|
||||||
principalTable: "Project",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
@ -476,9 +488,13 @@ namespace Yavsc.Migrations
|
|||||||
migrationBuilder.DropForeignKey(name: "FK_UserActivity_PerformerProfile_UserId", table: "UserActivity");
|
migrationBuilder.DropForeignKey(name: "FK_UserActivity_PerformerProfile_UserId", table: "UserActivity");
|
||||||
migrationBuilder.DropForeignKey(name: "FK_Project_Activity_ActivityCode", table: "Project");
|
migrationBuilder.DropForeignKey(name: "FK_Project_Activity_ActivityCode", table: "Project");
|
||||||
migrationBuilder.DropForeignKey(name: "FK_Project_ApplicationUser_ClientId", table: "Project");
|
migrationBuilder.DropForeignKey(name: "FK_Project_ApplicationUser_ClientId", table: "Project");
|
||||||
migrationBuilder.DropForeignKey(name: "FK_Project_GitRepositoryReference_Name", table: "Project");
|
migrationBuilder.DropForeignKey(name: "FK_Project_GitRepositoryReference_GitId", table: "Project");
|
||||||
migrationBuilder.DropForeignKey(name: "FK_Project_PerformerProfile_PerformerId", table: "Project");
|
migrationBuilder.DropForeignKey(name: "FK_Project_PerformerProfile_PerformerId", table: "Project");
|
||||||
migrationBuilder.DropForeignKey(name: "FK_ProjectBuildConfiguration_Project_ProjectId", table: "ProjectBuildConfiguration");
|
migrationBuilder.DropForeignKey(name: "FK_ProjectBuildConfiguration_Project_ProjectId", table: "ProjectBuildConfiguration");
|
||||||
|
migrationBuilder.DropColumn(name: "GitId", table: "Project");
|
||||||
|
migrationBuilder.DropColumn(name: "Description", table: "RdvQuery");
|
||||||
|
migrationBuilder.DropColumn(name: "Description", table: "HairMultiCutQuery");
|
||||||
|
migrationBuilder.DropColumn(name: "Description", table: "HairCutQuery");
|
||||||
migrationBuilder.DropTable("GitRepositoryReference");
|
migrationBuilder.DropTable("GitRepositoryReference");
|
||||||
migrationBuilder.AddForeignKey(
|
migrationBuilder.AddForeignKey(
|
||||||
name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId",
|
name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId",
|
@ -678,6 +678,8 @@ namespace Yavsc.Migrations
|
|||||||
|
|
||||||
b.Property<DateTime>("DateModified");
|
b.Property<DateTime>("DateModified");
|
||||||
|
|
||||||
|
b.Property<string>("Description");
|
||||||
|
|
||||||
b.Property<DateTime?>("EventDate");
|
b.Property<DateTime?>("EventDate");
|
||||||
|
|
||||||
b.Property<long?>("LocationId");
|
b.Property<long?>("LocationId");
|
||||||
@ -725,6 +727,8 @@ namespace Yavsc.Migrations
|
|||||||
|
|
||||||
b.Property<DateTime>("DateModified");
|
b.Property<DateTime>("DateModified");
|
||||||
|
|
||||||
|
b.Property<string>("Description");
|
||||||
|
|
||||||
b.Property<DateTime>("EventDate");
|
b.Property<DateTime>("EventDate");
|
||||||
|
|
||||||
b.Property<long?>("LocationId");
|
b.Property<long?>("LocationId");
|
||||||
@ -1266,6 +1270,8 @@ namespace Yavsc.Migrations
|
|||||||
|
|
||||||
b.Property<DateTime>("DateModified");
|
b.Property<DateTime>("DateModified");
|
||||||
|
|
||||||
|
b.Property<string>("Description");
|
||||||
|
|
||||||
b.Property<DateTime>("EventDate");
|
b.Property<DateTime>("EventDate");
|
||||||
|
|
||||||
b.Property<long?>("LocationId");
|
b.Property<long?>("LocationId");
|
||||||
@ -1354,6 +1360,8 @@ namespace Yavsc.Migrations
|
|||||||
|
|
||||||
b.Property<string>("Description");
|
b.Property<string>("Description");
|
||||||
|
|
||||||
|
b.Property<long>("GitId");
|
||||||
|
|
||||||
b.Property<string>("Name")
|
b.Property<string>("Name")
|
||||||
.IsRequired();
|
.IsRequired();
|
||||||
|
|
||||||
@ -1398,7 +1406,8 @@ namespace Yavsc.Migrations
|
|||||||
|
|
||||||
modelBuilder.Entity("Yavsc.Server.Models.IT.SourceCode.GitRepositoryReference", b =>
|
modelBuilder.Entity("Yavsc.Server.Models.IT.SourceCode.GitRepositoryReference", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("Path");
|
b.Property<long>("Id")
|
||||||
|
.ValueGeneratedOnAdd();
|
||||||
|
|
||||||
b.Property<string>("Branch")
|
b.Property<string>("Branch")
|
||||||
.HasAnnotation("MaxLength", 512);
|
.HasAnnotation("MaxLength", 512);
|
||||||
@ -1406,10 +1415,13 @@ namespace Yavsc.Migrations
|
|||||||
b.Property<string>("OwnerId")
|
b.Property<string>("OwnerId")
|
||||||
.HasAnnotation("MaxLength", 1024);
|
.HasAnnotation("MaxLength", 1024);
|
||||||
|
|
||||||
|
b.Property<string>("Path")
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
b.Property<string>("Url")
|
b.Property<string>("Url")
|
||||||
.HasAnnotation("MaxLength", 2048);
|
.HasAnnotation("MaxLength", 2048);
|
||||||
|
|
||||||
b.HasKey("Path");
|
b.HasKey("Id");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||||
@ -1880,7 +1892,7 @@ namespace Yavsc.Migrations
|
|||||||
|
|
||||||
b.HasOne("Yavsc.Server.Models.IT.SourceCode.GitRepositoryReference")
|
b.HasOne("Yavsc.Server.Models.IT.SourceCode.GitRepositoryReference")
|
||||||
.WithMany()
|
.WithMany()
|
||||||
.HasForeignKey("Name");
|
.HasForeignKey("GitId");
|
||||||
|
|
||||||
b.HasOne("Yavsc.Models.Payment.PayPalPayment")
|
b.HasOne("Yavsc.Models.Payment.PayPalPayment")
|
||||||
.WithMany()
|
.WithMany()
|
||||||
|
@ -12,10 +12,10 @@
|
|||||||
<hr />
|
<hr />
|
||||||
<div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div>
|
<div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="Repository" class="col-md-2 control-label"></label>
|
<label asp-for="GitId" class="col-md-2 control-label"></label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
<select asp-for="Repository" class ="form-control" asp-items="@ViewBag.RepositoryItems"></select>
|
<select asp-for="GitId" class ="form-control" asp-items="@ViewBag.RepositoryItems"></select>
|
||||||
<span asp-validation-for="Repository" class="text-danger" />
|
<span asp-validation-for="GitId" class="text-danger" ></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@ -34,14 +34,14 @@
|
|||||||
<label asp-for="Description" class="col-md-2 control-label"></label>
|
<label asp-for="Description" class="col-md-2 control-label"></label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
<input asp-for="Description" class="form-control" />
|
<input asp-for="Description" class="form-control" />
|
||||||
<span asp-validation-for="Description" class="text-danger" />
|
<span asp-validation-for="Description" class="text-danger" ></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="Name" class="col-md-2 control-label"></label>
|
<label asp-for="Name" class="col-md-2 control-label"></label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
<input asp-for="Name" class ="form-control" aria-required="true" ></input>
|
<input asp-for="Name" class ="form-control" aria-required="true" ></input>
|
||||||
<span asp-validation-for="Name" class="text-danger" />
|
<span asp-validation-for="Name" class="text-danger" ></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@ -49,7 +49,7 @@
|
|||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
<select asp-for="OwnerId" asp-items="@ViewBag.OwnerIdItems" class="form-control" >
|
<select asp-for="OwnerId" asp-items="@ViewBag.OwnerIdItems" class="form-control" >
|
||||||
</select>
|
</select>
|
||||||
<span asp-validation-for="OwnerId" class="text-danger" />
|
<span asp-validation-for="OwnerId" class="text-danger" ></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@ -62,21 +62,21 @@
|
|||||||
<label asp-for="Previsional" class="col-md-2 control-label"></label>
|
<label asp-for="Previsional" class="col-md-2 control-label"></label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
<input asp-for="Previsional" class="form-control" />
|
<input asp-for="Previsional" class="form-control" />
|
||||||
<span asp-validation-for="Previsional" class="text-danger" />
|
<span asp-validation-for="Previsional" class="text-danger" ></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="Status" class="col-md-2 control-label"></label>
|
<label asp-for="Status" class="col-md-2 control-label"></label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
<select asp-for="Status" class="form-control" asp-items="@ViewBag.Status" ></select>
|
<select asp-for="Status" class="form-control" asp-items="@ViewBag.Status" ></select>
|
||||||
<span asp-validation-for="Status" class="text-danger" />
|
<span asp-validation-for="Status" class="text-danger" ></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="Version" class="col-md-2 control-label"></label>
|
<label asp-for="Version" class="col-md-2 control-label"></label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
<input asp-for="Version" class="form-control" />
|
<input asp-for="Version" class="form-control" />
|
||||||
<span asp-validation-for="Version" class="text-danger" />
|
<span asp-validation-for="Version" class="text-danger" ></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
Reference in New Issue
Block a user