Skip to content

Commit

Permalink
Merge pull request #468 from rapidsms/python3-migrations
Browse files Browse the repository at this point in the history
Add missing migrations for Python3
  • Loading branch information
vkurup committed Aug 2, 2015
2 parents 745b3bb + a600b83 commit d622684
Show file tree
Hide file tree
Showing 13 changed files with 159 additions and 2 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Expand Up @@ -7,6 +7,7 @@ env:
- TOXENV=py27-1.7.X,py33-1.7.X,py34-1.7.X
- TOXENV=py27-1.8.X,py33-1.8.X,py34-1.8.X
- TOXENV=py27-trunk,py33-trunk,py34-trunk
- TOXENV=py27-migrations,py34-migrations
- TOXENV=docs
- TOXENV=flake8
- TOXENV=coverage
Expand Down
3 changes: 3 additions & 0 deletions check_for_missing_migrations.sh
@@ -0,0 +1,3 @@
#!/bin/bash

django-admin.py makemigrations --dry-run | grep 'No changes detected' || (echo 'There are changes which require migrations.' && exit 1)
20 changes: 20 additions & 0 deletions rapidsms/backends/database/migrations/0003_auto_20150801_2140.py
@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models, migrations


class Migration(migrations.Migration):

dependencies = [
('database', '0002_auto_20150710_1421'),
]

operations = [
migrations.AlterField(
model_name='backendmessage',
name='direction',
field=models.CharField(db_index=True, max_length=1, choices=[('I', 'Incoming'), ('O', 'Outgoing')]),
preserve_default=True,
),
]
1 change: 1 addition & 0 deletions rapidsms/backends/database/models.py
@@ -1,5 +1,6 @@
#!/usr/bin/env python
# vim: ai ts=4 sts=4 et sw=4
from __future__ import unicode_literals

from django.db import models
from django.utils.encoding import python_2_unicode_compatible
Expand Down
38 changes: 38 additions & 0 deletions rapidsms/backends/kannel/migrations/0002_auto_20150801_2142.py
@@ -0,0 +1,38 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models, migrations


class Migration(migrations.Migration):

dependencies = [
('kannel', '0001_initial'),
]

operations = [
migrations.AlterField(
model_name='deliveryreport',
name='message_id',
field=models.CharField(max_length=255, verbose_name='Message ID'),
preserve_default=True,
),
migrations.AlterField(
model_name='deliveryreport',
name='sms_id',
field=models.CharField(max_length=36, verbose_name='SMS ID'),
preserve_default=True,
),
migrations.AlterField(
model_name='deliveryreport',
name='smsc',
field=models.CharField(max_length=255, verbose_name='SMSC'),
preserve_default=True,
),
migrations.AlterField(
model_name='deliveryreport',
name='status',
field=models.SmallIntegerField(choices=[(1, 'Delivery Success'), (2, 'Delivery Failure'), (4, 'Message Buffered'), (8, 'SMSC Submit'), (16, 'SMSC Reject')]),
preserve_default=True,
),
]
2 changes: 2 additions & 0 deletions rapidsms/backends/kannel/models.py
@@ -1,3 +1,5 @@
from __future__ import unicode_literals

from django.db import models


Expand Down
20 changes: 20 additions & 0 deletions rapidsms/contrib/messagelog/migrations/0002_auto_20150801_2140.py
@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models, migrations


class Migration(migrations.Migration):

dependencies = [
('messagelog', '0001_initial'),
]

operations = [
migrations.AlterField(
model_name='message',
name='direction',
field=models.CharField(max_length=1, choices=[('I', 'Incoming'), ('O', 'Outgoing')]),
preserve_default=True,
),
]
1 change: 1 addition & 0 deletions rapidsms/contrib/messagelog/models.py
@@ -1,5 +1,6 @@
#!/usr/bin/env python
# vim: ai ts=4 sts=4 et sw=4
from __future__ import unicode_literals

from django.core.exceptions import ValidationError
from django.db import models
Expand Down
20 changes: 20 additions & 0 deletions rapidsms/migrations/0004_auto_20150801_2138.py
@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models, migrations


class Migration(migrations.Migration):

dependencies = [
('rapidsms', '0003_delete_backendmessage'),
]

operations = [
migrations.AlterField(
model_name='contact',
name='language',
field=models.CharField(help_text='The language which this contact prefers to communicate in, as a W3C language tag. If this field is left blank, RapidSMS will default to the value in LANGUAGE_CODE.', max_length=6, blank=True),
preserve_default=True,
),
]
2 changes: 1 addition & 1 deletion rapidsms/models.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
# vim: ai ts=4 sts=4 et sw=4

from __future__ import unicode_literals

from django.db import models
from django.utils.encoding import python_2_unicode_compatible
Expand Down
32 changes: 32 additions & 0 deletions rapidsms/router/db/migrations/0002_auto_20150801_2142.py
@@ -0,0 +1,32 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models, migrations


class Migration(migrations.Migration):

dependencies = [
('db', '0001_initial'),
]

operations = [
migrations.AlterField(
model_name='message',
name='direction',
field=models.CharField(max_length=1, db_index=True, choices=[('I', 'Incoming'), ('O', 'Outgoing')]),
preserve_default=True,
),
migrations.AlterField(
model_name='message',
name='status',
field=models.CharField(max_length=1, db_index=True, choices=[('Q', 'Queued'), ('R', 'Received'), ('P', 'Processing'), ('S', 'Sent'), ('D', 'Delivered'), ('E', 'Errored')], default='Q'),
preserve_default=True,
),
migrations.AlterField(
model_name='transmission',
name='status',
field=models.CharField(max_length=1, db_index=True, choices=[('Q', 'Queued'), ('R', 'Received'), ('P', 'Processing'), ('S', 'Sent'), ('D', 'Delivered'), ('E', 'Errored')]),
preserve_default=True,
),
]
2 changes: 2 additions & 0 deletions rapidsms/router/db/models.py
@@ -1,3 +1,5 @@
from __future__ import unicode_literals

from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from django.utils.timezone import now
Expand Down
19 changes: 18 additions & 1 deletion tox.ini
Expand Up @@ -11,12 +11,15 @@ envlist = py26-1.6.X,
py34-1.7.X,
py34-1.8.X,
py34-trunk,
py27-migrations,
py34-migrations,
docs,
flake8,
coverage

[default]
deps = -r{toxinidir}/tests/requirements/dev.txt
deps = pip>7
-r{toxinidir}/tests/requirements/dev.txt

[testenv]
basepython = python2.7
Expand Down Expand Up @@ -84,6 +87,20 @@ basepython = python3.4
deps = https://github.com/django/django/archive/master.tar.gz
{[default]deps}

[testenv:py27-migrations]
basepython = python2.7
deps = django
{[default]deps}
setenv = {[testenv]setenv}
commands = {toxinidir}/check_for_missing_migrations.sh

[testenv:py34-migrations]
basepython = python3.4
deps = django
{[default]deps}
setenv = {[testenv]setenv}
commands = {toxinidir}/check_for_missing_migrations.sh

[testenv:docs]
basepython = python2.7
deps = Sphinx==1.1.3
Expand Down

0 comments on commit d622684

Please sign in to comment.