Skip to content

Commit

Permalink
Merge pull request #81 from qld-gov-au/develop
Browse files Browse the repository at this point in the history
add extend_existing
  • Loading branch information
duttonw committed Feb 15, 2023
2 parents ef274aa + 85d91f3 commit 8aea548
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
strategy:
fail-fast: false
matrix:
ckan-version: [2.9, 2.9-py2, 2.8]
ckan-version: [2.9, 2.9-py2]

name: Continuous Integration build on CKAN ${{ matrix.ckan-version }}
runs-on: ubuntu-latest
container: integratedexperts/ci-builder
container: drevops/ci-builder
env:
CKAN_VERSION: ${{ matrix.ckan-version }}

Expand Down
9 changes: 6 additions & 3 deletions ckanext/datarequests/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ def get_open_datarequests_number(cls):
sa.Column('close_circumstance', sa.types.Unicode(constants.CLOSE_CIRCUMSTANCE_MAX_LENGTH), primary_key=False, default=u'')
if closing_circumstances_enabled else None,
sa.Column('approx_publishing_date', sa.types.DateTime, primary_key=False, default=None)
if closing_circumstances_enabled else None
if closing_circumstances_enabled else None,
extend_existing=True,
)

# Create the table only if it does not exist
Expand Down Expand Up @@ -146,7 +147,8 @@ def get_comment_datarequests_number(cls, **kw):
sa.Column('user_id', sa.types.UnicodeText, primary_key=False, default=u''),
sa.Column('datarequest_id', sa.types.UnicodeText, primary_key=True, default=uuid4),
sa.Column('time', sa.types.DateTime, primary_key=True, default=u''),
sa.Column('comment', sa.types.Unicode(constants.COMMENT_MAX_LENGTH), primary_key=False, default=u'')
sa.Column('comment', sa.types.Unicode(constants.COMMENT_MAX_LENGTH), primary_key=False, default=u''),
extend_existing=True
)

# Create the table only if it does not exist
Expand Down Expand Up @@ -177,7 +179,8 @@ def get_datarequest_followers_number(cls, **kw):
sa.Column('id', sa.types.UnicodeText, primary_key=True, default=uuid4),
sa.Column('user_id', sa.types.UnicodeText, primary_key=False, default=u''),
sa.Column('datarequest_id', sa.types.UnicodeText, primary_key=True, default=uuid4),
sa.Column('time', sa.types.DateTime, primary_key=True, default=u'')
sa.Column('time', sa.types.DateTime, primary_key=True, default=u''),
extend_existing=True
)

# Create the table only if it does not exist
Expand Down

0 comments on commit 8aea548

Please sign in to comment.