Migrator
renameSystemTables()
Signature
Section titled “Signature”renameSystemTables() — returns struct
Available in: migrator
Category: General Functions
Description
Section titled “Description”F15 Phase 2: rename legacy c_o_r_e_ system tables to wheels_.
Public API for the wheels migrate rename-system-tables CLI command.
Reads the current schema, generates per-adapter rename SQL, and
(unless dryRun is true) executes it inside a transaction. After
a successful rename, updates application.wheels.{levelsTableName,
migratorTableName} to the new names so the running app picks them
up without a restart.
Result struct:
- success: boolean
- renamed: array of “old -> new” strings (empty if no-op)
- skipped: human message when there’s nothing to do
- errors: array of error messages (when success=false)
- sql: array of SQL statements that would run / did run
Refuses to run (returns success=false) when both
c_o_r_e_ANDwheels_versions of either table coexist — that’s a partial- rename state which warrants manual cleanup, not silent destruction.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
dryRun | boolean | no | false | When true, returns the SQL that would run without executing. |