ArangoXEcto.Migration.create

You're seeing just the function create, go back to ArangoXEcto.Migration module for more information.

Specs

create(
  %ArangoXEcto.Migration.Collection{name: term(), type: term()}
  | %ArangoXEcto.Migration.Index{
      collection_name: term(),
      deduplication: term(),
      fields: term(),
      minLength: term(),
      sparse: term(),
      type: term(),
      unique: term()
    }
) :: :ok | {:error, binary()}

Creates an object

Will create the passed object, either a collection or an index.

Examples

Create a collection

iex> create(collection("users"))
:ok

Create an index

iex> create(index("users", [:email])
:ok