first commit
This commit is contained in:
commit
52145ecabf
10 changed files with 538 additions and 0 deletions
9
utils.py
Normal file
9
utils.py
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
from sqlalchemy import MetaData, Table
|
||||
|
||||
def cleanEntityName(entityName):
|
||||
return entityName.lower().replace('-', '_').replace('.', '_').replace(' ', '_').replace('(', '_').replace(')', '_').replace('ä', 'ae').replace('ö', 'oe').replace('ü', 'ue').replace('ß', 'ss').replace('?', '_')
|
||||
|
||||
def tableExists(engine, table_name):
|
||||
metadata = MetaData()
|
||||
metadata.reflect(bind=engine)
|
||||
return table_name in metadata.tables
|
||||
Loading…
Add table
Add a link
Reference in a new issue