You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
309 B
16 lines
309 B
6 months ago
|
from alembic import op
|
||
|
from sqlalchemy import Inspector
|
||
|
|
||
|
|
||
|
def get_existing_tables():
|
||
|
con = op.get_bind()
|
||
|
inspector = Inspector.from_engine(con)
|
||
|
tables = set(inspector.get_table_names())
|
||
|
return tables
|
||
|
|
||
|
|
||
|
def get_revision_id():
|
||
|
import uuid
|
||
|
|
||
|
return str(uuid.uuid4()).replace("-", "")[:12]
|