Pow v0.1.0-alpha.5 Pow.Ecto.Schema.Migration View Source

Generates schema migration content.

Configuration options

  • :repo - the ecto repo to use. This value defaults to the derrived context base repo from the context_base argument in gen/2.

  • :table - the ecto table name, defaults to “users”.

  • :attrs - list of attributes, defaults to the results from Pow.Ecto.Schema.Fields.attrs/1.

  • :indexes - list of indexes, defaults to the results from Pow.Ecto.Schema.Fields.indexes/1.

Link to this section Summary

Functions

Generates migration file content

Generates a migration module name

Generates a schema map to be used with the schema template

Link to this section Functions

Link to this function gen(context_base, config \\ []) View Source
gen(atom(), Pow.Config.t()) :: binary()

Generates migration file content.

Generates a migration module name.

Link to this function schema(context_base, repo, table, migration_name, attrs, indexes, opts) View Source
schema(atom(), atom(), binary(), binary(), list(), list(), Keyword.t()) ::
  map()

Generates a schema map to be used with the schema template.