ctran / annotate_models

Annotate Rails classes with schema and routes info
Other
4.41k stars 598 forks source link

Fix max_size for empty cols array #1018

Open camilova opened 5 months ago

camilova commented 5 months ago

This ensure a max_size = zero for the max_schema_info_width method for the case when cols array is empty. When table has columns without comments that also are all ignored, then cols array results on empty array, resulting on a nil max_size. This is fixed using the same estrategy as with commented cols putting zero as default if there are no cols.