嗨,我现在正在学习rails,并且正在学习教程.说明是在我创建应用程序后编辑迁移文件,然后运行rake db:migrate,然后运行rake db:create.
我已将迁移文件编辑为:
class CreateUsers < ActiveRecord::Migration
def change
create_table :users do |t|
t.string :username
t.string :email
t.string :encrypted_password
t.string :salt
t.timestamps
end
end
end
然后,当我运行‘rake db:Migrate’时,我收到一个错误
Mysql2::Error: Table 'users' already exists: CREATE TABLE `users` ...
在我运行"rake db:create"之后,我得到了这个
user_auth_development already exists
user_auth_test already exists