using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace ERP.TallerAutomotriz.Infrastructure.Persistence.Migrations
{
///
public partial class InitialCreate : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.EnsureSchema(
name: "inventario");
migrationBuilder.EnsureSchema(
name: "ventas");
migrationBuilder.EnsureSchema(
name: "taller");
migrationBuilder.EnsureSchema(
name: "crm");
migrationBuilder.EnsureSchema(
name: "personal");
migrationBuilder.EnsureSchema(
name: "compras");
migrationBuilder.EnsureSchema(
name: "sistema");
migrationBuilder.EnsureSchema(
name: "seguridad");
migrationBuilder.CreateTable(
name: "Almacenes",
schema: "inventario",
columns: table => new
{
Id = table.Column(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Codigo = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: false),
Nombre = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false),
Direccion = table.Column(type: "nvarchar(max)", nullable: true),
Responsable = table.Column(type: "nvarchar(max)", nullable: true),
EsPrincipal = table.Column(type: "bit", nullable: false),
FechaCreacion = table.Column(type: "datetime2", nullable: false),
CreadoPor = table.Column(type: "nvarchar(max)", nullable: true),
FechaModificacion = table.Column(type: "datetime2", nullable: true),
ModificadoPor = table.Column(type: "nvarchar(max)", nullable: true),
Activo = table.Column(type: "bit", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Almacenes", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Cajas",
schema: "ventas",
columns: table => new
{
Id = table.Column(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Codigo = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: false),
Nombre = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false),
Abierta = table.Column(type: "bit", nullable: false),
FechaApertura = table.Column(type: "datetime2", nullable: true),
FechaCierre = table.Column(type: "datetime2", nullable: true),
MontoApertura = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false),
MontoCierre = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false),
UsuarioApertura = table.Column(type: "nvarchar(max)", nullable: true),
UsuarioCierre = table.Column(type: "nvarchar(max)", nullable: true),
Observaciones = table.Column(type: "nvarchar(max)", nullable: true),
FechaCreacion = table.Column(type: "datetime2", nullable: false),
CreadoPor = table.Column(type: "nvarchar(max)", nullable: true),
FechaModificacion = table.Column(type: "datetime2", nullable: true),
ModificadoPor = table.Column(type: "nvarchar(max)", nullable: true),
Activo = table.Column(type: "bit", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Cajas", x => x.Id);
});
migrationBuilder.CreateTable(
name: "CategoriasRepuesto",
schema: "inventario",
columns: table => new
{
Id = table.Column(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Nombre = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false),
Descripcion = table.Column(type: "nvarchar(max)", nullable: true),
CategoriaPadreId = table.Column(type: "int", nullable: true),
FechaCreacion = table.Column(type: "datetime2", nullable: false),
CreadoPor = table.Column(type: "nvarchar(max)", nullable: true),
FechaModificacion = table.Column(type: "datetime2", nullable: true),
ModificadoPor = table.Column(type: "nvarchar(max)", nullable: true),
Activo = table.Column(type: "bit", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_CategoriasRepuesto", x => x.Id);
table.ForeignKey(
name: "FK_CategoriasRepuesto_CategoriasRepuesto_CategoriaPadreId",
column: x => x.CategoriaPadreId,
principalSchema: "inventario",
principalTable: "CategoriasRepuesto",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "CategoriasServicio",
schema: "taller",
columns: table => new
{
Id = table.Column(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Nombre = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false),
Descripcion = table.Column(type: "nvarchar(max)", nullable: true),
CategoriaPadreId = table.Column(type: "int", nullable: true),
FechaCreacion = table.Column(type: "datetime2", nullable: false),
CreadoPor = table.Column(type: "nvarchar(max)", nullable: true),
FechaModificacion = table.Column(type: "datetime2", nullable: true),
ModificadoPor = table.Column(type: "nvarchar(max)", nullable: true),
Activo = table.Column(type: "bit", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_CategoriasServicio", x => x.Id);
table.ForeignKey(
name: "FK_CategoriasServicio_CategoriasServicio_CategoriaPadreId",
column: x => x.CategoriaPadreId,
principalSchema: "taller",
principalTable: "CategoriasServicio",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "Clientes",
schema: "crm",
columns: table => new
{
Id = table.Column(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Codigo = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: false),
Tipo = table.Column(type: "int", nullable: false),
NombreRazonSocial = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false),
NombreComercial = table.Column(type: "nvarchar(max)", nullable: true),
DocumentoIdentidad = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: false),
Direccion = table.Column(type: "nvarchar(max)", nullable: true),
Ciudad = table.Column(type: "nvarchar(max)", nullable: true),
TelefonoPrincipal = table.Column(type: "nvarchar(max)", nullable: true),
TelefonoSecundario = table.Column(type: "nvarchar(max)", nullable: true),
Email = table.Column(type: "nvarchar(150)", maxLength: 150, nullable: true),
ContactoPrincipal = table.Column(type: "nvarchar(max)", nullable: true),
CargoContacto = table.Column(type: "nvarchar(max)", nullable: true),
Notas = table.Column(type: "nvarchar(max)", nullable: true),
RecibeNotificaciones = table.Column(type: "bit", nullable: false),
TecnicoConfianzaId = table.Column(type: "int", nullable: true),
SaldoPendiente = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false),
LimiteCredito = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false),
FechaCreacion = table.Column(type: "datetime2", nullable: false),
CreadoPor = table.Column(type: "nvarchar(max)", nullable: true),
FechaModificacion = table.Column(type: "datetime2", nullable: true),
ModificadoPor = table.Column(type: "nvarchar(max)", nullable: true),
Activo = table.Column(type: "bit", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Clientes", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Empresas",
schema: "sistema",
columns: table => new
{
Id = table.Column(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
RazonSocial = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false),
NombreComercial = table.Column(type: "nvarchar(max)", nullable: true),
DocumentoFiscal = table.Column(type: "nvarchar(max)", nullable: false),
Direccion = table.Column(type: "nvarchar(max)", nullable: true),
Telefono = table.Column(type: "nvarchar(max)", nullable: true),
Email = table.Column(type: "nvarchar(max)", nullable: true),
Sitio = table.Column(type: "nvarchar(max)", nullable: true),
UrlLogo = table.Column(type: "nvarchar(max)", nullable: true),
Moneda = table.Column(type: "nvarchar(max)", nullable: false),
SimboloMoneda = table.Column(type: "nvarchar(max)", nullable: false),
PorcentajeImpuesto = table.Column(type: "decimal(5,2)", precision: 5, scale: 2, nullable: false),
NombreImpuesto = table.Column(type: "nvarchar(max)", nullable: false),
Pais = table.Column(type: "nvarchar(max)", nullable: false),
FechaCreacion = table.Column(type: "datetime2", nullable: false),
CreadoPor = table.Column(type: "nvarchar(max)", nullable: true),
FechaModificacion = table.Column(type: "datetime2", nullable: true),
ModificadoPor = table.Column(type: "nvarchar(max)", nullable: true),
Activo = table.Column(type: "bit", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Empresas", x => x.Id);
});
migrationBuilder.CreateTable(
name: "LogsAuditoria",
schema: "sistema",
columns: table => new
{
Id = table.Column(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Fecha = table.Column(type: "datetime2", nullable: false),
Usuario = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false),
Accion = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false),
Entidad = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false),
EntidadId = table.Column(type: "nvarchar(max)", nullable: true),
Detalle = table.Column(type: "nvarchar(max)", nullable: true),
IpOrigen = table.Column(type: "nvarchar(max)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_LogsAuditoria", x => x.Id);
});
migrationBuilder.CreateTable(
name: "NotificacionesEnviadas",
schema: "sistema",
columns: table => new
{
Id = table.Column(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Fecha = table.Column(type: "datetime2", nullable: false),
Tipo = table.Column(type: "int", nullable: false),
Destinatario = table.Column(type: "nvarchar(max)", nullable: true),
Asunto = table.Column(type: "nvarchar(max)", nullable: true),
Cuerpo = table.Column(type: "nvarchar(max)", nullable: true),
Enviada = table.Column(type: "bit", nullable: false),
Error = table.Column(type: "nvarchar(max)", nullable: true),
PlantillaCodigo = table.Column(type: "nvarchar(max)", nullable: true),
ReferenciaTipo = table.Column(type: "nvarchar(max)", nullable: true),
ReferenciaId = table.Column(type: "int", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_NotificacionesEnviadas", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Parametros",
schema: "sistema",
columns: table => new
{
Id = table.Column(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Clave = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false),
Valor = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: false),
Descripcion = table.Column(type: "nvarchar(max)", nullable: true),
Categoria = table.Column(type: "nvarchar(max)", nullable: false),
FechaCreacion = table.Column(type: "datetime2", nullable: false),
CreadoPor = table.Column(type: "nvarchar(max)", nullable: true),
FechaModificacion = table.Column(type: "datetime2", nullable: true),
ModificadoPor = table.Column(type: "nvarchar(max)", nullable: true),
Activo = table.Column(type: "bit", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Parametros", x => x.Id);
});
migrationBuilder.CreateTable(
name: "PlantillasNotificacion",
schema: "sistema",
columns: table => new
{
Id = table.Column(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Codigo = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false),
Nombre = table.Column(type: "nvarchar(150)", maxLength: 150, nullable: false),
Tipo = table.Column(type: "int", nullable: false),
Asunto = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false),
Cuerpo = table.Column(type: "nvarchar(max)", nullable: false),
Variables = table.Column(type: "nvarchar(max)", nullable: true),
FechaCreacion = table.Column(type: "datetime2", nullable: false),
CreadoPor = table.Column(type: "nvarchar(max)", nullable: true),
FechaModificacion = table.Column(type: "datetime2", nullable: true),
ModificadoPor = table.Column(type: "nvarchar(max)", nullable: true),
Activo = table.Column(type: "bit", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_PlantillasNotificacion", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Proveedores",
schema: "compras",
columns: table => new
{
Id = table.Column(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Codigo = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: false),
RazonSocial = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false),
NombreComercial = table.Column(type: "nvarchar(max)", nullable: true),
DocumentoIdentidad = table.Column(type: "nvarchar(max)", nullable: false),
Direccion = table.Column(type: "nvarchar(max)", nullable: true),
Telefono = table.Column(type: "nvarchar(max)", nullable: true),
Email = table.Column(type: "nvarchar(max)", nullable: true),
Contacto = table.Column(type: "nvarchar(max)", nullable: true),
DiasCredito = table.Column(type: "int", nullable: false),
DiasEntrega = table.Column(type: "int", nullable: false),
CalificacionPrecio = table.Column(type: "decimal(3,1)", precision: 3, scale: 1, nullable: false),
CalificacionTiempo = table.Column(type: "decimal(3,1)", precision: 3, scale: 1, nullable: false),
CalificacionCalidad = table.Column(type: "decimal(3,1)", precision: 3, scale: 1, nullable: false),
Notas = table.Column(type: "nvarchar(max)", nullable: true),
FechaCreacion = table.Column(type: "datetime2", nullable: false),
CreadoPor = table.Column(type: "nvarchar(max)", nullable: true),
FechaModificacion = table.Column(type: "datetime2", nullable: true),
ModificadoPor = table.Column(type: "nvarchar(max)", nullable: true),
Activo = table.Column(type: "bit", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Proveedores", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Roles",
schema: "seguridad",
columns: table => new
{
Id = table.Column(type: "nvarchar(450)", nullable: false),
Descripcion = table.Column(type: "nvarchar(max)", nullable: true),
Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true),
NormalizedName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true),
ConcurrencyStamp = table.Column(type: "nvarchar(max)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Roles", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Sucursales",
schema: "sistema",
columns: table => new
{
Id = table.Column(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Codigo = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: false),
Nombre = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false),
Direccion = table.Column(type: "nvarchar(max)", nullable: true),
Telefono = table.Column(type: "nvarchar(max)", nullable: true),
Responsable = table.Column(type: "nvarchar(max)", nullable: true),
EsPrincipal = table.Column(type: "bit", nullable: false),
FechaCreacion = table.Column(type: "datetime2", nullable: false),
CreadoPor = table.Column(type: "nvarchar(max)", nullable: true),
FechaModificacion = table.Column(type: "datetime2", nullable: true),
ModificadoPor = table.Column(type: "nvarchar(max)", nullable: true),
Activo = table.Column(type: "bit", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Sucursales", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Tecnicos",
schema: "personal",
columns: table => new
{
Id = table.Column(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Codigo = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: false),
UsuarioIdentityId = table.Column(type: "nvarchar(max)", nullable: true),
Nombres = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false),
Apellidos = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false),
DocumentoIdentidad = table.Column(type: "nvarchar(max)", nullable: false),
Telefono = table.Column(type: "nvarchar(max)", nullable: true),
Email = table.Column(type: "nvarchar(max)", nullable: true),
Direccion = table.Column(type: "nvarchar(max)", nullable: true),
FechaIngreso = table.Column(type: "datetime2", nullable: false),
Nivel = table.Column(type: "int", nullable: false),
TarifaHora = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false),
PorcentajeComision = table.Column(type: "decimal(5,2)", precision: 5, scale: 2, nullable: false),
Especialidades = table.Column(type: "nvarchar(max)", nullable: true),
UrlFoto = table.Column(type: "nvarchar(max)", nullable: true),
FechaCreacion = table.Column(type: "datetime2", nullable: false),
CreadoPor = table.Column(type: "nvarchar(max)", nullable: true),
FechaModificacion = table.Column(type: "datetime2", nullable: true),
ModificadoPor = table.Column(type: "nvarchar(max)", nullable: true),
Activo = table.Column(type: "bit", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Tecnicos", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Usuarios",
schema: "seguridad",
columns: table => new
{
Id = table.Column(type: "nvarchar(450)", nullable: false),
Nombres = table.Column(type: "nvarchar(max)", nullable: true),
Apellidos = table.Column(type: "nvarchar(max)", nullable: true),
UrlAvatar = table.Column(type: "nvarchar(max)", nullable: true),
Activo = table.Column(type: "bit", nullable: false),
FechaCreacion = table.Column(type: "datetime2", nullable: false),
UltimoAcceso = table.Column(type: "datetime2", nullable: true),
TecnicoId = table.Column(type: "int", nullable: true),
SucursalId = table.Column(type: "int", nullable: true),
UserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true),
NormalizedUserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true),
Email = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true),
NormalizedEmail = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true),
EmailConfirmed = table.Column(type: "bit", nullable: false),
PasswordHash = table.Column(type: "nvarchar(max)", nullable: true),
SecurityStamp = table.Column(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column(type: "nvarchar(max)", nullable: true),
PhoneNumber = table.Column(type: "nvarchar(max)", nullable: true),
PhoneNumberConfirmed = table.Column(type: "bit", nullable: false),
TwoFactorEnabled = table.Column(type: "bit", nullable: false),
LockoutEnd = table.Column(type: "datetimeoffset", nullable: true),
LockoutEnabled = table.Column(type: "bit", nullable: false),
AccessFailedCount = table.Column(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Usuarios", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Repuestos",
schema: "inventario",
columns: table => new
{
Id = table.Column(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
CodigoInterno = table.Column(type: "nvarchar(30)", maxLength: 30, nullable: false),
CodigoOEM = table.Column(type: "nvarchar(450)", nullable: true),
CodigoBarras = table.Column(type: "nvarchar(450)", nullable: true),
Descripcion = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false),
DescripcionLarga = table.Column(type: "nvarchar(max)", nullable: true),
CategoriaId = table.Column(type: "int", nullable: true),
UnidadMedida = table.Column(type: "nvarchar(max)", nullable: false),
StockActual = table.Column(type: "decimal(18,4)", precision: 18, scale: 4, nullable: false),
StockMinimo = table.Column(type: "decimal(18,4)", precision: 18, scale: 4, nullable: false),
StockMaximo = table.Column(type: "decimal(18,4)", precision: 18, scale: 4, nullable: false),
PrecioVenta = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false),
CostoPromedio = table.Column(type: "decimal(18,4)", precision: 18, scale: 4, nullable: false),
CostoUltimo = table.Column(type: "decimal(18,4)", precision: 18, scale: 4, nullable: false),
MetodoCosteo = table.Column(type: "int", nullable: false),
Ubicacion = table.Column(type: "nvarchar(max)", nullable: true),
ManejaLote = table.Column(type: "bit", nullable: false),
ManejaSerie = table.Column(type: "bit", nullable: false),
TieneGarantia = table.Column(type: "bit", nullable: false),
MesesGarantia = table.Column(type: "int", nullable: true),
UrlImagen = table.Column(type: "nvarchar(max)", nullable: true),
FechaCreacion = table.Column(type: "datetime2", nullable: false),
CreadoPor = table.Column(type: "nvarchar(max)", nullable: true),
FechaModificacion = table.Column(type: "datetime2", nullable: true),
ModificadoPor = table.Column(type: "nvarchar(max)", nullable: true),
Activo = table.Column(type: "bit", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Repuestos", x => x.Id);
table.ForeignKey(
name: "FK_Repuestos_CategoriasRepuesto_CategoriaId",
column: x => x.CategoriaId,
principalSchema: "inventario",
principalTable: "CategoriasRepuesto",
principalColumn: "Id",
onDelete: ReferentialAction.SetNull);
});
migrationBuilder.CreateTable(
name: "Servicios",
schema: "taller",
columns: table => new
{
Id = table.Column(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Codigo = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: false),
Nombre = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false),
Descripcion = table.Column(type: "nvarchar(max)", nullable: true),
Tipo = table.Column(type: "int", nullable: false),
CategoriaId = table.Column(type: "int", nullable: true),
PrecioEstandar = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false),
TiempoEstimadoMinutos = table.Column(type: "int", nullable: false),
CostoManoObra = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false),
EsPaquete = table.Column(type: "bit", nullable: false),
Notas = table.Column(type: "nvarchar(max)", nullable: true),
FechaCreacion = table.Column(type: "datetime2", nullable: false),
CreadoPor = table.Column(type: "nvarchar(max)", nullable: true),
FechaModificacion = table.Column(type: "datetime2", nullable: true),
ModificadoPor = table.Column(type: "nvarchar(max)", nullable: true),
Activo = table.Column(type: "bit", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Servicios", x => x.Id);
table.ForeignKey(
name: "FK_Servicios_CategoriasServicio_CategoriaId",
column: x => x.CategoriaId,
principalSchema: "taller",
principalTable: "CategoriasServicio",
principalColumn: "Id");
});
migrationBuilder.CreateTable(
name: "Vehiculos",
schema: "crm",
columns: table => new
{
Id = table.Column(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
ClienteId = table.Column(type: "int", nullable: false),
Placa = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: false),
VIN = table.Column(type: "nvarchar(450)", nullable: true),
Marca = table.Column