using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace timetracker.Data.Migrations { /// public partial class AddMultiUser : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn( name: "UserId", table: "WorkDays", type: "INTEGER", nullable: false, defaultValue: 0); migrationBuilder.AddColumn( name: "UserId", table: "VacationDays", type: "INTEGER", nullable: false, defaultValue: 0); migrationBuilder.AddColumn( name: "UserId", table: "AppSettings", type: "INTEGER", nullable: false, defaultValue: 0); migrationBuilder.CreateTable( name: "Users", columns: table => new { Id = table.Column(type: "INTEGER", nullable: false) .Annotation("Sqlite:Autoincrement", true), Username = table.Column(type: "TEXT", nullable: false), PasswordHash = table.Column(type: "TEXT", nullable: false), PasswordSalt = table.Column(type: "TEXT", nullable: false) }, constraints: table => { table.PrimaryKey("PK_Users", x => x.Id); }); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "Users"); migrationBuilder.DropColumn( name: "UserId", table: "WorkDays"); migrationBuilder.DropColumn( name: "UserId", table: "VacationDays"); migrationBuilder.DropColumn( name: "UserId", table: "AppSettings"); } } }