mirror of
https://github.com/guilhermewerner/gerencia-projetos
synced 2025-06-16 23:15:05 +00:00
Fix Bugs
This commit is contained in:
@ -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");
|
||||
}
|
||||
}
|
||||
}
|
@ -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)
|
||||
{
|
@ -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 =>
|
||||
{
|
@ -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")
|
71
GerenciaProjetos/Migrations/20190924123135_2.cs
Normal file
71
GerenciaProjetos/Migrations/20190924123135_2.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
@ -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")
|
||||
|
Reference in New Issue
Block a user