Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,22 +1,15 @@
# Copyright 2025 Le Filament (https://le-filament.com)
# Copyright 2025 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from openupgradelib import openupgrade


def _fill_sequence_hr_applicant_refuse_reason(cr):
openupgrade.logged_query(
cr,
"""
ALTER TABLE hr_applicant_refuse_reason
ADD COLUMN IF NOT EXISTS sequence INTEGER DEFAULT 10;
""",
)
openupgrade.logged_query(
cr,
"""
ALTER TABLE hr_applicant_refuse_reason ALTER COLUMN sequence DROP DEFAULT;
""",
"ALTER TABLE hr_applicant_refuse_reason ADD COLUMN IF NOT EXISTS sequence int4",
)
openupgrade.logged_query(cr, "UPDATE hr_applicant_refuse_reason SET sequence=id")


@openupgrade.migrate(use_env=False)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,8 @@ hr_recruitment / hr.applicant / rating_ids (one2many) : NEW
# NOTHING TO DO: new fields

hr_recruitment / hr.applicant.refuse.reason / _order : _order is now 'sequence' ('id')
# NOTHING TO DO: new field sequence used to order

hr_recruitment / hr.applicant.refuse.reason / sequence (integer) : NEW hasdefault: default
# DONE: pre-migration: pre-create column with default value
# DONE: pre-migration: pre-create column and assign id as sequence for preserving previous order

hr_recruitment / hr.job / applicant_properties_definition (properties_definition): NEW
# NOTHING TO DO: new properties field
Expand Down
Loading