lundi 11 janvier 2016

Getting Issue when running migration but through console its works

When i am running this query through migration it gives Error-

Query -

    ActionEvent.includes([:historic_task_allocation, {:task_results =>[:task_result_status, :user]}]).where("action_events.ae_type = 0 AND action_events.result_status <> 2 AND task_result_statuses.is_completion AND users.id NOT IN (SELECT user_id FROM allocation_user_links aul WHERE aul.task_allocation_id = task_allocations.id AND aul.valid_from < action_events.date AND (aul.valid_to > action_events.date OR aul.valid_to IS NULL))")

Error -

Mysql2::Error: Unknown column 'task_allocations.can_complete_late' in 'field list':

But through console its work.

Where is the problem?

Aucun commentaire:

Enregistrer un commentaire