method
table_options
v5.0.0.1 -
Show latest stable
- Class:
ActiveRecord::ConnectionAdapters
table_options(table_name)public
No documentation available.
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 545
def table_options(table_name)
create_table_info = create_table_info(table_name)
# strip create_definitions and partition_options
raw_table_options = create_table_info.sub(/\A.*\n\) /, '').sub(/\n\/\*!.*\*\/\n\z/, '').strip
# strip AUTO_INCREMENT
raw_table_options.sub!(/(ENGINE=\w+)(?: AUTO_INCREMENT=\d+)/, '\1')
# strip COMMENT
raw_table_options.sub!(/ COMMENT='.+'/, '')
raw_table_options
end