Browse Source

Add documentation about the platforms and databases supported by Oscar.

Also remove unused migrations test for MySQL.
master
Samir Shah 4 years ago
parent
commit
8250e24cf8

+ 1
- 1
docs/source/index.rst View File

@@ -98,6 +98,7 @@ All you need to start developing an Oscar project.
98 98
 .. toctree::
99 99
    :maxdepth: 1
100 100
 
101
+   ref/platform_database_support
101 102
    topics/customisation
102 103
    topics/class_loading_explained
103 104
    topics/prices_and_availability
@@ -129,4 +130,3 @@ Learn about the ideas behind Oscar and how you can contribute.
129 130
    internals/design-decisions
130 131
    releases/index
131 132
    internals/contributing/index
132
-

+ 0
- 3
docs/source/internals/contributing/bugs-and-features.rst View File

@@ -5,9 +5,6 @@ Reporting bugs and requesting features
5 5
 Before reporting a bug or requesting a new feature, please consider these
6 6
 general points:
7 7
 
8
-* Be aware that Windows and the Django admin interface are unsupported; any
9
-  tickets regarding that will get closed.
10
-
11 8
 * Check that someone hasn't already filed the bug or feature request by
12 9
   searching in the ticket tracker.
13 10
 

+ 4
- 5
docs/source/internals/contributing/development-environment.rst View File

@@ -73,10 +73,10 @@ For this to work, you will need to ensure that the pre-processor binary
73 73
 
74 74
 .. _npm: https://www.npmjs.com/
75 75
 
76
-Testing migrations against MySQL and PostgreSQL
77
------------------------------------------------
76
+Testing migrations
77
+------------------
78 78
 
79
-To test the migrations against MySQL and PostgreSQL you will need to set
79
+To test the migrations against PostgreSQL you will need to set
80 80
 up an environment with both installed and do the following:
81 81
 
82 82
 1. Change to sandbox folder and activate your virtualenv
@@ -85,5 +85,4 @@ up an environment with both installed and do the following:
85 85
 
86 86
     ./test_migrations.sh
87 87
 
88
-This will recreate the Oscar database in both MySQL and PostgreSQL and rebuild
89
-it using ``migrate``.
88
+This will recreate the Oscar database in PostgreSQL and rebuild it using ``migrate``.

+ 0
- 6
docs/source/internals/sandbox.rst View File

@@ -49,12 +49,6 @@ Run the sandbox locally
49 49
 It's pretty straightforward to get the sandbox site running locally so you can
50 50
 play around with Oscar.
51 51
 
52
-.. warning::
53
-
54
-    While installing Oscar is straightforward, some of Oscar's dependencies
55
-    don't support Windows and are tricky to be properly installed, and therefore
56
-    you might encounter some errors that prevent a successful installation.
57
-
58 52
 In order to compile uWSGI, which is a dependency of the sandbox, you will
59 53
 first need to install the Python development headers with:::
60 54
 

+ 28
- 0
docs/source/ref/platform_database_support.rst View File

@@ -0,0 +1,28 @@
1
+=============================
2
+Platform and database support
3
+=============================
4
+
5
+Operating system
6
+================
7
+
8
+Oscar does not support for Microsoft Windows. Some of Oscar's dependencies don't support Windows and/or are
9
+tricky to install properly in that environment, and therefore you might encounter some errors that prevent a
10
+successful installation. Contributions to improve support for Windows are welcome.
11
+
12
+
13
+Databases
14
+=========
15
+
16
+Oscar officially supports PostgreSQL. Oscar is likely to work with the following databases, but official support is
17
+not provided for them:
18
+
19
+* MariaDB
20
+* Oracle
21
+* SQLite (this is suitable only for use in development)
22
+
23
+Oscar does not support MySQL. Developers are likely to encounter issues related to Unicode handling and update queries
24
+for certain query types. Both issues are caused by limitations in MySQL itself, or in Django's ORM support for MySQL.
25
+Relevant discussions on Django project are:
26
+
27
+* `Make MySQL backend default to utf8mb4 encoding <https://code.djangoproject.com/ticket/18392>`_.
28
+* `QuerySet.update() fails on MySQL if a subquery references the base table <https://code.djangoproject.com/ticket/28787>`_.

+ 1
- 2
requirements_migrations.txt View File

@@ -1,3 +1,2 @@
1 1
 # Those dependencies are needed for the test_migrations.sh script
2
-PyMySQL==0.9.3
3
-psycopg2==2.8.5
2
+psycopg2-binary

+ 0
- 2
sandbox/settings.py View File

@@ -38,8 +38,6 @@ CACHES = {
38 38
 # although not all choices may be available on all operating systems.
39 39
 # On Unix systems, a value of None will cause Django to use the same
40 40
 # timezone as the operating system.
41
-# If running in a Windows environment this must be set to the same as your
42
-# system time zone.
43 41
 USE_TZ = True
44 42
 TIME_ZONE = 'Europe/London'
45 43
 

+ 0
- 15
sandbox/settings_mysql.py View File

@@ -1,15 +0,0 @@
1
-import pymysql
2
-pymysql.install_as_MySQLdb()
3
-
4
-from settings import *  # noqa
5
-
6
-DATABASES = {
7
-    'default': {
8
-        'ENGINE': 'django.db.backends.mysql',
9
-        'NAME': 'oscar_travis',
10
-        'USER': 'travis',
11
-        'PASSWORD': '',
12
-        'HOST': 'localhost',
13
-        'PORT': '',
14
-    }
15
-}

+ 4
- 12
sandbox/test_migrations.sh View File

@@ -1,6 +1,6 @@
1 1
 #!/usr/bin/env bash
2
-# 
3
-# Test migrations run correctly with MySQL and Postgres
2
+#
3
+# Test migrations run correctly
4 4
 
5 5
 # Fail if any command fails
6 6
 # http://stackoverflow.com/questions/90418/exit-shell-script-based-on-process-exit-code
@@ -9,22 +9,14 @@ set -o pipefail
9 9
 
10 10
 if [ ! "$TRAVIS" == "true" ]
11 11
 then
12
-  # If not on Travis, then create databases
13
-  echo "Creating MySQL database and user"
14
-  mysql -u root -e "DROP DATABASE IF EXISTS oscar_travis; CREATE DATABASE oscar_travis"
15
-  mysql -u root -e "GRANT ALL PRIVILEGES ON oscar_travis.* TO 'travis'@'localhost' IDENTIFIED BY '';"
16
-
17
-  echo "Creating Postgres database and user"
12
+  # If not on Travis, then create database
13
+  echo "Creating PostgreSQL database and user"
18 14
   psql -c "DROP ROLE IF EXISTS travis"
19 15
   psql -c "CREATE ROLE travis LOGIN PASSWORD ''"
20 16
   psql -c "DROP DATABASE IF EXISTS oscar_travis"
21 17
   psql -c "CREATE DATABASE oscar_travis"
22 18
 fi
23 19
 
24
-# MySQL
25
-echo "Running migrations against MySQL"
26
-./manage.py migrate --noinput --settings=settings_mysql
27
-
28 20
 # Postgres
29 21
 echo "Running migrations against Postgres"
30 22
 ./manage.py migrate --noinput --settings=settings_postgres

Loading…
Cancel
Save