summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'python/tbc_www/models.py')
-rw-r--r--python/tbc_www/models.py37
1 files changed, 28 insertions, 9 deletions
diff --git a/python/tbc_www/models.py b/python/tbc_www/models.py
index b54c772..73b0413 100644
--- a/python/tbc_www/models.py
+++ b/python/tbc_www/models.py
@@ -144,13 +144,21 @@ class BuildLogsErrors(models.Model):
return '%s %s %s' % (self.Id, self.BuildLogId, self.ErrorId)
class EmergeInfo(models.Model):
- EInfoId = models.IntegerField(primary_key=True, db_column='einfo_id')
+ EInfoId = models.AutoField(primary_key=True, db_column='einfo_id')
EmergeInfoText = models.TextField(db_column='emerge_info_text')
class Meta:
db_table = 'emerge_info'
def __str__(self):
return '%s %s %s' % (self.EInfoId, self.Checksum, self.EmergeInfoText)
+class Keywords(models.Model):
+ KeywordId = models.AutoField(primary_key=True, db_column='keyword_id')
+ Keyword = models.CharField(max_length=40, db_column='keyword')
+ class Meta:
+ db_table = 'keywords'
+ def __str__(self):
+ return '%s %s' % (self.KeywordId, self.keyword)
+
class Setups(models.Model):
SetupId = models.AutoField(primary_key=True, db_column='setup_id')
Setup = models.CharField(max_length=100, db_column='setup')
@@ -170,6 +178,25 @@ class Configs(models.Model):
def __str__(self):
return '%s %s %s %s' % (self.ConfigId, self.HostName, self.SetupId, self.DefaultConfig)
+class ConfigsMetaData(models.Model):
+ Id = models.AutoField(primary_key=True, db_column='id')
+ ConfigId = models.ForeignKey(Configs, db_column='config_id')
+ KeywordId = models.ForeignKey(Keywords, db_column='keyword_id')
+ MakeConfText = models.TextField(db_column='make_conf_text')
+ Checksum = models.CharField(max_length=100, db_column='checksum')
+ ConfigSync = models.BooleanField(db_column='configsync')
+ Active = models.BooleanField(db_column='active')
+ ConfigErrorText = models.TextField(db_column='config_error_text')
+ Updateing = models.CharField(max_length=100, db_column='updateing')
+ Status = models.CharField(max_length=100, db_column='status')
+ Auto = models.BooleanField(db_column='auto')
+ RepoPath = models.CharField(max_length=200, db_column='repo_path')
+ TimeStamp = models.DateTimeField(db_column='time_stamp')
+ class Meta:
+ db_table = 'configs_metadata'
+ def __str__(self):
+ return '%s %s %s %s %s %s %s %s %s %s %s %s' % (self.ConfigId, self.KeywordId, self.MakeConfText, self.Checksum, self.ConfigSync, self.Active, self.ConfigErrorText, self.Updateing, self.Status, self.Auto, self.RepoPath, self.TimeStamp)
+
class BuildLogsConfig(models.Model):
LogId = models.IntegerField(primary_key=True, db_column='log_id')
BuildLogId = models.ForeignKey(BuildLogs, db_column='build_log_id')
@@ -242,14 +269,6 @@ class BuildJobsUse(models.Model):
def __str__(self):
return '%s %s %s %s' % (self.Id, self.BuildJobId, self.UseId, self.Status)
-class Keywords(models.Model):
- KeywordId = models.IntegerField(primary_key=True, db_column='keyword_id')
- Keyword = models.CharField(max_length=45, db_column='keyword')
- class Meta:
- db_table = 'keywords'
- def __str__(self):
- return '%s %s' % (self.KeywordId, self.Keyword)
-
class Restrictions(models.Model):
RestrictionId = models.IntegerField(primary_key=True, db_column='restriction_id')
Restriction = models.CharField(max_length=150, db_column='restriction')