Fix SA2.0 error: pass bind to create_all

This commit is contained in:
John Davis
2024-04-02 10:08:53 -04:00
parent 937292d6b7
commit 3c4543b00b
+1 -3
View File
@@ -35,13 +35,11 @@ def init(
engine_options = engine_options or {}
# Create the database engine
engine = build_engine(url, engine_options)
# Connect the metadata to the database.
metadata.bind = engine
result = ToolShedModelMapping([tool_shed.webapp.model], engine=engine)
if create_tables:
metadata.create_all()
metadata.create_all(bind=engine)
result.create_tables = create_tables