pg migration raw sql CREATE FUNCTION gets error: "TypeError: Cannot redefine property: then"
When I try:
in my migration "up" I get "✖ Migration failed with TypeError: Cannot redefine property: then" when migrating latest.
When I try the same in pgadmin it works no issue. Any ideas/suggestions?
Solution:Jump to solution
So took a bit of searching every possible previous issue/thread and finally stumbled across this answer from @koskimas in another thread last year:
https://discord.com/channels/890118421587578920/1108366659707736154/1108386004232060938
You have two (or more) incompatible versions of Kysely and you are mixing parts of them.In my case this somehow occurred from kysely v0.27.3 + kysely-ctl 0.8.7. Bumped to v.0.27.4 + 0.9.0 respectively fixed it....
1 Reply
Solution
So took a bit of searching every possible previous issue/thread and finally stumbled across this answer from @koskimas in another thread last year:
https://discord.com/channels/890118421587578920/1108366659707736154/1108386004232060938
You have two (or more) incompatible versions of Kysely and you are mixing parts of them.In my case this somehow occurred from kysely v0.27.3 + kysely-ctl 0.8.7. Bumped to v.0.27.4 + 0.9.0 respectively fixed it.