This commit is contained in:
Guilherme
2019-09-24 10:46:39 -03:00
parent 2802ef55b1
commit 34ab942f91
57 changed files with 1044 additions and 896 deletions

View File

@ -1,24 +0,0 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace GerenciaProjetos.Migrations
{
public partial class _2 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<TimeSpan>(
name: "TempoGasto",
table: "DesenvolvedorRequisito",
nullable: false,
defaultValue: new TimeSpan(0, 0, 0, 0, 0));
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "TempoGasto",
table: "DesenvolvedorRequisito");
}
}
}

View File

@ -9,8 +9,8 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace GerenciaProjetos.Migrations
{
[DbContext(typeof(GerenciaContext))]
[Migration("20190922115947_2")]
partial class _2
[Migration("20190924114622_1")]
partial class _1
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{

View File

@ -128,7 +128,8 @@ namespace GerenciaProjetos.Migrations
columns: table => new
{
DesenvolvedorId = table.Column<int>(nullable: false),
RequisitoId = table.Column<int>(nullable: false)
RequisitoId = table.Column<int>(nullable: false),
TempoGasto = table.Column<TimeSpan>(nullable: false)
},
constraints: table =>
{

View File

@ -9,8 +9,8 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace GerenciaProjetos.Migrations
{
[DbContext(typeof(GerenciaContext))]
[Migration("20190922115736_1")]
partial class _1
[Migration("20190924123135_2")]
partial class _2
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
@ -24,22 +24,23 @@ namespace GerenciaProjetos.Migrations
b.Property<int>("Id")
.ValueGeneratedOnAdd();
b.Property<int>("CriadorId");
b.Property<DateTime>("DataCadastro");
b.Property<string>("Descricao")
.IsRequired()
.HasMaxLength(100);
b.Property<int>("DesenvolvedorId");
b.Property<bool>("FoiResolvido");
b.Property<string>("Prioridade");
b.Property<string>("Prioridade")
.HasMaxLength(25);
b.Property<int>("RequisitoId");
b.HasKey("Id");
b.HasIndex("CriadorId");
b.HasIndex("DesenvolvedorId");
b.HasIndex("RequisitoId");
@ -90,6 +91,8 @@ namespace GerenciaProjetos.Migrations
b.Property<int>("RequisitoId");
b.Property<TimeSpan>("TempoGasto");
b.HasKey("DesenvolvedorId", "RequisitoId");
b.HasIndex("RequisitoId");
@ -146,11 +149,6 @@ namespace GerenciaProjetos.Migrations
modelBuilder.Entity("GerenciaProjetos.Models.Bug", b =>
{
b.HasOne("GerenciaProjetos.Models.Desenvolvedor", "Criador")
.WithMany()
.HasForeignKey("CriadorId")
.OnDelete(DeleteBehavior.Cascade);
b.HasOne("GerenciaProjetos.Models.Desenvolvedor", "Desenvolvedor")
.WithMany()
.HasForeignKey("DesenvolvedorId")

View File

@ -0,0 +1,71 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace GerenciaProjetos.Migrations
{
public partial class _2 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_Bugs_Desenvolvedores_CriadorId",
table: "Bugs");
migrationBuilder.DropIndex(
name: "IX_Bugs_CriadorId",
table: "Bugs");
migrationBuilder.DropColumn(
name: "CriadorId",
table: "Bugs");
migrationBuilder.AlterColumn<string>(
name: "Prioridade",
table: "Bugs",
maxLength: 25,
nullable: true,
oldClrType: typeof(string),
oldNullable: true);
migrationBuilder.AddColumn<string>(
name: "Descricao",
table: "Bugs",
maxLength: 100,
nullable: false,
defaultValue: "");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Descricao",
table: "Bugs");
migrationBuilder.AlterColumn<string>(
name: "Prioridade",
table: "Bugs",
nullable: true,
oldClrType: typeof(string),
oldMaxLength: 25,
oldNullable: true);
migrationBuilder.AddColumn<int>(
name: "CriadorId",
table: "Bugs",
nullable: false,
defaultValue: 0);
migrationBuilder.CreateIndex(
name: "IX_Bugs_CriadorId",
table: "Bugs",
column: "CriadorId");
migrationBuilder.AddForeignKey(
name: "FK_Bugs_Desenvolvedores_CriadorId",
table: "Bugs",
column: "CriadorId",
principalTable: "Desenvolvedores",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
}
}
}

View File

@ -22,22 +22,23 @@ namespace GerenciaProjetos.Migrations
b.Property<int>("Id")
.ValueGeneratedOnAdd();
b.Property<int>("CriadorId");
b.Property<DateTime>("DataCadastro");
b.Property<string>("Descricao")
.IsRequired()
.HasMaxLength(100);
b.Property<int>("DesenvolvedorId");
b.Property<bool>("FoiResolvido");
b.Property<string>("Prioridade");
b.Property<string>("Prioridade")
.HasMaxLength(25);
b.Property<int>("RequisitoId");
b.HasKey("Id");
b.HasIndex("CriadorId");
b.HasIndex("DesenvolvedorId");
b.HasIndex("RequisitoId");
@ -146,11 +147,6 @@ namespace GerenciaProjetos.Migrations
modelBuilder.Entity("GerenciaProjetos.Models.Bug", b =>
{
b.HasOne("GerenciaProjetos.Models.Desenvolvedor", "Criador")
.WithMany()
.HasForeignKey("CriadorId")
.OnDelete(DeleteBehavior.Cascade);
b.HasOne("GerenciaProjetos.Models.Desenvolvedor", "Desenvolvedor")
.WithMany()
.HasForeignKey("DesenvolvedorId")