You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running migration I have the following error :
== 20191104103725 CreateDoorkeeperOpenidConnectTables: migrating ==============
01 -- create_table(:oauth_openid_requests)
01 -> 0.0031s
01 -- add_foreign_key(:oauth_openid_requests, :oauth_access_grants, {:column=>:access_grant_id})
01 rake aborted!
01 StandardError: An error has occurred, all later migrations canceled:
01
01 Column `access_grant_id` on table `oauth_openid_requests` does not match column `id` on `oauth_access_grants`, which has type `bigint(20)`. To resolve this issue, change the type of the `access_grant_id` column…
01 Original message: Mysql2::Error: Can't create table `OIDC_welcom_provider_production`.`oauth_openid_requests` (errno: 150 "Foreign key constraint is incorrectly formed")
It appears the default type for id on other tables is bigint, thus the foreign key must match the same type
Rails indeed started using bigint as default a while ago : PR rails/rails#26266
I successfully fixed it locally by editing the generated migration to
The migration currently generated by the gem itself looks like this :
lib/generators/doorkeeper/openid_connect/templates/migration.rb.erb
When running migration I have the following error :
It appears the default type for id on other tables is
bigint
, thus the foreign key must match the same typeRails indeed started using bigint as default a while ago : PR rails/rails#26266
I successfully fixed it locally by editing the generated migration to
Anyone ever had the same problem ?
The text was updated successfully, but these errors were encountered: