Feat/UI schema dual write#78
Merged
Merged
Conversation
- Replace session advisory lock with a TTL row (nextly_migrate_lock) that survives PgBouncer/pooler connection churn; fail-fast and wait modes. - Add migrateCore (throwing, non-exiting) shared by the CLI and a new production run-on-boot hook (runProdMigrationsIfEnabled), gated on NODE_ENV=production + db.runMigrationsOnBoot; wired into init + auth-handler. - Adapt the boot logger to the full Logger surface so run-on-boot apply cannot crash on logger.success mid-run. - Drop-guard now protects internal nextly_ tables. - nextly migrate --force-unlock; db.runMigrationsOnBoot / migrateLockTtlSeconds config; playground ci script (nextly migrate && next build).
- migrate:create now emits a -- DOWN section by inverting the resolved forward ops (renames preserved as reverse renames, not data-losing drop+add); blank/data-only migrations get an irreversible placeholder. - New nextly migrate:down reverts the most-recently-applied migration(s) using their -- DOWN section: --step N, --allow-data-loss, --yes (prod), --dry-run, --force-unlock. Records a rolled_back event so the file becomes re-runnable. Restores schema shape, not data. - Export parseSqlSections/splitSqlStatements/executeTransaction for reuse. - Docs: rolling-back section + round-trip test recipe.
Contributor
PR title fails Conventional Commits checkExamples of valid titles:
|
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.
Summary
Type of change
Related issues
Changeset
This repo uses Changesets. If your PR changes any publishable package under
packages/*, you must include a changeset:Then commit the generated
.changeset/*.mdfile.apps/*)Test plan
pnpm lintpnpm check-typespnpm buildChecklist
mainbranchScreenshots / recordings
Notes for reviewers