Module: ActiveRecord::ConnectionAdapters::ColumnDumper
- Defined in:
- lib/activerecord-mysql-awesome/active_record/connection_adapters/abstract/schema_dumper.rb
Instance Method Summary collapse
- #column_spec_for_primary_key(column, options) ⇒ Object
- #options_for_column_spec(table_name) ⇒ Object
- #table_options(table_name) ⇒ Object
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, ) return if column.type == :integer spec = { id: column.type.inspect } spec.merge!((column, ).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 (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_name) nil end |