org.upgrade
Contains upgrade tasks that are executed when the application is being
upgraded on the server. See onegov.core.upgrade.upgrade_task.
Functions
Module Contents
- org.upgrade.move_town_to_organisation(context: onegov.core.upgrade.UpgradeContext) bool | None[source]
- org.upgrade.remove_official_notices_table(context: onegov.core.upgrade.UpgradeContext) bool | None[source]
- org.upgrade.add_new_defaults_to_existing_directories(context: onegov.core.upgrade.UpgradeContext) None[source]
- org.upgrade.rename_guideline_to_submissions_guideline(context: onegov.core.upgrade.UpgradeContext) None[source]
- org.upgrade.add_content_show_property_to_people(context: onegov.core.upgrade.UpgradeContext) None[source]
- org.upgrade.add_rerender_organsiation_html(context: onegov.core.upgrade.UpgradeContext) None[source]
- org.upgrade.change_daily_ticket_statistics_data_format(context: onegov.core.upgrade.UpgradeContext) None[source]
- org.upgrade.fix_content_people_for_models_that_use_person_link_extension(context: onegov.core.upgrade.UpgradeContext) None[source]
- org.upgrade.fix_nested_list_in_content_people(context: onegov.core.upgrade.UpgradeContext) None[source]
- org.upgrade.add_submission_window_id_to_survey_submissions(context: onegov.core.upgrade.UpgradeContext) None[source]
- org.upgrade.remove_stored_contact_html_and_opening_hours_html(context: onegov.core.upgrade.UpgradeContext) None[source]
- org.upgrade.add_cascade_delete_to_push_notification(context: onegov.core.upgrade.UpgradeContext) None[source]
- org.upgrade.convert_sent_at_to_utc_datetime(context: onegov.core.upgrade.UpgradeContext) None[source]
- org.upgrade.create_hierarchy_and_move_organisations_to_content(context: onegov.core.upgrade.UpgradeContext) None[source]
- org.upgrade.convert_directories_to_ticket_permissions(context: onegov.core.upgrade.UpgradeContext) None[source]
- org.upgrade.set_default_extras_pricing_method(context: onegov.core.upgrade.UpgradeContext) None[source]
- org.upgrade.add_party_column_to_par_parliamentarians(context: onegov.core.upgrade.UpgradeContext) None[source]
- org.upgrade.migrate_kaba_config_to_new_format(context: onegov.core.upgrade.UpgradeContext) None[source]
- org.upgrade.update_political_business_enum_values(context: onegov.core.upgrade.UpgradeContext) None[source]
- org.upgrade.change_political_business_participation_type_column_type(context: onegov.core.upgrade.UpgradeContext) None[source]
- org.upgrade.remove_obsolete_polymorphic_type_columns(context: onegov.core.upgrade.UpgradeContext) None[source]
- org.upgrade.make_political_business_participation_type_column_nullable(context: onegov.core.upgrade.UpgradeContext) None[source]
- org.upgrade.update_political_business_type_enum_values(context: onegov.core.upgrade.UpgradeContext) None[source]
- org.upgrade.cache_new_news_hashtags_in_meta(context: onegov.core.upgrade.UpgradeContext) None[source]
- org.upgrade.add_show_only_previews_column_to_newsletters(context: onegov.core.upgrade.UpgradeContext) None[source]
- org.upgrade.fix_missing_reserved_slots(session: Any) tuple[list[Any], list[tuple[Any, bool]]][source]
Fixes approved reservations that have no reserved slots.
Returns
(recreated_starts, deleted_starts).recreated_startsis a list ofstartdatetimes of reservations whose slots were recreated.deleted_startsentries are(start, noted)tuples wherenotedindicates whether a ticket note was added.
- org.upgrade.recreate_missing_reserved_slots(context: onegov.core.upgrade.UpgradeContext) None[source]
Fixes approved reservations whose ReservedSlot rows were erroneously deleted by a libres bug that occurred when rejecting one reservation on a partly-available allocation also removed the sibling reservation’s slots.
For each affected reservation the slots are recreated if the time range is still free. If another reservation already owns those slots the orphaned reservation is deleted and a note is added to its ticket.
- org.upgrade.subscribe_customer_message_recipients_to_cancellation_requests(context: onegov.core.upgrade.UpgradeContext) None[source]
- org.upgrade.switch_to_parsed_event_filters(context: onegov.core.upgrade.UpgradeContext) None[source]
- org.upgrade.refresh_zeroed_reservation_invoices(context: onegov.core.upgrade.UpgradeContext) None[source]
Store pricing settings on reservations (fixed) repairs the reservation data, but invoice lines already zeroed by an earlier refresh still show 0. Recompute them now that the reservation prices are restored.
Scoped to reservation invoices touched since the backfill rollout that are tied to an allocation the bug could have disturbed (per_item/per_hour/ free — the original broken OR only ever matched free), or to a per_item resource (whose content fallback was the broken one). Only refreshed when safe (manual, still-open payment).