1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
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<Guid>(nullable: false),
Created = table.Column<DateTime>(nullable: false),
CreatedBy = table.Column<Guid>(nullable: true),
Hidden = table.Column<bool>(nullable: false),
Name = table.Column<string>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Categories", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Payees",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
Created = table.Column<DateTime>(nullable: false),
CreatedBy = table.Column<Guid>(nullable: true),
Hidden = table.Column<bool>(nullable: false),
Name = table.Column<string>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Payees", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Transactions",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
Created = table.Column<DateTime>(nullable: false),
CreatedBy = table.Column<Guid>(nullable: true),
Hidden = table.Column<bool>(nullable: false),
Tags = table.Column<string>(nullable: true),
Note = table.Column<string>(nullable: true),
Date = table.Column<DateTime>(nullable: false),
Amount = table.Column<double>(nullable: false),
PayeeId = table.Column<Guid>(nullable: false),
CategoryId = table.Column<Guid>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Transactions", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Users",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
Created = table.Column<DateTime>(nullable: false),
CreatedBy = table.Column<Guid>(nullable: true),
Hidden = table.Column<bool>(nullable: false),
Password = table.Column<string>(nullable: true),
Username = table.Column<string>(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");
}
}
}
|