Skip to content

Commit

Permalink
Update to v0.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
javad-zobeidi committed Sep 22, 2024
1 parent 2395028 commit af5a4d6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.4.2

- Fix id auto-increment for PostgreSQL compatibility [#127](https://github.com/vania-dart/framework/issues/118)

## 0.4.1

- Refactor validation rule customErrorMessage to message
Expand Down
2 changes: 0 additions & 2 deletions lib/src/database/migration.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1246,14 +1246,12 @@ class Migration {

/// Mapper for mysql to postgresql query
String _mysqlToPosgresqlMapper(String queryStr) {

queryStr = queryStr.replaceAllMapped(
RegExp(
r'`(\w+)`\s+BIGINT\(\d+\)\s+UNSIGNED\s+NOT\s+NULL\s+AUTO_INCREMENT',
caseSensitive: false),
(match) => '"${match[1]}" SERIAL NOT NULL PRIMARY KEY');


if (RegExp(r"PRIMARY KEY \(`.*?`\) USING BTREE").hasMatch(queryStr)) {
queryStr = queryStr.replaceAll(
RegExp(r"PRIMARY KEY \(`.*?`\) USING BTREE", caseSensitive: false),
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: vania
description: Fast, simple, and powerful backend framework for Dart built with
version: 0.4.1
version: 0.4.2
homepage: https://vdart.dev
repository: https://github.com/vania-dart/framework
issue_tracker: https://github.com/vania-dart/framework/issues
Expand Down

0 comments on commit af5a4d6

Please sign in to comment.