Skip to content

Commit

Permalink
Release v0.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
José Valim committed Mar 4, 2015
1 parent 01809ac commit c485c17
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 24 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

## v0.9.0-dev
## v0.9.0 (2015-03-05)

* Enhancements
* Add MySQL support
Expand Down
43 changes: 24 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ config :my_app, Repo,
adapter: Ecto.Adapters.Postgres,
database: "ecto_simple",
username: "postgres",
password: "postgres",
hostname: "localhost"
password: "postgres"

# In your application code
defmodule Repo do
Expand Down Expand Up @@ -47,38 +46,44 @@ See the [online documentation](http://hexdocs.pm/ecto) or [run the sample applic

## Usage

Add Ecto as a dependency in your `mix.exs` file. If you are using PostgreSQL, you will also need the library that Ecto's PostgreSQL adapter is using.
You need to add both Ecto and the database adapter as a dependency to your `mix.exs` file. The supported databases and their adapters are:

Database | Ecto Adapter | Dependency
:---------------------- | :--------------------- | :-------------------
PostgreSQL | Ecto.Adapters.Postgres | [postgrex][postgrex]
MySQL | Ecto.Adapters.MySQL | [mariaex][mariaex]
MSSQL | Tds.Ecto | [tds_ecto][tds_ecto]

[postgrex]: http://github.com/ericmj/postgrex
[mariaex]: http://github.com/xerions/mariaex
[tds_ecto]: https://github.com/livehelpnow/tds_ecto

For example, if you want to use PostgreSQL, add to your `mix.exs` file:

```elixir
defp deps do
[{:postgrex, "0.7.0"},
{:ecto, "~> 0.8.1"}]
[{:postgrex, ">= 0.0.0"},
{:ecto, "~> 0.9.0"}]
end
```

You should also update your applications list to include both projects:
and update your applications list to include both projects:

```elixir
def application do
[applications: [:postgrex, :ecto]]
end
```

After you are done, run `mix deps.get` in your shell to fetch the dependencies.

## Supported databases

The following databases are supported:
Then run `mix deps.get` in your shell to fetch the dependencies. If you want to use another database, just choose the proper dependency from the table above.

Database | Ecto Adapter | Dependency
:---------------------- | :--------------------- | :-------------------
PostgreSQL | Ecto.Adapters.Postgres | [postgrex][postgrex]
MSSQL | Tds.Ecto | [tds_ecto][tds_ecto]
Finally, in the repository configuration, you will need to specify the `adapter:` respective to the chosen dependency. For PostgreSQL it is:

[postgrex]: http://github.com/ericmj/postgrex
[tds_ecto]: https://github.com/livehelpnow/tds_ecto

Just add the proper "Dependency" to your `mix.exs` file and the respective "Ecto Adapter" to your `Ecto.Repo` module.
```elixir
config :my_app, Repo,
adapter: Ecto.Adapters.Postgres,
...
```

We are currently looking for contributions to add support for other SQL databases and folks interested in exploring non-relational databases too.

Expand Down
6 changes: 3 additions & 3 deletions mix.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule Ecto.Mixfile do
use Mix.Project

@version "0.8.1"
@version "0.9.0"
@adapters [:pg]
@adapters [:pg, :mysql]

Expand Down Expand Up @@ -34,8 +34,8 @@ defmodule Ecto.Mixfile do
defp deps do
[{:poolboy, "~> 1.4.1"},
{:decimal, "~> 1.0"},
{:postgrex, "~> 0.8", optional: true},
{:mariaex, github: "liveforeverx/mariaex", optional: true},
{:postgrex, "~> 0.8.0", optional: true},
{:mariaex, "~> 0.1.0", optional: true},
{:ex_doc, "~> 0.7", only: :docs},
{:earmark, "~> 0.1", only: :docs},
{:inch_ex, only: :docs}]
Expand Down
2 changes: 1 addition & 1 deletion mix.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"earmark": {:hex, :earmark, "0.1.13"},
"ex_doc": {:hex, :ex_doc, "0.7.1"},
"inch_ex": {:hex, :inch_ex, "0.2.4"},
"mariaex": {:git, "git://github.com/liveforeverx/mariaex.git", "90e141b9083bca16e262237e8a63f1ce7aec6f00", []},
"mariaex": {:hex, :mariaex, "0.1.0"},
"poison": {:hex, :poison, "1.3.1"},
"poolboy": {:hex, :poolboy, "1.4.2"},
"postgrex": {:hex, :postgrex, "0.8.0"}}

0 comments on commit c485c17

Please sign in to comment.