[autotest] Remove synch_id from database
BUG=chromium:687781
TEST=Run migrate.py sync back and forth
Change-Id: Ib066b19d90b18ae9926e8aec2c871b963e6a2465
Reviewed-on: https://chromium-review.googlesource.com/441107
Commit-Ready: Allen Li <ayatane@chromium.org>
Tested-by: Allen Li <ayatane@chromium.org>
Reviewed-by: Dan Shi <dshi@google.com>
diff --git a/frontend/afe/doctests/001_rpc_test.txt b/frontend/afe/doctests/001_rpc_test.txt
index 89e29d6..c944353 100644
--- a/frontend/afe/doctests/001_rpc_test.txt
+++ b/frontend/afe/doctests/001_rpc_test.txt
@@ -109,7 +109,6 @@
>>> data == [{'id': 1,
... 'hostname': 'ipaj1',
... 'locked': 1,
-... 'synch_id': None,
... 'status': 'Ready',
... 'labels': [],
... 'atomic_group': None,
@@ -470,7 +469,6 @@
... 'invalid': 0,
... 'locked': 0,
... 'status': 'Ready',
-... 'synch_id': None,
... 'protection': 'No protection',
... 'locked_by': None,
... 'lock_time': None,
diff --git a/frontend/afe/models_test.py b/frontend/afe/models_test.py
index a4eabfd..f0cf5ab 100755
--- a/frontend/afe/models_test.py
+++ b/frontend/afe/models_test.py
@@ -1,13 +1,14 @@
#!/usr/bin/python
-import datetime
import unittest
+
import common
+from autotest_lib.client.common_lib import control_data
+from autotest_lib.client.common_lib import global_config
from autotest_lib.frontend import setup_django_environment
from autotest_lib.frontend.afe import frontend_test_utils
-from autotest_lib.frontend.afe import models, model_attributes, model_logic
-from autotest_lib.client.common_lib import global_config
-from autotest_lib.client.common_lib import control_data
+from autotest_lib.frontend.afe import model_logic
+from autotest_lib.frontend.afe import models
class AclGroupTest(unittest.TestCase,
@@ -446,8 +447,7 @@
'locked': False,
'protection': 0,
'shard': {'hostname': '1', 'id': 1},
- 'status': 'Ready',
- 'synch_id': None}],
+ 'status': 'Ready'}],
'jobs': [{'control_file': 'some control file\n\n\n',
'control_type': 2,
'created_on': '2014-09-04T13:09:35',
diff --git a/frontend/afe/rdb_model_extensions.py b/frontend/afe/rdb_model_extensions.py
index 12ba892..4444122 100644
--- a/frontend/afe/rdb_model_extensions.py
+++ b/frontend/afe/rdb_model_extensions.py
@@ -184,9 +184,6 @@
hostname = dbmodels.CharField(max_length=255, unique=True)
locked = dbmodels.BooleanField(default=False)
leased = dbmodels.BooleanField(default=True)
- # TODO(ayatane): This is needed until synch_id is removed from Host._fields
- synch_id = dbmodels.IntegerField(blank=True, null=True,
- editable=settings.FULL_ADMIN)
status = dbmodels.CharField(max_length=255, default=Status.READY,
choices=Status.choices(),
editable=settings.FULL_ADMIN)