我在mysql中没有看到任何字段
我使用terminal CreateUsers创建了简单的迁移类我在mysql中没有看到任何字段,mysql,ruby-on-rails,rails-migrations,Mysql,Ruby On Rails,Rails Migrations,我使用terminal CreateUsers创建了简单的迁移类 class CreateUsers < ActiveRecord::Migration def up create_table :users do |t| t.column "first_name", :string, :limit => 25 t.string "last_name", :limit => 25 t
class CreateUsers < ActiveRecord::Migration
def up
create_table :users do |t|
t.column "first_name", :string, :limit => 25
t.string "last_name", :limit => 25
t.string "email", :default => "" :null => false
t.string "password", :limit => 40
t.timestamps
end
end
def down
drop_table :users
end
end
在那之后,我渴望进入mysql帐户。当我显示我的用户字段时,我只看到ID和时间戳字段
我想知道为什么我不能看到名字、姓氏、电子邮件和密码字段
谢谢在命令行中,输入db控制台rails dbconsole,然后键入PRAGMA table_infousers;。它说什么?@JTG ERROR 1064 42000:您的SQL语法有错误;检查与MySQL服务器版本对应的手册,以了解在第1行“PRAGMA table_infousers”附近使用的正确语法。我修复了代码。在终端rake db:migrate:redo上运行之后,我丢失了一封逗号t.string电子邮件:default=>:null=>false
rake db:migrate