1
0
mirror of https://github.com/Mailu/Mailu.git synced 2024-12-14 10:53:30 +02:00
Mailu/core/admin/migrations/versions/25fd6c7bcb4a_.py

29 lines
617 B
Python
Raw Normal View History

2018-07-26 21:38:21 +02:00
""" Add a column for used quota
Revision ID: 25fd6c7bcb4a
Revises: 049fed905da7
Create Date: 2018-07-25 21:56:09.729153
"""
# revision identifiers, used by Alembic.
revision = '25fd6c7bcb4a'
down_revision = '049fed905da7'
from alembic import op
import sqlalchemy as sa
from alembic import op
import sqlalchemy as sa
def upgrade():
with op.batch_alter_table('user') as batch:
2019-01-13 17:40:28 +02:00
batch.add_column(sa.Column('quota_bytes_used', sa.BigInteger(), nullable=False, server_default='0'))
2018-07-26 21:38:21 +02:00
def downgrade():
with op.batch_alter_table('user') as batch:
batch.drop_column('user', 'quota_bytes_used')