# What this PR does Fixes https://github.com/grafana/oncall/issues/1960. ## Checklist - [x] Unit, integration, and e2e (if applicable) tests updated - [x] Documentation added (or `pr:no public docs` PR label added if not required) - [x] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not required)
15 lines
414 B
Python
15 lines
414 B
Python
from django.conf import settings
|
|
from django.core.management.base import BaseCommand
|
|
from django.db import connection
|
|
|
|
|
|
class Command(BaseCommand):
|
|
"""
|
|
Create SQLite3 database file if it doesn't exist.
|
|
"""
|
|
|
|
def handle(self, *args, **options):
|
|
assert settings.DATABASE_TYPE == "sqlite3"
|
|
|
|
# Creating a cursor creates the database file if it doesn't exist.
|
|
connection.cursor()
|