expected v0.1.1 Expected.MnesiaStore View Source

Stores login data in a Mnesia table.

To use this store, configure :expected accordingly and set the table name in the application configuration:

config :expected,
  store: :mnesia,
  table: :logins,

This table is not created by the store. You can use helpers to create it (see Expected) or create it yourself. In the latter case, you must ensure that:

For instance:

  type: :bag,
  record_name: :login,
  attributes: Expected.Login.keys(),
  index: [:serial, :last_login],
  disc_copies: [node()]

For Mnesia to work properly, you need to add it to your extra applications:

def application do
    mod: {MyApp.Application, []},
    extra_applications: [:logger, :mnesia]