mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 10:18:54 +00:00
Fix migrations and expand CONTRIBUTING.md docs (#661)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user