Bladeren bron

Migration as on QA

master
George Williams 5 jaren geleden
bovenliggende
commit
bc36ff4278

+ 8
- 8
UnivateProperties_API/Migrations/20191014123820_Location_Templates.cs Bestand weergeven

@@ -67,11 +67,11 @@ namespace UnivateProperties_API.Migrations
67 67
                 });
68 68
 
69 69
 
70
-            //migrationBuilder.CreateIndex(
71
-            //    name: "IX_Individuals_Telephone_CellNumber_Email",
72
-            //    table: "Individuals",
73
-            //    columns: new[] { "Telephone", "CellNumber", "Email" },
74
-            //    unique: true);
70
+            migrationBuilder.CreateIndex(
71
+                name: "IX_Individuals_Telephone_CellNumber_Email",
72
+                table: "Individuals",
73
+                columns: new[] { "Telephone", "CellNumber", "Email" },
74
+                unique: true);
75 75
 
76 76
             migrationBuilder.CreateIndex(
77 77
                 name: "IX_PlaceHolders_TemplateId",
@@ -94,9 +94,9 @@ namespace UnivateProperties_API.Migrations
94 94
                 name: "IX_Users_Username",
95 95
                 table: "Users");
96 96
 
97
-            //migrationBuilder.DropIndex(
98
-            //    name: "IX_Individuals_Telephone_CellNumber_Email",
99
-            //    table: "Individuals");
97
+            migrationBuilder.DropIndex(
98
+                name: "IX_Individuals_Telephone_CellNumber_Email",
99
+                table: "Individuals");
100 100
         }
101 101
     }
102 102
 }

+ 14
- 14
UnivateProperties_API/Migrations/20191018124608_NewPropertyProperties.cs Bestand weergeven

@@ -6,26 +6,26 @@ namespace UnivateProperties_API.Migrations
6 6
     {
7 7
         protected override void Up(MigrationBuilder migrationBuilder)
8 8
         {
9
-            //migrationBuilder.AddColumn<string>(
10
-            //    name: "Video",
11
-            //    table: "Properties",
12
-            //    nullable: true);
9
+            migrationBuilder.AddColumn<string>(
10
+                name: "Video",
11
+                table: "Properties",
12
+                nullable: true);
13 13
 
14
-            //migrationBuilder.AddColumn<string>(
15
-            //    name: "VirtualTour",
16
-            //    table: "Properties",
17
-            //    nullable: true);
14
+            migrationBuilder.AddColumn<string>(
15
+                name: "VirtualTour",
16
+                table: "Properties",
17
+                nullable: true);
18 18
         }
19 19
 
20 20
         protected override void Down(MigrationBuilder migrationBuilder)
21 21
         {
22
-            //migrationBuilder.DropColumn(
23
-            //    name: "Video",
24
-            //    table: "Properties");
22
+            migrationBuilder.DropColumn(
23
+                name: "Video",
24
+                table: "Properties");
25 25
 
26
-            //migrationBuilder.DropColumn(
27
-            //    name: "VirtualTour",
28
-            //    table: "Properties");
26
+            migrationBuilder.DropColumn(
27
+                name: "VirtualTour",
28
+                table: "Properties");
29 29
         }
30 30
     }
31 31
 }

+ 14
- 14
UnivateProperties_API/Migrations/20191021143440_MappingBank.cs Bestand weergeven

@@ -10,15 +10,15 @@ namespace UnivateProperties_API.Migrations
10 10
                 name: "FK_BankAccounts_Banks_BankId",
11 11
                 table: "BankAccounts");
12 12
 
13
-            migrationBuilder.AddColumn<string>(
14
-                name: "Video",
15
-                table: "Properties",
16
-                nullable: true);
13
+            //migrationBuilder.AddColumn<string>(
14
+            //    name: "Video",
15
+            //    table: "Properties",
16
+            //    nullable: true);
17 17
 
18
-            migrationBuilder.AddColumn<string>(
19
-                name: "VirtualTour",
20
-                table: "Properties",
21
-                nullable: true);
18
+            //migrationBuilder.AddColumn<string>(
19
+            //    name: "VirtualTour",
20
+            //    table: "Properties",
21
+            //    nullable: true);
22 22
 
23 23
             migrationBuilder.AddColumn<int>(
24 24
                 name: "BankAccountId",
@@ -93,13 +93,13 @@ namespace UnivateProperties_API.Migrations
93 93
                 name: "IX_Addresses_OwnerId",
94 94
                 table: "Addresses");
95 95
 
96
-            migrationBuilder.DropColumn(
97
-                name: "Video",
98
-                table: "Properties");
96
+            //migrationBuilder.DropColumn(
97
+            //    name: "Video",
98
+            //    table: "Properties");
99 99
 
100
-            migrationBuilder.DropColumn(
101
-                name: "VirtualTour",
102
-                table: "Properties");
100
+            //migrationBuilder.DropColumn(
101
+            //    name: "VirtualTour",
102
+            //    table: "Properties");
103 103
 
104 104
             migrationBuilder.DropColumn(
105 105
                 name: "BankAccountId",

+ 38
- 38
UnivateProperties_API/Migrations/20200107112926_test.cs Bestand weergeven

@@ -11,17 +11,17 @@ namespace UnivateProperties_API.Migrations
11 11
                 name: "FK_UnitConfigurationTypes_UnitConfigurations_UnitConfiguration~",
12 12
                 table: "UnitConfigurationTypes");
13 13
 
14
-            migrationBuilder.DropIndex(
15
-                name: "IX_Users_Username",
16
-                table: "Users");
14
+            //migrationBuilder.DropIndex(
15
+            //    name: "IX_Users_Username",
16
+            //    table: "Users");
17 17
 
18 18
             migrationBuilder.DropIndex(
19 19
                 name: "IX_UnitConfigurations_Code",
20 20
                 table: "UnitConfigurations");
21 21
 
