Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion PgCodeGen.scala
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ class PgCodeGen private (

def run(): Future[List[File]] =
for
_ <- Future {
_ <- Future.fromTry {
if debug then println("Running migrations...")

Zone:
Expand Down
14 changes: 14 additions & 0 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,17 @@ docker run --rm --name codegentest -e POSTGRES_PASSWORD=postgres -p 5555:5432 -d
-force=true && echo "✅ Code generation for provided connection ok.") || (docker rm -f codegentest; exit 1)

docker rm -f codegentest

echo "⏳Process should fail on running invalid sql"
if $CODEGEN_BIN \
-use-docker-image=postgres:17-alpine \
-output-dir=test-generated \
-pkg-name=generated \
-exclude-tables=unsupported_yet \
-source-dir=test/migrations_invalid \
-force=true; then
echo "❌ Process did not fail as expected"
exit 1
else
echo "✅ Process failed as expected"
fi
1 change: 1 addition & 0 deletions test/migrations_invalid/V1__test.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
syntax error;
Loading