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
4 changes: 3 additions & 1 deletion queue_job/migrations/13.0.3.2.0/pre-migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@

import logging

from odoo.tools.sql import column_exists
from odoo.tools.sql import column_exists, table_exists

_logger = logging.getLogger(__name__)


def migrate(cr, version):
if not table_exists(cr, "queue_job"):
return
if not column_exists(cr, "queue_job", "records"):
cr.execute(
"""
Expand Down
6 changes: 4 additions & 2 deletions queue_job/migrations/13.0.3.7.0/pre-migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@

import logging

from odoo.tools.sql import column_exists
from odoo.tools.sql import column_exists, table_exists

_logger = logging.getLogger(__name__)


def migrate(cr, version):
if not column_exists(cr, "queue_job", "exec_time"):
if table_exists(cr, "queue_job") and not column_exists(
cr, "queue_job", "exec_time"
):
# Disable trigger otherwise the update takes ages.
cr.execute(
"""
Expand Down