Skip to content

Instantly share code, notes, and snippets.

View pufe's full-sized avatar

Daniel Ribeiro Moreira pufe

  • São José dos Campos, SP, Brasil.
View GitHub Profile
@pufe
pufe / README.md
Last active December 23, 2016 16:20 — forked from romul/README.md
Using Postres hstore with Elixir, Ecto & Postgrex

To use hstore in Ecto schemas you have to create own Ecto type. To do this, follow these steps:

  1. Create files hstore.ex & hstore_extension.ex inside your lib folder
  2. Open your database settings and add the following line

extensions: [{MyApp.HStoreExtension, nil}],, for example

config :my_app, MyApp.Repo,
 adapter: Ecto.Adapters.Postgres,