The length limit option in Rails migrations is called :limit
:
change_column :posts, :content, :string, :limit => 10000
If you are finding yourself changing VARCHAR
length limits a lot, you might want to read @depesz's blog post on VARCHAR
vs TEXT
.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…