Sha256: d4470562d392ecd0cfe75f62d7f002c5dc51d304b65c58a0f068a5668930da69

Contents?: true

Size: 588 Bytes

Versions: 1

Compression:

Stored size: 588 Bytes

Contents

require 'rails/generators/active_record'

module ActiveRecord
  module Generators
    class JobLogMigrationGenerator < Base
      source_root File.expand_path("../templates", __FILE__)
      argument :name, :type => :string, :default => "add_job_logs_table"

      def create_migration_file
        migration_template "migration.rb", "db/migrate/#{file_name}.rb"
      end

      protected

        def job_log_table_name
          'jobs_dashboard_job_logs'
        end

        def migration_version
          "[#{ActiveRecord::Migration.current_version}]"
        end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jobs_dashboard-0.3.4 lib/generators/active_record/job_log_migration_generator.rb