I have the following in a migration:
create_table :model_with_a_long_name do |t|
t.references :other_model_with_an_equally_long_name, index: true
end
That produces an index with too long of a name for Postgres.
Is there a way to manually specify the index name (without adding the integer column and the index separately)?
Something like the following:
create_table :model_with_a_long_name do |t|
t.references :other_model_with_an_equally_long_name, index: true, index_name: 'model_and_other'
end
?