Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] Support database comments #433

Closed
okuramasafumi opened this issue Jan 9, 2017 · 5 comments
Closed

[Feature request] Support database comments #433

okuramasafumi opened this issue Jan 9, 2017 · 5 comments

Comments

@okuramasafumi
Copy link

Rails 5 supports comments in database. It would be convenient if they appear in annotations.

@deepj
Copy link

deepj commented Mar 15, 2017

Rails 5 supports adding comments in migrations

http://blog.bigbinary.com/2016/06/21/rails-5-supports-adding-comments-migrations.html

@hemju
Copy link

hemju commented Apr 28, 2017

This would be a great feature. Anything we can help you to implement it?

@gambala
Copy link

gambala commented Jun 13, 2017

PR was merged, but feature didn't work for me :(

Ruby 2.4.1, Rails and ActiveRecord 5.1.1, annotate 2.7.2, postgresql 9.5.

Used both annotate and rake annotate_models. Rake task was generated by annotate:install with this option in generated file:

'with_comment'              => true

My migration with comment:

class CommentOtherLocationsOnTasksAsDeprecated < ActiveRecord::Migration[5.1]
  def change
    change_column :tasks, :location_address, :string, comment: 'Deprecated. Use addresses field instead.'
  end
end

And this comment in schema.rb after running migration:

  create_table "tasks", id: :serial, force: :cascade do |t|
    ...
    t.string "location_address", comment: "Deprecated. Use addresses field instead."
    ...
  end

And annotation:

# == Schema Information
#
# Table name: tasks
#
#  id                 :integer          not null, primary key
#  title              :string
#  location_address   :string
#  ...

@okuramasafumi
Copy link
Author

Thank you for your work @motot and @dslh!
It seems the final working version is not released yet, so I cannot close this issue.
I'm waiting for the new release, @ctran!

@ctran ctran closed this as completed Feb 14, 2019
@Adeynack
Copy link
Contributor

Adeynack commented Apr 3, 2019

@ctran : You closed the issue on Feb. 14th. However, the last release I see on GH dates 2018. Is this feature here bundled in this last release (2.7.4) or not yet? If not yet, when will it be? My team wants to use that feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants