From a800b3b9f18ae3e8ab030c30c5d7b6504f2a5ebb Mon Sep 17 00:00:00 2001 From: ivarlovlie Date: Sat, 1 Aug 2020 20:14:34 +0200 Subject: Initial commit --- src/server/Migrations/20200729090558_Initial.cs | 97 +++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 src/server/Migrations/20200729090558_Initial.cs (limited to 'src/server/Migrations/20200729090558_Initial.cs') diff --git a/src/server/Migrations/20200729090558_Initial.cs b/src/server/Migrations/20200729090558_Initial.cs new file mode 100644 index 0000000..5dc0b40 --- /dev/null +++ b/src/server/Migrations/20200729090558_Initial.cs @@ -0,0 +1,97 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +namespace Dough.Migrations +{ + public partial class Initial : 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("193053d0-4292-4dc5-baae-59a920b64891"), new DateTime(2020, 7, 29, 9, 5, 57, 914, DateTimeKind.Utc).AddTicks(3427), null, false, "$2b$10$RFdcYLeqporq94pUIOoJGOPnhUbpV7R4e.2Iz8ot02N2PqeCpDCA6", "ivar" }); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "Categories"); + + migrationBuilder.DropTable( + name: "Payees"); + + migrationBuilder.DropTable( + name: "Transactions"); + + migrationBuilder.DropTable( + name: "Users"); + } + } +} -- cgit v1.3