Ruby on Rails Wednesday, March 2, 2011

I'd like to use migrations to add/remove/modify columns from a database.
Rails makes that relatively painless. One feature I don't see is the
ability to comment on columns in the schema. How can I add a column
comment to a migration?

We're using Oracle/PosgreSQL (and we're thinking of adding SQL Server in
the future.)

The SQL for adding a comment to a column is oddly enough the same for
all three it seems but I'd rather not take a chance.

COMMENT ON COLUMN table_name.column_name IS 'Random Comment';

Thanks in advance,

M

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment