Quellcode durchsuchen

Added Migration.

master
George Williams vor 5 Jahren
Ursprung
Commit
3e67e86c8d

+ 1241
- 0
UnivateProperties_API/Migrations/20191031084836_Carousel Stuff.Designer.cs
Datei-Diff unterdrückt, da er zu groß ist
Datei anzeigen


+ 38
- 0
UnivateProperties_API/Migrations/20191031084836_Carousel Stuff.cs Datei anzeigen

@@ -0,0 +1,38 @@
1
+using System;
2
+using Microsoft.EntityFrameworkCore.Migrations;
3
+using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
4
+
5
+namespace UnivateProperties_API.Migrations
6
+{
7
+    public partial class CarouselStuff : Migration
8
+    {
9
+        protected override void Up(MigrationBuilder migrationBuilder)
10
+        {
11
+            migrationBuilder.CreateTable(
12
+                name: "Carousel",
13
+                columns: table => new
14
+                {
15
+                    Id = table.Column<int>(nullable: false)
16
+                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn),
17
+                    Created = table.Column<DateTime>(nullable: false),
18
+                    Modified = table.Column<DateTime>(nullable: false),
19
+                    ModifiedBy = table.Column<string>(nullable: true),
20
+                    IsDeleted = table.Column<bool>(nullable: false),
21
+                    PropertyId = table.Column<int>(nullable: false),
22
+                    TimeshareId = table.Column<int>(nullable: false),
23
+                    Header = table.Column<string>(nullable: true),
24
+                    Image = table.Column<string>(nullable: true)
25
+                },
26
+                constraints: table =>
27
+                {
28
+                    table.PrimaryKey("PK_Carousel", x => x.Id);
29
+                });
30
+        }
31
+
32
+        protected override void Down(MigrationBuilder migrationBuilder)
33
+        {
34
+            migrationBuilder.DropTable(
35
+                name: "Carousel");
36
+        }
37
+    }
38
+}

+ 26
- 0
UnivateProperties_API/Migrations/DataContextModelSnapshot.cs Datei anzeigen

@@ -267,6 +267,32 @@ namespace UnivateProperties_API.Migrations
267 267
                     b.ToTable("Addresses");
268 268
                 });
269 269
 
270
+            modelBuilder.Entity("UnivateProperties_API.Model.Misc.Carousel", b =>
271
+                {
272
+                    b.Property<int>("Id")
273
+                        .ValueGeneratedOnAdd();
274
+
275
+                    b.Property<DateTime>("Created");
276
+
277
+                    b.Property<string>("Header");
278
+
279
+                    b.Property<string>("Image");
280
+
281
+                    b.Property<bool>("IsDeleted");
282
+
283
+                    b.Property<DateTime>("Modified");
284
+
285
+                    b.Property<string>("ModifiedBy");
286
+
287
+                    b.Property<int>("PropertyId");
288
+
289
+                    b.Property<int>("TimeshareId");
290
+
291
+                    b.HasKey("Id");
292
+
293
+                    b.ToTable("Carousel");
294
+                });
295
+
270 296
             modelBuilder.Entity("UnivateProperties_API.Model.Misc.Location", b =>
271 297
                 {
272 298
                     b.Property<int>("Id")

Laden…
Abbrechen
Speichern