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.
132 133 134 135 136 137 138 139 140 141 142 143 144 |
# File 'lib/active_record/migration.rb', line 132 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 |