Sha256: 5e34bcf91d754908b0ea5bedfd893c41dc3744887fe05b66cb565a224aa8af99

Contents?: true

Size: 526 Bytes

Versions: 5

Compression:

Stored size: 526 Bytes

Contents

# frozen_string_literal: true

module VelocityAudited
  module Generators
    module Migration
      # Implement the required interface for Rails::Generators::Migration.
      def next_migration_number(dirname) #:nodoc:
        next_migration_number = current_migration_number(dirname) + 1
        if ::ActiveRecord::Base.timestamped_migrations
          [Time.now.utc.strftime("%Y%m%d%H%M%S"), "%.14d" % next_migration_number].max
        else
          "%.3d" % next_migration_number
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
velocity_audited-6.0.4 lib/generators/audited/migration.rb
velocity_audited-6.0.3 lib/generators/audited/migration.rb
velocity_audited-6.0.1 lib/generators/audited/migration.rb
velocity_audited-5.1.6 lib/generators/audited/migration.rb
velocity_audited-5.1.5 lib/generators/audited/migration.rb