BetUnfair is a marketplace where users can place bets against each other,rather than against a bookmaker
At docs
folder you can checkout information about the database:
If you are confortable with using docker, you can run a development enviroment with this requesites with our Docker Image, which contains:
- Elixir ^1.12
- OTP ^24
- MariaDB / MySQL server running
- MariaDB / MySQL client
You can use the scrip autobuildDB
to rebuild the databases on migration update or creation.
Atention: this script will erase the previous databases betunfair and betunfair_test
sudo ./utils/autobuildDB.sh
Or you can do it manually
-
Create the databases by running
utils/init.sql
as root -
Run the migrations for the testing db
MIX_ENV=dev mix ecto.migrate -r BetUnfair.Repo MIX_ENV=test mix ecto.migrate -r BetUnfair.Repo
-
You can test the connection by running:
iex> MyApp.Repo.start_link() {:ok, #PID<0.198.0>}