# `Ecto.Adapter.Storage`
[🔗](https://github.com/elixir-ecto/ecto/blob/v3.13.6/lib/ecto/adapter/storage.ex#L1)

Specifies the adapter storage API.

# `storage_down`

```elixir
@callback storage_down(options :: Keyword.t()) ::
  :ok | {:error, :already_down} | {:error, term()}
```

Drops the storage given by options.

Returns `:ok` if it was dropped successfully.

Returns `{:error, :already_down}` if the storage has already been dropped or
`{:error, term}` in case anything else goes wrong.

## Examples

    storage_down(username: "postgres",
                 database: "ecto_test",
                 hostname: "localhost")

# `storage_status`

```elixir
@callback storage_status(options :: Keyword.t()) :: :up | :down | {:error, term()}
```

Returns the status of a storage given by options.

Can return `:up`, `:down` or `{:error, term}` in case anything goes wrong.

## Examples

    storage_status(username: "postgres",
                   database: "ecto_test",
                   hostname: "localhost")

# `storage_up`

```elixir
@callback storage_up(options :: Keyword.t()) ::
  :ok | {:error, :already_up} | {:error, term()}
```

Creates the storage given by options.

Returns `:ok` if it was created successfully.

Returns `{:error, :already_up}` if the storage has already been created or
`{:error, term}` in case anything else goes wrong.

## Examples

    storage_up(username: "postgres",
               database: "ecto_test",
               hostname: "localhost")

---

*Consult [api-reference.md](api-reference.md) for complete listing*
