- activate poetry shell
- delete files pyproject.toml and poetry.lock
- commit
- create new tag & commit tag
python setup.py buildpython setup.py sdist(создаст файл pre_commit_merge_content_hooks-0.0.0.tar.gz)python setup.py bdist_wheel(создаст файл pre_commit_merge_content_hooks-0.0.0-py3-none-any.whl)
The hook is used to check new migration files for the presence of large tables.
Migrations that include large tables must be tested on a copy of the production database and must contain the comments:
# migration tested on prod database# migration_duration: {n}where n is the migration execution time in minutes (integer only).
A downtime migration is a migration whose execution time exceeds 1 minute. Such migrations will be marked with the "_downtime" postfix.
Hook args:
--tables- names of big tables separated by commas. These tables will be validated by the hook.--min-revision- min revision number of migration after which the hook will perform the validation.--migrations-dir- path to migrations directory. Do not include "versions" and "old_versions" in path