Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Oracle database backend #98

Open
Jack28 opened this issue Aug 22, 2019 · 0 comments
Open

Oracle database backend #98

Jack28 opened this issue Aug 22, 2019 · 0 comments
Assignees

Comments

@Jack28
Copy link
Member

Jack28 commented Aug 22, 2019

SQLAlchemy has support for Oracle but our current test for _meta table and schema is not compatible.

oracle+cx_oracle://

First the test to check if schema exists leads to a crash because cx_oracle doesn't have the function has_table

if not self.__engine.dialect.has_table(self.__engine, '_meta'):

Secondly the auto_increment of primary keys needs to be realised by additional Sequences:

from sqlalchemy.schema import Sequence
...
    id = Column(Integer, Sequence('id_sample'), primary_key=True)
...
    id = Column(Integer, Sequence('id_analysis'), primary_key=True)

https://docs.sqlalchemy.org/en/13/dialects/oracle.html#auto-increment-behavior

After that everything seems to working as expected.

@Jack28 Jack28 self-assigned this Aug 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant