简体   繁体   中英

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.

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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