Skip to content

Commit

Permalink
Merge pull request #5089 from mozilla/enable-pgcrypto
Browse files Browse the repository at this point in the history
MPP-3931: Enable pgcrypto
  • Loading branch information
groovecoder authored Oct 10, 2024
2 parents c042803 + 45f08d4 commit 22e9725
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
12 changes: 12 additions & 0 deletions privaterelay/migrations/0011_add_pgcrypto_extension.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Generated by Django 4.2.16 on 2024-10-09 21:19

from django.contrib.postgres.operations import CryptoExtension
from django.db import migrations


class Migration(migrations.Migration):
dependencies = [
("privaterelay", "0010_move_profile_and_registered_subdomain_models"),
]

operations = [CryptoExtension()]
11 changes: 5 additions & 6 deletions privaterelay/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,13 +479,12 @@
WSGI_APPLICATION = "privaterelay.wsgi.application"

# Database
# https://docs.djangoproject.com/en/2.2/ref/settings/#databases
# https://docs.djangoproject.com/en/4.2/ref/settings/#databases

DATABASES = {
"default": dj_database_url.config(
default="sqlite:///{}".format(os.path.join(BASE_DIR, "db.sqlite3"))
)
}
DATABASE_URL = config(
"DATABASE_URL", default="sqlite:///{}".format(os.path.join(BASE_DIR, "db.sqlite3"))
)
DATABASES = {"default": dj_database_url.parse(DATABASE_URL)}
# Optionally set a test database name.
# This is useful for forcing an on-disk database for SQLite.
TEST_DB_NAME = config("TEST_DB_NAME", "")
Expand Down

0 comments on commit 22e9725

Please sign in to comment.