ソースを参照

Added search log migration

master
Kobus 5年前
コミット
3cfc67335d

+ 1030
- 0
UnivateProperties_API/Migrations/20190910092816_GeorgeNew.Designer.cs
ファイル差分が大きすぎるため省略します
ファイルの表示


+ 53
- 0
UnivateProperties_API/Migrations/20190910092816_GeorgeNew.cs ファイルの表示

@@ -0,0 +1,53 @@
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 GeorgeNew : Migration
8
+    {
9
+        protected override void Up(MigrationBuilder migrationBuilder)
10
+        {
11
+            migrationBuilder.DropColumn(
12
+                name: "CreatedBy",
13
+                table: "Properties");
14
+
15
+            migrationBuilder.AddColumn<int>(
16
+                name: "GCRecord",
17
+                table: "Properties",
18
+                nullable: true);
19
+
20
+            migrationBuilder.CreateTable(
21
+                name: "SearchLogs",
22
+                columns: table => new
23
+                {
24
+                    Id = table.Column<int>(nullable: false)
25
+                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn),
26
+                    Created = table.Column<DateTime>(nullable: false),
27
+                    Modified = table.Column<DateTime>(nullable: false),
28
+                    ModifiedBy = table.Column<string>(nullable: true),
29
+                    UserID = table.Column<int>(nullable: true),
30
+                    Search = table.Column<string>(nullable: true)
31
+                },
32
+                constraints: table =>
33
+                {
34
+                    table.PrimaryKey("PK_SearchLogs", x => x.Id);
35
+                });
36
+        }
37
+
38
+        protected override void Down(MigrationBuilder migrationBuilder)
39
+        {
40
+            migrationBuilder.DropTable(
41
+                name: "SearchLogs");
42
+
43
+            migrationBuilder.DropColumn(
44
+                name: "GCRecord",
45
+                table: "Properties");
46
+
47
+            migrationBuilder.AddColumn<string>(
48
+                name: "CreatedBy",
49
+                table: "Properties",
50
+                nullable: true);
51
+        }
52
+    }
53
+}

+ 22
- 2
UnivateProperties_API/Migrations/DataContextModelSnapshot.cs ファイルの表示

@@ -153,6 +153,26 @@ namespace UnivateProperties_API.Migrations
153 153
                     b.ToTable("Hosts");
154 154
                 });
155 155
 
156
+            modelBuilder.Entity("UnivateProperties_API.Model.Logging.SearchLog", b =>
157
+                {
158
+                    b.Property<int>("Id")
159
+                        .ValueGeneratedOnAdd();
160
+
161
+                    b.Property<DateTime>("Created");
162
+
163
+                    b.Property<DateTime>("Modified");
164
+
165
+                    b.Property<string>("ModifiedBy");
166
+
167
+                    b.Property<string>("Search");
168
+
169
+                    b.Property<int?>("UserID");
170
+
171
+                    b.HasKey("Id");
172
+
173
+                    b.ToTable("SearchLogs");
174
+                });
175
+
156 176
             modelBuilder.Entity("UnivateProperties_API.Model.Misc.Address", b =>
157 177
                 {
158 178
                     b.Property<int>("Id")
@@ -264,10 +284,10 @@ namespace UnivateProperties_API.Migrations
264 284
 
265 285
                     b.Property<DateTime>("Created");
266 286
 
267
-                    b.Property<string>("CreatedBy");
268
-
269 287
                     b.Property<string>("Description");
270 288
 
289
+                    b.Property<int?>("GCRecord");
290
+
271 291
                     b.Property<bool>("IsSale");
272 292
 
273 293
                     b.Property<DateTime>("Modified");

読み込み中…
キャンセル
保存