annotate_models
annotate_models copied to clipboard
[3.1.1] Annotate reads the default value from ActiveRecord::Enum. This bug or feature?
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
I think this is a bug. Because in DB default is definitely not a string. I'm affected by this as well :((
@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.