您好我正在学习rails,并按照教程.我在创建应用程序之后编辑迁移文件,然后运行rake db:migrate,然后运行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
Run Code Online (Sandbox Code Playgroud)
然后,当我运行'rake db:migrate'时,我收到了一个错误
Mysql2::Error: Table 'users' already exists: CREATE TABLE `users` ...
Run Code Online (Sandbox Code Playgroud)
在我应该运行'rake db:create'之后,我就得到了这个
user_auth_development already exists
user_auth_test already exists
Run Code Online (Sandbox Code Playgroud)