Mix.ArangoXEcto (ArangoX Ecto v1.0.0) View Source
Migration task helper functions
Link to this section Summary
Functions
Creates the database specified in the config
Creates a new database of name
Creates a document to store migrations
Creates the migrations collection
Gets the default repo's database name
Gets the default repo
Gets all the migrated versions
Gets the path to the priv repo folder
Removes a version from the migrations collection
Creates a timestamp for the migration file
Updates the migrated versions in the migration collection
Link to this section Types
Specs
version() :: String.t() | Integer.t()
Specifies a migration version type
Link to this section Functions
Specs
create_base_database() :: {:ok, String.t()} | {:error, Integer.t()}
Creates the database specified in the config
Specs
Creates a new database of name
Specs
create_migration_document() :: :ok | {:error, Integer.t()}
Creates a document to store migrations
Creates a document with key of the database name. Seperating the migrations into seperate documents allow for more organisation and better debugging.
Specs
create_migrations() :: :ok | {:error, Integer.t()}
Creates the migrations collection
Creates an empty system collection to store migrations.
Specs
get_database_name!() :: String.t()
Gets the default repo's database name
Specs
get_default_repo!() :: Ecto.Repo.t()
Gets the default repo
The first in the list of running repos is used.
Specs
Gets all the migrated versions
Specs
path_to_priv_repo(Ecto.Repo.t()) :: String.t()
Gets the path to the priv repo folder
Will return a full file path to the priv/repo folder.
Specs
Removes a version from the migrations collection
Specs
timestamp() :: String.t()
Creates a timestamp for the migration file
Specs
Updates the migrated versions in the migration collection