Code Monkey home page Code Monkey logo

Comments (3)

matthuhiggins avatar matthuhiggins commented on June 12, 2024

A workaround for you is to use the :name option, which works the same as remove_index:

remove_foreign_key :groups, :name => 'members_group_id_fk'

from foreigner.

raimo avatar raimo commented on June 12, 2024

Additionally the following works (based on the source code of lib/foreigner/connection_adapters/postgresql_adapter.rb):

remove_foreign_key(:groups, :column => 'participant_id')

The foreign key name can naturally be anything depending on the underlying database.

from foreigner.

matthuhiggins avatar matthuhiggins commented on June 12, 2024

The foreign key api is the same as the add/remove index api that rails comes with, and it seems like everything is working. The only thing I think could be improved is a patch for documentation.

from foreigner.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.