Skip to content

Commit 6e16942

Browse files
authored
Merge pull request rails#43687 from ghiculescu/patch-6
Add warning about `type` arg in `column_exists?`
2 parents 8337645 + e9a6c24 commit 6e16942

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,9 @@ def columns(table_name)
124124
# column_exists?(:suppliers, :name)
125125
#
126126
# # Check a column exists of a particular type
127+
# #
128+
# # This works for standard non-casted types (eg. string) but is unreliable
129+
# # for types that may get chasted (eg. char).
127130
# column_exists?(:suppliers, :name, :string)
128131
#
129132
# # Check a column exists with a specific definition

0 commit comments

Comments
 (0)