当前位置: 动力学知识库 > 问答 > 编程问答 >

database - Schema rails file showing non existing column

问题描述:

I have a strange problem with my schema file. Recently I accidently saw that there is a column in one table, that doesn't exist in a database. It looks like this

im mysql console

in rails console

so clearly there 6 columns besides the id column. but now in my db/schema file there is also a 'phone' column.

How is it possible? And how to delete this column from schema file??

网友答案:

This might fix your schema.rb file:

$ rake db:schema:dump
分享给朋友:
您可能感兴趣的文章:
随机阅读: