create_schema

GenericDBWrapper.create_schema(table: str, schema: str = None)[source]

Create the individual table table, either uses the create statement schema, or if schema is empty, then checks for a pre-existing CREATE statement for table in SCHEMAS.

>>> db = GenericDBWrapper('SomeDBName')
>>> db.create_schema('users', 'CREATE TABLE users (id INT PRIMARY KEY, name VARCHAR(200));')
Parameters
  • table

  • schema

Returns