Module: ActiveRecord::DatabaseUnsignedColumns::Definitions::Table
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/active_record/database_unsigned_columns/definitions/table.rb
Overview
Basado en thewebfellas.com/blog/2008/6/2/unsigned-integers-for-mysql-on-rails Modulo con extensiones/patches para ActiveRecord::ConnectionAdapters::TableDefinition
Instance Method Summary collapse
-
#column_with_unsigned(name, type, options = {}) ⇒ Object
Permite dentro de una migracion: def change create_table :tablename do |t| t.integer :uno, unsigned: true end end.
Instance Method Details
#column_with_unsigned(name, type, options = {}) ⇒ Object
Permite dentro de una migracion: def change
create_table :tablename do |t|
t.integer :uno, unsigned: true
end
end
24 25 26 27 28 |
# File 'lib/active_record/database_unsigned_columns/definitions/table.rb', line 24 def column_with_unsigned(name, type, = {}) ret_column = column_without_unsigned(name, type, ) ret_column[name].unsigned = [:unsigned] ret_column end |