dynamic table names for Active Record models

后端 未结 7 1356
感情败类
感情败类 2021-01-27 13:25

I have an interesting Active Record problem and I\'m not quite sure what the cleanest solution is. The legacy database that I am integrating with has a strange wrinkle in its sc

7条回答
  •  清酒与你
    2021-01-27 13:41

    DB table partitioning is pretty common practice really. I'd be surprised if someone hasn't done this before. How about ActsAsPartitionable? http://revolutiononrails.blogspot.com/2007/04/plugin-release-actsaspartitionable.html

    Another possibility: can your DBMS pretend that the partitions are one big table? I think MySQL supports this.

提交回复
热议问题