【发布时间】:2016-02-05 20:17:30
【问题描述】:
我有一个使用我无法控制的外部数据库的 Rails 4 应用程序。所以没有架构或迁移。无论如何,我创建了一个模型并使用 db 在模型中设置 table_name。
当我运行 cucumber 时,它会删除数据库表!? 知道为什么以及如何避免它吗?
$ bundle exec cucumber
Running via Spring preloader in process 18865
.../db/schema.rb doesn't exist yet. Run `rake
db:migrate` to create it, then try again. If you do not intend to use a
database, you should instead alter
.../config/application.rb to limit the frameworks that
will be loaded.
之后数据库为空,没有表。
【问题讨论】:
标签: mysql ruby-on-rails ruby ruby-on-rails-4 cucumber