Skip to content

Commit

Permalink
* Relax some constraints on the state and country and rebuild migrati…
Browse files Browse the repository at this point in the history
…ons.
  • Loading branch information
bgroff committed Apr 10, 2017
1 parent aa6094d commit 5bbeac2
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
4 changes: 2 additions & 2 deletions django_kala/accounts/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-04-06 03:52
# Generated by Django 1.11 on 2017-04-10 06:02
from __future__ import unicode_literals

import django.contrib.auth.models
Expand Down Expand Up @@ -53,8 +53,8 @@ class Migration(migrations.Migration):
('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')),
],
options={
'ordering': ['first_name', 'last_name'],
'db_table': 'kala_person',
'ordering': ['first_name', 'last_name'],
},
managers=[
('objects', django.contrib.auth.models.UserManager()),
Expand Down
9 changes: 4 additions & 5 deletions django_kala/companies/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-04-06 03:52
# Generated by Django 1.11 on 2017-04-10 06:02
from __future__ import unicode_literals

from django.db import migrations, models
import django_countries.fields
import django_localflavor_us.models
import timezone_field.fields
import uuid
Expand All @@ -26,9 +25,9 @@ class Migration(migrations.Migration):
('address', models.CharField(blank=True, max_length=255, null=True)),
('address1', models.CharField(blank=True, max_length=255, null=True)),
('city', models.CharField(blank=True, max_length=255, null=True)),
('state', django_localflavor_us.models.USStateField(blank=True, choices=[('AL', 'Alabama'), ('AK', 'Alaska'), ('AS', 'American Samoa'), ('AZ', 'Arizona'), ('AR', 'Arkansas'), ('AA', 'Armed Forces Americas'), ('AE', 'Armed Forces Europe'), ('AP', 'Armed Forces Pacific'), ('CA', 'California'), ('CO', 'Colorado'), ('CT', 'Connecticut'), ('DE', 'Delaware'), ('DC', 'District of Columbia'), ('FL', 'Florida'), ('GA', 'Georgia'), ('GU', 'Guam'), ('HI', 'Hawaii'), ('ID', 'Idaho'), ('IL', 'Illinois'), ('IN', 'Indiana'), ('IA', 'Iowa'), ('KS', 'Kansas'), ('KY', 'Kentucky'), ('LA', 'Louisiana'), ('ME', 'Maine'), ('MD', 'Maryland'), ('MA', 'Massachusetts'), ('MI', 'Michigan'), ('MN', 'Minnesota'), ('MS', 'Mississippi'), ('MO', 'Missouri'), ('MT', 'Montana'), ('NE', 'Nebraska'), ('NV', 'Nevada'), ('NH', 'New Hampshire'), ('NJ', 'New Jersey'), ('NM', 'New Mexico'), ('NY', 'New York'), ('NC', 'North Carolina'), ('ND', 'North Dakota'), ('MP', 'Northern Mariana Islands'), ('OH', 'Ohio'), ('OK', 'Oklahoma'), ('OR', 'Oregon'), ('PA', 'Pennsylvania'), ('PR', 'Puerto Rico'), ('RI', 'Rhode Island'), ('SC', 'South Carolina'), ('SD', 'South Dakota'), ('TN', 'Tennessee'), ('TX', 'Texas'), ('UT', 'Utah'), ('VT', 'Vermont'), ('VI', 'Virgin Islands'), ('VA', 'Virginia'), ('WA', 'Washington'), ('WV', 'West Virginia'), ('WI', 'Wisconsin'), ('WY', 'Wyoming')], max_length=2, null=True)),
('state', models.CharField(blank=True, max_length=80, null=True)),
('zip', models.CharField(blank=True, max_length=25, null=True)),
('country', django_countries.fields.CountryField(default='US', max_length=2)),
('country', models.CharField(blank=True, default='US', max_length=80, null=True)),
('fax', django_localflavor_us.models.PhoneNumberField(blank=True, max_length=20, null=True)),
('phone', django_localflavor_us.models.PhoneNumberField(blank=True, max_length=20, null=True)),
('locale', models.CharField(blank=True, default='en', max_length=2, null=True)),
Expand All @@ -38,8 +37,8 @@ class Migration(migrations.Migration):
('is_active', models.BooleanField(default=True)),
],
options={
'ordering': ['name'],
'db_table': 'kala_companies',
'ordering': ['name'],
},
),
]
4 changes: 2 additions & 2 deletions django_kala/companies/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ class Company(models.Model):
address = models.CharField(max_length=255, null=True, blank=True)
address1 = models.CharField(max_length=255, null=True, blank=True)
city = models.CharField(max_length=255, null=True, blank=True)
state = USStateField(null=True, blank=True)
state = models.CharField(null=True, blank=True, max_length=80)
zip = models.CharField(max_length=25, null=True, blank=True)
country = CountryField(default='US')
country = models.CharField(default='US', null=True, blank=True, max_length=80)
fax = PhoneNumberField(null=True, blank=True)
phone = PhoneNumberField(null=True, blank=True)
locale = models.CharField(max_length=2, null=True, blank=True, default='en')
Expand Down
6 changes: 3 additions & 3 deletions django_kala/documents/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-04-06 03:52
# Generated by Django 1.11 on 2017-04-10 06:02
from __future__ import unicode_literals

from django.conf import settings
Expand Down Expand Up @@ -31,8 +31,8 @@ class Migration(migrations.Migration):
('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='projects.Project')),
],
options={
'ordering': ['-date', 'name'],
'db_table': 'kala_documents',
'ordering': ['-date', 'name'],
},
),
migrations.CreateModel(
Expand All @@ -52,8 +52,8 @@ class Migration(migrations.Migration):
],
options={
'db_table': 'kala_document_version',
'ordering': ['name', 'created'],
'get_latest_by': 'created',
'ordering': ['name', 'created'],
},
),
]
2 changes: 1 addition & 1 deletion django_kala/projects/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-04-06 03:52
# Generated by Django 1.11 on 2017-04-10 06:02
from __future__ import unicode_literals

from django.conf import settings
Expand Down

0 comments on commit 5bbeac2

Please sign in to comment.