- Trying to solve database initialisation problem (no tables in tenant schema).
This commit is contained in:
@@ -46,7 +46,10 @@ class Database:
|
||||
|
||||
def create_tables(self):
|
||||
"""create tables in for schema"""
|
||||
db.metadata.create_all(self.get_engine())
|
||||
try:
|
||||
db.metadata.create_all(self.get_engine())
|
||||
except SQLAlchemyError as e:
|
||||
current_app.logger.error(f"💔 Error creating tables for schema {self.schema}: {e.args}")
|
||||
|
||||
def switch_schema(self):
|
||||
"""switch between tenant/public database schema"""
|
||||
|
||||
Reference in New Issue
Block a user