summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbhilash Raj2014-10-09 18:45:58 +0530
committerAbhilash Raj2014-10-09 18:45:58 +0530
commit6ee15bca20902f79925fb2d77416d8e1614632a3 (patch)
tree19ddd9eda1b9a8ea449a224c474a6f1307879f90
parent061799ef5031977bd343bbe54a6ad809138bdb45 (diff)
downloadmailman-6ee15bca20902f79925fb2d77416d8e1614632a3.tar.gz
mailman-6ee15bca20902f79925fb2d77416d8e1614632a3.tar.zst
mailman-6ee15bca20902f79925fb2d77416d8e1614632a3.zip
-rw-r--r--src/mailman/config/alembic.cfg4
-rw-r--r--src/mailman/config/schema.cfg2
-rw-r--r--src/mailman/database/alembic/env.py1
-rw-r--r--src/mailman/model/user.py5
4 files changed, 7 insertions, 5 deletions
diff --git a/src/mailman/config/alembic.cfg b/src/mailman/config/alembic.cfg
index b1f53a3d2..1858eb94a 100644
--- a/src/mailman/config/alembic.cfg
+++ b/src/mailman/config/alembic.cfg
@@ -34,7 +34,7 @@ keys = generic
[logger_root]
level = WARN
handlers = console
-qualname =
+qualname = console
[logger_sqlalchemy]
level = WARN
@@ -53,5 +53,5 @@ level = WARN
formatter = generic
[formatter_generic]
-format = %(levelname)-5.5s [%(name)s] %(message)s
+format = %(filename)s - $(funcName)s - %(levelname)-5.5s [%(name)s] %(message)s
datefmt = %H:%M:%S
diff --git a/src/mailman/config/schema.cfg b/src/mailman/config/schema.cfg
index e8f89ab41..6ab6e939b 100644
--- a/src/mailman/config/schema.cfg
+++ b/src/mailman/config/schema.cfg
@@ -206,7 +206,7 @@ debug: no
# Where can we find the Alembic migration scripts? The `python:` schema means
# that this is a module path relative to the Mailman 3 source installation.
-alembic_scripts: mailman.database:alembic
+# alembic_scripts: mailman.database:alembic
[logging.template]
diff --git a/src/mailman/database/alembic/env.py b/src/mailman/database/alembic/env.py
index d1caec58d..269dcf835 100644
--- a/src/mailman/database/alembic/env.py
+++ b/src/mailman/database/alembic/env.py
@@ -35,7 +35,6 @@ from mailman.core import initialize
from mailman.config import config
from mailman.database.alembic import alembic_cfg
from mailman.database.model import Model
-from mailman.utilities.modules import expand_path
from mailman.utilities.string import expand
diff --git a/src/mailman/model/user.py b/src/mailman/model/user.py
index 576015dbe..ffd52fdfb 100644
--- a/src/mailman/model/user.py
+++ b/src/mailman/model/user.py
@@ -66,7 +66,10 @@ class User(Model):
_preferred_address_id = Column(
Integer,
- ForeignKey('address.id', use_alter=True, name='_preferred_address'))
+ ForeignKey('address.id', use_alter=True,
+ name='_preferred_address',
+ ondelete="SET NULL"))
+
_preferred_address = relationship(
'Address', primaryjoin=(_preferred_address_id==Address.id),
post_update=True)