From: Lucas Meneghel Rodrigues Subject: [PATCH] Web frontend database: Expand test and subdir fields from tko_tests v2 Date: Mon, 29 Mar 2010 21:23:16 -0300 Message-ID: <1269908596-18363-1-git-send-email-lmr@redhat.com> Cc: kvm@vger.kernel.org, jamesren@google.com, mgoldish@redhat.com, Lucas Meneghel Rodrigues To: autotest@test.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:8712 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754632Ab0C3AZH (ORCPT ); Mon, 29 Mar 2010 20:25:07 -0400 Sender: kvm-owner@vger.kernel.org List-ID: Tests with large tags, such as the ones that can appear on the kvm test can have the fields 'test' and 'subdir' too large. This patch raises the length of such fields on the autotest_web database to 300. Changes from v1: * Realized that tko/migrations/019_widen_test_name_field.py expands the original value that test has from 30 to 60, so changed the downgrade sql statement accordingly. Signed-off-by: Lucas Meneghel Rodrigues --- .../migrations/052_expand_test_subdir_fields.py | 9 +++++++++ frontend/tko/models.py | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 frontend/migrations/052_expand_test_subdir_fields.py diff --git a/frontend/migrations/052_expand_test_subdir_fields.py b/frontend/migrations/052_expand_test_subdir_fields.py new file mode 100644 index 0000000..9f2732c --- /dev/null +++ b/frontend/migrations/052_expand_test_subdir_fields.py @@ -0,0 +1,9 @@ +UP_SQL = """ +ALTER TABLE tko_tests MODIFY test varchar(300) default NULL; +ALTER TABLE tko_tests MODIFY subdir varchar(300) default NULL; +""" + +DOWN_SQL = """ +ALTER TABLE tko_tests MODIFY test varchar(60) default NULL; +ALTER TABLE tko_tests MODIFY subdir varchar(60) default NULL; +""" \ No newline at end of file diff --git a/frontend/tko/models.py b/frontend/tko/models.py index 7348b07..e0215a6 100644 --- a/frontend/tko/models.py +++ b/frontend/tko/models.py @@ -169,8 +169,8 @@ class Test(dbmodels.Model, model_logic.ModelExtensions, model_logic.ModelWithAttributes): test_idx = dbmodels.AutoField(primary_key=True) job = dbmodels.ForeignKey(Job, db_column='job_idx') - test = dbmodels.CharField(max_length=90) - subdir = dbmodels.CharField(blank=True, max_length=180) + test = dbmodels.CharField(max_length=300) + subdir = dbmodels.CharField(blank=True, max_length=300) kernel = dbmodels.ForeignKey(Kernel, db_column='kernel_idx') status = dbmodels.ForeignKey(Status, db_column='status') reason = dbmodels.CharField(blank=True, max_length=3072) -- 1.6.6.1