summaryrefslogtreecommitdiff
path: root/src/mailman/database
diff options
context:
space:
mode:
authorBarry Warsaw2015-04-06 19:07:42 -0400
committerBarry Warsaw2015-04-06 19:07:42 -0400
commit20edc89f208b201e34628cc021c5bfe36ef5a035 (patch)
tree244d3beab2787c52b7037d2ccb28a16232232631 /src/mailman/database
parent4d8ef4efb330b0bfe6d9a07205240f152d813e85 (diff)
downloadmailman-20edc89f208b201e34628cc021c5bfe36ef5a035.tar.gz
mailman-20edc89f208b201e34628cc021c5bfe36ef5a035.tar.zst
mailman-20edc89f208b201e34628cc021c5bfe36ef5a035.zip
Checkpointing:
* Cleanups. * Updates to domains and users. * Allow is_server_owner to be PUT.
Diffstat (limited to 'src/mailman/database')
-rw-r--r--src/mailman/database/alembic/versions/46e92facee7_add_serverowner_domainowner.py34
1 files changed, 27 insertions, 7 deletions
diff --git a/src/mailman/database/alembic/versions/46e92facee7_add_serverowner_domainowner.py b/src/mailman/database/alembic/versions/46e92facee7_add_serverowner_domainowner.py
index e4dc25ab8..fc489cae5 100644
--- a/src/mailman/database/alembic/versions/46e92facee7_add_serverowner_domainowner.py
+++ b/src/mailman/database/alembic/versions/46e92facee7_add_serverowner_domainowner.py
@@ -1,3 +1,20 @@
+# Copyright (C) 2015 by the Free Software Foundation, Inc.
+#
+# This file is part of GNU Mailman.
+#
+# GNU Mailman is free software: you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation, either version 3 of the License, or (at your option)
+# any later version.
+#
+# GNU Mailman is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# GNU Mailman. If not, see <http://www.gnu.org/licenses/>.
+
"""add_serverowner_domainowner
Revision ID: 46e92facee7
@@ -6,7 +23,7 @@ Create Date: 2015-03-20 16:01:25.007242
"""
-# revision identifiers, used by Alembic.
+# Revision identifiers, used by Alembic.
revision = '46e92facee7'
down_revision = '33e1f5f6fa8'
@@ -15,15 +32,17 @@ import sqlalchemy as sa
def upgrade():
- op.create_table('domain_owner',
+ op.create_table(
+ 'domain_owner',
sa.Column('user_id', sa.Integer(), nullable=False),
sa.Column('domain_id', sa.Integer(), nullable=False),
sa.ForeignKeyConstraint(['domain_id'], ['domain.id'], ),
sa.ForeignKeyConstraint(['user_id'], ['user.id'], ),
sa.PrimaryKeyConstraint('user_id', 'domain_id')
- )
- op.add_column('user', sa.Column('is_server_owner', sa.Boolean(),
- nullable=True))
+ )
+ op.add_column(
+ 'user',
+ sa.Column('is_server_owner', sa.Boolean(), nullable=True))
if op.get_bind().dialect.name != 'sqlite':
op.drop_column('domain', 'contact_address')
@@ -31,6 +50,7 @@ def upgrade():
def downgrade():
if op.get_bind().dialect.name != 'sqlite':
op.drop_column('user', 'is_server_owner')
- op.add_column('domain', sa.Column('contact_address', sa.VARCHAR(),
- nullable=True))
+ op.add_column(
+ 'domain',
+ sa.Column('contact_address', sa.VARCHAR(), nullable=True))
op.drop_table('domain_owner')