apartmentex v0.2.3 Apartmentex.TenantActions

Summary

Functions

create_schema(repo, tenant)
drop_tenant(repo, tenant)
migrate_tenant(repo, tenant, direction \\ :up, opts \\ [])

Apply migrations to a tenant with given strategy, in given direction.

A direction can be given, as the third parameter, which defaults to :up A strategy can be given as an option, and defaults to :all

Options

  • :all - runs all available if true
  • :step - runs the specific number of migrations
  • :to - runs all until the supplied version is reached
  • :log - the level to use for logging. Defaults to :info. Can be any of Logger.level/0 values or false.
new_tenant(repo, tenant)