Exception: ActiveRecord::InvalidMigrationTimestampError
- Inherits:
-
MigrationError
- Object
- StandardError
- ActiveRecordError
- MigrationError
- ActiveRecord::InvalidMigrationTimestampError
- Defined in:
- lib/active_record/migration.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#initialize(version = nil, name = nil) ⇒ InvalidMigrationTimestampError
constructor
A new instance of InvalidMigrationTimestampError.
Constructor Details
#initialize(version = nil, name = nil) ⇒ InvalidMigrationTimestampError
Returns a new instance of InvalidMigrationTimestampError.
135 136 137 138 139 140 141 142 143 144 145 146 147 |
# File 'lib/active_record/migration.rb', line 135 def initialize(version = nil, name = nil) if version && name super(<<~MSG) Invalid timestamp #{version} for migration file: #{name}. Timestamp must be in form YYYYMMDDHHMMSS, and less than #{(Time.now.utc + 1.day).strftime("%Y%m%d%H%M%S")}. MSG else super(<<~MSG) Invalid timestamp for migration. Timestamp must be in form YYYYMMDDHHMMSS, and less than #{(Time.now.utc + 1.day).strftime("%Y%m%d%H%M%S")}. MSG end end |