Purpose: Lock schemas in production to prevent accidental changes.Permissions:
❌ Schema migrations blocked
✅ Read-only operations allowed
✅ Query execution
✅ Data mutations (INSERT/UPDATE/DELETE)
Example:
# Try to migrate in readonly modechameleon migrate --apply❌ readonly mode: schema modifications blocked💡 Upgrade to standard mode: chameleon config set mode=standard
This is the recommended mode for production environments. Schema changes should go through proper change management processes.
Purpose: Allow controlled schema changes during development.Permissions:
✅ Schema migrations allowed (with validation)
✅ Migration preview (dry-run)
✅ Schema validation
✅ All operations logged
Example:
# Upgrade to standard modechameleon config set mode=standard🔐 Enter mode password: ****✅ Mode upgraded to standard# Now migrations workchameleon migrate --apply✅ Migration applied successfully✅ Schema v002 registered and locked
Recommended for development and staging environments where teams need to iterate on schemas.
# readonly → standardchameleon config set mode=standard🔐 Enter mode password: ****✅ Mode upgraded to standard# standard → privilegedchameleon config set mode=privileged🔐 Enter mode password: ****✅ Mode upgraded to privileged# privileged → emergencychameleon config set mode=emergency🔐 Enter mode password: ****⚠️ WARNING: Emergency mode bypasses all safety checks✅ Mode upgraded to emergency
# emergency → readonly (no password)chameleon config set mode=readonly✅ Mode downgraded to readonly# privileged → standard (no password)chameleon config set mode=standard✅ Mode downgraded to standard
Downgrades are unrestricted because they increase security, not decrease it.
# Set password via environmentexport CHAMELEON_MODE_PASSWORD="strong-password"# Upgrade without promptchameleon config set mode=standard✅ Mode upgraded to standard (using env password)
Never commit passwords to version control. Use environment variables or secret management tools.
Mode: readonlyRationale: Prevent accidental schema changesPassword: DBA team only (rotated regularly)Monitoring: Alert on ANY mode changeProcess: Change requests required for upgrades
# 1. Start in readonly (default)chameleon status# Mode: readonly# 2. Upgrade for developmentchameleon config set mode=standard# 3. Develop and migratechameleon migrate --apply# 4. Downgrade when donechameleon config set mode=readonly