using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace line_gestao_api.Migrations { /// public partial class CreateBillingClients : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "billing_clients", columns: table => new { Id = table.Column(type: "uuid", nullable: false), Tipo = table.Column(type: "character varying(2)", maxLength: 2, nullable: false), Item = table.Column(type: "integer", nullable: false), Cliente = table.Column(type: "character varying(255)", maxLength: 255, nullable: false), QtdLinhas = table.Column(type: "integer", nullable: true), FranquiaVivo = table.Column(type: "numeric", nullable: true), ValorContratoVivo = table.Column(type: "numeric", nullable: true), FranquiaLine = table.Column(type: "numeric", nullable: true), ValorContratoLine = table.Column(type: "numeric", nullable: true), Lucro = table.Column(type: "numeric", nullable: true), Aparelho = table.Column(type: "text", nullable: true), FormaPagamento = table.Column(type: "text", nullable: true), CreatedAt = table.Column(type: "timestamp with time zone", nullable: false), UpdatedAt = table.Column(type: "timestamp with time zone", nullable: false) }, constraints: table => { table.PrimaryKey("PK_billing_clients", x => x.Id); }); migrationBuilder.CreateIndex( name: "IX_billing_clients_Cliente", table: "billing_clients", column: "Cliente"); migrationBuilder.CreateIndex( name: "IX_billing_clients_Item", table: "billing_clients", column: "Item"); migrationBuilder.CreateIndex( name: "IX_billing_clients_Tipo", table: "billing_clients", column: "Tipo"); migrationBuilder.CreateIndex( name: "IX_billing_clients_Tipo_Cliente", table: "billing_clients", columns: new[] { "Tipo", "Cliente" }); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "billing_clients"); } } }