Underbase

Underbase

  • Docs
  • Guides
  • API
  • GitHub

›Get started

Get started

  • Introduction
  • Installation
  • Configuration
  • Writting migrations
  • Module usage
  • Logging
  • Troubleshooting

Guides

  • Organizing migrations
  • Babel usage
  • Working with backups
  • Typescript usage

API

  • Module
  • Configuration API
  • Query Interface
  • Module for development
Edit

Troubleshooting

Important notice

  • You cannot create your own migration at version 0. This version is reserved by migration for a 'vanilla' system, that is, one without any migrations applied.
  • If migrating from vT1 to vTz and migration fails from a vTx to vTy, where vTx & vTy are incremental versions between vT1 to vTz, migration will stop at vTx.
  • Prefer an async function (async | promise) for both up()/down() setup. This will ensure migration completes before version bump during execution.
  • A warning will show up if up() or down() are not of type Async or Promise.

Errors

Not migrating, control is locked

Migrations set a lock when they are migrating, to prevent multiple instances of your clustered app from running migrations simultaneously. If your migrations throw an exception, you will need to manually remove the lock (and ensure your db is still consistent) before re-running the migration.

To remove the lock on migrations, use the unlock method :

async (/* ... */) => {
  await migrator.unlock();
};

You can also do it from the command-line :

underbase force-unlock

Your problem is not stated ? Open an issue !

← LoggingOrganizing migrations →
  • Important notice
  • Errors
    • Not migrating, control is locked
Underbase
Guides
Working with backupsWorking with continuous deploymentAPI Reference
Community
Stack OverflowIssues tracker
More
Release notesGitHub