Method: MultitenancyTools.create

Defined in:
lib/multitenancy_tools.rb

.create(name, sql_file, connection = ActiveRecord::Base.connection) ⇒ Object

Creates a new schema using the SQL file as template. This SQL file can be generated by SchemaDumper.

Parameters:

  • schema name

  • absolute path to the SQL template

  • (defaults to: ActiveRecord::Base.connection)

    connection adapter

See Also:



24
25
26
# File 'lib/multitenancy_tools.rb', line 24

def self.create(name, sql_file, connection = ActiveRecord::Base.connection)
  SchemaCreator.new(name, connection).create_from_file(sql_file)
end