Skip to content

Creating a Postgres Database and Migrations

Eric Yen edited this page Mar 31, 2019 · 2 revisions
  1. install postgresql sudo apt-get install postgresql

  2. create a default password for the default postgres user see https://stackoverflow.com/a/12721020/701403

  3. download dbmate sudo curl -fsSL -o /usr/local/bin/dbmate https://github.com/amacneil/dbmate/releases/download/v1.4.1/dbmate-linux-amd64; sudo chmod +x /usr/local/bin/dbmate

  4. setup dbmate export DATABASE_URL="postgres://postgres:[email protected]:5432/DriveFS?sslmode=disable"

  5. create the database cd DriveFS dbmate create

  6. migrate the base dbmate migrate

Clone this wiki locally