Browse Source

fix pre 2.0 sqlalchemy usage, and import medashare for orm..

main
John-Mark Gurney 1 year ago
parent
commit
0f633e175d
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      ui/medashare/alembic/script.py.mako

+ 2
- 1
ui/medashare/alembic/script.py.mako View File

@@ -7,6 +7,7 @@ Create Date: ${create_date}
"""
from alembic import op
import sqlalchemy as sa
import medashare
from medashare import mdb
${imports if imports else ""}

@@ -25,7 +26,7 @@ def upgrade() -> None:
mdo = sa.schema.MetaData()
#mdotbl = sa.Table('metadata_objects', mdo, autoload_with=connection.engine)

#stmt = sa.select([mdotbl.c.uuid, mdotbl.c.data])
#stmt = sa.select(mdotbl.c.uuid, mdotbl.c.data)
#newtypes = [ dict(olduuid=uuid, newtype=mdb.MDBase.decode(data).type) for
# uuid, data in connection.execute(stmt) ]



Loading…
Cancel
Save