Skip to content

Commit

Permalink
bug 884348 Make is_gc_count column add fast
Browse files Browse the repository at this point in the history
  • Loading branch information
selenamarie authored and lonnen committed Jun 19, 2013
1 parent c1dd2ae commit 3589010
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions alembic/versions/2b285e76f71d_bug_803209_add_garag.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@ def __repr__(self):
return "json"

def upgrade():
op.add_column(u'tcbs', sa.Column(u'is_gc_count', sa.INTEGER(), server_default='0', nullable=False))
op.add_column(u'tcbs_build', sa.Column(u'is_gc_count', sa.INTEGER(), server_default='0', nullable=False))
op.add_column(u'tcbs', sa.Column(u'is_gc_count', sa.INTEGER()))
op.alter_column(u'tcbs', u'is_gc_count', server_default='0')
op.add_column(u'tcbs_build', sa.Column(u'is_gc_count', sa.INTEGER()))
op.alter_column(u'tcbs_build', u'is_gc_count', server_default='0')
app_path=os.getcwd()
procs = [
'backfill_matviews.sql',
Expand Down
4 changes: 2 additions & 2 deletions socorro/external/postgresql/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ class Tcbs(DeclarativeBase):
lin_count = Column(u'lin_count', INTEGER(), nullable=False, server_default=text('0'))
hang_count = Column(u'hang_count', INTEGER(), nullable=False, server_default=text('0'))
startup_count = Column(u'startup_count', INTEGER())
is_gc_count = Column(u'is_gc_count', INTEGER(), nullable=False, server_default=text('0'))
is_gc_count = Column(u'is_gc_count', INTEGER(), server_default=text('0'))

idx_tcbs_product_version = Index('idx_tcbs_product_version', product_version_id, report_date)
tcbs_report_date = Index('tcbs_report_date', report_date)
Expand Down Expand Up @@ -1312,7 +1312,7 @@ class TcbsBuild(DeclarativeBase):
signature_id = Column(u'signature_id', INTEGER(), primary_key=True, nullable=False)
startup_count = Column(u'startup_count', INTEGER())
win_count = Column(u'win_count', INTEGER(), nullable=False, server_default=text('0'))
is_gc_count = Column(u'is_gc_count', INTEGER(), nullable=False, server_default=text('0'))
is_gc_count = Column(u'is_gc_count', INTEGER(), server_default=text('0'))

#relationship definitions

Expand Down

0 comments on commit 3589010

Please sign in to comment.