method

load_schema

Importance_0
v5.1.7 - Show latest stable - 0 notes - Class: DatabaseTasks
load_schema(configuration, format = ActiveRecord::Base.schema_format, file = nil, environment = env) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 226
      def load_schema(configuration, format = ActiveRecord::Base.schema_format, file = nil, environment = env) # :nodoc:
        file ||= schema_file(format)

        check_schema_file(file)
        ActiveRecord::Base.establish_connection(configuration)

        case format
        when :ruby
          load(file)
        when :sql
          structure_load(configuration, file)
        else
          raise ArgumentError, "unknown format #{format.inspect}"
        end
        ActiveRecord::InternalMetadata.create_table
        ActiveRecord::InternalMetadata[:environment] = environment
      end
Register or log in to add new notes.