如何从数据库活动记录模式 [英] how to generate active record models from database
问题描述
我在找一个工具或方法,它可以转换我的巨大的旧数据库的活动记录模型定义...喜欢逆向工程...
I am looking for a tool or a method which can convert my huge old database to active records model definitions ... like reverse engineering ...
推荐答案
这是少了逆向工程的问题,更多的是你的遗留数据库坚持以活动记录公约的问题。大多数人不从我的经验,这几乎是容易做的数据结束了一些迁移工作,得到它的状态,例如,它并遵守这些约定。 Rails是一个非常固执的软件,你就越争辩吧,快乐你会。
This is less a reverse engineering problem and more a "does your legacy database adhere to the active record conventions" problem. Most do not and from my experience, it's almost easier to do some migration work on the data end to get it in a state such that it does adhere to those conventions. Rails is a very opinionated piece of software, the less you argue with it, the happier you'll be.
我的两分钱...
这篇关于如何从数据库活动记录模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!