新手问题 rails 如何从已存在的数据库反向生成 model

ghjcumt2008 · March 08, 2013 · Last by ghjcumt2008 replied at May 11, 2016 · 3570 hits

如题,以前的系统,表结构,关系,数据都已经存在,用 rails 开发,是否可以反向生成 model 呢?

1 - Add "gem 'legacy_data' " to the Gemfile 2 - Run "bundle install" 3 - Run "rails g models_from_tables" 自己发现个解决方案,不知道有没有人用过

#2 楼 @liuwenchao-github 三年前发的帖子,当时是 rails3,如果不行的话,只能尝试找下别的方案了

You need to Sign in before reply, if you don't have an account, please Sign up first.