Grow all ID fields for Harvest cache tables
turns out Integer is not big enough, need BigInteger
This commit is contained in:
parent
d508ca225b
commit
2fa7ef5e71
2 changed files with 101 additions and 12 deletions
rattail_harvest/db/model
|
@ -2,7 +2,7 @@
|
|||
################################################################################
|
||||
#
|
||||
# Rattail -- Retail Software Framework
|
||||
# Copyright © 2010-2022 Lance Edgar
|
||||
# Copyright © 2010-2023 Lance Edgar
|
||||
#
|
||||
# This file is part of Rattail.
|
||||
#
|
||||
|
@ -46,7 +46,7 @@ class HarvestUser(model.Base):
|
|||
|
||||
uuid = model.uuid_column()
|
||||
|
||||
id = sa.Column(sa.Integer(), nullable=False)
|
||||
id = sa.Column(sa.BigInteger(), nullable=False)
|
||||
|
||||
first_name = sa.Column(sa.String(length=255), nullable=True)
|
||||
|
||||
|
@ -122,7 +122,7 @@ class HarvestClient(model.Base):
|
|||
|
||||
uuid = model.uuid_column()
|
||||
|
||||
id = sa.Column(sa.Integer(), nullable=False)
|
||||
id = sa.Column(sa.BigInteger(), nullable=False)
|
||||
|
||||
name = sa.Column(sa.String(length=255), nullable=True)
|
||||
|
||||
|
@ -155,9 +155,9 @@ class HarvestProject(model.Base):
|
|||
|
||||
uuid = model.uuid_column()
|
||||
|
||||
id = sa.Column(sa.Integer(), nullable=False)
|
||||
id = sa.Column(sa.BigInteger(), nullable=False)
|
||||
|
||||
client_id = sa.Column(sa.Integer(), nullable=True) # TODO: should not allow null?
|
||||
client_id = sa.Column(sa.BigInteger(), nullable=True) # TODO: should not allow null?
|
||||
client = orm.relationship(HarvestClient, backref=orm.backref('projects'))
|
||||
|
||||
name = sa.Column(sa.String(length=255), nullable=True)
|
||||
|
@ -226,7 +226,7 @@ class HarvestTask(model.Base):
|
|||
|
||||
uuid = model.uuid_column()
|
||||
|
||||
id = sa.Column(sa.Integer(), nullable=False)
|
||||
id = sa.Column(sa.BigInteger(), nullable=False)
|
||||
|
||||
name = sa.Column(sa.String(length=255), nullable=True)
|
||||
|
||||
|
@ -265,23 +265,23 @@ class HarvestTimeEntry(model.Base):
|
|||
|
||||
uuid = model.uuid_column()
|
||||
|
||||
id = sa.Column(sa.Integer(), nullable=False)
|
||||
id = sa.Column(sa.BigInteger(), nullable=False)
|
||||
|
||||
spent_date = sa.Column(sa.Date(), nullable=True)
|
||||
|
||||
user_id = sa.Column(sa.Integer(), nullable=True)
|
||||
user_id = sa.Column(sa.BigInteger(), nullable=True)
|
||||
user = orm.relationship(HarvestUser, backref=orm.backref('time_entries'))
|
||||
|
||||
client_id = sa.Column(sa.Integer(), nullable=True)
|
||||
client_id = sa.Column(sa.BigInteger(), nullable=True)
|
||||
client = orm.relationship(HarvestClient, backref=orm.backref('time_entries'))
|
||||
|
||||
project_id = sa.Column(sa.Integer(), nullable=True)
|
||||
project_id = sa.Column(sa.BigInteger(), nullable=True)
|
||||
project = orm.relationship(HarvestProject, backref=orm.backref('time_entries'))
|
||||
|
||||
task_id = sa.Column(sa.Integer(), nullable=True)
|
||||
task_id = sa.Column(sa.BigInteger(), nullable=True)
|
||||
task = orm.relationship(HarvestTask, backref=orm.backref('time_entries'))
|
||||
|
||||
invoice_id = sa.Column(sa.Integer(), nullable=True)
|
||||
invoice_id = sa.Column(sa.BigInteger(), nullable=True)
|
||||
|
||||
hours = sa.Column(sa.Numeric(precision=6, scale=2), nullable=True)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue