mirror of
https://github.com/Steffo99/greed.git
synced 2024-11-21 21:44:19 +00:00
🐛 Fix database table creation
This commit is contained in:
parent
3d095afcff
commit
46449d6168
1 changed files with 2 additions and 2 deletions
4
core.py
4
core.py
|
@ -76,12 +76,12 @@ def main():
|
|||
# Create the database engine
|
||||
log.debug("Creating the sqlalchemy engine...")
|
||||
engine = sqlalchemy.create_engine(user_cfg["Database"]["engine"])
|
||||
log.debug("Preparing the tables through deferred reflection...")
|
||||
sed.DeferredReflection.prepare(engine)
|
||||
log.debug("Binding metadata to the engine...")
|
||||
database.TableDeclarativeBase.metadata.bind = engine
|
||||
log.debug("Creating all missing tables...")
|
||||
database.TableDeclarativeBase.metadata.create_all()
|
||||
log.debug("Preparing the tables through deferred reflection...")
|
||||
sed.DeferredReflection.prepare(engine)
|
||||
|
||||
# Create a bot instance
|
||||
bot = duckbot.factory(user_cfg)()
|
||||
|
|
Loading…
Reference in a new issue