Triplex v1.2.0-rc.0 Mix.Triplex View Source

Useful functions for any triplex mix task.

Here is the list of tasks we have for now:

Link to this section Summary

Functions

Ensures the migrations path exists for the given repo

Returns the path for your tenant migrations

Link to this section Functions

Link to this function ensure_tenant_migrations_path(repo, config \\ Project.config()) View Source

Ensures the migrations path exists for the given repo.

You can optionally give us the project config keyword list, the options we use are:

  • apps_path - this will be used to decide if it is an umbrella project, in this case it never fails, because umbrellas does not have migrations and that’s right
  • app_path - and this will be used to get the full path to the migrations directory, which is relative to this path

Returns the unchanged repo if succeed or raises a Mix.raise if it fails.

Link to this function migrations_path(repo \\ config().repo()) View Source

Returns the path for your tenant migrations.