method

change_column

Importance_2
v3.2.13 - Show latest stable - 2 notes - Class: ActiveRecord::ConnectionAdapters::PostgreSQLAdapter
change_column(table_name, column_name, type, options = {}) public

Changes the column of a table.

Show source
Register or log in to add new notes.
July 8, 2009
1 thank

Change Column.

Into your migration write the follow:

Using Exemple

def self.up
  change_column :yourtable, :your_field, :your_type_field
end
July 8, 2009
0 thanks

Change Column. pt-br

Em sua migration escreva da seguinte forma:

Exemplo de uso.

def self.up
  change_column :sua_tabela, :seu_campo, :seu_tipo_campo
end