Skip to content

Commit 1315287

Browse files
committed
Merge branch 'main' of https://github.com/dataease/SQLBot
2 parents ac6f843 + 25c9606 commit 1315287

File tree

4 files changed

+37
-2
lines changed

4 files changed

+37
-2
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
"""035_sys_arg_ddl
2+
3+
Revision ID: 29559ee607af
4+
Revises: e8b470d2b150
5+
Create Date: 2025-08-15 11:43:26.175792
6+
7+
"""
8+
from alembic import op
9+
import sqlalchemy as sa
10+
import sqlmodel.sql.sqltypes
11+
12+
13+
# revision identifiers, used by Alembic.
14+
revision = '29559ee607af'
15+
down_revision = 'e8b470d2b150'
16+
branch_labels = None
17+
depends_on = None
18+
19+
20+
def upgrade():
21+
op.create_table(
22+
'sys_arg',
23+
sa.Column('id', sa.BigInteger(), primary_key=True, nullable=False, comment='ID'),
24+
sa.Column('pkey', sa.String(255), nullable=False, comment='pkey'),
25+
sa.Column('pval', sa.String(255), nullable=True, comment='pval'),
26+
sa.Column('ptype', sa.String(255), nullable=False, server_default='str', comment='str or file'),
27+
sa.Column('sort_no', sa.Integer(), nullable=False, server_default='1', comment='sort_no')
28+
)
29+
op.create_index(op.f('ix_sys_arg_id'), 'sys_arg', ['id'], unique=False)
30+
31+
32+
def downgrade():
33+
op.drop_index(op.f('ix_sys_arg_id'), table_name='sys_arg')
34+
op.drop_table('sys_arg')

backend/common/core/config.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ def all_cors_origins(self) -> list[str]:
6363
LOG_DIR: str = "logs"
6464
LOG_FORMAT: str = "%(asctime)s - %(name)s - %(levelname)s:%(lineno)d - %(message)s"
6565
SQL_DEBUG: bool = False
66+
67+
UPLOAD_DIR: str = "/opt/sqlbot/data/file"
6668

6769
@computed_field # type: ignore[prop-decorator]
6870
@property

backend/common/utils/utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
from jwt.exceptions import InvalidTokenError
1818

1919
from common.core import security
20-
from common.core.config import settings
2120

2221

2322
def generate_password_reset_token(email: str) -> str:

backend/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ dependencies = [
3636
"pyyaml (>=6.0.2,<7.0.0)",
3737
"fastapi-mcp (>=0.3.4,<0.4.0)",
3838
"tabulate>=0.9.0",
39-
"sqlbot-xpack==0.0.3.15",
39+
"sqlbot-xpack==0.0.3.16",
4040
"fastapi-cache2>=0.2.2",
4141
"sqlparse>=0.5.3",
4242
"redis>=6.2.0",

0 commit comments

Comments
 (0)