Releases: seantis/libres
1.1.0
-
Adds support for blocking resources.
Schedulernow accepts a collection
ofblocking_namesto indicate related resources that will block reservations
on the managed resource (e.g. for a soccer field where you can either reserve
the entire field or one of the two halves, the two halves should block the
entire field and vice versa, but the halves shouldn't block each other).For schedulers with blocking resources you should use the new method
allocations_with_availability_by_rangeto retrieve the availability and
availability partitions for a set of allocations, since the corresponding
attributes/method on theAllocationwill be inaccurate when blocking
resources are involved.For decent performance it's absolutely vital that the new GiST index on
tsrange(reserved_slots.start, reserved_slots."end")exists, it's also worth
adding a potentially missing index on thesource_typecolumn, you can
use the following recipe using an alembicOperationsobject to migrate
existing databases:context.operations.create_index( 'ix_reserved_slots_source_type', 'reserved_slots', columns=['source_type'], if_not_exists=True ) context.operations.create_index( 'start_end_tsrange_ix', 'reserved_slots', columns=[text('tsrange(start, "end")')], postgresql_using='gist', if_not_exists=True )
1.0.0
0.10.2
0.10.1
- Adds proper support for SQLAlchemy 1.4. As a result of this
Allocation.typeandReservation.typeare no longer nullable
and have a default value of 'generic', you may use the following
recipe using an alembicOperationsobject to migrate existing
databases:context.operations.execute(""" UPDATE allocations SET type = 'generic' WHERE type IS NULL; """) context.operations.alter_column('allocations', 'type', nullable=False) context.operations.execute(""" UPDATE reservations SET type = 'generic' WHERE type IS NULL; """) context.operations.alter_column('reservations', 'type', nullable=False)
0.10.0
- Adds new entity
ReservationBlockerfor administrative blockers
of targeted allocations for the targeted timespans, this also ends
up adding a new columnsource_typetoReservedSlotwhich can be
added using the following recipe using an alembicOperationsobject:operations.add_column( 'reserved_slots', Column( 'source_type', Enum( 'reservation', 'blocker', name='reserved_slot_source_type' ), nullable=False, server_default='reservation' ) ) operations.alter_column( 'reserved_slots', 'source_type', server_default=None )
0.9.0
- Replaces
JSONdatabase type withJSONB, this means
Postgres as a backend is not required. You will also need
to write a migration for existing JSON columns. You may use
the following recipe using an alembicOperationsobject:operations.alter_column( 'table_name', 'column_name', type_=JSON, postgresql_using='"column_name"::jsonb' )