View Source Pow.Ecto.Schema.Migration (Pow v1.0.36)

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.

Summary

Functions

Generates migration file content.

Generates migration schema map.

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

Functions

@spec gen(map()) :: binary()

Generates migration file content.

Link to this function

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

View Source
@spec 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
@spec schema(atom(), atom(), binary(), binary(), list(), list(), Keyword.t()) :: map()

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