Skip to content

docs/migrator: Update schema-drift page with current migrator output - #1885

Open
marcleblanc2 wants to merge 3 commits into
mainfrom
remove-stale-drift-example
Open

docs/migrator: Update schema-drift page with current migrator output#1885
marcleblanc2 wants to merge 3 commits into
mainfrom
remove-stale-drift-example

Conversation

@marcleblanc2

@marcleblanc2 marcleblanc2 commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Brings docs/self-hosted/updates/migrator/schema-drift.mdx in line with what migrator prints today (internal/database/migration/drift/ and lib/output/emoji.go in sourcegraph/sourcegraph).

Removed the lsif_data_docs_search_private_delete example:

  • The drift it shows cannot be reported anymore. Since sourcegraph/sourcegraph@f9b273e2b021f33179ee300fb929cb752c26c7df (#51237, May 2023) normalizeFunction collapses all whitespace in function definitions before comparison, so a space-vs-newline difference is no longer drift.
  • Its pasted cmp.Diff output was hard-wrapped mid-token ($functio" / "n$), which is also what produced the functio fragment in the spellcheck word list.

Refreshed the remaining examples:

  • EmojiFailure is now (was ); the migrator banner uses .
  • Column drift with a targeted fix says Suggested action: alter the column. and prints only the ALTER statement, no go-cmp struct diff (compare_columns.go + ColumnDescription.AlterToTarget). The old change the column nullability constraint and replace the function definition wordings were dropped in sourcegraph/sourcegraph@5fbbcdafd46cda11da80dcc120d0f2a39e2be84d (#50207).
  • The drift command prints one ⨯ Drift detected! preamble before the summaries (drift/util.go).
  • The upgrade-time hint now ends with the docs link migrator actually prints (multiversion/drift.go).
  • Unwrapped the hard-wrapped SQL so statements match migrator output.

Test plan

  • Compared each line against the current source files named above.
  • Page reads cleanly: the "Then check the database again..." paragraph flows straight into the support / -skip-drift-check paragraph.

Amp threads

The lsif_data_docs_search_private_delete example showed migrator
reporting a space-vs-newline difference in a function definition.
Since sourcegraph/sourcegraph f9b273e (May 2023), function
definitions are whitespace-normalized before comparison, so this
drift can no longer be reported. The example also used the old
'replace the function definition' wording and the old ❌ prefix,
and its pasted output was hard-wrapped mid-token.

Amp-Thread-ID: https://ampcode.com/threads/T-01a08426-e0ec-71d9-a4b9-bcf3deaa2890
Co-authored-by: Amp <amp@ampcode.com>
@vercel

vercel Bot commented Sep 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
sourcegraph-docs Ready Ready Preview Sep 9, 2026 3:46am UTC

Request Review

- EmojiFailure is now ' ⨯' (was ❌); migrator banner uses ✱
- Column drift with a targeted fix now says 'alter the column' and
  prints only the ALTER statement, not a go-cmp struct diff
- Drift command prints a single 'Drift detected!' preamble
- Upgrade-time hint now links to the schema-drift docs page
- Unwrap hard-wrapped SQL so statements match what migrator prints

Amp-Thread-ID: https://ampcode.com/threads/T-01a08426-e0ec-71d9-a4b9-bcf3deaa2890
Co-authored-by: Amp <amp@ampcode.com>
@marcleblanc2 marcleblanc2 changed the title docs: remove stale whitespace-drift example from schema-drift page docs: refresh schema-drift page to current migrator output Sep 9, 2026
@marcleblanc2 marcleblanc2 changed the title docs: refresh schema-drift page to current migrator output docs: Refresh schema-drift page to current migrator output Sep 9, 2026
@marcleblanc2 marcleblanc2 changed the title docs: Refresh schema-drift page to current migrator output docs/migrator: Update schema-drift page with current migrator output Sep 9, 2026
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