Repository navigation
fix(db): add the forgot-password keys to the whitelabelingConfig default - #119
Merged
Merged
Conversation
The Drizzle schema default of webServerSettings.whitelabelingConfig has the keys passwordResetGuide and supportEmail, but the database default set by the migrations does not. Upstream commit 44fc4cc ("custom forgot password flow in whitelabeling settings") added the keys to the schema without a migration, and the upstream sync of 2026-10-26 (#87) brought that into the fork. Upstream canary has no migration for it either. Every drizzle-kit generate therefore emitted ALTER COLUMN "whitelabelingConfig" SET DEFAULT, and any schema change picked it up as an unrelated statement (#118 had to drop it by hand). Migration 0211_whitelabeling_config_default, right after #118's 0210_railpack_default_0_42_0, sets the column default to the schema's: the same object plus "passwordResetGuide":null and "supportEmail":null. drizzle-kit generate now reports no changes. Only the default changes, so only rows inserted later (a fresh install) get the keys. Existing rows are not backfilled: every reader treats a missing key as null (getPublicWhitelabelingConfig with ?? null, the login page with !!supportEmail, the settings form with ?? ""), and save and reset write the whole object. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
agentHits
force-pushed
the
fix/whitelabeling-config-default
branch
from
October 28, 2026 17:50
695cd90 to
72034cb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Migration
0211_whitelabeling_config_defaultbrings the database default ofwebServerSettings.whitelabelingConfigin line with the Drizzle schema. The default keeps the same object and adds"passwordResetGuide": nulland"supportEmail": null. After this PR,bunx drizzle-kit generate --config ./server/db/drizzle.config.tsinapps/dokployreports no changes.Why
Upstream commit
44fc4ccc6(feat(enterprise): custom forgot password flow in whitelabeling settings) added the two keys to the schema default inpackages/server/src/db/schema/web-server-settings.tsbut shipped no migration. The upstream sync of 2026-10-26 (#87) brought the change into the fork. Upstream canary still has no migration for it: its latest snapshot (0198) lacks both keys too.Because of this gap, every
drizzle-kit generateemittedALTER TABLE "webServerSettings" ALTER COLUMN "whitelabelingConfig" SET DEFAULT '{...}'::jsonb. Any unrelated schema change picked the statement up, and #118 had to drop it from its Railpack migration by hand. Now it has its own migration.Effect on existing panels
webServerSettingsrows keep their config as it is.null:getPublicWhitelabelingConfigreturnsconfig.passwordResetGuide ?? nullandconfig.supportEmail ?? null;!!whitelabeling?.supportEmail, and falls back to the default text whenpasswordResetGuideis empty;data.passwordResetGuide ?? ""anddata.supportEmail ?? "";Order with #118
The migration was first generated as
0210alongside #118, which also added a0210. #118 merged first, so this migration was regenerated on top of it as0211. Its snapshot'sprevIdis theidof #118's0210snapshot, and its journalwhen(1793209780808) is later than0210's (1793202867422), so the migrator applies both in order.Checks
drizzle-kit generateafter the migration:No schema changes, nothing to migrate.0211_snapshot.jsondiffers from0210_snapshot.jsononly inid/prevIdand this default.migration.ts:0210fromAgentHits-Devapplied, then awebServerSettingsrow was inserted;0211applied, and the row inserted before it kept its config without the two keys, while a row inserted after it got both asnull;update-server-config,migration-exit-code,high-findings-regression,super-password-*,install-agenthits-update,env/encryption): 7 files, 118 passed.bun run typecheck: clean in all four packages.🤖 Generated with Claude Code