refactor: assembling the app features in modular way (#9129)
Signed-off-by: -LAN- <laipz8200@outlook.com> Co-authored-by: -LAN- <laipz8200@outlook.com>
This commit is contained in:
parent
3bc4dc58d7
commit
9b46b02717
30 changed files with 396 additions and 318 deletions
|
|
@ -1,6 +1,8 @@
|
|||
from flask_sqlalchemy import SQLAlchemy
|
||||
from sqlalchemy import MetaData
|
||||
|
||||
from dify_app import DifyApp
|
||||
|
||||
POSTGRES_INDEXES_NAMING_CONVENTION = {
|
||||
"ix": "%(column_0_label)s_idx",
|
||||
"uq": "%(table_name)s_%(column_0_name)s_key",
|
||||
|
|
@ -13,5 +15,5 @@ metadata = MetaData(naming_convention=POSTGRES_INDEXES_NAMING_CONVENTION)
|
|||
db = SQLAlchemy(metadata=metadata)
|
||||
|
||||
|
||||
def init_app(app):
|
||||
def init_app(app: DifyApp):
|
||||
db.init_app(app)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue