Commit 93bb29c
fix: Fix PostgreSQL migration 014 trigger function syntax error
Fixed critical bug where sqlparser was dropping empty parentheses from
EXECUTE FUNCTION in CREATE TRIGGER statements. PostgreSQL requires ()
after function names in trigger definitions even when there are no parameters.
Migration 014 was failing with "syntax error at or near ';'" due to missing
parentheses in trigger creation. Added automatic detection and restoration
of missing parentheses for EXECUTE FUNCTION statements.
Changes:
- Enhanced migration parsing to handle both CREATE FUNCTION and CREATE TRIGGER sqlparser bugs
- Improved debug logging for migration statement parsing
- Updated migration 014 to use correct PostgreSQL function syntax
- This ensures migration 014 (queue pause functionality) executes correctly in production
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>1 parent 2f88587 commit 93bb29c
File tree
4 files changed
+89
-10
lines changed- src/migrations
4 files changed
+89
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
10 | 22 | | |
11 | 23 | | |
12 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
23 | | - | |
24 | | - | |
| 24 | + | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
15 | 19 | | |
16 | 20 | | |
17 | 21 | | |
18 | 22 | | |
19 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
20 | 28 | | |
21 | 29 | | |
22 | 30 | | |
| |||
41 | 49 | | |
42 | 50 | | |
43 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
44 | 80 | | |
45 | 81 | | |
46 | 82 | | |
47 | 83 | | |
48 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
49 | 87 | | |
50 | 88 | | |
| 89 | + | |
51 | 90 | | |
52 | 91 | | |
53 | 92 | | |
| |||
195 | 234 | | |
196 | 235 | | |
197 | 236 | | |
198 | | - | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
199 | 247 | | |
200 | 248 | | |
201 | 249 | | |
| |||
209 | 257 | | |
210 | 258 | | |
211 | 259 | | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
212 | 269 | | |
213 | 270 | | |
214 | 271 | | |
| |||
218 | 275 | | |
219 | 276 | | |
220 | 277 | | |
221 | | - | |
| 278 | + | |
222 | 279 | | |
223 | 280 | | |
224 | | - | |
| 281 | + | |
| 282 | + | |
225 | 283 | | |
226 | 284 | | |
227 | | - | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
228 | 294 | | |
229 | 295 | | |
230 | 296 | | |
| |||
0 commit comments