22
-            migrationBuilder.DropIndex(
23
-                name: "IX_Individuals_Telephone_CellNumber_Email",
24
-                table: "Individuals");
22
+            //migrationBuilder.DropIndex(
23
+            //    name: "IX_Individuals_Telephone_CellNumber_Email",
24
+            //    table: "Individuals");
25 25
 
26 26
             migrationBuilder.AlterColumn<int>(
27 27
                 name: "Id",
@@ -247,26 +247,26 @@ namespace UnivateProperties_API.Migrations
247 247
                 oldClrType: typeof(int))
248 248
                 .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
249 249
 
250
-            migrationBuilder.CreateIndex(
251
-                name: "IX_Users_Username",
252
-                table: "Users",
253
-                column: "Username",
254
-                unique: true,
255
-                filter: "[Username] IS NOT NULL");
250
+            //migrationBuilder.CreateIndex(
251
+            //    name: "IX_Users_Username",
252
+            //    table: "Users",
253
+            //    column: "Username",
254
+            //    unique: true,
255
+            //    filter: "[Username] IS NOT NULL");
256 256
 
257
-            migrationBuilder.CreateIndex(
258
-                name: "IX_UnitConfigurations_Code",
259
-                table: "UnitConfigurations",
260
-                column: "Code",
261
-                unique: true,
262
-                filter: "[Code] IS NOT NULL");
257
+            //migrationBuilder.CreateIndex(
258
+            //    name: "IX_UnitConfigurations_Code",
259
+            //    table: "UnitConfigurations",
260
+            //    column: "Code",
261
+            //    unique: true,
262
+            //    filter: "[Code] IS NOT NULL");
263 263
 
264
-            migrationBuilder.CreateIndex(
265
-                name: "IX_Individuals_Telephone_CellNumber_Email",
266
-                table: "Individuals",
267
-                columns: new[] { "Telephone", "CellNumber", "Email" },
268
-                unique: true,
269
-                filter: "[Telephone] IS NOT NULL AND [CellNumber] IS NOT NULL AND [Email] IS NOT NULL");
264
+            //migrationBuilder.CreateIndex(
265
+            //    name: "IX_Individuals_Telephone_CellNumber_Email",
266
+            //    table: "Individuals",
267
+            //    columns: new[] { "Telephone", "CellNumber", "Email" },
268
+            //    unique: true,
269
+            //    filter: "[Telephone] IS NOT NULL AND [CellNumber] IS NOT NULL AND [Email] IS NOT NULL");
270 270
 
271 271
             migrationBuilder.AddForeignKey(
272 272
                 name: "FK_UnitConfigurationTypes_UnitConfigurations_UnitConfigurationId",
@@ -283,17 +283,17 @@ namespace UnivateProperties_API.Migrations
283 283
                 name: "FK_UnitConfigurationTypes_UnitConfigurations_UnitConfigurationId",
284 284
                 table: "UnitConfigurationTypes");
285 285
 
286
-            migrationBuilder.DropIndex(
287
-                name: "IX_Users_Username",
288
-                table: "Users");
286
+            //migrationBuilder.DropIndex(
287
+            //    name: "IX_Users_Username",
288
+            //    table: "Users");
289 289
 
290
-            migrationBuilder.DropIndex(
291
-                name: "IX_UnitConfigurations_Code",
292
-                table: "UnitConfigurations");
290
+            //migrationBuilder.DropIndex(
291
+            //    name: "IX_UnitConfigurations_Code",
292
+            //    table: "UnitConfigurations");
293 293
 
294
-            migrationBuilder.DropIndex(
295
-                name: "IX_Individuals_Telephone_CellNumber_Email",
296
-                table: "Individuals");
294
+            //migrationBuilder.DropIndex(
295
+            //    name: "IX_Individuals_Telephone_CellNumber_Email",
296
+            //    table: "Individuals");
297 297
 
298 298
             migrationBuilder.AlterColumn<int>(
299 299
                 name: "Id",
@@ -519,11 +519,11 @@ namespace UnivateProperties_API.Migrations
519 519
                 oldClrType: typeof(int))
520 520
                 .OldAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
521 521
 
522
-            migrationBuilder.CreateIndex(
523
-                name: "IX_Users_Username",
524
-                table: "Users",
525
-                column: "Username",
526
-                unique: true);
522
+            //migrationBuilder.CreateIndex(
523
+            //    name: "IX_Users_Username",
524
+            //    table: "Users",
525
+            //    column: "Username",
526
+            //    unique: true);
527 527
 
