Newer versions of rails let you specify that tables should be created with a uuid primary key like so:
create_table :foos, id: :uuid do |t|
# ...
end
Which is great. And for a long time rails has supported creating join tables like so:
create_join_table :foos, :bars do |t|
# ...
end
Also great. Except my tables have uuid primary keys and that generates foreign key columns of type integer instead of type uuid.
Looking over the documentation for create_join_table, I can't find anything obvious to change the column type. Is it possible to use create_join_table with uuids?
Or do I have create the join table manually:
create_table :bars_foos, id: false do |t|
t.uuid :bar_id
t.uuid :foo_id
end