Init Commit
This commit is contained in:
@@ -0,0 +1,88 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace GestorFacturas.API.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class InitialCreate : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Configuraciones",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
Periodicidad = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: false),
|
||||
ValorPeriodicidad = table.Column<int>(type: "int", nullable: false),
|
||||
HoraEjecucion = table.Column<string>(type: "nvarchar(10)", maxLength: 10, nullable: false),
|
||||
UltimaEjecucion = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
Estado = table.Column<bool>(type: "bit", nullable: false),
|
||||
EnEjecucion = table.Column<bool>(type: "bit", nullable: false),
|
||||
DBServidor = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
|
||||
DBNombre = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
|
||||
DBUsuario = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
|
||||
DBClave = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
|
||||
DBTrusted = table.Column<bool>(type: "bit", nullable: false),
|
||||
RutaFacturas = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: false),
|
||||
RutaDestino = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: false),
|
||||
SMTPServidor = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
|
||||
SMTPPuerto = table.Column<int>(type: "int", nullable: false),
|
||||
SMTPUsuario = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
|
||||
SMTPClave = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
|
||||
SMTPSSL = table.Column<bool>(type: "bit", nullable: false),
|
||||
SMTPDestinatario = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
|
||||
AvisoMail = table.Column<bool>(type: "bit", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Configuraciones", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Eventos",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
Fecha = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
Mensaje = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
Tipo = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: false),
|
||||
Enviado = table.Column<bool>(type: "bit", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Eventos", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Configuraciones",
|
||||
columns: new[] { "Id", "AvisoMail", "DBClave", "DBNombre", "DBServidor", "DBTrusted", "DBUsuario", "EnEjecucion", "Estado", "HoraEjecucion", "Periodicidad", "RutaDestino", "RutaFacturas", "SMTPClave", "SMTPDestinatario", "SMTPPuerto", "SMTPSSL", "SMTPServidor", "SMTPUsuario", "UltimaEjecucion", "ValorPeriodicidad" },
|
||||
values: new object[] { 1, false, null, "", "TECNICA3", true, null, false, true, "00:00:00", "Dias", "", "", null, null, 587, true, null, null, null, 1 });
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Eventos_Fecha",
|
||||
table: "Eventos",
|
||||
column: "Fecha");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Eventos_Tipo",
|
||||
table: "Eventos",
|
||||
column: "Tipo");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "Configuraciones");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Eventos");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user