Skip to content
This repository has been archived by the owner on Sep 5, 2019. It is now read-only.

Commit

Permalink
Fix upgrade step
Browse files Browse the repository at this point in the history
  • Loading branch information
msom committed Feb 1, 2018
1 parent ca2404e commit 1719758
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions onegov/ballot/upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,16 +259,14 @@ def replace_results_group(context):
@upgrade_task('Change counted columns of elections')
def change_counted_columns_of_elections(context):
if not context.has_column('election_results', 'counted'):
# import pdb; pdb.set_trace()
context.operations.add_column(
'election_results', Column(
'counted', Boolean, nullable=False, server_default='TRUE'
)
)

# todo:
# if context.has_column('elections', 'total_entities'):
# context.operations.drop_column('elections', 'total_entities')
#
# if context.has_column('elections', 'counted_entities'):
# context.operations.drop_column('elections', 'counted_entities')
if context.has_column('elections', 'total_entities'):
context.operations.drop_column('elections', 'total_entities')

if context.has_column('elections', 'counted_entities'):
context.operations.drop_column('elections', 'counted_entities')

0 comments on commit 1719758

Please sign in to comment.