我在尝试.getsmaller
:
rake db:migrate
据我所见,我在迁移文件中看不到任何新行:
/db/migrate/20180124161533_a_dd_uid_to_appuser_and_response.rb:22: syntax error, unexpected '\n', expecting =>
知道问题是什么吗?
答案 0 :(得分:1)
以下是修改代码的示例。只需在所有行的,
语句之前删除if
。例如,行:
add_column :appusers, :archived, :boolean, algorithm: :concurrently, if !column_exists?(:appusers, :archived)
应该是:
add_column :appusers, :archived, :boolean, algorithm: :concurrently if !column_exists?(:appusers, :archived)