diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9e728d4bd..09e95fd28 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -59,6 +59,11 @@ Firezone development requires access to a Postgresql instance. Versions 9.6 or higher should work fine. Access can be configured using the [ .env](#the-env-file) described below. +**Note:** To use the default configuration without specifying the database URL in the `.env` file, you need to configure the `postgres` user with the password `postgres` to do so use the following command: +```sql +ALTER USER postgres WITH PASSWORD 'postgres'; +``` + ### Pre-commit We use [pre-commit](https://pre-commit.com) to catch any static analysis issues diff --git a/apps/fz_http/priv/repo/migrations/20220124162404_add_uuids.exs b/apps/fz_http/priv/repo/migrations/20220124162404_add_uuids.exs index 65d56b2c4..34d148e18 100644 --- a/apps/fz_http/priv/repo/migrations/20220124162404_add_uuids.exs +++ b/apps/fz_http/priv/repo/migrations/20220124162404_add_uuids.exs @@ -2,6 +2,11 @@ defmodule FzHttp.Repo.Migrations.AddUuids do use Ecto.Migration def change do + execute( + "CREATE EXTENSION pgcrypto", + "DROP EXTENSION pgcrypto" + ) + execute( "ALTER TABLE rules ADD COLUMN uuid uuid DEFAULT gen_random_uuid() NOT NULL", "ALTER TABLE rules DROP COLUMN uuid"