Rails 3.2.6 & database views creation through migrations

后端 未结 2 2285
我寻月下人不归
我寻月下人不归 2021-02-19 06:44

I\'m using rails 3.2.6 and I need to create a database VIEW. As usual I created a migration and I tried to achieve the goal using the execute method.

Unfortunately the m

相关标签:
2条回答
  • 2021-02-19 07:22

    It looks like you've answered your own question, but I'll make a related suggestion. Try the rails_sql_views gem. That link goes to the original repo on GitHub. It looks like it's not being maintained anymore, though. It would be worth looking at the network graph and trying one of the forks. I'm not positive that any of the forks supports Rails 3.2.6, but I'd suggest looking through them. Christian Eichhorn added support for the mysql2 adapter about three years ago.

    0 讨论(0)
  • 2021-02-19 07:35

    I've made a gem called rails_db_views which is compatible with Rails 4, and still maintained.

    Regards,

    Yacine.

    0 讨论(0)
提交回复
热议问题