Fixed bunch of null/unique attributes for model fields
- Legacy-Id: 2063
This commit is contained in:
parent
f35a2a07bf
commit
d07c05976f
|
@ -42,14 +42,14 @@ class Announcement(models.Model):
|
|||
announced_time = models.CharField(blank=True, max_length=20)
|
||||
text = models.TextField(blank=True, db_column='announcement_text')
|
||||
announced_from = models.ForeignKey(AnnouncedFrom)
|
||||
cc = models.CharField(blank=True, max_length=255)
|
||||
cc = models.CharField(blank=True, null=True, max_length=255)
|
||||
subject = models.CharField(blank=True, max_length=255)
|
||||
extra = models.TextField(blank=True)
|
||||
extra = models.TextField(blank=True,null=True)
|
||||
announced_to = models.ForeignKey(AnnouncedTo)
|
||||
nomcom = models.BooleanField()
|
||||
nomcom_chair = models.ForeignKey(ChairsHistory, null=True, blank=True)
|
||||
manually_added = models.BooleanField(db_column='manualy_added')
|
||||
other_val = models.CharField(blank=True, max_length=255)
|
||||
other_val = models.CharField(blank=True, null=True, max_length=255)
|
||||
def __str__(self):
|
||||
return "Announcement from %s to %s on %s %s" % (self.announced_from, self.announced_to, self.announced_date, self.announced_time)
|
||||
def from_name(self):
|
||||
|
@ -64,23 +64,23 @@ class Announcement(models.Model):
|
|||
class ScheduledAnnouncement(models.Model):
|
||||
mail_sent = models.BooleanField()
|
||||
to_be_sent_date = models.DateField(null=True, blank=True)
|
||||
to_be_sent_time = models.CharField(blank=True, max_length=50)
|
||||
to_be_sent_time = models.CharField(blank=True, null=True, max_length=50)
|
||||
scheduled_by = models.CharField(blank=True, max_length=100)
|
||||
scheduled_date = models.DateField(null=True, blank=True)
|
||||
scheduled_time = models.CharField(blank=True, max_length=50)
|
||||
subject = models.CharField(blank=True, max_length=255)
|
||||
to_val = models.CharField(blank=True, max_length=255)
|
||||
from_val = models.CharField(blank=True, max_length=255)
|
||||
cc_val = models.TextField(blank=True)
|
||||
cc_val = models.TextField(blank=True,null=True)
|
||||
body = models.TextField(blank=True)
|
||||
actual_sent_date = models.DateField(null=True, blank=True)
|
||||
actual_sent_time = models.CharField(blank=True, max_length=50)
|
||||
first_q = models.IntegerField(null=True, blank=True)
|
||||
second_q = models.IntegerField(null=True, blank=True)
|
||||
note = models.TextField(blank=True)
|
||||
note = models.TextField(blank=True,null=True)
|
||||
content_type = models.CharField(blank=True, max_length=255)
|
||||
replyto = models.CharField(blank=True, max_length=255)
|
||||
bcc_val = models.CharField(blank=True, max_length=255)
|
||||
replyto = models.CharField(blank=True, null=True, max_length=255)
|
||||
bcc_val = models.CharField(blank=True, null=True, max_length=255)
|
||||
def __str__(self):
|
||||
return "Scheduled Announcement from %s to %s on %s %s" % (self.from_val, self.to_val, self.to_be_sent_date, self.to_be_sent_time)
|
||||
class Meta:
|
||||
|
|
|
@ -71,7 +71,7 @@ class Area(models.Model):
|
|||
status = models.ForeignKey(AreaStatus)
|
||||
comments = models.TextField(blank=True)
|
||||
last_modified_date = models.DateField(auto_now=True)
|
||||
extra_email_addresses = models.TextField(blank=True)
|
||||
extra_email_addresses = models.TextField(blank=True,null=True)
|
||||
def __str__(self):
|
||||
return self.area_acronym.acronym
|
||||
def additional_urls(self):
|
||||
|
@ -128,23 +128,23 @@ class InternetDraft(models.Model):
|
|||
revision_date = models.DateField()
|
||||
file_type = models.CharField(max_length=20)
|
||||
txt_page_count = models.IntegerField()
|
||||
local_path = models.CharField(max_length=255, blank=True)
|
||||
local_path = models.CharField(max_length=255, blank=True, null=True)
|
||||
start_date = models.DateField()
|
||||
expiration_date = models.DateField()
|
||||
expiration_date = models.DateField(null=True)
|
||||
abstract = models.TextField()
|
||||
dunn_sent_date = models.DateField(null=True, blank=True)
|
||||
extension_date = models.DateField(null=True, blank=True)
|
||||
status = models.ForeignKey(IDStatus)
|
||||
intended_status = models.ForeignKey(IDIntendedStatus)
|
||||
lc_sent_date = models.DateField(null=True, blank=True)
|
||||
lc_changes = models.CharField(max_length=3)
|
||||
lc_changes = models.CharField(max_length=3,null=True)
|
||||
lc_expiration_date = models.DateField(null=True, blank=True)
|
||||
b_sent_date = models.DateField(null=True, blank=True)
|
||||
b_discussion_date = models.DateField(null=True, blank=True)
|
||||
b_approve_date = models.DateField(null=True, blank=True)
|
||||
wgreturn_date = models.DateField(null=True, blank=True)
|
||||
rfc_number = models.IntegerField(null=True, blank=True, db_index=True)
|
||||
comments = models.TextField(blank=True)
|
||||
comments = models.TextField(blank=True,null=True)
|
||||
last_modified_date = models.DateField()
|
||||
replaced_by = models.ForeignKey('self', db_column='replaced_by', blank=True, null=True, related_name='replaces_set')
|
||||
replaces = FKAsOneToOne('replaces', reverse=True)
|
||||
|
@ -252,8 +252,8 @@ class PersonOrOrgInfo(models.Model):
|
|||
date_modified = models.DateField(null=True, blank=True, auto_now=True)
|
||||
modified_by = models.CharField(blank=True, max_length=8)
|
||||
date_created = models.DateField(auto_now_add=True)
|
||||
created_by = models.CharField(blank=True, max_length=8)
|
||||
address_type = models.CharField(blank=True, max_length=4)
|
||||
created_by = models.CharField(blank=True, null=True, max_length=8)
|
||||
address_type = models.CharField(blank=True, null=True, max_length=4)
|
||||
def save(self):
|
||||
self.first_name_key = self.first_name.upper()
|
||||
self.middle_initial_key = self.middle_initial.upper()
|
||||
|
@ -314,7 +314,7 @@ class IESGLogin(models.Model):
|
|||
first_name = models.CharField(blank=True, max_length=25)
|
||||
last_name = models.CharField(blank=True, max_length=25)
|
||||
person = models.ForeignKey(PersonOrOrgInfo, db_column='person_or_org_tag', unique=True)
|
||||
pgp_id = models.CharField(blank=True, max_length=20)
|
||||
pgp_id = models.CharField(blank=True, null=True, max_length=20)
|
||||
default_search = models.IntegerField(null=True)
|
||||
def __str__(self):
|
||||
#return "%s, %s" % ( self.last_name, self.first_name)
|
||||
|
@ -436,7 +436,7 @@ class Rfc(models.Model):
|
|||
verbose_name_plural = 'RFCs'
|
||||
|
||||
class RfcAuthor(models.Model):
|
||||
rfc = models.ForeignKey(Rfc, unique=True, db_column='rfc_number', related_name='authors')
|
||||
rfc = models.ForeignKey(Rfc, db_column='rfc_number', related_name='authors')
|
||||
person = models.ForeignKey(PersonOrOrgInfo, db_column='person_or_org_tag')
|
||||
def __str__(self):
|
||||
return "%s, %s" % ( self.person.last_name, self.person.first_name)
|
||||
|
@ -462,9 +462,9 @@ class BallotInfo(models.Model): # Added by Michael Lee
|
|||
active = models.BooleanField()
|
||||
an_sent = models.BooleanField()
|
||||
an_sent_date = models.DateField(null=True, blank=True)
|
||||
an_sent_by = models.ForeignKey(IESGLogin, db_column='an_sent_by', related_name='ansent')
|
||||
an_sent_by = models.ForeignKey(IESGLogin, db_column='an_sent_by', related_name='ansent', null=True)
|
||||
defer = models.BooleanField(blank=True)
|
||||
defer_by = models.ForeignKey(IESGLogin, db_column='defer_by', related_name='deferred')
|
||||
defer_by = models.ForeignKey(IESGLogin, db_column='defer_by', related_name='deferred', null=True)
|
||||
defer_date = models.DateField(null=True, blank=True)
|
||||
approval_text = models.TextField(blank=True)
|
||||
last_call_text = models.TextField(blank=True)
|
||||
|
@ -754,7 +754,7 @@ class EmailAddress(models.Model):
|
|||
type = models.CharField(max_length=4, db_column='email_type')
|
||||
priority = models.IntegerField(db_column='email_priority')
|
||||
address = models.CharField(max_length=255, db_column='email_address')
|
||||
comment = models.CharField(blank=True, max_length=255, db_column='email_comment')
|
||||
comment = models.CharField(blank=True, null=True, max_length=255, db_column='email_comment')
|
||||
def __str__(self):
|
||||
return self.address
|
||||
class Meta:
|
||||
|
@ -858,7 +858,7 @@ class IETFWG(models.Model):
|
|||
verbose_name = 'IETF Working Group'
|
||||
|
||||
class WGChair(models.Model):
|
||||
person = models.ForeignKey(PersonOrOrgInfo, db_column='person_or_org_tag', unique=True)
|
||||
person = models.ForeignKey(PersonOrOrgInfo, db_column='person_or_org_tag')
|
||||
group_acronym = models.ForeignKey(IETFWG)
|
||||
def __str__(self):
|
||||
return "%s (%s)" % ( self.person, self.role() )
|
||||
|
@ -880,7 +880,7 @@ class WGEditor(models.Model):
|
|||
# match the model naming scheme.
|
||||
class WGSecretary(models.Model):
|
||||
group_acronym = models.ForeignKey(IETFWG)
|
||||
person = models.ForeignKey(PersonOrOrgInfo, db_column='person_or_org_tag', unique=True)
|
||||
person = models.ForeignKey(PersonOrOrgInfo, db_column='person_or_org_tag')
|
||||
def __str__(self):
|
||||
return "%s (%s)" % ( self.person, self.role() )
|
||||
def role(self):
|
||||
|
|
|
@ -85,10 +85,10 @@ class LegacyWgPassword(models.Model):
|
|||
person = models.ForeignKey(PersonOrOrgInfo, db_column='person_or_org_tag', primary_key=True)
|
||||
password = models.CharField(blank=True, max_length=255)
|
||||
secrete_question_id = models.IntegerField(null=True, blank=True)
|
||||
secrete_answer = models.CharField(blank=True, max_length=255)
|
||||
secrete_answer = models.CharField(blank=True, null=True, max_length=255)
|
||||
is_tut_resp = models.IntegerField(null=True, blank=True)
|
||||
irtf_id = models.IntegerField(null=True, blank=True)
|
||||
comment = models.TextField(blank=True)
|
||||
comment = models.TextField(blank=True,null=True)
|
||||
login_name = models.CharField(blank=True, max_length=100)
|
||||
def __str__(self):
|
||||
return self.login_name
|
||||
|
|
|
@ -59,11 +59,11 @@ class IprDetail(models.Model):
|
|||
title = models.CharField(blank=True, db_column="document_title", max_length=255)
|
||||
|
||||
# Legacy information fieldset
|
||||
legacy_url_0 = models.CharField(blank=True, db_column="old_ipr_url", max_length=255)
|
||||
legacy_url_1 = models.CharField(blank=True, db_column="additional_old_url1", max_length=255)
|
||||
legacy_title_1 = models.CharField(blank=True, db_column="additional_old_title1", max_length=255)
|
||||
legacy_url_2 = models.CharField(blank=True, db_column="additional_old_url2", max_length=255)
|
||||
legacy_title_2 = models.CharField(blank=True, db_column="additional_old_title2", max_length=255)
|
||||
legacy_url_0 = models.CharField(blank=True, null=True, db_column="old_ipr_url", max_length=255)
|
||||
legacy_url_1 = models.CharField(blank=True, null=True, db_column="additional_old_url1", max_length=255)
|
||||
legacy_title_1 = models.CharField(blank=True, null=True, db_column="additional_old_title1", max_length=255)
|
||||
legacy_url_2 = models.CharField(blank=True, null=True, db_column="additional_old_url2", max_length=255)
|
||||
legacy_title_2 = models.CharField(blank=True, null=True, db_column="additional_old_title2", max_length=255)
|
||||
|
||||
# Patent holder fieldset
|
||||
legal_name = models.CharField("Legal Name", db_column="p_h_legal_name", max_length=255)
|
||||
|
|
|
@ -26,28 +26,28 @@ class FromBodies(models.Model):
|
|||
|
||||
class LiaisonDetail(models.Model):
|
||||
detail_id = models.AutoField(primary_key=True)
|
||||
person = models.ForeignKey(PersonOrOrgInfo, db_column='person_or_org_tag')
|
||||
person = models.ForeignKey(PersonOrOrgInfo, null=True, db_column='person_or_org_tag')
|
||||
submitted_date = models.DateField(null=True, blank=True)
|
||||
last_modified_date = models.DateField(null=True, blank=True)
|
||||
from_id = models.IntegerField(null=True, blank=True)
|
||||
to_body = models.CharField(blank=True, max_length=255)
|
||||
title = models.CharField(blank=True, max_length=255)
|
||||
response_contact = models.CharField(blank=True, max_length=255)
|
||||
technical_contact = models.CharField(blank=True, max_length=255)
|
||||
purpose_text = models.TextField(blank=True, db_column='purpose')
|
||||
body = models.TextField(blank=True)
|
||||
to_body = models.CharField(blank=True, null=True, max_length=255)
|
||||
title = models.CharField(blank=True, null=True, max_length=255)
|
||||
response_contact = models.CharField(blank=True, null=True, max_length=255)
|
||||
technical_contact = models.CharField(blank=True, null=True, max_length=255)
|
||||
purpose_text = models.TextField(blank=True, null=True, db_column='purpose')
|
||||
body = models.TextField(blank=True,null=True)
|
||||
deadline_date = models.DateField(null=True, blank=True)
|
||||
cc1 = models.TextField(blank=True)
|
||||
cc1 = models.TextField(blank=True, null=True)
|
||||
# unclear why cc2 is a CharField, but it's always
|
||||
# either NULL or blank.
|
||||
cc2 = models.CharField(blank=True, max_length=50)
|
||||
submitter_name = models.CharField(blank=True, max_length=255)
|
||||
submitter_email = models.CharField(blank=True, max_length=255)
|
||||
cc2 = models.CharField(blank=True, null=True, max_length=50)
|
||||
submitter_name = models.CharField(blank=True, null=True, max_length=255)
|
||||
submitter_email = models.CharField(blank=True, null=True, max_length=255)
|
||||
by_secretariat = models.IntegerField(null=True, blank=True)
|
||||
to_poc = models.CharField(blank=True, max_length=255)
|
||||
to_email = models.CharField(blank=True, max_length=255)
|
||||
purpose = models.ForeignKey(LiaisonPurpose)
|
||||
replyto = models.CharField(blank=True, max_length=255)
|
||||
to_poc = models.CharField(blank=True, null=True, max_length=255)
|
||||
to_email = models.CharField(blank=True, null=True, max_length=255)
|
||||
purpose = models.ForeignKey(LiaisonPurpose,null=True)
|
||||
replyto = models.CharField(blank=True, null=True, max_length=255)
|
||||
def __str__(self):
|
||||
return self.title or "<no title>"
|
||||
def from_body(self):
|
||||
|
|
|
@ -224,7 +224,7 @@ class IESGHistory(models.Model):
|
|||
class MeetingTime(models.Model):
|
||||
time_id = models.AutoField(primary_key=True)
|
||||
time_desc = models.CharField(max_length=100)
|
||||
meeting = models.ForeignKey(Meeting, db_column='meeting_num', unique=True)
|
||||
meeting = models.ForeignKey(Meeting, db_column='meeting_num')
|
||||
day_id = models.IntegerField()
|
||||
session_name = models.ForeignKey(SessionName,null=True)
|
||||
def __str__(self):
|
||||
|
@ -314,7 +314,7 @@ class WgMeetingSession(models.Model, ResolveAcronym):
|
|||
requested_by = models.ForeignKey(PersonOrOrgInfo, db_column='requested_by')
|
||||
scheduled_date = models.DateField(null=True, blank=True)
|
||||
last_modified_date = models.DateField(null=True, blank=True)
|
||||
ad_comments = models.TextField(blank=True)
|
||||
ad_comments = models.TextField(blank=True,null=True)
|
||||
sched_room_id1 = models.ForeignKey(MeetingRoom, db_column='sched_room_id1', null=True, blank=True, related_name='here1')
|
||||
sched_time_id1 = models.ForeignKey(MeetingTime, db_column='sched_time_id1', null=True, blank=True, related_name='now1')
|
||||
sched_date1 = models.DateField(null=True, blank=True)
|
||||
|
|
Loading…
Reference in a new issue