7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# File 'lib/activerecord-mysql-comment/active_record/connection_adapters/abstract_mysql_adapter.rb', line 7
def add_index_options(table_name, column_name, options = {})
if options.key?(:comment)
= options[:comment]
options.delete(:comment)
end
index_name, index_type, index_columns, index_options, algorithm, using = super
if .present?
if index_options
index_options << " COMMENT '#{}'"
else
index_options = " COMMENT '#{}'"
end
end
[index_name, index_type, index_columns, index_options, algorithm, using]
end
|