antrix
antrix•11mo ago

Manual migration update?

I've been hit by this issue when upgrading to the latest version during migration:
while executing migrations: error returned from database: syntax error at or near "TRIGGER"
I believe the reason for this is that CREATE OR REPLACE TRIGGER syntax doesn't work in AWS Aurora PG 13. Now upgrading to 14 is something we can do but will need much more effort and testing. https://github.com/windmill-labs/windmill/blob/main/backend/migrations/20231002123723_notify_delete_config.up.sql Meanwhile, I've manually created the trigger. But how do I set the "Last migration version" such that the app doesn't try to run this migration again upon startup?
GitHub
windmill/backend/migrations/20231002123723_notify_delete_config.up....
Open-source developer platform to turn scripts into workflows and UIs. Fastest workflow engine (5x vs Airflow). Open-source alternative to Airplane and Retool. - windmill-labs/windmill
7 Replies
Sindre
Sindre•11mo ago
_sqlx_migrations I think the table is called. ruben had a comment about how to change something here: https://discord.com/channels/930051556043276338/1054971402119286815/1181534690138669146 Hope that gets you closer
antrix
antrix•11mo ago
Nice. Now can someone share the checksum for 20231002123723_notify_delete_config? 🙂 never mind.. it's a sha 384 checksum of the sql file
rubenf
rubenf•11mo ago
I wanted to write a little guide on how to do this but you're doing it exactly right. we do recommend upgrading to 14 so this serve as a force function but it's really just a side-effect of having done that migration and not being able to revert it
antrix
antrix•11mo ago
Managed to get the the service started. Thanks! I think it's worth documenting minimum DB versions as you go, though.
rubenf
rubenf•11mo ago
I think we do mention it in self-host and we do log as part of your starting logs (we log your current PG version and the minimum required PG version)
antrix
antrix•11mo ago
I see in the app startup logs. But I don't see it here: https://www.windmill.dev/docs/advanced/self_host#use-an-external-database I don't recall seeing it in release notes either but those are so numerous that I could've missed!
Self Host | Windmill
Self-host Windmill on your own infrastructure.
rubenf
rubenf•11mo ago
you're right it doesn't say in the docs will fix right now