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
The safe version of change_column_null automatically generates a constraint of the form "#{table}_#{column}_null"; for wordy table and column names, this can easily exceed the 64-character constraint name length limit enforced by PostgreSQL. Ideally, we could do one of the following:
Always use a short constraint name (for example, strong_migrations_#{SecureRandom.uuid.delete "-"}); ideally this constraint shouldn't ever actually be seen or interacted with by a human
OR allow the migration to specify a custom constraint name as a kwarg
Thoughts?
The text was updated successfully, but these errors were encountered:
Roguelazer
changed the title
improve length of constraint name for safe_change_column_null
[idea] improve length of constraint name for safe_change_column_null
Jan 28, 2025
The safe version of
change_column_null
automatically generates a constraint of the form"#{table}_#{column}_null"
; for wordy table and column names, this can easily exceed the 64-character constraint name length limit enforced by PostgreSQL. Ideally, we could do one of the following:strong_migrations_#{SecureRandom.uuid.delete "-"}
); ideally this constraint shouldn't ever actually be seen or interacted with by a humanThoughts?
The text was updated successfully, but these errors were encountered: