Переглянути джерело

minor fix: fix default for status of TidbAuthBinding in compatible with various versions (#22288)

tags/1.7.2
NeatGuyCoding 3 місяці тому
джерело
коміт
759ded3e3a
Аккаунт користувача з таким Email не знайдено

+ 25
- 0
api/migrations/versions/2025_07_24_1450-532b3f888abf_manual_dataset_field_update.py Переглянути файл

@@ -0,0 +1,25 @@
"""manual dataset field update

Revision ID: 532b3f888abf
Revises: 8bcc02c9bd07
Create Date: 2025-07-24 14:50:48.779833

"""
from alembic import op
import models as models
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '532b3f888abf'
down_revision = '8bcc02c9bd07'
branch_labels = None
depends_on = None


def upgrade():
op.execute("ALTER TABLE tidb_auth_bindings ALTER COLUMN status SET DEFAULT 'CREATING'::character varying")


def downgrade():
op.execute("ALTER TABLE tidb_auth_bindings ALTER COLUMN status SET DEFAULT 'CREATING'")

+ 1
- 1
api/models/dataset.py Переглянути файл

@@ -970,7 +970,7 @@ class TidbAuthBinding(Base):
cluster_id: Mapped[str] = mapped_column(String(255), nullable=False)
cluster_name: Mapped[str] = mapped_column(String(255), nullable=False)
active: Mapped[bool] = mapped_column(db.Boolean, nullable=False, server_default=db.text("false"))
status = mapped_column(String(255), nullable=False, server_default=db.text("CREATING"))
status = mapped_column(String(255), nullable=False, server_default=db.text("'CREATING'::character varying"))
account: Mapped[str] = mapped_column(String(255), nullable=False)
password: Mapped[str] = mapped_column(String(255), nullable=False)
created_at: Mapped[datetime] = mapped_column(DateTime, nullable=False, server_default=func.current_timestamp())

+ 1
- 1
web/app/components/app/configuration/base/warning-mask/index.tsx Переглянути файл

@@ -22,7 +22,7 @@ const WarningMask: FC<IWarningMaskProps> = ({
footer,
}) => {
return (
<div className={`${s.mask} absolute inset-0 z-10 pt-16 bg-components-panel-bg-blur`}
<div className={`${s.mask} absolute inset-0 z-10 bg-components-panel-bg-blur pt-16`}
>
<div className='mx-auto px-10'>
<div className={`${s.icon} flex h-11 w-11 items-center justify-center rounded-xl bg-components-panel-bg`}>{warningIcon}</div>

+ 0
- 2
web/app/components/datasets/documents/detail/completed/child-segment-detail.tsx Переглянути файл

@@ -60,7 +60,6 @@ const ChildSegmentDetail: FC<IChildSegmentDetailProps> = ({
const wordCountText = useMemo(() => {
const count = content.length
return `${formatNumber(count)} ${t('datasetDocuments.segment.characters', { count })}`
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [content.length])

const EditTimeText = useMemo(() => {
@@ -69,7 +68,6 @@ const ChildSegmentDetail: FC<IChildSegmentDetailProps> = ({
dateFormat: `${t('datasetDocuments.segment.dateTimeFormat')}`,
})
return `${t('datasetDocuments.segment.editedAt')} ${timeText}`
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [childChunkInfo?.updated_at])

return (

+ 0
- 2
web/app/components/workflow/index.tsx Переглянути файл

@@ -190,7 +190,6 @@ export const Workflow: FC<WorkflowProps> = memo(({
return () => {
handleSyncWorkflowDraft(true, true)
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [])

const { handleRefreshWorkflowDraft } = useWorkflowRefreshDraft()
@@ -282,7 +281,6 @@ export const Workflow: FC<WorkflowProps> = memo(({
const { fetchInspectVars } = useSetWorkflowVarsWithValue()
useEffect(() => {
fetchInspectVars()
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [])

const store = useStoreApi()

+ 0
- 1
web/app/components/workflow/nodes/_base/components/agent-strategy-selector.tsx Переглянути файл

@@ -143,7 +143,6 @@ export const AgentStrategySelector = memo((props: AgentStrategySelectorProps) =>
category: PluginType.agent,
})
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [query])

const pluginRef = useRef<ListRef>(null)

+ 0
- 1
web/app/components/workflow/nodes/agent/use-config.ts Переглянути файл

@@ -151,7 +151,6 @@ const useConfig = (id: string, payload: AgentNodeType) => {
return
const newData = formattingLegacyData()
setInputs(newData)
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [currentStrategy])

// vars

+ 0
- 2
web/app/components/workflow/nodes/llm/use-config.ts Переглянути файл

@@ -101,7 +101,6 @@ const useConfig = (id: string, payload: LLMNodeType) => {
})
setInputs(newInputs)
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [defaultConfig, isChatModel])

const [modelChanged, setModelChanged] = useState(false)
@@ -161,7 +160,6 @@ const useConfig = (id: string, payload: LLMNodeType) => {
return
setModelChanged(false)
handleVisionConfigAfterModelChanged()
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [isVisionModel, modelChanged])

// variables

+ 1
- 1
web/app/components/workflow/types.ts Переглянути файл

@@ -447,6 +447,6 @@ export enum VersionHistoryContextMenuOptions {
delete = 'delete',
}

export interface ChildNodeTypeCount {
export type ChildNodeTypeCount = {
[key: string]: number;
}

Завантаження…
Відмінити
Зберегти