Class: ActiveRecord::ConnectionAdapters::TableDefinition
- Inherits:
-
Object
- Object
- ActiveRecord::ConnectionAdapters::TableDefinition
- Defined in:
- lib/active_record/connection_adapter_with_uuid.rb
Instance Method Summary collapse
-
#uuid(*args) ⇒ Object
Adds hstore type for migrations.
Instance Method Details
#uuid(*args) ⇒ Object
Adds hstore type for migrations. So you can add columns to a table like:
create_table :people, :id => false do |t|
...
t.uuid :id, :null => false
...
end
12 13 14 15 16 |
# File 'lib/active_record/connection_adapter_with_uuid.rb', line 12 def uuid(*args) = args. column_names = args column_names.each { |name| column(name, 'uuid', ) } end |