Skip to content

Consolidated 3.x-era → 4.8.x upgrade migration (for Client B et al.)#98

Merged
kennethphough merged 2 commits into
masterfrom
feature/3x-era-consolidated-migration
Jun 1, 2026
Merged

Consolidated 3.x-era → 4.8.x upgrade migration (for Client B et al.)#98
kennethphough merged 2 commits into
masterfrom
feature/3x-era-consolidated-migration

Conversation

@kennethphough

Copy link
Copy Markdown
Member

Consolidated 3.x-era → 4.8.x upgrade migration

A documented, idempotent reference path to bring a pre-4.1.0 ("3.x era") install up to the 4.8.x framework schema in one shot. Pre-4.1.0 schema changes were documented in the CHANGELOG (not .sql files); this consolidates everything from ~3.8.0 → 4.8.0 into a single file, built to the final 4.8.x shape (e.g. version tables are created already without the obfuscation columns, rather than create-then-drop).

First consumer: Client B (kyte-php 3.7.3, MariaDB). Diffed the full 4.8.1 framework set (53 tables) against their live schema (34 tables).

Contents (generated from a live v4.8.1 install's SHOW CREATE TABLE)

  • 19 CREATE TABLE IF NOT EXISTS — the 6 versioning tables, 5 cron tables, 3 AI/Bedrock tables, KyteActivityLog, KyteRefreshToken, KyteMCPToken, KyteMCPSession, KyteLibraryAssignment.
  • 15 ADD COLUMN IF NOT EXISTSApplication.auth_mode+language; sensitive ×4; KyteAccount.default_language; KyteUser.language; KyteScriptAssignment.global_scope; KyteError ×6.
  • 12 DROP COLUMN IF EXISTS — the obfuscation columns (4.8.0).

Portability / safety decisions

  • Charset/collation stripped so new tables/columns inherit the target DB's defaults — the source 4.8.1 install was MySQL 8.0, whose utf8mb4_0900_ai_ci collation MariaDB doesn't support, and this also avoids "illegal mix of collations" against the install's existing tables.
  • Built for MariaDB — the column-level IF [NOT] EXISTS clauses are MariaDB extensions (MySQL 8.0 doesn't support them on ADD/DROP COLUMN). Noted in the header.

NOT covered here (deliberately) — see the upgrade plan

  • config.php 4.x constants (JWT secret + TTLs, auth strategy dispatcher, etc.).
  • Cron data-migration (old full-class cron jobs → function-based format) — N/A if the install never used cron (a freshly-created CronJob* set is empty).
  • Shipyard 1.5.11 → 2.2.0 (separate major-jump).

⚠️ Process

This is a reference/rehearsal artifact, not a drop-in prod run. Rehearse on a clone of the target DB + a staging install, smoke-test, then apply to the real install.

🤖 Generated with Claude Code

kennethphough and others added 2 commits May 31, 2026 20:16
Documented reference path to bring a pre-4.1.0 ("3.x era") install up to the
4.8.x framework schema in one shot. Pre-4.1.0 schema changes lived in the
CHANGELOG (not .sql files); this consolidates ~3.8.0 -> 4.8.0 into one
idempotent file, built to the FINAL 4.8.x shape (version tables created already
without obfuscation columns, rather than create-then-drop).

Generated from a live v4.8.1 install's SHOW CREATE TABLE: 19 CREATE TABLE IF
NOT EXISTS + 15 ADD COLUMN IF NOT EXISTS + 12 DROP COLUMN IF EXISTS. Explicit
charset/collation stripped (inherit DB default) - MySQL utf8mb4_0900_ai_ci is
not valid on MariaDB. Built for MariaDB (column-level IF [NOT] EXISTS).

First consumer: Client B (kyte-php 3.7.3, MariaDB). Rehearse on a clone before
prod; config.php 4.x constants + the cron data-migration are out of scope here.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ion header

The file both ADDS (safe before the code swap) and DROPS obfuscation columns
(the pre-4.8 code still reads them, so must be after). Header now spells out
sections 1&2 -> composer update -> section 3. Also corrected the config note:
4.x auto-defaults new constants (AUTH_STRATEGY_DISPATCHER='off' = legacy HMAC),
so an HMAC install needs little/no config change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@kennethphough
kennethphough merged commit 098189f into master Jun 1, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant