Skip to content

Rails 7 create_enum generates array of arrays in schema.rb #55

@dpaluy

Description

@dpaluy

After migrating from Rails 6.1 to Rails 7 and updating this gem to 2.0.0
the schema.rb isn't generated correctly.

My migration is:

class AddMood < ActiveRecord::Migration[7.0]
  def change
    create_enum :mood, %w(happy great been_better)
  end
end

The schema.rb result is:

ActiveRecord::Schema.define(version: 2021_12_24_061446) do
  create_enum :mood, [["happy", "great", "been_better"]]
end

This double array fails when running: rake db:schema:load

Expected behavior

ActiveRecord::Schema.define(version: 2021_12_24_061446) do
  create_enum :mood, ["happy", "great", "been_better"]
end

Context (please complete the following information):

  • OS: MacOs 12.1
  • Gem Version: 2.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions