66using Microsoft . EntityFrameworkCore . Storage . ValueConversion ;
77using Npgsql . EntityFrameworkCore . PostgreSQL . Metadata ;
88
9+ #nullable disable
10+
911namespace Infrastructure . Identity . Migrations
1012{
1113 [ DbContext ( typeof ( IdentityContext ) ) ]
@@ -16,34 +18,36 @@ protected override void BuildModel(ModelBuilder modelBuilder)
1618#pragma warning disable 612 , 618
1719 modelBuilder
1820 . HasDefaultSchema ( "Identity" )
19- . HasAnnotation ( "Relational:MaxIdentifierLength" , 63 )
20- . HasAnnotation ( "ProductVersion" , "5.0.11" )
21- . HasAnnotation ( "Npgsql:ValueGenerationStrategy" , NpgsqlValueGenerationStrategy . IdentityByDefaultColumn ) ;
21+ . HasAnnotation ( "ProductVersion" , "6.0.9" )
22+ . HasAnnotation ( "Relational:MaxIdentifierLength" , 63 ) ;
23+
24+ NpgsqlModelBuilderExtensions . UseIdentityByDefaultColumns ( modelBuilder ) ;
2225
2326 modelBuilder . Entity ( "Application.DTOs.Account.RefreshToken" , b =>
2427 {
2528 b . Property < int > ( "Id" )
2629 . ValueGeneratedOnAdd ( )
27- . HasColumnType ( "integer" )
28- . HasAnnotation ( "Npgsql:ValueGenerationStrategy" , NpgsqlValueGenerationStrategy . IdentityByDefaultColumn ) ;
30+ . HasColumnType ( "integer" ) ;
31+
32+ NpgsqlPropertyBuilderExtensions . UseIdentityByDefaultColumn ( b . Property < int > ( "Id" ) ) ;
2933
3034 b . Property < string > ( "ApplicationUserId" )
3135 . HasColumnType ( "text" ) ;
3236
3337 b . Property < DateTime > ( "Created" )
34- . HasColumnType ( "timestamp without time zone" ) ;
38+ . HasColumnType ( "timestamp with time zone" ) ;
3539
3640 b . Property < string > ( "CreatedByIp" )
3741 . HasColumnType ( "text" ) ;
3842
3943 b . Property < DateTime > ( "Expires" )
40- . HasColumnType ( "timestamp without time zone" ) ;
44+ . HasColumnType ( "timestamp with time zone" ) ;
4145
4246 b . Property < string > ( "ReplacedByToken" )
4347 . HasColumnType ( "text" ) ;
4448
4549 b . Property < DateTime ? > ( "Revoked" )
46- . HasColumnType ( "timestamp without time zone" ) ;
50+ . HasColumnType ( "timestamp with time zone" ) ;
4751
4852 b . Property < string > ( "RevokedByIp" )
4953 . HasColumnType ( "text" ) ;
@@ -55,7 +59,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)
5559
5660 b . HasIndex ( "ApplicationUserId" ) ;
5761
58- b . ToTable ( "RefreshToken" ) ;
62+ b . ToTable ( "RefreshToken" , "Identity" ) ;
5963 } ) ;
6064
6165 modelBuilder . Entity ( "Infrastructure.Identity.Models.ApplicationUser" , b =>
@@ -125,7 +129,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)
125129 . IsUnique ( )
126130 . HasDatabaseName ( "UserNameIndex" ) ;
127131
128- b . ToTable ( "User" ) ;
132+ b . ToTable ( "User" , "Identity" ) ;
129133 } ) ;
130134
131135 modelBuilder . Entity ( "Microsoft.AspNetCore.Identity.IdentityRole" , b =>
@@ -151,15 +155,16 @@ protected override void BuildModel(ModelBuilder modelBuilder)
151155 . IsUnique ( )
152156 . HasDatabaseName ( "RoleNameIndex" ) ;
153157
154- b . ToTable ( "Role" ) ;
158+ b . ToTable ( "Role" , "Identity" ) ;
155159 } ) ;
156160
157161 modelBuilder . Entity ( "Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>" , b =>
158162 {
159163 b . Property < int > ( "Id" )
160164 . ValueGeneratedOnAdd ( )
161- . HasColumnType ( "integer" )
162- . HasAnnotation ( "Npgsql:ValueGenerationStrategy" , NpgsqlValueGenerationStrategy . IdentityByDefaultColumn ) ;
165+ . HasColumnType ( "integer" ) ;
166+
167+ NpgsqlPropertyBuilderExtensions . UseIdentityByDefaultColumn ( b . Property < int > ( "Id" ) ) ;
163168
164169 b . Property < string > ( "ClaimType" )
165170 . HasColumnType ( "text" ) ;
@@ -175,15 +180,16 @@ protected override void BuildModel(ModelBuilder modelBuilder)
175180
176181 b . HasIndex ( "RoleId" ) ;
177182
178- b . ToTable ( "RoleClaims" ) ;
183+ b . ToTable ( "RoleClaims" , "Identity" ) ;
179184 } ) ;
180185
181186 modelBuilder . Entity ( "Microsoft.AspNetCore.Identity.IdentityUserClaim<string>" , b =>
182187 {
183188 b . Property < int > ( "Id" )
184189 . ValueGeneratedOnAdd ( )
185- . HasColumnType ( "integer" )
186- . HasAnnotation ( "Npgsql:ValueGenerationStrategy" , NpgsqlValueGenerationStrategy . IdentityByDefaultColumn ) ;
190+ . HasColumnType ( "integer" ) ;
191+
192+ NpgsqlPropertyBuilderExtensions . UseIdentityByDefaultColumn ( b . Property < int > ( "Id" ) ) ;
187193
188194 b . Property < string > ( "ClaimType" )
189195 . HasColumnType ( "text" ) ;
@@ -199,7 +205,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)
199205
200206 b . HasIndex ( "UserId" ) ;
201207
202- b . ToTable ( "UserClaims" ) ;
208+ b . ToTable ( "UserClaims" , "Identity" ) ;
203209 } ) ;
204210
205211 modelBuilder . Entity ( "Microsoft.AspNetCore.Identity.IdentityUserLogin<string>" , b =>
@@ -221,7 +227,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)
221227
222228 b . HasIndex ( "UserId" ) ;
223229
224- b . ToTable ( "UserLogins" ) ;
230+ b . ToTable ( "UserLogins" , "Identity" ) ;
225231 } ) ;
226232
227233 modelBuilder . Entity ( "Microsoft.AspNetCore.Identity.IdentityUserRole<string>" , b =>
@@ -236,7 +242,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)
236242
237243 b . HasIndex ( "RoleId" ) ;
238244
239- b . ToTable ( "UserRoles" ) ;
245+ b . ToTable ( "UserRoles" , "Identity" ) ;
240246 } ) ;
241247
242248 modelBuilder . Entity ( "Microsoft.AspNetCore.Identity.IdentityUserToken<string>" , b =>
@@ -255,7 +261,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)
255261
256262 b . HasKey ( "UserId" , "LoginProvider" , "Name" ) ;
257263
258- b . ToTable ( "UserTokens" ) ;
264+ b . ToTable ( "UserTokens" , "Identity" ) ;
259265 } ) ;
260266
261267 modelBuilder . Entity ( "Application.DTOs.Account.RefreshToken" , b =>
0 commit comments