From 39e0c7ba668d0aa8a3c6202bd1cd580056fad1d1 Mon Sep 17 00:00:00 2001 From: TomJaeger Date: Fri, 6 Mar 2026 14:23:01 -0500 Subject: [PATCH] adding new docs for update-db cli command --- docs/cli/built-in-commands/update-db.md | 52 +++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 docs/cli/built-in-commands/update-db.md diff --git a/docs/cli/built-in-commands/update-db.md b/docs/cli/built-in-commands/update-db.md new file mode 100644 index 00000000..e2ddf6d2 --- /dev/null +++ b/docs/cli/built-in-commands/update-db.md @@ -0,0 +1,52 @@ +# `update:db` + +Update Database -- Runs ExpressionEngine database updates only + +Use this command when your ExpressionEngine files are already in place and you only need to run database update steps. + +## Syntax + +`php eecli.php update:db` + +## Options list: + +``` + --rollback + Rollback last database update + + --verbose + -v + Verbose output + + -y + Skip all confirmations. Advanced use only. + + --skip-cleanup + Skip cleanup steps after update + + --to-version= + Target database version to upgrade to + + --from-version= + Starting database version to upgrade from +``` + +## Examples: + +`php eecli.php update:db` + +`php eecli.php update:db --from-version=7.5.0 --to-version=7.5.3 -y` + +`php eecli.php update:db --rollback -y` + +## Operational caveats + +- `--to-version` cannot be greater than your installed app version. +- If your database is already at or above the target version, the command exits without running updates. +- If `--from-version` does not match the detected database version, the command prints a warning before continuing. +- When running against a local installer payload, `EE_INSTALL_MODE` must be set to `TRUE` in `.env.php`. + +## Rollback notes + +- Rollback requires a backup SQL file at `system/user/cache/ee_update/database.sql`. +- If that backup file does not exist, rollback cannot run.