reservation.upgrade

Contains upgrade tasks that are executed when the application is being upgraded on the server. See onegov.core.upgrade.upgrade_task.

Module Contents

Functions

run_upgrades(→ bool)

onegov.reservation is a bit special because it defines its tables

add_form_definition_field(→ None)

add_resource_group_field(→ None)

add_reservations_allocations_type_field(→ None)

make_reservations_allocations_payable(→ None)

set_defaults_on_existing_reservation_resourcd_objects(→ None)

add_access_token_to_existing_resources(→ None)

add_default_view_to_existing_resource_types(→ None)

make_resource_polymorphic_type_non_nullable(→ None)

reservation.upgrade.run_upgrades(context: onegov.core.upgrade.UpgradeContext) bool[source]

onegov.reservation is a bit special because it defines its tables through its own declarative base. This is due to libres requireing its own base.

As a consequence, not all applications loaded in the current process have all the tables for all the modules (which is usually the case for all onegov modules using the default onegov.core.orm.Base class).

This means we can only run the upgrades if Libres is integrated with the current app.

reservation.upgrade.add_form_definition_field(context: onegov.core.upgrade.UpgradeContext) None[source]
reservation.upgrade.add_resource_group_field(context: onegov.core.upgrade.UpgradeContext) None[source]
reservation.upgrade.add_reservations_allocations_type_field(context: onegov.core.upgrade.UpgradeContext) None[source]
reservation.upgrade.make_reservations_allocations_payable(context: onegov.core.upgrade.UpgradeContext) None[source]
reservation.upgrade.set_defaults_on_existing_reservation_resourcd_objects(context: onegov.core.upgrade.UpgradeContext) None[source]
reservation.upgrade.add_access_token_to_existing_resources(context: onegov.core.upgrade.UpgradeContext) None[source]
reservation.upgrade.add_default_view_to_existing_resource_types(context: onegov.core.upgrade.UpgradeContext) None[source]
reservation.upgrade.make_resource_polymorphic_type_non_nullable(context: onegov.core.upgrade.UpgradeContext) None[source]