Pow.Ecto.Schema.Migration (Pow v1.0.24) 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 migration schema map.

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

Link to this section Functions

Specs

gen(map()) :: binary()

Generates migration file content.

Link to this function

new(context_base, schema_plural, config \\ [])

View Source

Specs

new(atom(), binary(), Pow.Config.t()) :: map()

Generates migration schema map.

Link to this function

schema(context_base, repo, table, migration_name, attrs, indexes, opts)

View Source

Specs

schema(atom(), atom(), binary(), binary(), list(), list(), Keyword.t()) :: map()

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