mirror of
https://github.com/Mailu/Mailu.git
synced 2025-01-14 02:34:22 +02:00
Merge pull request #836 from Mailu/revert-835-schema-maxUserQuota-1
Revert "Change quota columns type to BigInteger "
This commit is contained in:
commit
fc9509a2c5
@ -131,7 +131,7 @@ class Domain(Base):
|
||||
backref=db.backref('manager_of'), lazy='dynamic')
|
||||
max_users = db.Column(db.Integer, nullable=False, default=-1)
|
||||
max_aliases = db.Column(db.Integer, nullable=False, default=-1)
|
||||
max_quota_bytes = db.Column(db.BigInteger(), nullable=False, default=0)
|
||||
max_quota_bytes = db.Column(db.Integer(), nullable=False, default=0)
|
||||
signup_enabled = db.Column(db.Boolean(), nullable=False, default=False)
|
||||
|
||||
@property
|
||||
@ -307,8 +307,8 @@ class User(Base, Email):
|
||||
domain = db.relationship(Domain,
|
||||
backref=db.backref('users', cascade='all, delete-orphan'))
|
||||
password = db.Column(db.String(255), nullable=False)
|
||||
quota_bytes = db.Column(db.BigInteger(), nullable=False, default=10**9)
|
||||
quota_bytes_used = db.Column(db.BigInteger(), nullable=False, default=0)
|
||||
quota_bytes = db.Column(db.Integer(), nullable=False, default=10**9)
|
||||
quota_bytes_used = db.Column(db.Integer(), nullable=False, default=0)
|
||||
global_admin = db.Column(db.Boolean(), nullable=False, default=False)
|
||||
enabled = db.Column(db.Boolean(), nullable=False, default=True)
|
||||
|
||||
|
@ -15,7 +15,7 @@ import sqlalchemy as sa
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.add_column('domain', sa.Column('max_quota_bytes', sa.BigInteger(), nullable=False, server_default='0'))
|
||||
op.add_column('domain', sa.Column('max_quota_bytes', sa.Integer(), nullable=False, server_default='0'))
|
||||
|
||||
|
||||
def downgrade():
|
||||
|
@ -20,7 +20,7 @@ import sqlalchemy as sa
|
||||
|
||||
def upgrade():
|
||||
with op.batch_alter_table('user') as batch:
|
||||
batch.add_column(sa.Column('quota_bytes_used', sa.BigInteger(), nullable=False, server_default='0'))
|
||||
batch.add_column(sa.Column('quota_bytes_used', sa.Integer(), nullable=False, server_default='0'))
|
||||
|
||||
|
||||
def downgrade():
|
||||
|
@ -41,7 +41,7 @@ def upgrade():
|
||||
sa.Column('comment', sa.String(length=255), nullable=True),
|
||||
sa.Column('localpart', sa.String(length=80), nullable=False),
|
||||
sa.Column('password', sa.String(length=255), nullable=False),
|
||||
sa.Column('quota_bytes', sa.BigInteger(), nullable=False),
|
||||
sa.Column('quota_bytes', sa.Integer(), nullable=False),
|
||||
sa.Column('global_admin', sa.Boolean(), nullable=False),
|
||||
sa.Column('enable_imap', sa.Boolean(), nullable=False),
|
||||
sa.Column('enable_pop', sa.Boolean(), nullable=False),
|
||||
|
Loading…
Reference in New Issue
Block a user