问题:
I wrongly named a column hased_password
instead of hashed_password
. 我错误地将列命名为hased_password
而不是hashed_password
。
How do I update the database schema, using migration to rename this column? 如何使用迁移重命名此列来更新数据库架构?
解决方案:
参考一: https://stackoom.com/question/8MDL/如何在Ruby-on-Rails迁移中重命名数据库列参考二: https://oldbug.net/q/8MDL/How-can-I-rename-a-database-column-in-a-Ruby-on-Rails-migration
来源:oschina
链接:https://my.oschina.net/stackoom/blog/4480378