【发布时间】:2015-08-12 22:27:28
【问题描述】:
我应该在 Rails 中为 postgresql 函数创建迁移吗?
如何进行迁移以及如何调用函数?
我有这个:
class CreateReportFunction < ActiveRecord::Migration
def up
execute <<-SPROC
CREATE OR REPLACE FUNCTION reporter
...
SPROC
end
end
然后我做了一个 rake:db,但我怎么知道它工作正常?如何使用该功能?
【问题讨论】:
标签: ruby-on-rails postgresql function