Projet

Général

Profil

0002-misc-remove-sqlite-support-52912.patch

Lauréline Guérin, 20 avril 2021 16:27

Télécharger (2,53 ko)

Voir les différences:

Subject: [PATCH 2/2] misc: remove sqlite support (#52912)

 README            | 2 +-
 combo/settings.py | 3 +--
 tests/settings.py | 2 +-
 tox.ini           | 6 +++---
 4 files changed, 6 insertions(+), 7 deletions(-)
README
13 13
 $ pip install -r requirements.txt
14 14

  
15 15
It's then required to get the database configured (./manage.py migrate); by
16
default it will create a db.sqlite3 file.
16
default it will create a postgresqsl DB.
17 17

  
18 18
You can then run the Django test server for a quick try (you should refer to
19 19
the Django documentation for production deployments).
combo/settings.py
136 136

  
137 137
DATABASES = {
138 138
    'default': {
139
        'ENGINE': 'django.db.backends.sqlite3',
140
        'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
139
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
141 140
    }
142 141
}
143 142

  
tests/settings.py
1 1
DATABASES = {
2 2
    'default': {
3
        'ENGINE': os.environ.get('DB_ENGINE', 'django.db.backends.sqlite3'),
3
        'ENGINE': os.environ.get('DB_ENGINE', 'django.db.backends.postgresql_psycopg2'),
4 4
        'NAME': 'combo-test-%s' % os.environ.get("BRANCH_NAME", "").replace('/', '-')[:45],
5 5
    }
6 6
}
tox.ini
1 1
[tox]
2 2
toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/combo/{env:BRANCH_NAME:}
3
envlist = coverage-py3-django111-codestyle-pylint-{sqlite,pg},py3-django22-pg
3
envlist = coverage-py3-django111-codestyle-pylint,py3-django22
4 4

  
5 5
[testenv]
6 6
usedevelop = True
......
10 10
  TOX_WORK_DIR={toxworkdir}
11 11
  SETUPTOOLS_USE_DISTUTILS=stdlib
12 12
  coverage: COVERAGE=--cov-report xml --cov-report html --cov=combo/
13
  pg: DB_ENGINE=django.db.backends.postgresql_psycopg2
13
  DB_ENGINE=django.db.backends.postgresql_psycopg2
14 14
passenv =
15 15
  BRANCH_NAME
16 16
deps =
......
27 27
  pylint
28 28
  pylint-django
29 29
  django-webtest<1.9.3
30
  pg: psycopg2-binary
30
  psycopg2-binary
31 31
  django-mellon>=1.13
32 32
  vobject
33 33
  django-ratelimit<3
34
-