using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace Modelo.Migrations { /// public partial class mepaseasqlite : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AlterColumn( name: "ProveedorCuit", table: "Remitos", type: "INTEGER", nullable: false, oldClrType: typeof(long), oldType: "bigint"); migrationBuilder.AlterColumn( name: "Id", table: "Remitos", type: "INTEGER", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("Sqlite:Autoincrement", true) .OldAnnotation("Sqlite:Autoincrement", true); migrationBuilder.AlterColumn( name: "RazonSocial", table: "Proveedores", type: "TEXT", maxLength: 60, nullable: false, oldClrType: typeof(string), oldType: "nvarchar(60)", oldMaxLength: 60); migrationBuilder.AlterColumn( name: "Nombre", table: "Proveedores", type: "TEXT", maxLength: 30, nullable: false, oldClrType: typeof(string), oldType: "nvarchar(30)", oldMaxLength: 30); migrationBuilder.AlterColumn( name: "Habilitado", table: "Proveedores", type: "INTEGER", nullable: false, defaultValue: true, oldClrType: typeof(bool), oldType: "bit", oldDefaultValue: true); migrationBuilder.AlterColumn( name: "Direccion", table: "Proveedores", type: "TEXT", maxLength: 60, nullable: false, oldClrType: typeof(string), oldType: "nvarchar(60)", oldMaxLength: 60); migrationBuilder.AlterColumn( name: "Cuit", table: "Proveedores", type: "INTEGER", nullable: false, oldClrType: typeof(long), oldType: "bigint"); migrationBuilder.AlterColumn( name: "ProductoId", table: "ProductoProveedor", type: "INTEGER", nullable: false, oldClrType: typeof(int), oldType: "int"); migrationBuilder.AlterColumn( name: "ProveedorId", table: "ProductoProveedor", type: "INTEGER", nullable: false, oldClrType: typeof(long), oldType: "bigint"); migrationBuilder.AlterColumn( name: "ProductoId", table: "ProductoCategoria", type: "INTEGER", nullable: false, oldClrType: typeof(int), oldType: "int"); migrationBuilder.AlterColumn( name: "CategoriaId", table: "ProductoCategoria", type: "INTEGER", nullable: false, oldClrType: typeof(int), oldType: "int"); migrationBuilder.AlterColumn( name: "TipoDeEnvase", table: "Producto", type: "TEXT", nullable: true, oldClrType: typeof(string), oldType: "nvarchar(max)", oldNullable: true); migrationBuilder.AlterColumn( name: "Nombre", table: "Producto", type: "TEXT", maxLength: 30, nullable: false, oldClrType: typeof(string), oldType: "nvarchar(30)", oldMaxLength: 30); migrationBuilder.AlterColumn( name: "MesesHastaVencimiento", table: "Producto", type: "INTEGER", nullable: true, oldClrType: typeof(int), oldType: "int", oldNullable: true); migrationBuilder.AlterColumn( name: "MesesHastaConsumoPreferente", table: "Producto", type: "INTEGER", nullable: true, oldClrType: typeof(int), oldType: "int", oldNullable: true); migrationBuilder.AlterColumn( name: "Habilitado", table: "Producto", type: "INTEGER", nullable: false, defaultValue: true, oldClrType: typeof(bool), oldType: "bit", oldDefaultValue: true); migrationBuilder.AlterColumn( name: "EsPerecedero", table: "Producto", type: "INTEGER", nullable: false, oldClrType: typeof(bool), oldType: "bit"); migrationBuilder.AlterColumn( name: "Discriminator", table: "Producto", type: "TEXT", maxLength: 21, nullable: false, oldClrType: typeof(string), oldType: "nvarchar(21)", oldMaxLength: 21); migrationBuilder.AlterColumn( name: "Id", table: "Producto", type: "INTEGER", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("Sqlite:Autoincrement", true) .OldAnnotation("Sqlite:Autoincrement", true); migrationBuilder.AlterColumn( name: "ProveedorCuit", table: "Presupuestos", type: "INTEGER", nullable: false, oldClrType: typeof(long), oldType: "bigint"); migrationBuilder.AlterColumn( name: "IdProveedor", table: "Presupuestos", type: "INTEGER", nullable: false, oldClrType: typeof(long), oldType: "bigint"); migrationBuilder.AlterColumn( name: "Habilitado", table: "Presupuestos", type: "INTEGER", nullable: false, oldClrType: typeof(bool), oldType: "bit"); migrationBuilder.AlterColumn( name: "Fecha", table: "Presupuestos", type: "TEXT", nullable: false, oldClrType: typeof(DateTime), oldType: "datetime2"); migrationBuilder.AlterColumn( name: "Aceptado", table: "Presupuestos", type: "INTEGER", nullable: false, oldClrType: typeof(bool), oldType: "bit"); migrationBuilder.AlterColumn( name: "Id", table: "Presupuestos", type: "INTEGER", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("Sqlite:Autoincrement", true) .OldAnnotation("Sqlite:Autoincrement", true); migrationBuilder.AlterColumn( name: "ProveedorCuit", table: "OrdenDeCompras", type: "INTEGER", nullable: false, oldClrType: typeof(long), oldType: "bigint"); migrationBuilder.AlterColumn( name: "IdProveedor", table: "OrdenDeCompras", type: "INTEGER", nullable: false, oldClrType: typeof(long), oldType: "bigint"); migrationBuilder.AlterColumn( name: "Entregado", table: "OrdenDeCompras", type: "INTEGER", nullable: false, oldClrType: typeof(bool), oldType: "bit"); migrationBuilder.AlterColumn( name: "Id", table: "OrdenDeCompras", type: "INTEGER", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("Sqlite:Autoincrement", true) .OldAnnotation("Sqlite:Autoincrement", true); migrationBuilder.AlterColumn( name: "ProductoId", table: "Lotes", type: "INTEGER", nullable: false, oldClrType: typeof(int), oldType: "int"); migrationBuilder.AlterColumn( name: "Habilitado", table: "Lotes", type: "INTEGER", nullable: false, oldClrType: typeof(bool), oldType: "bit"); migrationBuilder.AlterColumn( name: "Fecha", table: "Lotes", type: "TEXT", nullable: false, oldClrType: typeof(DateTime), oldType: "datetime2"); migrationBuilder.AlterColumn( name: "Cantidad", table: "Lotes", type: "INTEGER", nullable: false, oldClrType: typeof(int), oldType: "int"); migrationBuilder.AlterColumn( name: "IdRemito", table: "Lotes", type: "INTEGER", nullable: false, oldClrType: typeof(int), oldType: "int"); migrationBuilder.AlterColumn( name: "Id", table: "Lotes", type: "INTEGER", nullable: false, oldClrType: typeof(int), oldType: "int"); migrationBuilder.AlterColumn( name: "Total", table: "Facturas", type: "REAL", nullable: false, oldClrType: typeof(double), oldType: "float"); migrationBuilder.AlterColumn( name: "IdCliente", table: "Facturas", type: "INTEGER", nullable: false, oldClrType: typeof(long), oldType: "bigint"); migrationBuilder.AlterColumn( name: "Fecha", table: "Facturas", type: "TEXT", nullable: false, oldClrType: typeof(DateTime), oldType: "datetime2"); migrationBuilder.AlterColumn( name: "ClienteCuit", table: "Facturas", type: "INTEGER", nullable: false, oldClrType: typeof(long), oldType: "bigint"); migrationBuilder.AlterColumn( name: "Id", table: "Facturas", type: "INTEGER", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("Sqlite:Autoincrement", true) .OldAnnotation("Sqlite:Autoincrement", true); migrationBuilder.AlterColumn( name: "ProductoId", table: "DetallesFacturas", type: "INTEGER", nullable: false, oldClrType: typeof(int), oldType: "int"); migrationBuilder.AlterColumn( name: "Cantidad", table: "DetallesFacturas", type: "INTEGER", nullable: false, oldClrType: typeof(int), oldType: "int"); migrationBuilder.AlterColumn( name: "IdFactura", table: "DetallesFacturas", type: "INTEGER", nullable: false, oldClrType: typeof(int), oldType: "int"); migrationBuilder.AlterColumn( name: "Id", table: "DetallesFacturas", type: "INTEGER", nullable: false, oldClrType: typeof(int), oldType: "int"); migrationBuilder.AlterColumn( name: "ProductoId", table: "DetallePresupuestos", type: "INTEGER", nullable: false, oldClrType: typeof(int), oldType: "int"); migrationBuilder.AlterColumn( name: "MontoCUPropuesto", table: "DetallePresupuestos", type: "REAL", nullable: false, oldClrType: typeof(double), oldType: "float"); migrationBuilder.AlterColumn( name: "Cantidad", table: "DetallePresupuestos", type: "INTEGER", nullable: false, oldClrType: typeof(int), oldType: "int"); migrationBuilder.AlterColumn( name: "IdPresupuesto", table: "DetallePresupuestos", type: "INTEGER", nullable: false, oldClrType: typeof(int), oldType: "int"); migrationBuilder.AlterColumn( name: "Id", table: "DetallePresupuestos", type: "INTEGER", nullable: false, oldClrType: typeof(int), oldType: "int"); migrationBuilder.AlterColumn( name: "ProductoId", table: "DetalleOrdenDeCompras", type: "INTEGER", nullable: false, oldClrType: typeof(int), oldType: "int"); migrationBuilder.AlterColumn( name: "MontoCU", table: "DetalleOrdenDeCompras", type: "REAL", nullable: false, oldClrType: typeof(double), oldType: "float"); migrationBuilder.AlterColumn( name: "IdPresupuesto", table: "DetalleOrdenDeCompras", type: "INTEGER", nullable: false, oldClrType: typeof(int), oldType: "int"); migrationBuilder.AlterColumn( name: "Cantidad", table: "DetalleOrdenDeCompras", type: "INTEGER", nullable: false, oldClrType: typeof(int), oldType: "int"); migrationBuilder.AlterColumn( name: "IdOrdenDeCompra", table: "DetalleOrdenDeCompras", type: "INTEGER", nullable: false, oldClrType: typeof(int), oldType: "int"); migrationBuilder.AlterColumn( name: "Id", table: "DetalleOrdenDeCompras", type: "INTEGER", nullable: false, oldClrType: typeof(int), oldType: "int"); migrationBuilder.AlterColumn( name: "Nombre", table: "Clientes", type: "TEXT", maxLength: 30, nullable: false, oldClrType: typeof(string), oldType: "nvarchar(30)", oldMaxLength: 30); migrationBuilder.AlterColumn( name: "Habilitado", table: "Clientes", type: "INTEGER", nullable: false, defaultValue: true, oldClrType: typeof(bool), oldType: "bit", oldDefaultValue: true); migrationBuilder.AlterColumn( name: "Direccion", table: "Clientes", type: "TEXT", maxLength: 50, nullable: false, oldClrType: typeof(string), oldType: "nvarchar(50)", oldMaxLength: 50); migrationBuilder.AlterColumn( name: "Correo", table: "Clientes", type: "TEXT", maxLength: 150, nullable: false, oldClrType: typeof(string), oldType: "nvarchar(150)", oldMaxLength: 150); migrationBuilder.AlterColumn( name: "Apellido", table: "Clientes", type: "TEXT", maxLength: 30, nullable: false, oldClrType: typeof(string), oldType: "nvarchar(30)", oldMaxLength: 30); migrationBuilder.AlterColumn( name: "Cuit", table: "Clientes", type: "INTEGER", nullable: false, oldClrType: typeof(long), oldType: "bigint"); migrationBuilder.AlterColumn( name: "Descripcion", table: "Categoria", type: "TEXT", maxLength: 50, nullable: false, oldClrType: typeof(string), oldType: "nvarchar(50)", oldMaxLength: 50); migrationBuilder.AlterColumn( name: "Id", table: "Categoria", type: "INTEGER", nullable: false, oldClrType: typeof(int), oldType: "int") .Annotation("Sqlite:Autoincrement", true) .OldAnnotation("Sqlite:Autoincrement", true); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.AlterColumn( name: "ProveedorCuit", table: "Remitos", type: "bigint", nullable: false, oldClrType: typeof(long), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "Id", table: "Remitos", type: "int", nullable: false, oldClrType: typeof(int), oldType: "INTEGER") .Annotation("Sqlite:Autoincrement", true) .OldAnnotation("Sqlite:Autoincrement", true); migrationBuilder.AlterColumn( name: "RazonSocial", table: "Proveedores", type: "nvarchar(60)", maxLength: 60, nullable: false, oldClrType: typeof(string), oldType: "TEXT", oldMaxLength: 60); migrationBuilder.AlterColumn( name: "Nombre", table: "Proveedores", type: "nvarchar(30)", maxLength: 30, nullable: false, oldClrType: typeof(string), oldType: "TEXT", oldMaxLength: 30); migrationBuilder.AlterColumn( name: "Habilitado", table: "Proveedores", type: "bit", nullable: false, defaultValue: true, oldClrType: typeof(bool), oldType: "INTEGER", oldDefaultValue: true); migrationBuilder.AlterColumn( name: "Direccion", table: "Proveedores", type: "nvarchar(60)", maxLength: 60, nullable: false, oldClrType: typeof(string), oldType: "TEXT", oldMaxLength: 60); migrationBuilder.AlterColumn( name: "Cuit", table: "Proveedores", type: "bigint", nullable: false, oldClrType: typeof(long), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "ProductoId", table: "ProductoProveedor", type: "int", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "ProveedorId", table: "ProductoProveedor", type: "bigint", nullable: false, oldClrType: typeof(long), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "ProductoId", table: "ProductoCategoria", type: "int", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "CategoriaId", table: "ProductoCategoria", type: "int", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "TipoDeEnvase", table: "Producto", type: "nvarchar(max)", nullable: true, oldClrType: typeof(string), oldType: "TEXT", oldNullable: true); migrationBuilder.AlterColumn( name: "Nombre", table: "Producto", type: "nvarchar(30)", maxLength: 30, nullable: false, oldClrType: typeof(string), oldType: "TEXT", oldMaxLength: 30); migrationBuilder.AlterColumn( name: "MesesHastaVencimiento", table: "Producto", type: "int", nullable: true, oldClrType: typeof(int), oldType: "INTEGER", oldNullable: true); migrationBuilder.AlterColumn( name: "MesesHastaConsumoPreferente", table: "Producto", type: "int", nullable: true, oldClrType: typeof(int), oldType: "INTEGER", oldNullable: true); migrationBuilder.AlterColumn( name: "Habilitado", table: "Producto", type: "bit", nullable: false, defaultValue: true, oldClrType: typeof(bool), oldType: "INTEGER", oldDefaultValue: true); migrationBuilder.AlterColumn( name: "EsPerecedero", table: "Producto", type: "bit", nullable: false, oldClrType: typeof(bool), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "Discriminator", table: "Producto", type: "nvarchar(21)", maxLength: 21, nullable: false, oldClrType: typeof(string), oldType: "TEXT", oldMaxLength: 21); migrationBuilder.AlterColumn( name: "Id", table: "Producto", type: "int", nullable: false, oldClrType: typeof(int), oldType: "INTEGER") .Annotation("Sqlite:Autoincrement", true) .OldAnnotation("Sqlite:Autoincrement", true); migrationBuilder.AlterColumn( name: "ProveedorCuit", table: "Presupuestos", type: "bigint", nullable: false, oldClrType: typeof(long), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "IdProveedor", table: "Presupuestos", type: "bigint", nullable: false, oldClrType: typeof(long), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "Habilitado", table: "Presupuestos", type: "bit", nullable: false, oldClrType: typeof(bool), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "Fecha", table: "Presupuestos", type: "datetime2", nullable: false, oldClrType: typeof(DateTime), oldType: "TEXT"); migrationBuilder.AlterColumn( name: "Aceptado", table: "Presupuestos", type: "bit", nullable: false, oldClrType: typeof(bool), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "Id", table: "Presupuestos", type: "int", nullable: false, oldClrType: typeof(int), oldType: "INTEGER") .Annotation("Sqlite:Autoincrement", true) .OldAnnotation("Sqlite:Autoincrement", true); migrationBuilder.AlterColumn( name: "ProveedorCuit", table: "OrdenDeCompras", type: "bigint", nullable: false, oldClrType: typeof(long), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "IdProveedor", table: "OrdenDeCompras", type: "bigint", nullable: false, oldClrType: typeof(long), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "Entregado", table: "OrdenDeCompras", type: "bit", nullable: false, oldClrType: typeof(bool), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "Id", table: "OrdenDeCompras", type: "int", nullable: false, oldClrType: typeof(int), oldType: "INTEGER") .Annotation("Sqlite:Autoincrement", true) .OldAnnotation("Sqlite:Autoincrement", true); migrationBuilder.AlterColumn( name: "ProductoId", table: "Lotes", type: "int", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "Habilitado", table: "Lotes", type: "bit", nullable: false, oldClrType: typeof(bool), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "Fecha", table: "Lotes", type: "datetime2", nullable: false, oldClrType: typeof(DateTime), oldType: "TEXT"); migrationBuilder.AlterColumn( name: "Cantidad", table: "Lotes", type: "int", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "IdRemito", table: "Lotes", type: "int", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "Id", table: "Lotes", type: "int", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "Total", table: "Facturas", type: "float", nullable: false, oldClrType: typeof(double), oldType: "REAL"); migrationBuilder.AlterColumn( name: "IdCliente", table: "Facturas", type: "bigint", nullable: false, oldClrType: typeof(long), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "Fecha", table: "Facturas", type: "datetime2", nullable: false, oldClrType: typeof(DateTime), oldType: "TEXT"); migrationBuilder.AlterColumn( name: "ClienteCuit", table: "Facturas", type: "bigint", nullable: false, oldClrType: typeof(long), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "Id", table: "Facturas", type: "int", nullable: false, oldClrType: typeof(int), oldType: "INTEGER") .Annotation("Sqlite:Autoincrement", true) .OldAnnotation("Sqlite:Autoincrement", true); migrationBuilder.AlterColumn( name: "ProductoId", table: "DetallesFacturas", type: "int", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "Cantidad", table: "DetallesFacturas", type: "int", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "IdFactura", table: "DetallesFacturas", type: "int", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "Id", table: "DetallesFacturas", type: "int", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "ProductoId", table: "DetallePresupuestos", type: "int", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "MontoCUPropuesto", table: "DetallePresupuestos", type: "float", nullable: false, oldClrType: typeof(double), oldType: "REAL"); migrationBuilder.AlterColumn( name: "Cantidad", table: "DetallePresupuestos", type: "int", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "IdPresupuesto", table: "DetallePresupuestos", type: "int", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "Id", table: "DetallePresupuestos", type: "int", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "ProductoId", table: "DetalleOrdenDeCompras", type: "int", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "MontoCU", table: "DetalleOrdenDeCompras", type: "float", nullable: false, oldClrType: typeof(double), oldType: "REAL"); migrationBuilder.AlterColumn( name: "IdPresupuesto", table: "DetalleOrdenDeCompras", type: "int", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "Cantidad", table: "DetalleOrdenDeCompras", type: "int", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "IdOrdenDeCompra", table: "DetalleOrdenDeCompras", type: "int", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "Id", table: "DetalleOrdenDeCompras", type: "int", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "Nombre", table: "Clientes", type: "nvarchar(30)", maxLength: 30, nullable: false, oldClrType: typeof(string), oldType: "TEXT", oldMaxLength: 30); migrationBuilder.AlterColumn( name: "Habilitado", table: "Clientes", type: "bit", nullable: false, defaultValue: true, oldClrType: typeof(bool), oldType: "INTEGER", oldDefaultValue: true); migrationBuilder.AlterColumn( name: "Direccion", table: "Clientes", type: "nvarchar(50)", maxLength: 50, nullable: false, oldClrType: typeof(string), oldType: "TEXT", oldMaxLength: 50); migrationBuilder.AlterColumn( name: "Correo", table: "Clientes", type: "nvarchar(150)", maxLength: 150, nullable: false, oldClrType: typeof(string), oldType: "TEXT", oldMaxLength: 150); migrationBuilder.AlterColumn( name: "Apellido", table: "Clientes", type: "nvarchar(30)", maxLength: 30, nullable: false, oldClrType: typeof(string), oldType: "TEXT", oldMaxLength: 30); migrationBuilder.AlterColumn( name: "Cuit", table: "Clientes", type: "bigint", nullable: false, oldClrType: typeof(long), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "Descripcion", table: "Categoria", type: "nvarchar(50)", maxLength: 50, nullable: false, oldClrType: typeof(string), oldType: "TEXT", oldMaxLength: 50); migrationBuilder.AlterColumn( name: "Id", table: "Categoria", type: "int", nullable: false, oldClrType: typeof(int), oldType: "INTEGER") .Annotation("Sqlite:Autoincrement", true) .OldAnnotation("Sqlite:Autoincrement", true); } } }