method

change_column

rails latest stable - Class: ActiveRecord::ConnectionAdapters::PostgreSQLAdapter

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v3.2.13) is shown here.

change_column(table_name, column_name, type, options = {})
public

Changes the column of a table.

2Notes

Change Column.

targinosilveira · Jul 8, 20091 thank

Into your migration write the follow:

==== Using Exemple

def self.up
change_column :yourtable, :your_field, :your_type_field
end

Change Column. pt-br

targinosilveira · Jul 8, 2009

Em sua migration escreva da seguinte forma:

==== Exemplo de uso.

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