Skip to content

Commit

Permalink
PostgreSQL - use identity instead of serial (#551)
Browse files Browse the repository at this point in the history
  • Loading branch information
neglectedvalue authored May 13, 2024
1 parent c748f4d commit ad8b7b5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<PackageVersion Include="Parlot" Version="0.0.25" />
<PackageVersion Include="Microsoft.Data.SqlClient" Version="5.2.0" />
<PackageVersion Include="Microsoft.Data.Sqlite" Version="8.0.0" />
<PackageVersion Include="Npgsql" Version="8.0.2" />
<PackageVersion Include="Npgsql" Version="8.0.3" />
<PackageVersion Include="MySqlConnector" Version="2.3.6" />
<PackageVersion Include="Dapper.StrongName" Version="2.1.35" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
Expand Down
4 changes: 2 additions & 2 deletions src/YesSql.Provider.PostgreSql/PostgreSqlDialect.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ public PostgreSqlDialect()
public override string NotInOperator(string values) => " <> all(array[" + values + "])";
public override string IdentitySelectString => "RETURNING";
public override string IdentityLastId => $"lastval()";
public override string IdentityColumnString => "SERIAL PRIMARY KEY";
public override string LegacyIdentityColumnString => "SERIAL PRIMARY KEY";
public override string IdentityColumnString => "BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY";
public override string LegacyIdentityColumnString => "INT GENERATED ALWAYS AS IDENTITY PRIMARY KEY";
public override string RandomOrderByClause => "random()";
public override bool SupportsIfExistsBeforeTableName => true;
public override bool PrefixIndex => true;
Expand Down

0 comments on commit ad8b7b5

Please sign in to comment.