mirror of
https://github.com/open-webui/open-webui
synced 2024-12-29 15:25:29 +00:00
16 lines
309 B
Python
16 lines
309 B
Python
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]
|