Skip to content

Commit cff83e0

Browse files
committed
Use bigint also for quota_media
1 parent 8d7839c commit cff83e0

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
"""Use BigInt for quota_media
2+
3+
Revision ID: 84960b7d968c
4+
Revises: b0582f54029c
5+
Create Date: 2023-07-18 12:10:56.978022
6+
7+
"""
8+
from alembic import op
9+
import sqlalchemy as sa
10+
11+
12+
# revision identifiers, used by Alembic.
13+
revision = "84960b7d968c"
14+
down_revision = "b0582f54029c"
15+
branch_labels = None
16+
depends_on = None
17+
18+
19+
def upgrade():
20+
if op.get_bind().dialect.name != "sqlite":
21+
op.alter_column(
22+
"trees", "quota_media", type_=sa.BigInteger(), existing_type=sa.Integer()
23+
)
24+
25+
26+
def downgrade():
27+
if op.get_bind().dialect.name != "sqlite":
28+
op.alter_column(
29+
"trees", "quota_media", type_=sa.Integer(), existing_type=sa.BigInteger()
30+
)

gramps_webapi/auth/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ class Tree(user_db.Model):
423423
__tablename__ = "trees"
424424

425425
id = sa.Column(sa.String, primary_key=True)
426-
quota_media = sa.Column(sa.Integer)
426+
quota_media = sa.Column(sa.BigInteger)
427427
quota_people = sa.Column(sa.Integer)
428428
usage_media = sa.Column(sa.BigInteger)
429429
usage_people = sa.Column(sa.Integer)

0 commit comments

Comments
 (0)