Module: ActiveRecord::ConnectionAdapters::ColumnDumper

Defined in:
lib/activerecord-mysql-awesome/active_record/connection_adapters/abstract/schema_dumper.rb

Instance Method Summary collapse

Instance Method Details

#column_spec_for_primary_key(column, options) ⇒ Object



10
11
12
13
14
# File 'lib/activerecord-mysql-awesome/active_record/connection_adapters/abstract/schema_dumper.rb', line 10

def column_spec_for_primary_key(column, options)
  return if column.type == :integer
  spec = { id: column.type.inspect }
  spec.merge!(prepare_column_options(column, options).delete_if { |key, _| [:name, :type].include?(key) })
end

#options_for_column_spec(table_name) ⇒ Object



6
7
8
# File 'lib/activerecord-mysql-awesome/active_record/connection_adapters/abstract/schema_dumper.rb', line 6

def options_for_column_spec(table_name)
  { table_name: table_name }
end

#table_options(table_name) ⇒ Object



16
17
18
# File 'lib/activerecord-mysql-awesome/active_record/connection_adapters/abstract/schema_dumper.rb', line 16

def table_options(table_name)
  nil
end