summaryrefslogtreecommitdiffstats
path: root/src/Migrations/20200205233013_Intial.cs
diff options
context:
space:
mode:
authorivar <i@oiee.no>2025-10-19 23:41:23 +0200
committerivar <i@oiee.no>2025-10-19 23:41:23 +0200
commit3f4c0720e1e3421431e7baa20882a4a4512a7fab (patch)
tree734ca81d7d0841d8863e3f523ebba14c282dc681 /src/Migrations/20200205233013_Intial.cs
downloadfagprove-3f4c0720e1e3421431e7baa20882a4a4512a7fab.tar.xz
fagprove-3f4c0720e1e3421431e7baa20882a4a4512a7fab.zip
InitialHEADmaster
Diffstat (limited to 'src/Migrations/20200205233013_Intial.cs')
-rw-r--r--src/Migrations/20200205233013_Intial.cs93
1 files changed, 93 insertions, 0 deletions
diff --git a/src/Migrations/20200205233013_Intial.cs b/src/Migrations/20200205233013_Intial.cs
new file mode 100644
index 0000000..df385f3
--- /dev/null
+++ b/src/Migrations/20200205233013_Intial.cs
@@ -0,0 +1,93 @@
+using System;
+using Microsoft.EntityFrameworkCore.Migrations;
+
+namespace IOL.Fagprove.Migrations
+{
+ public partial class Intial : Migration
+ {
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.CreateTable(
+ name: "Cabins",
+ columns: table => new
+ {
+ Id = table.Column<Guid>(nullable: false),
+ CreatedUtc = table.Column<DateTime>(nullable: true),
+ CreatedBy = table.Column<Guid>(nullable: true),
+ ModifiedUtc = table.Column<DateTime>(nullable: true),
+ ModifiedBy = table.Column<Guid>(nullable: true),
+ CategoryId = table.Column<Guid>(nullable: false),
+ Name = table.Column<string>(nullable: true),
+ Capacity = table.Column<int>(nullable: true),
+ Price = table.Column<string>(nullable: true),
+ Description = table.Column<string>(nullable: true)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_Cabins", x => x.Id);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "Reservations",
+ columns: table => new
+ {
+ Id = table.Column<Guid>(nullable: false),
+ CreatedUtc = table.Column<DateTime>(nullable: true),
+ CreatedBy = table.Column<Guid>(nullable: true),
+ ModifiedUtc = table.Column<DateTime>(nullable: true),
+ ModifiedBy = table.Column<Guid>(nullable: true),
+ UserId = table.Column<Guid>(nullable: false),
+ ReservationObjectId = table.Column<Guid>(nullable: false),
+ From = table.Column<DateTime>(nullable: false),
+ To = table.Column<DateTime>(nullable: false),
+ Status = table.Column<int>(nullable: false),
+ Extra = table.Column<string>(nullable: true)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_Reservations", x => x.Id);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "Users",
+ columns: table => new
+ {
+ Id = table.Column<Guid>(nullable: false),
+ CreatedUtc = table.Column<DateTime>(nullable: true),
+ CreatedBy = table.Column<Guid>(nullable: true),
+ ModifiedUtc = table.Column<DateTime>(nullable: true),
+ ModifiedBy = table.Column<Guid>(nullable: true),
+ Name = table.Column<string>(nullable: true),
+ Email = table.Column<string>(nullable: true),
+ Password = table.Column<string>(nullable: true),
+ Role = table.Column<int>(nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_Users", x => x.Id);
+ });
+
+ migrationBuilder.InsertData(
+ table: "Users",
+ columns: new[] { "Id", "CreatedBy", "CreatedUtc", "Email", "ModifiedBy", "ModifiedUtc", "Name", "Password", "Role" },
+ values: new object[] { new Guid("d2512ef5-f25e-486d-a94d-1ea43c732195"), null, new DateTime(2020, 2, 5, 23, 30, 13, 316, DateTimeKind.Utc).AddTicks(6060), "ivar@protektit.no", null, null, "Ivar Løvlie Administrator", "9F267A5EC952ABC97CC5B768AEF42337", 1 });
+
+ migrationBuilder.InsertData(
+ table: "Users",
+ columns: new[] { "Id", "CreatedBy", "CreatedUtc", "Email", "ModifiedBy", "ModifiedUtc", "Name", "Password", "Role" },
+ values: new object[] { new Guid("e166655c-cbdc-4128-8e0e-9aeb9c52093d"), null, new DateTime(2020, 2, 5, 23, 30, 13, 320, DateTimeKind.Utc).AddTicks(310), "ivarino@protektit.no", null, null, "Ivar Løvlie Standard", "9F267A5EC952ABC97CC5B768AEF42337", 0 });
+ }
+
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropTable(
+ name: "Cabins");
+
+ migrationBuilder.DropTable(
+ name: "Reservations");
+
+ migrationBuilder.DropTable(
+ name: "Users");
+ }
+ }
+}