Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change max_length(s) to Reflect Data #69

Merged
merged 9 commits into from
Nov 14, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions calaccess_raw/models/campaign.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,9 @@ class CvrCampaignDisclosureCd(CalAccessBaseModel):
filer_fax = models.CharField(
max_length=20L, db_column='FILER_FAX', blank=True
)
filer_id = models.IntegerField(db_column='FILER_ID', db_index=True)
filer_id = models.CharField(
max_length=15L, db_column='FILER_ID', db_index=True
)
filer_namf = models.CharField(
max_length=45L, db_column='FILER_NAMF', blank=True
)
Expand Down Expand Up @@ -537,6 +539,7 @@ class CvrCampaignDisclosureCd(CalAccessBaseModel):
max_length=20L, db_column='TRES_PHON', blank=True
)
tres_st = models.CharField(max_length=2L, db_column='TRES_ST', blank=True)

tres_zip4 = models.CharField(
max_length=10L, db_column='TRES_ZIP4', blank=True
)
Expand Down Expand Up @@ -1113,10 +1116,11 @@ class RcptCd(CalAccessBaseModel):
help_text="State portion of the treasurer or responsible officer's \
address"
)
tres_zip4 = models.IntegerField(
tres_zip4 = models.CharField(
null=True,
db_column='TRES_ZIP4',
max_length=10L,
blank=True,
db_column='TRES_ZIP4',
help_text="Zip code portion of the treasurer or responsible officer's \
address"
)
Expand Down
5 changes: 3 additions & 2 deletions calaccess_raw/models/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class FilernameCd(CalAccessBaseModel):
"""
DATE_FIELDS = ('EFFECT_DT',)
xref_filer_id = models.CharField(
max_length=7L,
max_length=15L,
db_column='XREF_FILER_ID',
db_index=True,
help_text="The external filer id saved in the forms tables"
Expand Down Expand Up @@ -52,7 +52,7 @@ class FilernameCd(CalAccessBaseModel):
help_text="First name"
)
namt = models.CharField(
max_length=28L, db_column='NAMT', blank=True,
max_length=70L, db_column='NAMT', blank=True,
help_text="Name prefix or title"
)
nams = models.CharField(
Expand Down Expand Up @@ -120,6 +120,7 @@ class FilerFilingsCd(CalAccessBaseModel):
)
stmnt_status = models.IntegerField(
db_column='STMNT_STATUS',
null=True,
help_text="The status of the statement. If the filing has been \
reviewed or not reviewed."
)
Expand Down
4 changes: 2 additions & 2 deletions calaccess_raw/models/lobbying.py
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ class LobbyAmendmentsCd(CalAccessBaseModel):
max_length=45L, db_column='D_LE_NAMF', blank=True
)
d_le_namt = models.CharField(
max_length=9L, db_column='D_LE_NAMT', blank=True
max_length=12L, db_column='D_LE_NAMT', blank=True
)
d_le_nams = models.CharField(
max_length=9L, db_column='D_LE_NAMS', blank=True
Expand Down Expand Up @@ -854,7 +854,7 @@ class LccmCd(CalAccessBaseModel):
max_length=45L, db_column='CTRIB_NAMF', blank=True
)
ctrib_naml = models.CharField(
max_length=45L, db_column='CTRIB_NAML', blank=True
max_length=120L, db_column='CTRIB_NAML', blank=True
)
ctrib_nams = models.CharField(
max_length=10L, db_column='CTRIB_NAMS', blank=True
Expand Down
6 changes: 3 additions & 3 deletions calaccess_raw/models/other.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

class AcronymsCd(CalAccessBaseModel):
DATE_FIELDS = ("EFFECT_DT",)
acronym = models.CharField(max_length=25, db_column="ACRONYM")
acronym = models.CharField(max_length=40, db_column="ACRONYM")
stands_for = models.CharField(max_length=4, db_column="STANDS_FOR")
effect_dt = models.DateField(db_column="EFFECT_DT")
a_desc = models.CharField(max_length=25, db_column="A_DESC")
a_desc = models.CharField(max_length=50, db_column="A_DESC")

class Meta:
app_label = 'calaccess_raw'
Expand All @@ -23,7 +23,7 @@ class AddressCd(CalAccessBaseModel):
st = models.CharField(max_length=500, db_column="ST")
zip4 = models.IntegerField(db_column="ZIP4")
phon = models.IntegerField(db_column="PHON")
fax = models.IntegerField(db_column="FAX")
fax = models.IntegerField(db_column="FAX", null=True)
email = models.CharField(max_length=500, db_column="EMAIL")

class Meta:
Expand Down