Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
django-migration-rollback
Advanced tools
A simple Django app to be able to migrate back to a previous migration or to migrate back to a migration in a specific branch in a git repository or locally.
A Django package used to just make the python manage.py migrate
a little easier for Django apps that commit their migrations and want a way to rollback to a previous migration without needing to check what the which one it is via python manage.py showmigrations
or in the project's git repository.
Able to set which branch in a git repository to rollback to using the custom command migraterollback
or if you wish to just rollback to a previous migration only via migrateprevious
. Note in order to use the rollback with a git repository's branch feature with git the project must have a .git
file present.
migraterollback
command❯ python manage.py migraterollback polls feature/really-cool-branch
Attempting to go back to rollback polls to latest migration on branch feature/really-cool-branch
Operations to perform:
Target specific migration: 0006_question5, from polls
Running migrations:
Rendering model states...
DONE
Unapplying polls.0007_question6...
OK
This command is used to migrate a Django app back to the migration found in a repository's branch (this will also migrate to that migration if behind).
main
will be used.migrateprevious
command❯ python manage.py migrateprevious polls
Attempting to go back to rollback polls to previous migration
Operations to perform:
Target specific migration: 0005_question4, from polls
Running migrations:
Rendering model states...
DONE
Unapplying polls.0006_question5...
OK
This command is used to migrate a Django app back to the previously applied migration.
pip install django-migration-rollback
pip install git+ssh://git@github.com/jdboisvert/django-migration-rollback
Add "migration_rollback" to your INSTALLED_APPS in the settings.py
like this:
INSTALLED_APPS = [
...
'migration_rollback',
]
# install pyenv (if necessary)
brew install pyenv pyenv-virtualenv
echo """
export PYENV_VIRTUALENV_DISABLE_PROMPT=1
eval "$(pyenv init --path)"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
""" > ~/.zshrc
source ~/.zshrc
# create a virtualenv
pyenv install 3.10.5
pyenv virtualenv 3.10.5 django_migration_rollback
pyenv activate django_migration_rollback
# install dependencies
pip install -U pip
pip install -r requirements.txt -r requirements_dev.txt
pre-commit install
FAQs
A simple Django app to be able to migrate back to a previous migration or to migrate back to a migration in a specific branch in a git repository or locally.
We found that django-migration-rollback demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.