-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(0.1.6): add migration to enable statements
- Loading branch information
1 parent
fd9c0b4
commit 9bab7b4
Showing
5 changed files
with
27 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Generated by Django 4.2.9 on 2024-01-17 01:46 | ||
import logging | ||
|
||
from django.db import OperationalError, connection, migrations | ||
|
||
|
||
def create_extension(apps, schema_editor): | ||
try: | ||
with connection.cursor() as cursor: | ||
cursor.execute("CREATE EXTENSION IF NOT EXISTS pg_stat_statements") | ||
except OperationalError: | ||
logging.error("Could not install extension `pg_stat_statements`.") | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [] | ||
|
||
operations = [ | ||
migrations.RunPython(create_extension, migrations.RunPython.noop), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "django-pev" | ||
version = "0.1.5" | ||
version = "0.1.6" | ||
description = "Context manager to upload explain plans to https://explain.dalibo.com/" | ||
authors = ["william chu <[email protected]>"] | ||
readme = "README.md" | ||
|