create all tables on startup
This commit is contained in:
parent
653151c8bd
commit
f4002b4ac7
@ -19,9 +19,12 @@ class Database(SQLAlchemy):
|
||||
database=os.getenv("DB_DBNAME")
|
||||
)
|
||||
app.config["SQLALCHEMY_DATABASE_URI"] = db_url
|
||||
|
||||
|
||||
super().init_app(app)
|
||||
|
||||
with app.app_context():
|
||||
self.create_all()
|
||||
|
||||
db = Database()
|
||||
|
||||
class Locale(db.Model):
|
||||
|
Loading…
Reference in New Issue
Block a user