Web frontend database: Expand test and subdir fields from tko_tests
PATCH 1/1 Web frontend database: Expand test and subdir fields from tko_tests
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.
Signed-off-by Lucas Meneghel Rodrigues <[email protected]>
--- .../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
frontend/migrations/052_expand_test_subdir_fields.py new file +9 -0
@@ -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(30) default NULL; +ALTER TABLE tko_tests MODIFY subdir varchar(60) default NULL; +"""
frontend/tko/models.py +2 -2
@@ -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)
Signature · 1 line
1.6.6.1