summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlmr <lmr@592f7852-d20e-0410-864c-8624ca9c26a4>2011-06-06 17:44:28 +0000
committerlmr <lmr@592f7852-d20e-0410-864c-8624ca9c26a4>2011-06-06 17:44:28 +0000
commit98d47273226648110e0f890175018d3e222345ba (patch)
tree36b5d01effb2928e46059fbd9ccc81b356539cd7
parent62af571af5a1663edbce9a93176573c5e2d850a1 (diff)
Add primary key id in table afe_hosts_labels
This key is now required when performing queries on that table, for validation. Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com> git-svn-id: svn://test.kernel.org/autotest/trunk@5411 592f7852-d20e-0410-864c-8624ca9c26a4
-rw-r--r--frontend/migrations/065_add_id_afe_hosts_labels.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/frontend/migrations/065_add_id_afe_hosts_labels.py b/frontend/migrations/065_add_id_afe_hosts_labels.py
new file mode 100644
index 00000000..995feef1
--- /dev/null
+++ b/frontend/migrations/065_add_id_afe_hosts_labels.py
@@ -0,0 +1,7 @@
+UP_SQL = """
+ALTER TABLE afe_hosts_labels ADD COLUMN id integer AUTO_INCREMENT NOT NULL PRIMARY KEY FIRST;
+"""
+
+DOWN_SQL = """
+ALTER TABLE afe_hosts_labels DROP COLUMN id;
+"""