Class: CreateTaskQueues
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateTaskQueues
- Defined in:
- lib/generators/queue_dispatcher/migration/templates/task_queues.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
15 16 17 |
# File 'lib/generators/queue_dispatcher/migration/templates/task_queues.rb', line 15 def self.down drop_table "<%= options[:task_queues_table_name] %>" end |
.up ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 |
# File 'lib/generators/queue_dispatcher/migration/templates/task_queues.rb', line 2 def self.up create_table "<%= options[:task_queues_table_name] %>" do |t| t.string :name t.string :state t.integer :pid t.boolean :terminate_immediately t. end add_index "<%= options[:task_queues_table_name] %>", :name end |