95 lines
2.7 KiB
C#
95 lines
2.7 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace line_gestao_api.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class AddUserDataPessoaFields : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "Cnpj",
|
|
table: "UserDatas",
|
|
type: "text",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "Nome",
|
|
table: "UserDatas",
|
|
type: "text",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "RazaoSocial",
|
|
table: "UserDatas",
|
|
type: "text",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "TipoPessoa",
|
|
table: "UserDatas",
|
|
type: "text",
|
|
nullable: true);
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_UserDatas_Cnpj",
|
|
table: "UserDatas",
|
|
column: "Cnpj");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_UserDatas_Nome",
|
|
table: "UserDatas",
|
|
column: "Nome");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_UserDatas_RazaoSocial",
|
|
table: "UserDatas",
|
|
column: "RazaoSocial");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_UserDatas_TipoPessoa",
|
|
table: "UserDatas",
|
|
column: "TipoPessoa");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropIndex(
|
|
name: "IX_UserDatas_Cnpj",
|
|
table: "UserDatas");
|
|
|
|
migrationBuilder.DropIndex(
|
|
name: "IX_UserDatas_Nome",
|
|
table: "UserDatas");
|
|
|
|
migrationBuilder.DropIndex(
|
|
name: "IX_UserDatas_RazaoSocial",
|
|
table: "UserDatas");
|
|
|
|
migrationBuilder.DropIndex(
|
|
name: "IX_UserDatas_TipoPessoa",
|
|
table: "UserDatas");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "Cnpj",
|
|
table: "UserDatas");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "Nome",
|
|
table: "UserDatas");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "RazaoSocial",
|
|
table: "UserDatas");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "TipoPessoa",
|
|
table: "UserDatas");
|
|
}
|
|
}
|
|
}
|