For more information about Message DB, see: https://github.com/message-db.
This is a set of tasks to install Message DB from source. Inspired by the other language-specific packages such as https://github.com/message-db/ruby-gem.
def deps do
[
{:message_db, "~> 0.0", github: "elixir-verity/ex-message-db"}
]
end
Clone the message-db source (recommended to be located as a sibling to your application):
git clone https://github.com/message-db/message-db.git
Sym-link database scripts (in your application):
mix mdb.symlink_database_scripts --home $PWD/..
Verify symlink:
ls priv/database/
Install Message DB:
PGUSER=postgres PGPASSWORD=postgres PGHOST=localhost mix mdb.create_db
Delete Message DB:
PGUSER=postgres PGPASSWORD=postgres PGHOST=localhost mix mdb.delete_db
DATABASE_USER=postgres PGPASSWORD=postgres PGHOST=localhost priv/database/print-messages.sh
You cannot create users/roles on Heroku therefore the following functions and scripts will fail
to execute, they need to be removed in install.sh
:
create-user
; actually creates a roleinstall-privileges
; otherwiseERROR: role "message_store" does not exist
For more info on the user role, see: https://github.com/message-db/message-db#userrole.