528 528
             migrationBuilder.CreateIndex(
529 529
                 name: "IX_UnitConfigurations_Code",

+ 1298
- 0
UnivateProperties_API/Migrations/20200121092345_MissingColumns.Designer.cs
Diff onderdrukt omdat het te groot bestand
Bestand weergeven


+ 569
- 0
UnivateProperties_API/Migrations/20200121092345_MissingColumns.cs Bestand weergeven

@@ -0,0 +1,569 @@
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 MissingColumns : Migration
8
+    {
9
+        protected override void Up(MigrationBuilder migrationBuilder)
10
+        {
11
+            migrationBuilder.DropForeignKey(
12
+                name: "FK_UnitConfigurationTypes_UnitConfigurations_UnitConfigurationId",
13
+                table: "UnitConfigurationTypes");
14
+
15
+            //migrationBuilder.DropIndex(
16
+            //    name: "IX_Users_Username",
17
+            //    table: "Users");
18
+
19
+            //migrationBuilder.DropIndex(
20
+            //    name: "IX_UnitConfigurations_Code",
21
+            //    table: "UnitConfigurations");
22
+
23
+            //migrationBuilder.DropIndex(
24
+            //    name: "IX_Individuals_Telephone_CellNumber_Email",
25
+            //    table: "Individuals");
26
+
27
+            //migrationBuilder.AlterColumn<int>(
28
+            //    name: "Id",
29
+            //    table: "Weeks",
30
+            //    nullable: false,
31
+            //    oldClrType: typeof(int))
32
+            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
33
+
34
+            //migrationBuilder.AlterColumn<int>(
35
+            //    name: "Id",
36
+            //    table: "Users",
37
+            //    nullable: false,
38
+            //    oldClrType: typeof(int))
39
+            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
40
+
41
+            //migrationBuilder.AlterColumn<int>(
42
+            //    name: "Id",
43
+            //    table: "UserDefinedGroups",
44
+            //    nullable: false,
45
+            //    oldClrType: typeof(int))
46
+            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
47
+
48
+            //migrationBuilder.AlterColumn<int>(
49
+            //    name: "Id",
50
+            //    table: "UserDefinedFields",
51
+            //    nullable: false,
52
+            //    oldClrType: typeof(int))
53
+            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
54
+
55
+            //migrationBuilder.AlterColumn<int>(
56
+            //    name: "Id",
57
+            //    table: "UnitConfigurationTypes",
58
+            //    nullable: false,
59
+            //    oldClrType: typeof(int))
60
+            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
61
+
62
+            //migrationBuilder.AlterColumn<int>(
63
+            //    name: "Id",
64
+            //    table: "UnitConfigurations",
65
+            //    nullable: false,
66
+            //    oldClrType: typeof(int))
67
+            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
68
+
69
+            //migrationBuilder.AlterColumn<int>(
70
+            //    name: "Id",
71
+            //    table: "Templates",
72
+            //    nullable: false,
73
+            //    oldClrType: typeof(int))
74
+            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
75
+
76
+            //migrationBuilder.AlterColumn<int>(
77
+            //    name: "Id",
78
+            //    table: "Suburbs",
79
+            //    nullable: false,
80
+            //    oldClrType: typeof(int))
81
+            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
82
+
83
+            //migrationBuilder.AlterColumn<int>(
84
+            //    name: "Id",
85
+            //    table: "Status",
86
+            //    nullable: false,
87
+            //    oldClrType: typeof(int))
88
+            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
89
+
90
+            //migrationBuilder.AlterColumn<int>(
91
+            //    name: "Id",
92
+            //    table: "Seasons",
93
+            //    nullable: false,
94
+            //    oldClrType: typeof(int))
95
+            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
96
+
97
+            //migrationBuilder.AlterColumn<int>(
98
+            //    name: "Id",
99
+            //    table: "SearchLogs",
100
+            //    nullable: false,
101
+            //    oldClrType: typeof(int))
102
+            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
103
+
104
+            //migrationBuilder.AlterColumn<int>(
105
+            //    name: "Id",
106
+            //    table: "Provinces",
107
+            //    nullable: false,
108
+            //    oldClrType: typeof(int))
109
+            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
110
+
111
+            //migrationBuilder.AlterColumn<int>(
112
+            //    name: "Id",
113
+            //    table: "PropertyUserFields",
114
+            //    nullable: false,
115
+            //    oldClrType: typeof(int))
116
+            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
117
+
118
+            //migrationBuilder.AlterColumn<int>(
119
+            //    name: "Id",
120
+            //    table: "PropertyTypes",
121
+            //    nullable: false,
122
+            //    oldClrType: typeof(int))
123
+            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
124
+
125
+            //migrationBuilder.AlterColumn<int>(
126
+            //    name: "Id",
127
+            //    table: "PropertyImages",
128
+            //    nullable: false,
129
+            //    oldClrType: typeof(int))
130
+            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
131
+
132
+            //migrationBuilder.AlterColumn<int>(
133
+            //    name: "Id",
134
+            //    table: "Properties",
135
+            //    nullable: false,
136
+            //    oldClrType: typeof(int))
137
+            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
138
+
139
+            migrationBuilder.AddColumn<DateTime>(
140
+                name: "DateAvailable",
141
+                table: "Properties",
142
+                nullable: false,
143
+                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
144
+
145
+            //migrationBuilder.AlterColumn<int>(
146
+            //    name: "Id",
147
+            //    table: "ProcessFlows",
148
+            //    nullable: false,
149
+            //    oldClrType: typeof(int))
150
+            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
151
+
152
+            //migrationBuilder.AlterColumn<int>(
153
+            //    name: "Id",
154
+            //    table: "PlaceHolders",
155
+            //    nullable: false,
156
+            //    oldClrType: typeof(int))
157
+            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
158
+
159
+            //migrationBuilder.AlterColumn<int>(
160
+            //    name: "Id",
161
+            //    table: "Person",
162
+            //    nullable: false,
163
+            //    oldClrType: typeof(int))
164
+            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
165
+
166
+            //migrationBuilder.AlterColumn<int>(
167
+            //    name: "Id",
168
+            //    table: "Location",
169
+            //    nullable: false,
170
+            //    oldClrType: typeof(int))
171
+            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
172
+
173
+            //migrationBuilder.AlterColumn<int>(
174
+            //    name: "Id",
175
+            //    table: "Individuals",
176
+            //    nullable: false,
177
+            //    oldClrType: typeof(int))
178
+            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
179
+
180
+            //migrationBuilder.AlterColumn<int>(
181
+            //    name: "Id",
182
+            //    table: "Hosts",
183
+            //    nullable: false,
184
+            //    oldClrType: typeof(int))
185
+            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
186
+
187
+            //migrationBuilder.AlterColumn<int>(
188
+            //    name: "Id",
189
+            //    table: "Emails",
190
+            //    nullable: false,
191
+            //    oldClrType: typeof(int))
192
+            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
193
+
194
+            //migrationBuilder.AlterColumn<int>(
195
+            //    name: "Id",
196
+            //    table: "Cities",
197
+            //    nullable: false,
198
+            //    oldClrType: typeof(int))
199
+            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
200
+
201
+            //migrationBuilder.AlterColumn<int>(
202
+            //    name: "Id",
203
+            //    table: "Carousel",
204
+            //    nullable: false,
205
+            //    oldClrType: typeof(int))
206
+            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
207
+
208
+            //migrationBuilder.AlterColumn<int>(
209
+            //    name: "Id",
210
+            //    table: "BidItems",
211
+            //    nullable: false,
212
+            //    oldClrType: typeof(int))
213
+            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
214
+
215
+            //migrationBuilder.AlterColumn<int>(
216
+            //    name: "Id",
217
+            //    table: "Banks",
218
+            //    nullable: false,
219
+            //    oldClrType: typeof(int))
220
+            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
221
+
222
+            //migrationBuilder.AlterColumn<int>(
223
+            //    name: "Id",
224
+            //    table: "BankAccounts",
225
+            //    nullable: false,
226
+            //    oldClrType: typeof(int))
227
+            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
228
+
229
+            //migrationBuilder.AlterColumn<int>(
230
+            //    name: "Id",
231
+            //    table: "Agents",
232
+            //    nullable: false,
233
+            //    oldClrType: typeof(int))
234
+            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
235
+
236
+            //migrationBuilder.AlterColumn<int>(
237
+            //    name: "Id",
238
+            //    table: "Agencies",
239
+            //    nullable: false,
240
+            //    oldClrType: typeof(int))
241
+            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
242
+
243
+            //migrationBuilder.AlterColumn<int>(
244
+            //    name: "Id",
245
+            //    table: "Addresses",
246
+            //    nullable: false,
247
+            //    oldClrType: typeof(int))
248
+            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
249
+
250
+            migrationBuilder.AddColumn<string>(
251
+                name: "Province",
252
+                table: "Addresses",
253
+                nullable: true);
254
+
255
+            //migrationBuilder.AlterColumn<int>(
256
+            //    name: "Id",
257
+            //    table: "Accounts",
258
+            //    nullable: false,
259
+            //    oldClrType: typeof(int))
260
+            //    .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
261
+
262
+            //migrationBuilder.CreateIndex(
263
+            //    name: "IX_Users_Username",
264
+            //    table: "Users",
265
+            //    column: "Username",
266
+            //    unique: true);
267
+
268
+            migrationBuilder.CreateIndex(
269
+                name: "IX_UnitConfigurations_Code",
270
+                table: "UnitConfigurations",
271
+                column: "Code",
272
+                unique: true);
273
+
274
+            //migrationBuilder.CreateIndex(
275
+            //    name: "IX_Individuals_Telephone_CellNumber_Email",
276
+            //    table: "Individuals",
277
+            //    columns: new[] { "Telephone", "CellNumber", "Email" },
278
+            //    unique: true);
279
+
280
+            migrationBuilder.AddForeignKey(
281
+                name: "FK_UnitConfigurationTypes_UnitConfigurations_UnitConfiguration~",
282
+                table: "UnitConfigurationTypes",
283
+                column: "UnitConfigurationId",
284
+                principalTable: "UnitConfigurations",
285
+                principalColumn: "Id",
286
+                onDelete: ReferentialAction.Cascade);
287
+        }
288
+
289
+        protected override void Down(MigrationBuilder migrationBuilder)
290
+        {
291
+            migrationBuilder.DropForeignKey(
292
+                name: "FK_UnitConfigurationTypes_UnitConfigurations_UnitConfiguration~",
293
+                table: "UnitConfigurationTypes");
294
+
295
+            migrationBuilder.DropIndex(
296
+                name: "IX_Users_Username",
297
+                table: "Users");
298
+
299
+            migrationBuilder.DropIndex(
300
+                name: "IX_UnitConfigurations_Code",
301
+                table: "UnitConfigurations");
302
+
303
+            migrationBuilder.DropIndex(
304
+                name: "IX_Individuals_Telephone_CellNumber_Email",
305
+                table: "Individuals");
306
+
307
+            migrationBuilder.DropColumn(
308
+                name: "DateAvailable",
309
+                table: "Properties");
310
+
311
+            migrationBuilder.DropColumn(
312
+                name: "Province",
313
+                table: "Addresses");
314
+
315
+            migrationBuilder.AlterColumn<int>(
316
+                name: "Id",
317
+                table: "Weeks",
318
+                nullable: false,
319
+                oldClrType: typeof(int))
320
+                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
321
+
322
+            migrationBuilder.AlterColumn<int>(
323
+                name: "Id",
324
+                table: "Users",
325
+                nullable: false,
326
+                oldClrType: typeof(int))
327
+                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
328
+
329
+            migrationBuilder.AlterColumn<int>(
330
+                name: "Id",
331
+                table: "UserDefinedGroups",
332
+                nullable: false,
333
+                oldClrType: typeof(int))
334
+                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
335
+
336
+            migrationBuilder.AlterColumn<int>(
337
+                name: "Id",
338
+                table: "UserDefinedFields",
339
+                nullable: false,
340
+                oldClrType: typeof(int))
341
+                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
342
+
343
+            migrationBuilder.AlterColumn<int>(
344
+                name: "Id",
345
+                table: "UnitConfigurationTypes",
346
+                nullable: false,
347
+                oldClrType: typeof(int))
348
+                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
349
+
350
+            migrationBuilder.AlterColumn<int>(
351
+                name: "Id",
352
+                table: "UnitConfigurations",
353
+                nullable: false,
354
+                oldClrType: typeof(int))
355
+                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
356
+
357
+            migrationBuilder.AlterColumn<int>(
358
+                name: "Id",
359
+                table: "Templates",
360
+                nullable: false,
361
+                oldClrType: typeof(int))
362
+                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
363
+
364
+            migrationBuilder.AlterColumn<int>(
365
+                name: "Id",
366
+                table: "Suburbs",
367
+                nullable: false,
368
+                oldClrType: typeof(int))
369
+                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
370
+
371
+            migrationBuilder.AlterColumn<int>(
372
+                name: "Id",
373
+                table: "Status",
374
+                nullable: false,
375
+                oldClrType: typeof(int))
376
+                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
377
+
378
+            migrationBuilder.AlterColumn<int>(
379
+                name: "Id",
380
+                table: "Seasons",
381
+                nullable: false,
382
+                oldClrType: typeof(int))
383
+                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
384
+
385
+            migrationBuilder.AlterColumn<int>(
386
+                name: "Id",
387
+                table: "SearchLogs",
388
+                nullable: false,
389
+                oldClrType: typeof(int))
390
+                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
391
+
392
+            migrationBuilder.AlterColumn<int>(
393
+                name: "Id",
394
+                table: "Provinces",
395
+                nullable: false,
396
+                oldClrType: typeof(int))
397
+                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
398
+
399
+            migrationBuilder.AlterColumn<int>(
400
+                name: "Id",
401
+                table: "PropertyUserFields",
402
+                nullable: false,
403
+                oldClrType: typeof(int))
404
+                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
405
+
406
+            migrationBuilder.AlterColumn<int>(
407
+                name: "Id",
408
+                table: "PropertyTypes",
409
+                nullable: false,
410
+                oldClrType: typeof(int))
411
+                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
412
+
413
+            migrationBuilder.AlterColumn<int>(
414
+                name: "Id",
415
+                table: "PropertyImages",
416
+                nullable: false,
417
+                oldClrType: typeof(int))
418
+                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
419
+
420
+            migrationBuilder.AlterColumn<int>(
421
+                name: "Id",
422
+                table: "Properties",
423
+                nullable: false,
424
+                oldClrType: typeof(int))
425
+                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
426
+
427
+            migrationBuilder.AlterColumn<int>(
428
+                name: "Id",
429
+                table: "ProcessFlows",
430
+                nullable: false,
431
+                oldClrType: typeof(int))
432
+                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
433
+
434
+            migrationBuilder.AlterColumn<int>(
435
+                name: "Id",
436
+                table: "PlaceHolders",
437
+                nullable: false,
438
+                oldClrType: typeof(int))
439
+                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
440
+
441
+            migrationBuilder.AlterColumn<int>(
442
+                name: "Id",
443
+                table: "Person",
444
+                nullable: false,
445
+                oldClrType: typeof(int))
446
+                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
447
+
448
+            migrationBuilder.AlterColumn<int>(
449
+                name: "Id",
450
+                table: "Location",
451
+                nullable: false,
452
+                oldClrType: typeof(int))
453
+                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
454
+
455
+            migrationBuilder.AlterColumn<int>(
456
+                name: "Id",
457
+                table: "Individuals",
458
+                nullable: false,
459
+                oldClrType: typeof(int))
460
+                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
461
+
462
+            migrationBuilder.AlterColumn<int>(
463
+                name: "Id",
464
+                table: "Hosts",
465
+                nullable: false,
466
+                oldClrType: typeof(int))
467
+                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
468
+
469
+            migrationBuilder.AlterColumn<int>(
470
+                name: "Id",
471
+                table: "Emails",
472
+                nullable: false,
473
+                oldClrType: typeof(int))
474
+                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
475
+
476
+            migrationBuilder.AlterColumn<int>(
477
+                name: "Id",
478
+                table: "Cities",
479
+                nullable: false,
480
+                oldClrType: typeof(int))
481
+                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
482
+
483
+            migrationBuilder.AlterColumn<int>(
484
+                name: "Id",
485
+                table: "Carousel",
486
+                nullable: false,
487
+                oldClrType: typeof(int))
488
+                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
489
+
490
+            migrationBuilder.AlterColumn<int>(
491
+                name: "Id",
492
+                table: "BidItems",
493
+                nullable: false,
494
+                oldClrType: typeof(int))
495
+                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
496
+
497
+            migrationBuilder.AlterColumn<int>(
498
+                name: "Id",
499
+                table: "Banks",
500
+                nullable: false,
501
+                oldClrType: typeof(int))
502
+                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
503
+
504
+            migrationBuilder.AlterColumn<int>(
505
+                name: "Id",
506
+                table: "BankAccounts",
507
+                nullable: false,
508
+                oldClrType: typeof(int))
509
+                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
510
+
511
+            migrationBuilder.AlterColumn<int>(
512
+                name: "Id",
513
+                table: "Agents",
514
+                nullable: false,
515
+                oldClrType: typeof(int))
516
+                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
517
+
518
+            migrationBuilder.AlterColumn<int>(
519
+                name: "Id",
520
+                table: "Agencies",
521
+                nullable: false,
522
+                oldClrType: typeof(int))
523
+                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
524
+
525
+            migrationBuilder.AlterColumn<int>(
526
+                name: "Id",
527
+                table: "Addresses",
528
+                nullable: false,
529
+                oldClrType: typeof(int))
530
+                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
531
+
532
+            migrationBuilder.AlterColumn<int>(
533
+                name: "Id",
534
+                table: "Accounts",
535
+                nullable: false,
536
+                oldClrType: typeof(int))
537
+                .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn);
538
+
539
+            migrationBuilder.CreateIndex(
540
+                name: "IX_Users_Username",
541
+                table: "Users",
542
+                column: "Username",
543
+                unique: true,
544
+                filter: "[Username] IS NOT NULL");
545
+
546
+            migrationBuilder.CreateIndex(
547
+                name: "IX_UnitConfigurations_Code",
548
+                table: "UnitConfigurations",
549
+                column: "Code",
550
+                unique: true,
551
+                filter: "[Code] IS NOT NULL");
552
+
553
+            migrationBuilder.CreateIndex(
554
+                name: "IX_Individuals_Telephone_CellNumber_Email",
555
+                table: "Individuals",
556
+                columns: new[] { "Telephone", "CellNumber", "Email" },
557
+                unique: true,
558
+                filter: "[Telephone] IS NOT NULL AND [CellNumber] IS NOT NULL AND [Email] IS NOT NULL");
559
+
560
+            migrationBuilder.AddForeignKey(
561
+                name: "FK_UnitConfigurationTypes_UnitConfigurations_UnitConfigurationId",
562
+                table: "UnitConfigurationTypes",
563
+                column: "UnitConfigurationId",
564
+                principalTable: "UnitConfigurations",
565
+                principalColumn: "Id",
566
+                onDelete: ReferentialAction.Cascade);
567
+        }
568
+    }
569
+}

