Module: ActiveRecord::ConnectionAdapters::PostgreSQL::ColumnDumper
- Included in:
- ActiveRecord::ConnectionAdapters::PostgreSQLAdapter
- Defined in:
- lib/active_record/connection_adapters/postgresql/schema_dumper.rb
Instance Method Summary collapse
- #column_spec_for_primary_key(column) ⇒ Object
-
#migration_keys ⇒ Object
Adds
:array
as a valid migration key. -
#prepare_column_options(column) ⇒ Object
Adds
:array
option to the default set.
Instance Method Details
#column_spec_for_primary_key(column) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/active_record/connection_adapters/postgresql/schema_dumper.rb', line 5 def column_spec_for_primary_key(column) spec = super if schema_type(column) == :uuid spec[:default] ||= 'nil' end spec end |
#migration_keys ⇒ Object
Adds :array
as a valid migration key
21 22 23 |
# File 'lib/active_record/connection_adapters/postgresql/schema_dumper.rb', line 21 def migration_keys super + [:array] end |
#prepare_column_options(column) ⇒ Object
Adds :array
option to the default set
14 15 16 17 18 |
# File 'lib/active_record/connection_adapters/postgresql/schema_dumper.rb', line 14 def (column) spec = super spec[:array] = 'true' if column.array? spec end |