Class: CreateTasks
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateTasks
- Defined in:
- lib/generators/queue_dispatcher/migration/templates/tasks.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
22 23 24 |
# File 'lib/generators/queue_dispatcher/migration/templates/tasks.rb', line 22 def self.down drop_table "<%= options[:tasks_table_name] %>" end |
.up ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/generators/queue_dispatcher/migration/templates/tasks.rb', line 2 def self.up create_table "<%= options[:tasks_table_name] %>" do |t| t.text :target t.string :method_name t.text :args t.string :state t.integer :priority t.string :message t.integer :perc_finished t.string :remark t.text :output t.text :error_msg t.integer :task_queue_id t. end add_index "<%= options[:tasks_table_name] %>", :task_queue_id end |