lib/generators/say_when/migration/templates/migration.rb in say_when-2.0.2 vs lib/generators/say_when/migration/templates/migration.rb in say_when-2.1.0
- old
+ new
@@ -2,11 +2,11 @@
class CreateSayWhenTables < ActiveRecord::Migration
def self.up
- create_table :say_when_jobs, :force => true do |t|
+ create_table :<%= prefix %>say_when_jobs, :force => true do |t|
t.string :group
t.string :name
t.string :status
@@ -27,25 +27,25 @@
t.integer :scheduled_id
t.timestamps null: false
end
- add_index :say_when_jobs, [:next_fire_at, :status]
- add_index :say_when_jobs, [:scheduled_type, :scheduled_id]
+ add_index :<%= prefix %>say_when_jobs, [:next_fire_at, :status]
+ add_index :<%= prefix %>say_when_jobs, [:scheduled_type, :scheduled_id]
- create_table :say_when_job_executions, :force => true do |t|
+ create_table :<%= prefix %>say_when_job_executions, :force => true do |t|
t.integer :job_id
t.string :status
t.text :result
t.datetime :start_at
t.datetime :end_at
end
- add_index :say_when_job_executions, :job_id
- add_index :say_when_job_executions, [:status, :start_at, :end_at]
+ add_index :<%= prefix %>say_when_job_executions, :job_id
+ add_index :<%= prefix %>say_when_job_executions, [:status, :start_at, :end_at]
end
def self.down
- drop_table :say_when_job_executions
- drop_table :say_when_jobs
+ drop_table :<%= prefix %>say_when_job_executions
+ drop_table :<%= prefix %>say_when_jobs
end
end