Skip to content

Commit

Permalink
* Increase the length of string fields
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishekram committed Mar 15, 2019
1 parent e0270ad commit cb267c8
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,5 @@ target/
messages/
certificates/
logging/
venv
venv
.DS_STORE
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Release History
===============

0.4.4 - 2019-03-15
~~~~~~~~~~~~~~~

* Increase the length of string fields


0.4.3 - 2018-06-09
~~~~~~~~~~~~~~~

Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
# The short X.Y version.
version = u'0.4'
# The full version, including alpha/beta/rc tags.
release = u'0.4.2'
release = u'0.4.4'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
2 changes: 1 addition & 1 deletion pyas2/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__title__ = 'pyAS2'
__version__ = '0.4.3'
__version__ = '0.4.4'
40 changes: 40 additions & 0 deletions pyas2/migrations/0020_auto_20190315_1048.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.6 on 2019-03-15 10:48
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('pyas2', '0019_auto_20180127_0509'),
]

operations = [
migrations.AlterField(
model_name='log',
name='text',
field=models.TextField(),
),
migrations.AlterField(
model_name='mdn',
name='message_id',
field=models.CharField(max_length=250, primary_key=True, serialize=False),
),
migrations.AlterField(
model_name='message',
name='adv_status',
field=models.TextField(null=True),
),
migrations.AlterField(
model_name='message',
name='message_id',
field=models.CharField(max_length=250, primary_key=True, serialize=False),
),
migrations.AlterField(
model_name='payload',
name='file',
field=models.TextField(),
),
]
10 changes: 5 additions & 5 deletions pyas2/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,12 +163,12 @@ class Message(models.Model):
('ASYNC', _('Asynchronous')),
)
# TODO: Create composite key (message_id, organization, partner)
message_id = models.CharField(max_length=100, primary_key=True)
message_id = models.CharField(max_length=250, primary_key=True)
headers = models.TextField(null=True)
direction = models.CharField(max_length=5, choices=DIRECTION_CHOICES)
timestamp = models.DateTimeField(auto_now_add=True)
status = models.CharField(max_length=2, choices=STATUS_CHOICES)
adv_status = models.CharField(max_length=255, null=True)
adv_status = models.TextField(null=True)
organization = models.ForeignKey(Organization, null=True)
partner = models.ForeignKey(Partner, null=True)
payload = models.OneToOneField(
Expand All @@ -188,7 +188,7 @@ def __str__(self):
class Payload(models.Model):
name = models.CharField(max_length=100)
content_type = models.CharField(max_length=255)
file = models.CharField(max_length=500)
file = models.TextField()

def __str__(self):
return self.name
Expand All @@ -203,7 +203,7 @@ class Log(models.Model):
timestamp = models.DateTimeField(auto_now_add=True)
status = models.CharField(max_length=2, choices=STATUS_CHOICES)
message = models.ForeignKey(Message, related_name='logs')
text = models.CharField(max_length=255)
text = models.TextField()


class MDN(models.Model):
Expand All @@ -212,7 +212,7 @@ class MDN(models.Model):
('R', _('Received')),
('P', _('Pending')),
)
message_id = models.CharField(max_length=100, primary_key=True)
message_id = models.CharField(max_length=250, primary_key=True)
timestamp = models.DateTimeField(auto_now_add=True)
status = models.CharField(max_length=2, choices=STATUS_CHOICES)
file = models.CharField(max_length=500)
Expand Down

0 comments on commit cb267c8

Please sign in to comment.