Skip to content

Wrong FK naming #1

Description

@e1senh0rn

I found strange behavior, more likely to be a bug for me.
Steps to reproduce:
DBMS: MySQL 5.1.45

Create table with field supposed to be FK:

create_table :seals do |t|
  t.references :bag, :foreign_key => {:dependent => :delete}, :null => false
  ...
end

Constraint named "seals_ibfk_1" will be created.

And when I run

remove_foreign_key  :seals, :bags

SQL query with drop FK name "fk_seals_bag_id" would be generated.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions