Sha256: 4d9ff2f579819703b1c683d500d56a587a54bd775366652c0f7d964cee76e3f0

Contents?: true

Size: 518 Bytes

Versions: 5

Compression:

Stored size: 518 Bytes

Contents

# frozen_string_literal: true

module Audited
  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 & 2 rubygems

Version Path
velocity_audited-5.1.4 lib/generators/audited/migration.rb
velocity_audited-5.1.3 lib/generators/audited/migration.rb
audited-5.0.2 lib/generators/audited/migration.rb
audited-5.0.1 lib/generators/audited/migration.rb
audited-5.0.0 lib/generators/audited/migration.rb