method
change_column
![Moderate documentation Importance_2](https://d2vfyqvduarcvs.cloudfront.net/images/importance_2.png?1349367920)
Ruby on Rails latest stable (v7.1.3.2)
-
2 notes -
Class: ActiveRecord::ConnectionAdapters::PostgreSQLAdapter
- 1.0.0
- 1.1.6
- 1.2.6
- 2.0.3 (0)
- 2.1.0 (0)
- 2.2.1 (0)
- 2.3.8 (0)
- 3.0.0 (0)
- 3.0.9 (-4)
- 3.1.0 (0)
- 3.2.1 (0)
- 3.2.8 (0)
- 3.2.13 (0)
- 4.0.2
- 4.1.8
- 4.2.1
- 4.2.7
- 4.2.9
- 5.0.0.1
- 5.1.7
- 5.2.3
- 6.0.0
- 6.1.3.1
- 6.1.7.7
- 7.0.0
- 7.1.3.2
- 7.1.3.4
- What's this?
change_column(table_name, column_name, type, options = {})
public
Changes the column of a table.
Register or
log in
to add new notes.
targinosilveira -
July 8, 2009
targinosilveira -
July 8, 2009
![Default_avatar_30](https://www.gravatar.com/avatar/67fb0981460f067487eb749b0a6f0702?default=http://apidock.com/images/default_avatar_30.png&size=30)
1 thank
Change Column.
Into your migration write the follow:
Using Exemple
def self.up change_column :yourtable, :your_field, :your_type_field end
![Default_avatar_30](https://www.gravatar.com/avatar/67fb0981460f067487eb749b0a6f0702?default=http://apidock.com/images/default_avatar_30.png&size=30)
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