Class: ActiveRecord::ConnectionAdapters::TableDefinition
- Inherits:
-
Object
- Object
- ActiveRecord::ConnectionAdapters::TableDefinition
- Defined in:
- lib/padrino-hstore/activerecord.rb
Instance Method Summary collapse
-
#hstore(*args) ⇒ Object
Adds hstore type for migrations.
Instance Method Details
#hstore(*args) ⇒ Object
Adds hstore type for migrations. So you can add columns to a table like:
create_table :people do |t|
...
t.hstore :info
...
end
109 110 111 112 113 |
# File 'lib/padrino-hstore/activerecord.rb', line 109 def hstore(*args) = args. column_names = args column_names.each { |name| column(name, 'hstore', ) } end |