fix(ci): reject procedural migration bodies
ci / verify (pull_request) Successful in 9m24s

This commit is contained in:
2026-07-17 17:04:05 +08:00
parent f226f9c953
commit 86509d5c43
3 changed files with 15 additions and 2 deletions
+9 -1
View File
@@ -165,7 +165,15 @@ END;
$$;
SQL
commit_all "$repo" plpgsql_block_end
expect_pass "$repo" "$base"
expect_fail "$repo" "$base" 'procedural SQL body'
repo=$(new_repo ordinary_string_procedural_body)
base=$(git -C "$repo" rev-parse HEAD)
cat >"$repo/apps/api/migrations/0002_do_string.sql" <<'SQL'
DO LANGUAGE plpgsql 'BEGIN DROP TABLE accounts; END';
SQL
commit_all "$repo" ordinary_string_procedural_body
expect_fail "$repo" "$base" 'procedural SQL body'
repo=$(new_repo ordinary_string_boundary)
base=$(git -C "$repo" rev-parse HEAD)