using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace line_gestao_api.Migrations { /// public partial class AddChipsVirgensControleRecebidos : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "ChipVirgemLines", columns: table => new { Id = table.Column(type: "uuid", nullable: false), TenantId = table.Column(type: "uuid", nullable: false), Item = table.Column(type: "integer", nullable: false), NumeroDoChip = table.Column(type: "character varying(40)", maxLength: 40, nullable: true), Observacoes = table.Column(type: "character varying(500)", maxLength: 500, 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_ChipVirgemLines", x => x.Id); }); migrationBuilder.CreateTable( name: "ControleRecebidoLines", columns: table => new { Id = table.Column(type: "uuid", nullable: false), TenantId = table.Column(type: "uuid", nullable: false), Ano = table.Column(type: "integer", nullable: false), Item = table.Column(type: "integer", nullable: false), NotaFiscal = table.Column(type: "character varying(50)", maxLength: 50, nullable: true), Chip = table.Column(type: "character varying(40)", maxLength: 40, nullable: true), Serial = table.Column(type: "character varying(80)", maxLength: 80, nullable: true), ConteudoDaNf = table.Column(type: "character varying(255)", maxLength: 255, nullable: true), NumeroDaLinha = table.Column(type: "character varying(40)", maxLength: 40, nullable: true), ValorUnit = table.Column(type: "numeric", nullable: true), ValorDaNf = table.Column(type: "numeric", nullable: true), DataDaNf = table.Column(type: "timestamp with time zone", nullable: true), DataDoRecebimento = table.Column(type: "timestamp with time zone", nullable: true), Quantidade = table.Column(type: "integer", nullable: true), IsResumo = table.Column(type: "boolean", nullable: false), 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_ControleRecebidoLines", x => x.Id); }); migrationBuilder.CreateIndex( name: "IX_ChipVirgemLines_Item", table: "ChipVirgemLines", column: "Item"); migrationBuilder.CreateIndex( name: "IX_ChipVirgemLines_NumeroDoChip", table: "ChipVirgemLines", column: "NumeroDoChip"); migrationBuilder.CreateIndex( name: "IX_ChipVirgemLines_TenantId", table: "ChipVirgemLines", column: "TenantId"); migrationBuilder.CreateIndex( name: "IX_ControleRecebidoLines_Ano", table: "ControleRecebidoLines", column: "Ano"); migrationBuilder.CreateIndex( name: "IX_ControleRecebidoLines_Chip", table: "ControleRecebidoLines", column: "Chip"); migrationBuilder.CreateIndex( name: "IX_ControleRecebidoLines_DataDaNf", table: "ControleRecebidoLines", column: "DataDaNf"); migrationBuilder.CreateIndex( name: "IX_ControleRecebidoLines_DataDoRecebimento", table: "ControleRecebidoLines", column: "DataDoRecebimento"); migrationBuilder.CreateIndex( name: "IX_ControleRecebidoLines_Item", table: "ControleRecebidoLines", column: "Item"); migrationBuilder.CreateIndex( name: "IX_ControleRecebidoLines_NotaFiscal", table: "ControleRecebidoLines", column: "NotaFiscal"); migrationBuilder.CreateIndex( name: "IX_ControleRecebidoLines_NumeroDaLinha", table: "ControleRecebidoLines", column: "NumeroDaLinha"); migrationBuilder.CreateIndex( name: "IX_ControleRecebidoLines_Serial", table: "ControleRecebidoLines", column: "Serial"); migrationBuilder.CreateIndex( name: "IX_ControleRecebidoLines_TenantId", table: "ControleRecebidoLines", column: "TenantId"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "ChipVirgemLines"); migrationBuilder.DropTable( name: "ControleRecebidoLines"); } } }