From 46449d616824667ed894f3eae75f3c51c3c14d4f Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Fri, 11 Sep 2020 01:38:37 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20database=20table=20creatio?= =?UTF-8?q?n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core.py b/core.py index 3aa411f..c45d259 100644 --- a/core.py +++ b/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)()