11using System ;
22using Microsoft . EntityFrameworkCore . Metadata ;
33using Microsoft . EntityFrameworkCore . Migrations ;
4+ using Npgsql . EntityFrameworkCore . PostgreSQL . Metadata ;
45
56namespace Core . Migrations
67{
@@ -53,8 +54,12 @@ protected override void Up(MigrationBuilder migrationBuilder)
5354 {
5455 Id = table . Column < int > ( nullable : false )
5556 . Annotation ( "Sqlite:Autoincrement" , true )
56- . Annotation ( "SqlServer:ValueGenerationStrategy" , SqlServerValueGenerationStrategy . IdentityColumn )
57- . Annotation ( "MySql:ValueGenerationStrategy" , MySqlValueGenerationStrategy . IdentityColumn ) ,
57+ . Annotation ( "SqlServer:ValueGenerationStrategy" ,
58+ SqlServerValueGenerationStrategy . IdentityColumn )
59+ . Annotation ( "MySql:ValueGenerationStrategy" ,
60+ MySqlValueGenerationStrategy . IdentityColumn )
61+ . Annotation ( "Npgsql:ValueGenerationStrategy" ,
62+ NpgsqlValueGenerationStrategy . SerialColumn ) ,
5863 AppUserId = table . Column < string > ( maxLength : 160 , nullable : true ) ,
5964 AppUserName = table . Column < string > ( maxLength : 160 , nullable : true ) ,
6065 Email = table . Column < string > ( nullable : true ) ,
@@ -75,8 +80,12 @@ protected override void Up(MigrationBuilder migrationBuilder)
7580 {
7681 Id = table . Column < int > ( nullable : false )
7782 . Annotation ( "Sqlite:Autoincrement" , true )
78- . Annotation ( "SqlServer:ValueGenerationStrategy" , SqlServerValueGenerationStrategy . IdentityColumn )
79- . Annotation ( "MySql:ValueGenerationStrategy" , MySqlValueGenerationStrategy . IdentityColumn ) ,
83+ . Annotation ( "SqlServer:ValueGenerationStrategy" ,
84+ SqlServerValueGenerationStrategy . IdentityColumn )
85+ . Annotation ( "MySql:ValueGenerationStrategy" ,
86+ MySqlValueGenerationStrategy . IdentityColumn )
87+ . Annotation ( "Npgsql:ValueGenerationStrategy" ,
88+ NpgsqlValueGenerationStrategy . SerialColumn ) ,
8089 AuthorId = table . Column < int > ( nullable : false ) ,
8190 Title = table . Column < string > ( maxLength : 160 , nullable : false ) ,
8291 Slug = table . Column < string > ( maxLength : 160 , nullable : false ) ,
@@ -100,8 +109,12 @@ protected override void Up(MigrationBuilder migrationBuilder)
100109 {
101110 Id = table . Column < int > ( nullable : false )
102111 . Annotation ( "Sqlite:Autoincrement" , true )
103- . Annotation ( "SqlServer:ValueGenerationStrategy" , SqlServerValueGenerationStrategy . IdentityColumn )
104- . Annotation ( "MySql:ValueGenerationStrategy" , MySqlValueGenerationStrategy . IdentityColumn ) ,
112+ . Annotation ( "SqlServer:ValueGenerationStrategy" ,
113+ SqlServerValueGenerationStrategy . IdentityColumn )
114+ . Annotation ( "MySql:ValueGenerationStrategy" ,
115+ MySqlValueGenerationStrategy . IdentityColumn )
116+ . Annotation ( "Npgsql:ValueGenerationStrategy" ,
117+ NpgsqlValueGenerationStrategy . SerialColumn ) ,
105118 RoleId = table . Column < string > ( nullable : false ) ,
106119 ClaimType = table . Column < string > ( nullable : true ) ,
107120 ClaimValue = table . Column < string > ( nullable : true )
@@ -123,8 +136,12 @@ protected override void Up(MigrationBuilder migrationBuilder)
123136 {
124137 Id = table . Column < int > ( nullable : false )
125138 . Annotation ( "Sqlite:Autoincrement" , true )
126- . Annotation ( "SqlServer:ValueGenerationStrategy" , SqlServerValueGenerationStrategy . IdentityColumn )
127- . Annotation ( "MySql:ValueGenerationStrategy" , MySqlValueGenerationStrategy . IdentityColumn ) ,
139+ . Annotation ( "SqlServer:ValueGenerationStrategy" ,
140+ SqlServerValueGenerationStrategy . IdentityColumn )
141+ . Annotation ( "MySql:ValueGenerationStrategy" ,
142+ MySqlValueGenerationStrategy . IdentityColumn )
143+ . Annotation ( "Npgsql:ValueGenerationStrategy" ,
144+ NpgsqlValueGenerationStrategy . SerialColumn ) ,
128145 UserId = table . Column < string > ( nullable : false ) ,
129146 ClaimType = table . Column < string > ( nullable : true ) ,
130147 ClaimValue = table . Column < string > ( nullable : true )
0 commit comments