mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-23 08:56:42 +08:00
Docs: Update version references to v0.26.4 in READMEs and docs (#16716)
This commit is contained in:
@@ -104,7 +104,7 @@ The script has three mutually exclusive modes:
|
||||
```bash
|
||||
# Using config file
|
||||
python mysql_migration.py --stages tenant_model_provider --config config.yaml
|
||||
|
||||
|
||||
# Using command line MySQL connection
|
||||
python mysql_migration.py --stages tenant_model_provider --host localhost --port 3306 --user root
|
||||
```
|
||||
@@ -275,8 +275,8 @@ python db_schema_sync.py [OPTIONS]
|
||||
### Version Format
|
||||
|
||||
Version must be in format `vxx.xx.xx` where `xx` are digits:
|
||||
- Valid: `v0.26.3`, `v1.0.0`, `v10.20.30`
|
||||
- Invalid: `0.26.3`, `v0.25`, `v0.26.3.1`
|
||||
- Valid: `v0.26.4`, `v1.0.0`, `v10.20.30`
|
||||
- Invalid: `0.26.4`, `v0.25`, `v0.26.4.1`
|
||||
|
||||
### Migration File Location
|
||||
|
||||
@@ -287,7 +287,7 @@ tools/migrate/{version_dir}/
|
||||
|
||||
Where `{version_dir}` is the version with `.` replaced by `_`.
|
||||
|
||||
Example: Version `v0.26.3` → Directory `tools/migrate/v0_26_3/`
|
||||
Example: Version `v0.26.4` → Directory `tools/migrate/v0_26_4/`
|
||||
|
||||
### Examples
|
||||
|
||||
@@ -295,32 +295,32 @@ Example: Version `v0.26.3` → Directory `tools/migrate/v0_26_3/`
|
||||
# List all migrations
|
||||
python db_schema_sync.py --list \
|
||||
--host localhost --port 3306 --user root --password xxx --database rag_flow \
|
||||
--version v0.26.3
|
||||
--version v0.26.4
|
||||
|
||||
# Create a new auto-detected migration (new tables, new fields, type changes only)
|
||||
python db_schema_sync.py --create \
|
||||
--host localhost --port 3306 --user root --password xxx --database rag_flow \
|
||||
--version v0.26.3
|
||||
--version v0.26.4
|
||||
|
||||
# Create a migration including dropped fields (destructive!)
|
||||
python db_schema_sync.py --create --drop \
|
||||
--host localhost --port 3306 --user root --password xxx --database rag_flow \
|
||||
--version v0.26.3
|
||||
--version v0.26.4
|
||||
|
||||
# Create a named migration
|
||||
python db_schema_sync.py --create --name add_user_table \
|
||||
--host localhost --port 3306 --user root --password xxx --database rag_flow \
|
||||
--version v0.26.3
|
||||
--version v0.26.4
|
||||
|
||||
# Run all pending migrations
|
||||
python db_schema_sync.py --migrate \
|
||||
--host localhost --port 3306 --user root --password xxx --database rag_flow \
|
||||
--version v0.26.3
|
||||
--version v0.26.4
|
||||
|
||||
# Show schema differences (including removed fields)
|
||||
python db_schema_sync.py --diff \
|
||||
--host localhost --port 3306 --user root --password xxx --database rag_flow \
|
||||
--version v0.26.3
|
||||
--version v0.26.4
|
||||
```
|
||||
|
||||
## How It Works
|
||||
|
||||
@@ -52,7 +52,7 @@ def validate_version(version: str) -> bool:
|
||||
|
||||
|
||||
def version_to_dirname(version: str) -> str:
|
||||
"""Convert version string to valid directory name (e.g., 'v0.26.3' -> 'v0_26_3')"""
|
||||
"""Convert version string to valid directory name (e.g., 'v0.26.4' -> 'v0_26_4')"""
|
||||
return version.replace(".", "_")
|
||||
|
||||
|
||||
@@ -838,19 +838,19 @@ def main():
|
||||
epilog="""
|
||||
Examples:
|
||||
# List all migrations
|
||||
python db_schema_sync.py --list --host localhost --port 3306 --user root --password xxx --database rag_flow --version v0.26.3
|
||||
python db_schema_sync.py --list --host localhost --port 3306 --user root --password xxx --database rag_flow --version v0.26.4
|
||||
|
||||
# Create migration from model changes
|
||||
python db_schema_sync.py --create --host localhost --port 3306 --user root --password xxx --database rag_flow --version v0.26.3
|
||||
python db_schema_sync.py --create --host localhost --port 3306 --user root --password xxx --database rag_flow --version v0.26.4
|
||||
|
||||
# Create migration including dropped fields (destructive!)
|
||||
python db_schema_sync.py --create --drop --host localhost --port 3306 --user root --password xxx --database rag_flow --version v0.26.3
|
||||
python db_schema_sync.py --create --drop --host localhost --port 3306 --user root --password xxx --database rag_flow --version v0.26.4
|
||||
|
||||
# Run all pending migrations
|
||||
python db_schema_sync.py --migrate --host localhost --port 3306 --user root --password xxx --database rag_flow --version v0.26.3
|
||||
python db_schema_sync.py --migrate --host localhost --port 3306 --user root --password xxx --database rag_flow --version v0.26.4
|
||||
|
||||
# Show schema differences
|
||||
python db_schema_sync.py --diff --host localhost --port 3306 --user root --password xxx --database rag_flow --version v0.26.3
|
||||
python db_schema_sync.py --diff --host localhost --port 3306 --user root --password xxx --database rag_flow --version v0.26.4
|
||||
""",
|
||||
)
|
||||
|
||||
@@ -862,7 +862,7 @@ Examples:
|
||||
parser.add_argument("--database", type=str, required=True, help="MySQL database name")
|
||||
|
||||
# Version option
|
||||
parser.add_argument("--version", "-v", type=str, required=True, help="Version number in format vxx.xx.xx (e.g., v0.26.3)")
|
||||
parser.add_argument("--version", "-v", type=str, required=True, help="Version number in format vxx.xx.xx (e.g., v0.26.4)")
|
||||
|
||||
# Action options
|
||||
parser.add_argument("--list", "-l", action="store_true", help="List all migrations")
|
||||
@@ -878,7 +878,7 @@ Examples:
|
||||
|
||||
# Validate version format
|
||||
if not validate_version(args.version):
|
||||
logger.error(f"Invalid version format: {args.version}. Expected format: vxx.xx.xx (e.g., v0.26.3)")
|
||||
logger.error(f"Invalid version format: {args.version}. Expected format: vxx.xx.xx (e.g., v0.26.4)")
|
||||
sys.exit(1)
|
||||
|
||||
# Validate at least one action is specified
|
||||
|
||||
@@ -1381,10 +1381,10 @@ Examples:
|
||||
python mysql_migration.py --list-stages
|
||||
|
||||
# Check whether migration is needed for a target version
|
||||
python mysql_migration.py --check-database-version --database-version v0.26.3 --config /path/to/config.yaml
|
||||
python mysql_migration.py --check-database-version --database-version v0.26.4 --config /path/to/config.yaml
|
||||
|
||||
# Mark database version separately
|
||||
python mysql_migration.py --mark-database-version --database-version v0.26.3 --config /path/to/config.yaml
|
||||
python mysql_migration.py --mark-database-version --database-version v0.26.4 --config /path/to/config.yaml
|
||||
|
||||
# Dry run (default - check only, no write) with config file
|
||||
python mysql_migration.py --stages tenant_model_provider --config /path/to/config.yaml
|
||||
@@ -1398,11 +1398,11 @@ Examples:
|
||||
# Execute full migration (create tables and migrate data)
|
||||
python mysql_migration.py --stages tenant_model_provider --config /path/to/config.yaml --execute
|
||||
|
||||
# Execute migration only when database version is lower than v0.26.3
|
||||
python mysql_migration.py --stages tenant_model_provider --config /path/to/config.yaml --execute --database-version v0.26.3
|
||||
# Execute migration only when database version is lower than v0.26.4
|
||||
python mysql_migration.py --stages tenant_model_provider --config /path/to/config.yaml --execute --database-version v0.26.4
|
||||
|
||||
# Execute migration and mark the database version when all stages succeed
|
||||
python mysql_migration.py --stages tenant_model_provider,tenant_model_instance,tenant_model,model_id_config --config /path/to/config.yaml --execute --database-version v0.26.3 --mark-database-version-on-success
|
||||
python mysql_migration.py --stages tenant_model_provider,tenant_model_instance,tenant_model,model_id_config --config /path/to/config.yaml --execute --database-version v0.26.4 --mark-database-version-on-success
|
||||
|
||||
# Normalize legacy model IDs in stored configs
|
||||
python mysql_migration.py --stages model_id_config --config /path/to/config.yaml --execute
|
||||
|
||||
Reference in New Issue
Block a user