Skip to content

Commit

Permalink
fixup! add migration script
Browse files Browse the repository at this point in the history
  • Loading branch information
gurneyalex committed Mar 15, 2024
1 parent 4590088 commit b8049b5
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion connector_jira/migrations/15.0.2.0.0/pre-migrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,22 @@ def migrate(cr, version):


def remove_field_selection(cr, version):
query = """
DELETE FROM ir_model_data imd
USING ir_model_fields_selection fs, ir_model_fields f, ir_model m
WHERE imd.module='connector_jira'
AND imd.model='ir.model.fields.selection'
AND res_id=fs.id
AND f.model_id = m.id
AND m.name='jira.backend.auth'
AND fs.field_id=f.id;
"""
cr.execute(query)
query = """
DELETE FROM ir_model_fields_selection
USING ir_model_fields f, ir_model m
WHERE f.model_id = m.id AND m.name='jira.backend.auth' AND field_id=f.id;
WHERE f.model_id = m.id
AND m.name='jira.backend.auth'
AND field_id=f.id;
"""
cr.execute(query)

0 comments on commit b8049b5

Please sign in to comment.