Comments (8)
This feature is already supported, albeit implicitly. I've added tests to ensure support will remain.
from migration_comments.
It didn’t work for me though, I didn’t get a comment in my column, with MySQL...
from migration_comments.
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.
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.
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.
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.
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.
@yesnik glad to hear that you can confirm this. I'm closing the issue for now.
from migration_comments.
Related Issues (20)
- Comments not generated in Rails 4.1 HOT 6
- Postgresql uuid default is not set. HOT 4
- New release? HOT 5
- won't work with jruby? HOT 3
- Incompatible with schema_plus HOT 12
- Incompatible with foreigner HOT 5
- Varchar primary key fields with name other than id changed to int(11) ai HOT 4
- Changing column comment crashes with Postgresql HOT 2
- Support Rails 5 HOT 1
- Missing information about license terms HOT 1
- v0.4.0 connection adapters regression HOT 3
- v0.4.0 introduces a breaking API change for setting table comments HOT 7
- set_column_comment to MySQL bigint(20) primary_key revert to int(11) HOT 2
- Silence warnings
- What if you are using Active Record > 4.2 but Ruby < 2.1 ? Weird conflict with UUIDs HOT 1
- undefined method `descendants' for #<Module:0x0000aaab167ce9c8> (NoMethodError) HOT 1
- undefined method `descendants' for MigrationComments::ActiveRecord::ConnectionAdapters::AbstractAdapter::SchemaCreation:Module (NoMethodError) HOT 1
- Tables with no columns... HOT 2
- ColumnDefinition constant not found HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from migration_comments.