summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBarry Warsaw2015-12-19 12:15:13 -0500
committerBarry Warsaw2015-12-19 12:15:13 -0500
commit9f14de31ec1f78a2f2847d7a2c9b8efb775adab9 (patch)
tree0eb693c9bd60e235081fccd139c372db4cc39a63
parent2e13b2cea1d6d68c287bd1a879b4a8f20f5d5e4e (diff)
downloadmailman-9f14de31ec1f78a2f2847d7a2c9b8efb775adab9.tar.gz
mailman-9f14de31ec1f78a2f2847d7a2c9b8efb775adab9.tar.zst
mailman-9f14de31ec1f78a2f2847d7a2c9b8efb775adab9.zip
-rw-r--r--src/mailman/docs/DATABASE.rst11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/mailman/docs/DATABASE.rst b/src/mailman/docs/DATABASE.rst
index ed513b841..b27b1f788 100644
--- a/src/mailman/docs/DATABASE.rst
+++ b/src/mailman/docs/DATABASE.rst
@@ -71,19 +71,16 @@ something in the models, what steps are needed to reflect that change in the
database schema? You need to create and enter a virtual environment, install
Mailman into that, and then run the ``alembic`` command. For example::
- $ virtualenv -p python3 /tmp/mm3
+ $ python3 -m venv /tmp/mm3
$ source /tmp/mm3/bin/activate
$ python setup.py develop
+ $ mailman info
$ alembic -c src/mailman/config/alembic.cfg revision --autogenerate -m
"<migration_name>"
+ $ deactivate
This would create a new migration which would automatically be migrated to the
-database on the next run of Mailman. Note that the database needs to be in
-the older state so that Alembic can track the changes in the schema and
-autogenerate a migration. If you don't have the database in the older state
-you can remove the `--autogenerate` flag in the above command. It would then
-create a new empty revision which you can edit manually to reflect your
-changes in the database schema.
+database on the next run of Mailman.
People upgrading Mailman from previous versions need not do anything manually,
as soon as a new migration is added in the sources, it will be automatically