mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-06-29 15:31:05 +08:00
Feat: mark mysql migrations as applied (#15504)
### What problem does this PR solve? mark mysql migrations as applied ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@@ -114,6 +114,24 @@ run_server(){
|
||||
fi
|
||||
}
|
||||
|
||||
ensure_db_init() {
|
||||
echo "Initializing database tables..."
|
||||
"$PY" -c "from api.db.db_models import init_database_tables as init_web_db; init_web_db()"
|
||||
echo "Database tables initialized."
|
||||
}
|
||||
|
||||
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
|
||||
echo "Model provider table migrations completed."
|
||||
}
|
||||
|
||||
ensure_db_init
|
||||
run_mysql_migrations
|
||||
|
||||
# Start task executors
|
||||
for ((i=0;i<WS;i++))
|
||||
do
|
||||
|
||||
Reference in New Issue
Block a user