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
Fortunately, rails since 5.1 adds foreign key columns (like post_id) with bigint types (or the type explicitly configured by the application). This works implicitly when adding them by add_reference helper. But people sometimes add columns via add_column or t.column or t.integer, so this can lead to incorrect (like integer) types columns. I saw a couple of offences in my application.
I want to propose a cop that detects such cases based on the configured type (bigint by default), but can be configured via some cop's option.
Fortunately, rails since 5.1 adds foreign key columns (like
post_id
) withbigint
types (or the type explicitly configured by the application). This works implicitly when adding them byadd_reference
helper. But people sometimes add columns viaadd_column
ort.column
ort.integer
, so this can lead to incorrect (likeinteger
) types columns. I saw a couple of offences in my application.I want to propose a cop that detects such cases based on the configured type (
bigint
by default), but can be configured via some cop's option.@koic Are you open for this?
The text was updated successfully, but these errors were encountered: