Giter VIP home page Giter VIP logo

enum_ref_table's People

Contributors

oggy avatar

Watchers

 avatar

enum_ref_table's Issues

Make this a fork of enum_table

There are some outstanding improvements/issues that are open on enum_table, and there has now been an improvement made and an issue opened on this repo. If this was to be a fork of enum_table, it'd make sharing changes and improvements between the projects much easier.

The README to this project states that there are name conflicts with the enum_column3 gem. I'm wondering if this could be solved by instead renaming something within enum_table itself, writing some sort of monkey patch to achieve the desired behavior, or if whatever is conflicting can be renamed in a branch called no_conflict or something that a project's Gemfile could be pointed to.

I just think having multiple apps in production with different developers working on them can help smooth out rough edges and reveal edge cases sooner, which could benefit all users of the gem.

Let me know thoughts @rmw @oggy

Enum_ref_table: Update gem to set ref table BEFORE foreign key constraints

In schema.rb, this gem places the table creation UNDER the all of the foreign key constraints. This is a problem because the constraint can't be created due to this ordering (in schema:load & test:prepare)

Noticed that the foreigner was potentially part to blame for the ordering issue...but we know you and we're harassing you about it ๐Ÿ˜„

For example:

# table
  create_table "media", :force => true do |t|
    t.integer  "user_id",                  :null => false
    t.integer  "couple_id",                :null => false
    t.string   "uri",                      :null => false
    t.integer  "type_id",                  :null => false
    t.string   "mime_type",  :limit => 64, :null => false
    t.datetime "created_at",               :null => false
    t.datetime "updated_at",               :null => false
  end

# stuff
  add_foreign_key "media", "media_types", :name => "media_type_id_fk", :column => "type_id"
# stuff

  create_enum_ref_table "media_types", force: true do |t|
    t.add "image", 1
  end

end

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.