Code Monkey home page Code Monkey logo

Comments (8)

pinnymz avatar pinnymz commented on June 28, 2024

This feature is already supported, albeit implicitly. I've added tests to ensure support will remain.

from migration_comments.

Smarre avatar Smarre commented on June 28, 2024

It didn’t work for me though, I didn’t get a comment in my column, with MySQL...

from migration_comments.

pinnymz avatar pinnymz commented on June 28, 2024

Strange... I just tested it with MySQL and it seemed to work properly. Can you create a test case that demonstrates this?

from migration_comments.

Smarre avatar Smarre commented on June 28, 2024

Okay, by any chance, did you use trunk version? I assume you did.

Looks like Activerecord 4 support has been committed after it, I’m using stable version of 0.3.2, maybe that is the problem... I’ll test with trunk version.

from migration_comments.

Smarre avatar Smarre commented on June 28, 2024

Nope, still not working, with current trunk. What kind of test would you like for this? I don’t really know how to do simple test for Activerecord (my environment is based to still unreleased/closed source so I can’t provide the gem I’m using for it, so I need to create different kind of system to run the migration for just the test).

from migration_comments.

pinnymz avatar pinnymz commented on June 28, 2024

Please see https://github.com/pinnymz/migration_comments/blob/master/test/add_comments_test.rb#L29 for an example. It may also be helpful to see a list of gems you are using, as it's possible there's some incompatibility somewhere.

from migration_comments.

yesnik avatar yesnik commented on June 28, 2024

Hello, I HAD the same issue. But then I found out that I didn't install gem migration_comments in my project correctly. That's why my migration failed with error: undefined method set_column_comment ...`.
After correct installation the following migrations worked for me:

class AddCurrentActivityDatesToCompanies < ActiveRecord::Migration
  def self.up
    add_column :companies, :current_activity_starts_on, :date, comment: 'Comment 1'
    set_column_comment :companies, :current_activity_ends_on, 'Comment 2'
    # ...
  end
  # ...
end

So, this gem works correctly in my environment: Ruby: 1.9.3-p547, Rails: 3.2.22, PostgreSQL: 9.2.13, Bundler: 1.7.9.

from migration_comments.

pinnymz avatar pinnymz commented on June 28, 2024

@yesnik glad to hear that you can confirm this. I'm closing the issue for now.

from migration_comments.

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.