cctiger36/batch_manager

View on GitHub
lib/generators/batch_manager/migration/templates/active_record/migration.rb

Summary

Maintainability
A
0 mins
Test Coverage
class BatchManagerMigration < ActiveRecord::Migration
  def self.up
    create_table :schema_batches do |t|
      t.string :name
      t.integer :ran_times, :default => 0
      t.datetime :last_ran_at
    end
    add_index :schema_batches, :name
  end

  def self.down
    drop_table :schema_batches
  end
end