Skip to content

creating tables via sqlalchemy model base in sqlite #25

@cdesyoun

Description

@cdesyoun

I tried to create all of tables via ODM2 model base, like this:

from odm2api.base import *
modelBase.metadata.create_all(engine)

in current odm2 sqlalchemy model, because of table schema, "odm2", when creating tables in sqlite, I got the error message below:

sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) unknown database "odm2" [SQL: u'PRAGMA "odm2".table_info("samplingfeatureexternalidentifiers")']

When using the modified odm2 model for sqlite, https://github.com/ODM2/ODM2PythonAPI/blob/master/odm2api/ODM2/models_sqlite.py, it went well.
Is there any way to skip the schema tag in current odm2 sqlalchemy model for not supporting the schema in certain databases, sqlite, mySQL?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions