Repository: getredash/redash

Issue:
Oracle: add support for cx_Oracle v5.3.

### Issue Summary

cx_Oracle.FIXED_UNICODE: TYPE_STRING,

Variable FIXED_UNICODE was removed with Release 5.3 of cx_Oracle: https://github.com/oracle/python-cx_Oracle/blob/ae45152339f0e9b46a93d5aea74f3bc16e775060/doc/src/releasenotes.rst#version-53-march-2017 

    Removed deprecated types UNICODE, FIXED_UNICODE and LONG_UNICODE (use NCHAR, FIXED_NCHAR and LONG_NCHAR instead).

but is referenced in https://github.com/getredash/redash/blob/master/redash/query_runner/oracle.py#L17



### Steps to Reproduce

Our Dockerfile:

	FROM redash/redash:2.0.0.b2924

	USER root

	RUN apt-get update

	RUN apt-get -y --no-install-recommends  install alien
	COPY "oracle-instantclient12.2-basiclite-12.2.0.1.0-1.x86_64.rpm" "/tmp/oracle-instantclient12.2-basiclite-12.2.0.1.0-1.x86_64.rpm"
	RUN alien -i "/tmp/oracle-instantclient12.2-basiclite-12.2.0.1.0-1.x86_64.rpm"
	RUN echo /usr/lib/oracle/12.2/client64/lib > /etc/ld.so.conf.d/oracle-instantclient.conf && ldconfig
	RUN apt-get install -y libaio1
	RUN pip install cx_Oracle --pre
	
	EXPOSE 5000
	
	ENTRYPOINT ["/app/bin/docker-entrypoint"]
	
	CMD ["server"]


Output: 
```
  AttributeError: 'module' object has no attribute 'FIXED_UNICODE'
  Traceback (most recent call last):
    File "/usr/local/lib/python2.7/dist-packages/gunicorn/arbiter.py", line 515, in spawn_worker
      worker.init_process()
    File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/base.py", line 122, in init_process
      self.load_wsgi()
    File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/base.py", line 130, in load_wsgi
      self.wsgi = self.app.wsgi()
    File "/usr/local/lib/python2.7/dist-packages/gunicorn/app/base.py", line 67, in wsgi
      self.callable = self.load()
    File "/usr/local/lib/python2.7/dist-packages/gunicorn/app/wsgiapp.py", line 65, in load
      return self.load_wsgiapp()
    File "/usr/local/lib/python2.7/dist-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
      return util.import_app(self.app_uri)
    File "/usr/local/lib/python2.7/dist-packages/gunicorn/util.py", line 357, in import_app
      __import__(module)
    File "/app/redash/__init__.py", line 68, in <module>
      import_query_runners(settings.QUERY_RUNNERS)
    File "/app/redash/query_runner/__init__.py", line 175, in import_query_runners
      __import__(runner_import)
    File "/app/redash/query_runner/oracle.py", line 17, in <module>
      cx_Oracle.FIXED_UNICODE: TYPE_STRING,
  AttributeError: 'module' object has no attribute 'FIXED_UNICODE
```'


### Technical details:

* Redash Version: Docker Image redash/redash:2.0.0.b2924
* How did you install Redash: Dockerfile

Oracle: add support for cx_Oracle v5.3.

### Issue Summary

cx_Oracle.FIXED_UNICODE: TYPE_STRING,

Variable FIXED_UNICODE was removed with Release 5.3 of cx_Oracle: https://github.com/oracle/python-cx_Oracle/blob/ae45152339f0e9b46a93d5aea74f3bc16e775060/doc/src/releasenotes.rst#version-53-march-2017 

    Removed deprecated types UNICODE, FIXED_UNICODE and LONG_UNICODE (use NCHAR, FIXED_NCHAR and LONG_NCHAR instead).

but is referenced in https://github.com/getredash/redash/blob/master/redash/query_runner/oracle.py#L17



### Steps to Reproduce

