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

Commit

Permalink
Adds support for libres 0.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Denis Krienbühl committed Jun 7, 2017
1 parent 91f9233 commit 5130a7f
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 2 deletions.
3 changes: 3 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Changelog
---------

- Adds support for libres 0.3.1.
[href]

0.4.0 (2017-03-20)
~~~~~~~~~~~~~~~~~~~

Expand Down
9 changes: 8 additions & 1 deletion onegov/reservation/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
from libres.db.models import Allocation, Reservation
from onegov.reservation.collection import ResourceCollection
from onegov.reservation.core import LibresIntegration
from onegov.reservation.models import Resource

__all__ = ['LibresIntegration', 'Resource', 'ResourceCollection']
__all__ = [
'Allocation',
'LibresIntegration',
'Resource',
'ResourceCollection',
'Reservation'
]
12 changes: 12 additions & 0 deletions onegov/reservation/upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,15 @@ def add_resource_group_field(context):
context.operations.add_column(
'resources', Column('group', Text, nullable=True)
)


@upgrade_task('Add reservations/allocations type field')
def add_reservations_allocations_type_field(context):

if run_upgrades(context):
context.operations.add_column(
'reservations', Column('type', Text, nullable=True)
)
context.operations.add_column(
'allocations', Column('type', Text, nullable=True)
)
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def get_long_description():
zip_safe=False,
platforms='any',
install_requires=[
'libres>=0.1.2',
'libres>=0.3.1',
'onegov.core>=0.16.0',
'onegov.form'
],
Expand Down

0 comments on commit 5130a7f

Please sign in to comment.