annotate_models icon indicating copy to clipboard operation
annotate_models copied to clipboard

[3.1.1] Annotate reads the default value from ActiveRecord::Enum. This bug or feature?

Open denisoster opened this issue 4 years ago • 2 comments

Annotate reads the default value from ActiveRecord::Enum This bug or feature?

ALTER TABLE table_name ADD field INTEGER NOT NULL DEFAULT 0;

#  field      :integer          default("UDP"), not null

Version

  • annotate v3.1.1
  • Rails 6.0.3.3
  • ruby 2.5.5p157 (2019-03-15 revision 67260) [x86_64-darwin19]

@drwl @sashabelozerov @ctran

denisoster avatar Oct 06 '20 06:10 denisoster

I think this is a bug. Because in DB default is definitely not a string. I'm affected by this as well :((

ixti avatar Sep 07 '23 17:09 ixti

@ixti in case you're curious, I talk about this on my repo https://github.com/drwl/annotaterb/issues/57. tl;dr if it was easy to support db level annotations then I would.

drwl avatar Sep 08 '23 00:09 drwl