From 406bc3c5b03aa51bb6142b3f0796501f4e9e8311 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 9 Aug 2018 20:43:51 +0200 Subject: [PATCH] Remove migration before 3.0 issue6470 review52421002 --- work.py | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/work.py b/work.py index 96c712b7bd..ed1e249fa4 100644 --- a/work.py +++ b/work.py @@ -121,12 +121,9 @@ class Work(sequence_ordered(), tree(separator='\\'), ModelSQL, ModelView): TimesheetWork = Pool().get('timesheet.work') cursor = Transaction().connection.cursor() table_project_work = cls.__table_handler__(module_name) - table_timesheet_work = TimesheetWork.__table_handler__(module_name) project = cls.__table__() timesheet = TimesheetWork.__table__() - migrate_sequence = (not table_project_work.column_exist('sequence') - and table_timesheet_work.column_exist('sequence')) work_exist = table_project_work.column_exist('work') add_parent = (not table_project_work.column_exist('parent') and work_exist) @@ -137,20 +134,6 @@ class Work(sequence_ordered(), tree(separator='\\'), ModelSQL, ModelView): super(Work, cls).__register__(module_name) - # Migration from 2.0: copy sequence from timesheet to project - if migrate_sequence: - cursor.execute(*timesheet.join(project, - condition=project.work == timesheet.id - ).select(timesheet.sequence, timesheet.id)) - for sequence, id_ in cursor.fetchall(): - cursor.execute(*project.update( - columns=[project.sequence], - values=[sequence], - where=project.work == id_)) - - # Migration from 2.4: drop required on sequence - table_project_work.not_null_action('sequence', action='remove') - # Migration from 3.4: change effort into timedelta effort_duration if table_project_work.column_exist('effort'): cursor.execute(*project.select(project.id, project.effort,