migrate

command
v0.0.122 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2026 License: GPL-3.0 Imports: 27 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

migrate is the consolidated one-off maintenance tool for an Ex DynamoDB table. Each subcommand is an idempotent, resumable backfill or cleanup that can be re-run any number of times without harm. All default to --dry-run; pass --apply to actually write.

Usage:

go run ./cmd/migrate <subcommand> [--apply] [-v]

Subcommands:

thread-delete          soft-delete replies whose thread root is already deleted
thread-index           backfill the GSI1 thread index on existing replies
parent-index           backfill per-parent PIN#/FILE# index rows
notification-keywords  seed name keywords for accounts that have none, and
                       swap a seeded "Muhammad" prefix for the name after it
attachment-relink      re-link orphaned attachments to their message [--window=1h]
draft-cleanup          delete orphaned DynamoDB DRAFT# rows (drafts now live in Redis)
evt-ttl                set the idle TTL on legacy durable inbox streams (Redis)
search-reindex         recreate ex_users/ex_channels with the autocomplete mapping + reindex (OpenSearch)
avatar-resize          shrink avatars stored before uploads were resized (S3 + Redis)
thumbnail-webp         re-encode lossless WebP message thumbnails as lossy WebP (S3) [--workers=16]
oidc-unbind            clear an account's pinned SSO identity so its next SSO login re-pins it --email=<address>
thread-activity        order existing followed threads by latest reply for the paged /threads list

Required environment variables (same as the `ex` server):

  • AWS_REGION
  • DYNAMODB_TABLE
  • DYNAMODB_ENDPOINT (only for DynamoDB Local)
  • OPENSEARCH_URL (only for the search-reindex subcommand)
  • S3_* (only for avatar-resize and thumbnail-webp) and REDIS_URL (only for evt-ttl and avatar-resize)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL