99 lines
5.9 KiB
C#
99 lines
5.9 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Metadata;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
namespace GWMS.Data.Migrations
|
|
{
|
|
public partial class RemoveLocalUser : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "Users");
|
|
|
|
migrationBuilder.UpdateData(
|
|
table: "Transporter",
|
|
keyColumn: "TransporterId",
|
|
keyValue: 1,
|
|
column: "PositionUpdated",
|
|
value: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
|
|
|
|
migrationBuilder.UpdateData(
|
|
table: "Transporter",
|
|
keyColumn: "TransporterId",
|
|
keyValue: 2,
|
|
column: "PositionUpdated",
|
|
value: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.CreateTable(
|
|
name: "Users",
|
|
columns: table => new
|
|
{
|
|
UserId = table.Column<int>(type: "int", nullable: false)
|
|
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
|
AuthKey = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true)
|
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
Email = table.Column<string>(type: "varchar(250)", maxLength: 250, nullable: true)
|
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
Firstname = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true)
|
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
IsActive = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
|
Lang = table.Column<string>(type: "varchar(10)", maxLength: 10, nullable: true)
|
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
Lastname = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true)
|
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
Livello = table.Column<int>(type: "int", nullable: false),
|
|
MaskPlantId = table.Column<int>(type: "int", nullable: false),
|
|
MaskSupplierId = table.Column<int>(type: "int", nullable: false),
|
|
MaskTranspId = table.Column<int>(type: "int", nullable: false),
|
|
SaltPasswd = table.Column<string>(type: "varchar(250)", maxLength: 250, nullable: true)
|
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
UserName = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true)
|
|
.Annotation("MySql:CharSet", "utf8mb4")
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_Users", x => x.UserId);
|
|
})
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.UpdateData(
|
|
table: "Transporter",
|
|
keyColumn: "TransporterId",
|
|
keyValue: 1,
|
|
column: "PositionUpdated",
|
|
value: new DateTime(2021, 8, 9, 16, 36, 52, 691, DateTimeKind.Local).AddTicks(9092));
|
|
|
|
migrationBuilder.UpdateData(
|
|
table: "Transporter",
|
|
keyColumn: "TransporterId",
|
|
keyValue: 2,
|
|
column: "PositionUpdated",
|
|
value: new DateTime(2021, 8, 9, 16, 36, 52, 691, DateTimeKind.Local).AddTicks(9470));
|
|
|
|
migrationBuilder.InsertData(
|
|
table: "Users",
|
|
columns: new[] { "UserId", "AuthKey", "Email", "Firstname", "IsActive", "Lang", "Lastname", "Livello", "MaskPlantId", "MaskSupplierId", "MaskTranspId", "SaltPasswd", "UserName" },
|
|
values: new object[,]
|
|
{
|
|
{ 1, "th1sIsTh3R1vrOfThNgt98", "samuele@steamware.net", "Samuele", true, "IT", "Locatelli", 1, 0, 0, 0, "", "samuele.locatelli" },
|
|
{ 2, "th1sIsTh3R1vrOfThNgt91", "giancarlo@steamware.net", "Giancarlo", true, "IT", "Rottoli", 1, 0, 0, 0, "", "giancarlo.rottoli" },
|
|
{ 3, "th1sIsTh3R1vrOfThNgt93", "info@steamware.net", "Steamware", true, "IT", "Admin", 1, 0, 0, 0, "", "steamw.admin" },
|
|
{ 4, "th1sIsTh3R1vrOfThNgt97", "a.pizzaferri@pizzaferripetroli.it", "Angelo", true, "IT", "Pizzaferri", 2, 0, 0, 0, "", "angelo.pizzaferri" },
|
|
{ 5, "th1sIsTh3R1vrOfThNgt99", "andrei.valeanu@winnlab.it", "Andrei", true, "IT", "Valeanu", 2, 0, 0, 0, "", "andrei.valeanu" },
|
|
{ 6, "th1sIsTh3R1vrOfThNgt92", "info@steamware.net", "User", true, "IT", "LIQUIGAS", 4, 0, 1, 0, "", "liquigas.user01" },
|
|
{ 7, "th1sIsTh3R1vrOfThNgt94", "info@steamware.net", "User", true, "IT", "VULKANGAS", 4, 0, 2, 0, "", "vulkangas.user01" },
|
|
{ 8, "th1sIsTh3R1vrOfThNgt95", "info@steamware.net", "User", true, "IT", "LEVORATO", 4, 0, 0, 1, "", "levorato.user01" },
|
|
{ 9, "th1sIsTh3R1vrOfThNgt96", "info@steamware.net", "User", true, "IT", "TRAFFIK", 4, 0, 0, 2, "", "traffik.user01" },
|
|
{ 10, "th1sIsTh3R1vrOfThNgt96", "info@steamware.net", "Stazione", true, "IT", "Collecchio", 3, 1, 0, 0, "", "piz03.user01" },
|
|
{ 11, "th1sIsTh3R1vrOfThNgt96", "info@steamware.net", "Stazione", true, "IT", "Noceto", 3, 2, 0, 0, "", "piz04.user01" },
|
|
{ 12, "th1sIsTh3R1vrOfThNgt96", "info@steamware.net", "Stazione", true, "IT", "Baganzola", 3, 3, 0, 0, "", "piz05.user01" },
|
|
{ 13, "th1sIsTh3R1vrOfThNgt96", "info@steamware.net", "Stazione", true, "IT", "Pilastrello", 3, 4, 0, 0, "", "piz08.user01" }
|
|
});
|
|
}
|
|
}
|
|
}
|