zero_downtime_migrations
zero_downtime_migrations copied to clipboard
[Ruby 3] Wrong number of arguments (given 2, expected 1)
Hi there,
When I was upgrading a Rails 6.1 app from Ruby v2 to v3, migrations stopped working. Here's an example:
create_table :my_table, id: :uuid, default: nil do |t|
# ...
end
And here's the output:
== 20210000000000 CreateMyTable: migrating =========================
-- create_table(:my_table, {:id=>:uuid, :default=>nil})
rails aborted!
StandardError: An error has occurred, this and all later migrations canceled:
wrong number of arguments (given 2, expected 1)
./db/migrate/20210000000000_create_my_table.rb:3:in `change'
./bin/rails:5:in `<top (required)>'
By removing the zero_downtime_migrations gem, everything works as expected :)
Cheers.
Ah, I think #43 might potentially fix this issue.