using System; using Microsoft.EntityFrameworkCore.Migrations; namespace Dough.Migrations { public partial class INITIAL_MIGRATION : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "Categories", columns: table => new { Id = table.Column(nullable: false), Created = table.Column(nullable: false), CreatedBy = table.Column(nullable: true), Hidden = table.Column(nullable: false), Name = table.Column(nullable: true) }, constraints: table => { table.PrimaryKey("PK_Categories", x => x.Id); }); migrationBuilder.CreateTable( name: "Payees", columns: table => new { Id = table.Column(nullable: false), Created = table.Column(nullable: false), CreatedBy = table.Column(nullable: true), Hidden = table.Column(nullable: false), Name = table.Column(nullable: true) }, constraints: table => { table.PrimaryKey("PK_Payees", x => x.Id); }); migrationBuilder.CreateTable( name: "Transactions", columns: table => new { Id = table.Column(nullable: false), Created = table.Column(nullable: false), CreatedBy = table.Column(nullable: true), Hidden = table.Column(nullable: false), Tags = table.Column(nullable: true), Note = table.Column(nullable: true), Date = table.Column(nullable: false), Amount = table.Column(nullable: false), PayeeId = table.Column(nullable: false), CategoryId = table.Column(nullable: false) }, constraints: table => { table.PrimaryKey("PK_Transactions", x => x.Id); }); migrationBuilder.CreateTable( name: "Users", columns: table => new { Id = table.Column(nullable: false), Created = table.Column(nullable: false), CreatedBy = table.Column(nullable: true), Hidden = table.Column(nullable: false), Password = table.Column(nullable: true), Username = table.Column(nullable: true) }, constraints: table => { table.PrimaryKey("PK_Users", x => x.Id); }); migrationBuilder.InsertData( table: "Users", columns: new[] { "Id", "Created", "CreatedBy", "Hidden", "Password", "Username" }, values: new object[] { new Guid("4fb39ecf-9619-42be-8852-81c48a9a9f72"), new DateTime(2020, 8, 1, 20, 53, 56, 576, DateTimeKind.Utc).AddTicks(931), null, false, "$2b$10$v7e7AJc0atQvyvvwkvXAnuin0m75qRZSxcSAHdDiKcSHuByJpc0zy", "ivar" }); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "Categories"); migrationBuilder.DropTable( name: "Payees"); migrationBuilder.DropTable( name: "Transactions"); migrationBuilder.DropTable( name: "Users"); } } }