jetbase lock-status¶
Check if the database migration lock is active.
Usage¶
Description¶
The lock-status command shows whether the database is currently locked for migrations. Jetbase uses a locking mechanism to prevent multiple migration processes from running simultaneously, which could cause database corruption.
Output¶
When Unlocked (Normal State)¶
Output:
This is the normal state. You can safely run migrations.
When Locked¶
Output:
This indicates that a migration process is currently in progress. Please wait for it to finish before attempting any further actions.
If you are absolutely certain that no migration or fix command is active, you may use jetbase unlock to safely release the lock (see unlock for details).
How Locking Works¶
- Before migrations run, Jetbase locks other migrations from running
- During migrations, the lock prevents other processes from starting migrations
- After migrations complete, the lock is automatically released
For a detailed explanation of how migration locking works, see Migration Locking.
- Must be run from inside the
jetbase/directory - The lock is stored in the
jetbase_lockdatabase table - Locks are automatically released whether the migration was successful or an error occurred.