Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.1.4] Migrations - Directly inheriting from ActiveRecord::Migration is not supported and Index name length #14

Open
tommyalvarez opened this issue Aug 16, 2018 · 0 comments

Comments

@tommyalvarez
Copy link

Update wupee generator to support Rails 5. Currently the generator creates migration files like this:

class CreateWupeeNotificationTypes < ActiveRecord::Migration
  def change
    create_table :wupee_notification_types do |t|
      t.string :name
      t.timestamps null: false
    end

    add_index :wupee_notification_types, :name, unique: true
  end
end

When they should be like this (note the [5.1]):

class CreateWupeeNotificationTypes < ActiveRecord::Migration[5.1]
  def change
    create_table :wupee_notification_types do |t|
      t.string :name
      t.timestamps null: false
    end

    add_index :wupee_notification_types, :name, unique: true
  end
end

Also check index names length. They are being generated with a length > 63 which breaks on regular gem code base.

@tommyalvarez tommyalvarez changed the title Migrations - Directly inheriting from ActiveRecord::Migration is not supported and Index name length [1.1.4] Migrations - Directly inheriting from ActiveRecord::Migration is not supported and Index name length Aug 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant