using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace StandManager.Infrastructure.Migrations { /// public partial class Initial : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "ApplicationUsers", columns: table => new { Id = table.Column(type: "nvarchar(450)", nullable: false), UserName = table.Column(type: "nvarchar(max)", nullable: true), NormalizedUserName = table.Column(type: "nvarchar(max)", nullable: true), Email = table.Column(type: "nvarchar(max)", nullable: true), NormalizedEmail = table.Column(type: "nvarchar(max)", 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_ApplicationUsers", x => x.Id); }); migrationBuilder.CreateTable( name: "Utente", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), Username = table.Column(type: "nvarchar(max)", nullable: false), Email = table.Column(type: "nvarchar(max)", nullable: false), Password = table.Column(type: "nvarchar(max)", nullable: false), Nome = table.Column(type: "nvarchar(max)", nullable: false), Cognome = table.Column(type: "nvarchar(max)", nullable: false), DataCreazione = table.Column(type: "datetime2", nullable: false), DataModifica = table.Column(type: "datetime2", nullable: true), Eliminato = table.Column(type: "bit", nullable: false), IdUtenteCreazione = table.Column(type: "uniqueidentifier", nullable: true), IdUtenteModifica = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { table.PrimaryKey("PK_Utente", x => x.Id); table.ForeignKey( name: "FK_Utente_Utente_IdUtenteCreazione", column: x => x.IdUtenteCreazione, principalTable: "Utente", principalColumn: "Id"); table.ForeignKey( name: "FK_Utente_Utente_IdUtenteModifica", column: x => x.IdUtenteModifica, principalTable: "Utente", principalColumn: "Id"); }); migrationBuilder.CreateIndex( name: "IX_Utente_IdUtenteCreazione", table: "Utente", column: "IdUtenteCreazione"); migrationBuilder.CreateIndex( name: "IX_Utente_IdUtenteModifica", table: "Utente", column: "IdUtenteModifica"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "ApplicationUsers"); migrationBuilder.DropTable( name: "Utente"); } } }