Our Dockerfile:

	FROM redash/redash:2.0.0.b2924

	USER root

	RUN apt-get update

	RUN apt-get -y --no-install-recommends  install alien
	COPY "oracle-instantclient12.2-basiclite-12.2.0.1.0-1.x86_64.rpm" "/tmp/oracle-instantclient12.2-basiclite-12.2.0.1.0-1.x86_64.rpm"
	RUN alien -i "/tmp/oracle-instantclient12.2-basiclite-12.2.0.1.0-1.x86_64.rpm"
	RUN echo /usr/lib/oracle/12.2/client64/lib > /etc/ld.so.conf.d/oracle-instantclient.conf && ldconfig
	RUN apt-get install -y libaio1
	RUN pip install cx_Oracle --pre
	
	EXPOSE 5000
	
	ENTRYPOINT ["/app/bin/docker-entrypoint"]
	
	CMD ["server"]


Output: 
```
  AttributeError: 'module' object has no attribute 'FIXED_UNICODE'
  Traceback (most recent call last):
    File "/usr/local/lib/python2.7/dist-packages/gunicorn/arbiter.py", line 515, in spawn_worker
      worker.init_process()
    File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/base.py", line 122, in init_process
      self.load_wsgi()
    File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/base.py", line 130, in load_wsgi
      self.wsgi = self.app.wsgi()
    File "/usr/local/lib/python2.7/dist-packages/gunicorn/app/base.py", line 67, in wsgi
      self.callable = self.load()
    File "/usr/local/lib/python2.7/dist-packages/gunicorn/app/wsgiapp.py", line 65, in load
      return self.load_wsgiapp()
    File "/usr/local/lib/python2.7/dist-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
      return util.import_app(self.app_uri)
    File "/usr/local/lib/python2.7/dist-packages/gunicorn/util.py", line 357, in import_app
      __import__(module)
    File "/app/redash/__init__.py", line 68, in <module>
      import_query_runners(settings.QUERY_RUNNERS)
    File "/app/redash/query_runner/__init__.py", line 175, in import_query_runners
      __import__(runner_import)
    File "/app/redash/query_runner/oracle.py", line 17, in <module>
      cx_Oracle.FIXED_UNICODE: TYPE_STRING,
  AttributeError: 'module' object has no attribute 'FIXED_UNICODE
```'


### Technical details:

* Redash Version: Docker Image redash/redash:2.0.0.b2924
* How did you install Redash: Dockerfile



Discussion:
The Oracle query runner was written with [`cx_Oracle==5.2`](https://github.com/getredash/redash/blob/master/requirements_oracle_ds.txt#L4).
A description how to enable and use oracle data sorces would be great. 
The Oracle query runner was written with [`cx_Oracle==5.2`](https://github.com/getredash/redash/blob/master/requirements_oracle_ds.txt#L4).
A description how to enable and use oracle data sorces would be great. 

Resolving patch:
diff --git a/redash/query_runner/oracle.py b/redash/query_runner/oracle.py
--- a/redash/query_runner/oracle.py
+++ b/redash/query_runner/oracle.py
@@ -14,18 +14,14 @@
         cx_Oracle.LOB: TYPE_STRING,
         cx_Oracle.FIXED_CHAR: TYPE_STRING,
         cx_Oracle.FIXED_NCHAR: TYPE_STRING,
-        cx_Oracle.FIXED_UNICODE: TYPE_STRING,
         cx_Oracle.INTERVAL: TYPE_DATETIME,
-        cx_Oracle.LONG_NCHAR: TYPE_STRING,
         cx_Oracle.LONG_STRING: TYPE_STRING,
-        cx_Oracle.LONG_UNICODE: TYPE_STRING,
         cx_Oracle.NATIVE_FLOAT: TYPE_FLOAT,
         cx_Oracle.NCHAR: TYPE_STRING,
         cx_Oracle.NUMBER: TYPE_FLOAT,
         cx_Oracle.ROWID: TYPE_INTEGER,
         cx_Oracle.STRING: TYPE_STRING,
         cx_Oracle.TIMESTAMP: TYPE_DATETIME,
-        cx_Oracle.UNICODE: TYPE_STRING,
     }
 
 


Test patch: