Refa: refine mysql migration version workflow (#15549)

### What problem does this PR solve?

refine mysql migration version workflow

### Type of change

- [x] Refactoring
This commit is contained in:
buua436
2026-06-03 11:51:42 +08:00
committed by GitHub
parent a75ea7ba7c
commit 76fc1d547f
3 changed files with 175 additions and 75 deletions

View File

@@ -274,10 +274,12 @@ ensure_db_init
if [[ "${INIT_MODEL_PROVIDER_TABLES}" -eq 1 ]]; then
echo "Running model provider table migrations..."
"$PY" tools/scripts/mysql_migration.py --stages tenant_model_provider --config conf/service_conf.yaml --execute
"$PY" tools/scripts/mysql_migration.py --stages tenant_model_instance --config conf/service_conf.yaml --execute
"$PY" tools/scripts/mysql_migration.py --stages tenant_model --config conf/service_conf.yaml --execute
"$PY" tools/scripts/mysql_migration.py --stages model_id_config --config conf/service_conf.yaml --execute
"$PY" tools/scripts/mysql_migration.py \
--stages tenant_model_provider,tenant_model_instance,tenant_model,model_id_config \
--config conf/service_conf.yaml \
--execute \
--database-version "v0.26.0" \
--mark-database-version-on-success
echo "Model provider table migrations completed."
fi

View File

@@ -122,10 +122,12 @@ ensure_db_init() {
run_mysql_migrations() {
echo "Running model provider table migrations..."
"$PY" tools/scripts/mysql_migration.py --stages tenant_model_provider --config conf/service_conf.yaml --execute
"$PY" tools/scripts/mysql_migration.py --stages tenant_model_instance --config conf/service_conf.yaml --execute
"$PY" tools/scripts/mysql_migration.py --stages tenant_model --config conf/service_conf.yaml --execute
"$PY" tools/scripts/mysql_migration.py --stages model_id_config --config conf/service_conf.yaml --execute
"$PY" tools/scripts/mysql_migration.py \
--stages tenant_model_provider,tenant_model_instance,tenant_model,model_id_config \
--config conf/service_conf.yaml \
--execute \
--database-version "v0.26.0" \
--mark-database-version-on-success
echo "Model provider table migrations completed."
}