简体   繁体   English

遗留表的模型生成

[英]Model generation for legacy tables

https://www.ruby-toolbox.com/projects/magic_model_generator我们无法使用上述gem,是否还有其他满足从Rails3现有遗留数据库生成模式/模型类的需求。

The only other gem for this is Dr Nic's Magic Models , but is suffers from the same problem as your suggestion, not updated for Rails 3. 唯一的其他宝石是Nic博士的魔术模型 ,但与您的建议存在相同的问题,未针对Rails 3进行更新。

I investigated this recently and came to the conclusion that you could either update Dr Nic´s gem to work with Rails 3 (and I would cheer you on if you did) or go for a table by table approach and model the legacy tables by hand. 我最近对此进行了调查,得出的结论是,您可以更新Nic博士的宝石以使其与Rails 3配合使用(如果您愿意,我会为您加油),或者逐个表地进行处理并手动为旧表建模。

Since I only had a small number of tables I choose to do it by hand. 由于我只有少数几张桌子,所以我选择手动进行。 But getting Dr Nic's gem up to speed would be awesome so if you go that route let me know and maybe we could help out. 但是,让Nic博士的宝石快速运转起来真是太棒了,因此,如果您走那条路,请告诉我,也许我们可以提供帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM