18 lines
412 B
Ruby
18 lines
412 B
Ruby
class DropPsqlJobsPopFn < ActiveRecord::Migration
|
|
tag :predeploy
|
|
|
|
def self.connection
|
|
Delayed::Job.connection
|
|
end
|
|
|
|
def self.up
|
|
if connection.adapter_name == 'PostgreSQL'
|
|
connection.execute("DROP FUNCTION IF EXISTS pop_from_delayed_jobs(varchar, varchar, integer, integer, timestamp without time zone)")
|
|
end
|
|
end
|
|
|
|
def self.down
|
|
raise ActiveRecord::IrreversibleMigration
|
|
end
|
|
end
|