Add notes
This commit is contained in:
@@ -11,7 +11,10 @@ from sqlalchemy_utils import database_exists, create_database
|
||||
|
||||
from .. import app
|
||||
|
||||
engine = create_engine(app.config['SQLALCHEMY_DATABASE_URI'], echo=True)
|
||||
engine = create_engine(
|
||||
app.config['SQLALCHEMY_DATABASE_URI'],
|
||||
echo=app.config['SQLDEBUG']
|
||||
)
|
||||
if not database_exists(engine.url):
|
||||
create_database(engine.url)
|
||||
|
||||
@@ -30,6 +33,9 @@ from .tag import Tag
|
||||
# Статьи
|
||||
from .page import Page, TagPage
|
||||
|
||||
# Заметки
|
||||
from .note import Note, TagNote
|
||||
|
||||
Base.metadata.create_all(engine)
|
||||
|
||||
__all__ = []
|
||||
|
||||
Reference in New Issue
Block a user