bug: ERROR: syntax error at or near "TRIGGER"
@rubenfiszel is already working on this.
Since May 22, 2025.
Assessment
This issue has not been assessed yet.
Description
Describe the bug
Hey
I'm trying to run the tool for the first time pointing to an external postgres database. Even after all the steps in the database-related documentation, I came across this error.
SQL Error [42601]: ERROR: syntax error at or near "TRIGGER"
Position: 23
Error position: line: 1 pos: 22
This error happens when we the migration 20231002123723_notify_delete_config.up.sql is executed.
happens because of incorrect usage of double quotes (") around the trigger name in the CREATE TRIGGER statement.
This way works fine
CREATE FUNCTION notify_global_setting_delete()
RETURNS TRIGGER AS $$
BEGIN
PERFORM pg_notify('notify_global_setting_change', OLD.name::text);
RETURN OLD;
END;
$$ LANGUAGE plpgsql;
CREATE TRIGGER notify_global_setting_delete
AFTER DELETE ON global_settings
FOR EACH ROW
EXECUTE FUNCTION notify_global_setting_delete();
To reproduce
- Point the windmill to use an external db (https://www.windmill.dev/docs/advanced/self_host#use-an-external-database)
- Try to up the service
Expected behavior
Migrations executed without error
Screenshots
No response
Browser information
No response
Application version
CE v1.491.5-17-g6e3613641
Additional Context
No response
- Dominant language
- Rust
- Stars
- 18k
- Forks
- 1.1k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 328
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from windmill-labs/windmill
-
webmux_oneshot
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
windmill-labs/windmill#10877 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
windmill-labs/windmill#11234 ·
-
bug webmux_oneshot
windmill-labs/windmill#11219 · 1 assignee ·
-
bug
windmill-labs/windmill#11196 · 1 assignee ·
-
windmill-labs/windmill#11002 · 1 assignee ·
All issues in windmill-labs/windmill
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100