method

inherited

rails latest stable - Class: ActiveRecord::InvalidMigrationTimestampError::Migration

Method not available on this version

This method is only available on newer versions. The first available version (v7.2.3) is shown here.

inherited(subclass)
public

No documentation available.

# File activerecord/lib/active_record/migration.rb, line 620
    def self.inherited(subclass) # :nodoc:
      super
      if subclass.superclass == Migration
        major = ActiveRecord::VERSION::MAJOR
        minor = ActiveRecord::VERSION::MINOR
        raise StandardError, "Directly inheriting from ActiveRecord::Migration is not supported. "            "Please specify the Active Record release the migration was written for:\n"            "\n"            "  class #{subclass} < ActiveRecord::Migration[#{major}.#{minor}]"
      end
    end