using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace SistemaGestionAcademias.Migrations
{
///
public partial class AgregarActivoInstructor : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn(
name: "Telefono",
table: "Instructores",
type: "nvarchar(max)",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(20)",
oldMaxLength: 20);
migrationBuilder.AlterColumn(
name: "Especialidad",
table: "Instructores",
type: "nvarchar(max)",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "Correo",
table: "Instructores",
type: "nvarchar(max)",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
migrationBuilder.AddColumn(
name: "Activo",
table: "Instructores",
type: "bit",
nullable: false,
defaultValue: false);
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Activo",
table: "Instructores");
migrationBuilder.AlterColumn(
name: "Telefono",
table: "Instructores",
type: "nvarchar(20)",
maxLength: 20,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "Especialidad",
table: "Instructores",
type: "nvarchar(max)",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
migrationBuilder.AlterColumn(
name: "Correo",
table: "Instructores",
type: "nvarchar(max)",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);
}
}
}