+ 42
- 73
UnivateProperties_API/Migrations/DataContextModelSnapshot.cs Bestand weergeven

@@ -2,8 +2,8 @@
2 2
 using System;
3 3
 using Microsoft.EntityFrameworkCore;
4 4
 using Microsoft.EntityFrameworkCore.Infrastructure;
5
-using Microsoft.EntityFrameworkCore.Metadata;
6 5
 using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
6
+using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
7 7
 using UnivateProperties_API.Context;
8 8
 
9 9
 namespace UnivateProperties_API.Migrations
@@ -15,15 +15,14 @@ namespace UnivateProperties_API.Migrations
15 15
         {
16 16
 #pragma warning disable 612, 618
17 17
             modelBuilder
18
+                .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn)
18 19
                 .HasAnnotation("ProductVersion", "2.2.6-servicing-10079")
19
-                .HasAnnotation("Relational:MaxIdentifierLength", 128)
20
-                .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
20
+                .HasAnnotation("Relational:MaxIdentifierLength", 63);
21 21
 
22 22
             modelBuilder.Entity("UnivateProperties_API.Model.Banks.Bank", b =>
23 23
                 {
24 24
                     b.Property<int>("Id")
25
-                        .ValueGeneratedOnAdd()
26
-                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
25
+                        .ValueGeneratedOnAdd();
27 26
 
28 27
                     b.Property<DateTime>("Created");
29 28
 
@@ -45,8 +44,7 @@ namespace UnivateProperties_API.Migrations
45 44
             modelBuilder.Entity("UnivateProperties_API.Model.Banks.BankAccount", b =>
46 45
                 {
47 46
                     b.Property<int>("Id")
48
-                        .ValueGeneratedOnAdd()
49
-                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
47
+                        .ValueGeneratedOnAdd();
50 48
 
51 49
                     b.Property<string>("AccountHolder");
52 50
 
@@ -76,8 +74,7 @@ namespace UnivateProperties_API.Migrations
76 74
             modelBuilder.Entity("UnivateProperties_API.Model.Communication.Email", b =>
77 75
                 {
78 76
                     b.Property<int>("Id")
79
-                        .ValueGeneratedOnAdd()
80
-                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
77
+                        .ValueGeneratedOnAdd();
81 78
 
82 79
                     b.Property<string>("BCC");
83 80
 
@@ -115,8 +112,7 @@ namespace UnivateProperties_API.Migrations
115 112
             modelBuilder.Entity("UnivateProperties_API.Model.Communication.PlaceHolder", b =>
116 113
                 {
117 114
                     b.Property<int>("Id")
118
-                        .ValueGeneratedOnAdd()
119
-                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
115
+                        .ValueGeneratedOnAdd();
120 116
 
121 117
                     b.Property<string>("BoundTo");
122 118
 
@@ -146,8 +142,7 @@ namespace UnivateProperties_API.Migrations
146 142
             modelBuilder.Entity("UnivateProperties_API.Model.Communication.SMTPAccount", b =>
147 143
                 {
148 144
                     b.Property<int>("Id")
149
-                        .ValueGeneratedOnAdd()
150
-                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
145
+                        .ValueGeneratedOnAdd();
151 146
 
152 147
                     b.Property<string>("Address");
153 148
 
@@ -175,8 +170,7 @@ namespace UnivateProperties_API.Migrations
175 170
             modelBuilder.Entity("UnivateProperties_API.Model.Communication.SMTPHost", b =>
176 171
                 {
177 172
                     b.Property<int>("Id")
178
-                        .ValueGeneratedOnAdd()
179
-                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
173
+                        .ValueGeneratedOnAdd();
180 174
 
181 175
                     b.Property<DateTime>("Created");
182 176
 
@@ -204,8 +198,7 @@ namespace UnivateProperties_API.Migrations
204 198
             modelBuilder.Entity("UnivateProperties_API.Model.Communication.Template", b =>
205 199
                 {
206 200
                     b.Property<int>("Id")
207
-                        .ValueGeneratedOnAdd()
208
-                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
201
+                        .ValueGeneratedOnAdd();
209 202
 
210 203
                     b.Property<string>("Body");
211 204
 
@@ -233,8 +226,7 @@ namespace UnivateProperties_API.Migrations
233 226
             modelBuilder.Entity("UnivateProperties_API.Model.Logging.SearchLog", b =>
234 227
                 {
235 228
                     b.Property<int>("Id")
236
-                        .ValueGeneratedOnAdd()
237
-                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
229
+                        .ValueGeneratedOnAdd();
238 230
 
239 231
                     b.Property<DateTime>("Created");
240 232
 
@@ -256,8 +248,7 @@ namespace UnivateProperties_API.Migrations
256 248
             modelBuilder.Entity("UnivateProperties_API.Model.Misc.Address", b =>
257 249
                 {
258 250
                     b.Property<int>("Id")
259
-                        .ValueGeneratedOnAdd()
260
-                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
251
+                        .ValueGeneratedOnAdd();
261 252
 
262 253
                     b.Property<string>("City");
263 254
 
@@ -273,6 +264,8 @@ namespace UnivateProperties_API.Migrations
273 264
 
274 265
                     b.Property<string>("PostalCode");
275 266
 
267
+                    b.Property<string>("Province");
268
+
276 269
                     b.Property<string>("Street");
277 270
 
278 271
                     b.Property<string>("StreetNumber");
@@ -289,8 +282,7 @@ namespace UnivateProperties_API.Migrations
289 282
             modelBuilder.Entity("UnivateProperties_API.Model.Misc.Carousel", b =>
290 283
                 {
291 284
                     b.Property<int>("Id")
292
-                        .ValueGeneratedOnAdd()
293
-                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
285
+                        .ValueGeneratedOnAdd();
294 286
 
295 287
                     b.Property<DateTime>("Created");
296 288
 
@@ -316,8 +308,7 @@ namespace UnivateProperties_API.Migrations
316 308
             modelBuilder.Entity("UnivateProperties_API.Model.Misc.Location", b =>
317 309
                 {
318 310
                     b.Property<int>("Id")
319
-                        .ValueGeneratedOnAdd()
320
-                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
311
+                        .ValueGeneratedOnAdd();
321 312
 
322 313
                     b.Property<DateTime>("Created");
323 314
 
@@ -339,8 +330,7 @@ namespace UnivateProperties_API.Migrations
339 330
             modelBuilder.Entity("UnivateProperties_API.Model.ProcessFlow.BidItem", b =>
340 331
                 {
341 332
                     b.Property<int>("Id")
342
-                        .ValueGeneratedOnAdd()
343
-                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
333
+                        .ValueGeneratedOnAdd();
344 334
 
345 335
                     b.Property<double>("Amount");
346 336
 
@@ -380,8 +370,7 @@ namespace UnivateProperties_API.Migrations
380 370
             modelBuilder.Entity("UnivateProperties_API.Model.ProcessFlow.ProcessFlow", b =>
381 371
                 {
382 372
                     b.Property<int>("Id")
383
-                        .ValueGeneratedOnAdd()
384
-                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
373
+                        .ValueGeneratedOnAdd();
385 374
 
386 375
                     b.Property<DateTime>("Created");
387 376
 
@@ -411,8 +400,7 @@ namespace UnivateProperties_API.Migrations
411 400
             modelBuilder.Entity("UnivateProperties_API.Model.Properties.Property", b =>
412 401
                 {
413 402
                     b.Property<int>("Id")
414
-                        .ValueGeneratedOnAdd()
415
-                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
403
+                        .ValueGeneratedOnAdd();
416 404
 
417 405
                     b.Property<string>("AddressLine1");
418 406
 
@@ -428,6 +416,8 @@ namespace UnivateProperties_API.Migrations
428 416
 
429 417
                     b.Property<DateTime>("Created");
430 418
 
419
+                    b.Property<DateTime>("DateAvailable");
420
+
431 421
                     b.Property<string>("Description");
432 422
 
433 423
                     b.Property<bool>("IsDeleted");
@@ -490,8 +480,7 @@ namespace UnivateProperties_API.Migrations
490 480
             modelBuilder.Entity("UnivateProperties_API.Model.Properties.PropertyImage", b =>
491 481
                 {
492 482
                     b.Property<int>("Id")
493
-                        .ValueGeneratedOnAdd()
494
-                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
483
+                        .ValueGeneratedOnAdd();
495 484
 
496 485
                     b.Property<DateTime>("Created");
497 486
 
@@ -517,8 +506,7 @@ namespace UnivateProperties_API.Migrations
517 506
             modelBuilder.Entity("UnivateProperties_API.Model.Properties.PropertyType", b =>
518 507
                 {
519 508
                     b.Property<int>("Id")
520
-                        .ValueGeneratedOnAdd()
521
-                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
509
+                        .ValueGeneratedOnAdd();
522 510
 
523 511
                     b.Property<DateTime>("Created");
524 512
 
@@ -540,8 +528,7 @@ namespace UnivateProperties_API.Migrations
540 528
             modelBuilder.Entity("UnivateProperties_API.Model.Properties.PropertyUserField", b =>
541 529
                 {
542 530
                     b.Property<int>("Id")
543
-                        .ValueGeneratedOnAdd()
544
-                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
531
+                        .ValueGeneratedOnAdd();
545 532
 
546 533
                     b.Property<DateTime>("Created");
547 534
 
@@ -571,8 +558,7 @@ namespace UnivateProperties_API.Migrations
571 558
             modelBuilder.Entity("UnivateProperties_API.Model.Properties.UserDefinedField", b =>
572 559
                 {
573 560
                     b.Property<int>("Id")
574
-                        .ValueGeneratedOnAdd()
575
-                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
561
+                        .ValueGeneratedOnAdd();
576 562
 
577 563
                     b.Property<DateTime>("Created");
578 564
 
@@ -600,8 +586,7 @@ namespace UnivateProperties_API.Migrations
600 586
             modelBuilder.Entity("UnivateProperties_API.Model.Properties.UserDefinedGroup", b =>
601 587
                 {
602 588
                     b.Property<int>("Id")
603
-                        .ValueGeneratedOnAdd()
604
-                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
589
+                        .ValueGeneratedOnAdd();
605 590
 
606 591
                     b.Property<DateTime>("Created");
607 592
 
@@ -625,8 +610,7 @@ namespace UnivateProperties_API.Migrations
625 610
             modelBuilder.Entity("UnivateProperties_API.Model.Region.City", b =>
626 611
                 {
627 612
                     b.Property<int>("Id")
628
-                        .ValueGeneratedOnAdd()
629
-                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
613
+                        .ValueGeneratedOnAdd();
630 614
 
631 615
                     b.Property<string>("Code");
632 616
 
@@ -652,8 +636,7 @@ namespace UnivateProperties_API.Migrations
652 636
             modelBuilder.Entity("UnivateProperties_API.Model.Region.Province", b =>
653 637
                 {
654 638
                     b.Property<int>("Id")
655
-                        .ValueGeneratedOnAdd()
656
-                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
639
+                        .ValueGeneratedOnAdd();
657 640
 
658 641
                     b.Property<string>("Code");
659 642
 
@@ -675,8 +658,7 @@ namespace UnivateProperties_API.Migrations
675 658
             modelBuilder.Entity("UnivateProperties_API.Model.Region.Suburb", b =>
676 659
                 {
677 660
                     b.Property<int>("Id")
678
-                        .ValueGeneratedOnAdd()
679
-                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
661
+                        .ValueGeneratedOnAdd();
680 662
 
681 663
                     b.Property<int>("CityId");
682 664
 
@@ -702,8 +684,7 @@ namespace UnivateProperties_API.Migrations
702 684
             modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.Season", b =>
703 685
                 {
704 686
                     b.Property<int>("Id")
705
-                        .ValueGeneratedOnAdd()
706
-                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
687
+                        .ValueGeneratedOnAdd();
707 688
 
708 689
                     b.Property<DateTime>("Created");
709 690
 
@@ -723,8 +704,7 @@ namespace UnivateProperties_API.Migrations
723 704
             modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.Status", b =>
724 705
                 {
725 706
                     b.Property<int>("Id")
726
-                        .ValueGeneratedOnAdd()
727
-                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
707
+                        .ValueGeneratedOnAdd();
728 708
 
729 709
                     b.Property<string>("Code");
730 710
 
@@ -748,8 +728,7 @@ namespace UnivateProperties_API.Migrations
748 728
             modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.TimeshareWeek", b =>
749 729
                 {
750 730
                     b.Property<int>("Id")
751
-                        .ValueGeneratedOnAdd()
752
-                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
731
+                        .ValueGeneratedOnAdd();
753 732
 
754 733
                     b.Property<int?>("AgencyId");
755 734
 
@@ -835,8 +814,7 @@ namespace UnivateProperties_API.Migrations
835 814
             modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.UnitConfiguration", b =>
836 815
                 {
837 816
                     b.Property<int>("Id")
838
-                        .ValueGeneratedOnAdd()
839
-                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
817
+                        .ValueGeneratedOnAdd();
840 818
 
841 819
                     b.Property<int>("Adults");
842 820
 
@@ -857,8 +835,7 @@ namespace UnivateProperties_API.Migrations
857 835
                     b.HasKey("Id");
858 836
 
859 837
                     b.HasIndex("Code")
860
-                        .IsUnique()
861
-                        .HasFilter("[Code] IS NOT NULL");
838
+                        .IsUnique();
862 839
 
863 840
                     b.ToTable("UnitConfigurations");
864 841
                 });
@@ -866,8 +843,7 @@ namespace UnivateProperties_API.Migrations
866 843
             modelBuilder.Entity("UnivateProperties_API.Model.Timeshare.UnitConfigurationType", b =>
867 844
                 {
868 845
                     b.Property<int>("Id")
869
-                        .ValueGeneratedOnAdd()
870
-                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
846
+                        .ValueGeneratedOnAdd();
871 847
 
872 848
                     b.Property<DateTime>("Created");
873 849
 
@@ -891,8 +867,7 @@ namespace UnivateProperties_API.Migrations
891 867
             modelBuilder.Entity("UnivateProperties_API.Model.Users.Agency", b =>
892 868
                 {
893 869
                     b.Property<int>("Id")
894
-                        .ValueGeneratedOnAdd()
895
-                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
870
+                        .ValueGeneratedOnAdd();
896 871
 
897 872
                     b.Property<string>("AgencyName");
898 873
 
@@ -916,8 +891,7 @@ namespace UnivateProperties_API.Migrations
916 891
             modelBuilder.Entity("UnivateProperties_API.Model.Users.Agent", b =>
917 892
                 {
918 893
                     b.Property<int>("Id")
919
-                        .ValueGeneratedOnAdd()
920
-                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
894
+                        .ValueGeneratedOnAdd();
921 895
 
922 896
                     b.Property<int?>("AgencyId");
923 897
 
@@ -957,8 +931,7 @@ namespace UnivateProperties_API.Migrations
957 931
             modelBuilder.Entity("UnivateProperties_API.Model.Users.Individual", b =>
958 932
                 {
959 933
                     b.Property<int>("Id")
960
-                        .ValueGeneratedOnAdd()
961
-                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
934
+                        .ValueGeneratedOnAdd();
962 935
 
963 936
                     b.Property<int?>("AddressId");
964 937
 
@@ -1005,8 +978,7 @@ namespace UnivateProperties_API.Migrations
1005 978
                     b.HasIndex("UserId");
1006 979
 
1007 980
                     b.HasIndex("Telephone", "CellNumber", "Email")
1008
-                        .IsUnique()
1009
-                        .HasFilter("[Telephone] IS NOT NULL AND [CellNumber] IS NOT NULL AND [Email] IS NOT NULL");
981
+                        .IsUnique();
1010 982
 
1011 983
                     b.ToTable("Individuals");
1012 984
                 });
@@ -1014,8 +986,7 @@ namespace UnivateProperties_API.Migrations
1014 986
             modelBuilder.Entity("UnivateProperties_API.Model.Users.Person", b =>
1015 987
                 {
1016 988
                     b.Property<int>("Id")
1017
-                        .ValueGeneratedOnAdd()
1018
-                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
989
+                        .ValueGeneratedOnAdd();
1019 990
 
1020 991
                     b.Property<string>("CellNumber");
1021 992
 
@@ -1047,8 +1018,7 @@ namespace UnivateProperties_API.Migrations
1047 1018
             modelBuilder.Entity("UnivateProperties_API.Model.Users.User", b =>
1048 1019
                 {
1049 1020
                     b.Property<int>("Id")
1050
-                        .ValueGeneratedOnAdd()
1051
-                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
1021
+                        .ValueGeneratedOnAdd();
1052 1022
 
1053 1023
                     b.Property<DateTime>("Created");
1054 1024
 
@@ -1073,8 +1043,7 @@ namespace UnivateProperties_API.Migrations
1073 1043
                     b.HasKey("Id");
1074 1044
 
1075 1045
                     b.HasIndex("Username")
1076
-                        .IsUnique()
1077
-                        .HasFilter("[Username] IS NOT NULL");
1046
+                        .IsUnique();
1078 1047
 
1079 1048
                     b.ToTable("Users");
1080 1049
                 });

Laden…
Annuleren
Opslaan