我有以下迁移:
ggplot(GO, aes(x = d1, y = order(d2), fill = factor(d1))) +
geom_bar(stat = "identity", position = "identity", width = 0.6)
答案 0 :(得分:1)
如文件中所述:A primary key column called id will also be added implicitly, as it's the default primary key for all Active Record models...
您可以将参数传递给列,如下所示:
is_archived, default: 0, null: false
此处提供更多信息:http://guides.rubyonrails.org/active_record_migrations.html