Describe the bug
Wheels migration command fails when running a migration involving foreign key definitions. Running wheels migrate latest results in an error:
Running migration: latest...
Migrating from 0 up to 20260605110522.
-------- 20260605110522_create_products_table --------------
Error migrating to 20260605110522.
Component [wheels.databaseAdapters.PostgreSQL.PostgreSQLMigrator] has no function with name [addForeignKeyOptions]
To Reproduce
Steps to reproduce the behavior:
wheels new test_app
cd test_app
wheels generate scaffold Post title body:text publishedAt:datetime --belongsTo=author
wheels migrate latest
- See error
Expected behavior
Successful migration with creation of database table including a foreign key column.
Desktop
- OS: Ubuntu 26.04 LTS
- 4.0.2, 4.0.3-snapshot.1991 (bleeding-edge),
Additional context
Ran into this error with a more complicated model. This was the most direct reproduction method I found.
Error does NOT occur on Windows, with the same Wheels version.
Describe the bug
Wheels migration command fails when running a migration involving foreign key definitions. Running
wheels migrate latestresults in an error:To Reproduce
Steps to reproduce the behavior:
wheels new test_appcd test_appwheels generate scaffold Post title body:text publishedAt:datetime --belongsTo=authorwheels migrate latestExpected behavior
Successful migration with creation of database table including a foreign key column.
Desktop
Additional context
Ran into this error with a more complicated model. This was the most direct reproduction method I found.
Error does NOT occur on Windows, with the same Wheels version.