Sha256: 055b864f9c4f4b2daf6338b85417d109c29ae512d90e5ff7b9e098a8e5509ce4

Contents?: true

Size: 483 Bytes

Versions: 2

Compression:

Stored size: 483 Bytes

Contents

module Jive
	module OauthToken
		module NextMigrationVersion
			# while methods have moved around this has been the implementation
			# since ActiveRecord 3.0
			def next_migration_number(dirname)
				next_migration_number = current_migration_number(dirname) + 1
				if ActiveRecord::Base.timestamped_migrations
					[Time.now.utc.strftime("%Y%m%d%H%M%S"), format("%.14d", next_migration_number)].max
				else
					format("%.3d", next_migration_number)
				end
			end
		end
	end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
jive-oauth_token-0.0.2 lib/generators/jive/oauth_token/next_migration_version.rb
jive-oauth_token-0.0.1 lib/generators/jive/oauth_token/next_migration_version.rb