Skip to content

Commit fed58af

Browse files
committed
Merge pull request #46 from RyanBalfanz/merge_prep
Merge prep
2 parents e6a05b8 + 71ec05e commit fed58af

5 files changed

+355
-13
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
# -*- coding: utf-8 -*-
2+
import datetime
3+
from south.db import db
4+
from south.v2 import SchemaMigration
5+
from django.db import models
6+
7+
8+
class Migration(SchemaMigration):
9+
10+
def forwards(self, orm):
11+
12+
# Changing field 'BounceEvent.bounce_type'
13+
db.alter_column('sendgrid_bounceevent', 'bounce_type_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['sendgrid.BounceType'], null=True))
14+
15+
# Changing field 'BounceEvent.bounce_reason'
16+
db.alter_column('sendgrid_bounceevent', 'bounce_reason_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['sendgrid.BounceReason'], null=True))
17+
18+
def backwards(self, orm):
19+
20+
# User chose to not deal with backwards NULL issues for 'BounceEvent.bounce_type'
21+
raise RuntimeError("Cannot reverse this migration. 'BounceEvent.bounce_type' and its values cannot be restored.")
22+
23+
# User chose to not deal with backwards NULL issues for 'BounceEvent.bounce_reason'
24+
raise RuntimeError("Cannot reverse this migration. 'BounceEvent.bounce_reason' and its values cannot be restored.")
25+
26+
models = {
27+
'sendgrid.argument': {
28+
'Meta': {'object_name': 'Argument'},
29+
'creation_time': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
30+
'data_type': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
31+
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
32+
'key': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
33+
'last_modified_time': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
34+
},
35+
'sendgrid.bounceevent': {
36+
'Meta': {'object_name': 'BounceEvent', '_ormbases': ['sendgrid.Event']},
37+
'bounce_reason': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sendgrid.BounceReason']", 'null': 'True'}),
38+
'bounce_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sendgrid.BounceType']", 'null': 'True'}),
39+
'event_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['sendgrid.Event']", 'unique': 'True', 'primary_key': 'True'}),
40+
'status': ('django.db.models.fields.CharField', [], {'max_length': '16'})
41+
},
42+
'sendgrid.bouncereason': {
43+
'Meta': {'object_name': 'BounceReason'},
44+
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
45+
'reason': ('django.db.models.fields.TextField', [], {})
46+
},
47+
'sendgrid.bouncetype': {
48+
'Meta': {'object_name': 'BounceType'},
49+
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
50+
'type': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
51+
},
52+
'sendgrid.category': {
53+
'Meta': {'object_name': 'Category'},
54+
'creation_time': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
55+
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
56+
'last_modified_time': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
57+
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '150'})
58+
},
59+
'sendgrid.clickevent': {
60+
'Meta': {'object_name': 'ClickEvent', '_ormbases': ['sendgrid.Event']},
61+
'click_url': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sendgrid.ClickUrl']"}),
62+
'event_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['sendgrid.Event']", 'unique': 'True', 'primary_key': 'True'})
63+
},
64+
'sendgrid.clickurl': {
65+
'Meta': {'object_name': 'ClickUrl'},
66+
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
67+
'url': ('django.db.models.fields.TextField', [], {})
68+
},
69+
'sendgrid.deferredevent': {
70+
'Meta': {'object_name': 'DeferredEvent', '_ormbases': ['sendgrid.Event']},
71+
'attempt': ('django.db.models.fields.IntegerField', [], {}),
72+
'event_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['sendgrid.Event']", 'unique': 'True', 'primary_key': 'True'}),
73+
'response': ('django.db.models.fields.TextField', [], {})
74+
},
75+
'sendgrid.deliverredevent': {
76+
'Meta': {'object_name': 'DeliverredEvent', '_ormbases': ['sendgrid.Event']},
77+
'event_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['sendgrid.Event']", 'unique': 'True', 'primary_key': 'True'}),
78+
'response': ('django.db.models.fields.TextField', [], {})
79+
},
80+
'sendgrid.droppedevent': {
81+
'Meta': {'object_name': 'DroppedEvent', '_ormbases': ['sendgrid.Event']},
82+
'event_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['sendgrid.Event']", 'unique': 'True', 'primary_key': 'True'}),
83+
'reason': ('django.db.models.fields.CharField', [], {'max_length': '255'})
84+
},
85+
'sendgrid.emailmessage': {
86+
'Meta': {'object_name': 'EmailMessage'},
87+
'arguments': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['sendgrid.Argument']", 'through': "orm['sendgrid.UniqueArgument']", 'symmetrical': 'False'}),
88+
'categories': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['sendgrid.Category']", 'symmetrical': 'False'}),
89+
'category': ('django.db.models.fields.CharField', [], {'max_length': '150', 'null': 'True', 'blank': 'True'}),
90+
'creation_time': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
91+
'from_email': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
92+
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
93+
'last_modified_time': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
94+
'message_id': ('django.db.models.fields.CharField', [], {'max_length': '36', 'unique': 'True', 'null': 'True', 'blank': 'True'}),
95+
'response': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
96+
'to_email': ('django.db.models.fields.CharField', [], {'max_length': '254'})
97+
},
98+
'sendgrid.emailmessageattachmentsdata': {
99+
'Meta': {'object_name': 'EmailMessageAttachmentsData'},
100+
'data': ('django.db.models.fields.TextField', [], {}),
101+
'email_message': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'attachments'", 'unique': 'True', 'primary_key': 'True', 'to': "orm['sendgrid.EmailMessage']"})
102+
},
103+
'sendgrid.emailmessagebccdata': {
104+
'Meta': {'object_name': 'EmailMessageBccData'},
105+
'data': ('django.db.models.fields.TextField', [], {}),
106+
'email_message': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'bcc'", 'unique': 'True', 'primary_key': 'True', 'to': "orm['sendgrid.EmailMessage']"})
107+
},
108+
'sendgrid.emailmessagebodydata': {
109+
'Meta': {'object_name': 'EmailMessageBodyData'},
110+
'data': ('django.db.models.fields.TextField', [], {}),
111+
'email_message': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'body'", 'unique': 'True', 'primary_key': 'True', 'to': "orm['sendgrid.EmailMessage']"})
112+
},
113+
'sendgrid.emailmessageccdata': {
114+
'Meta': {'object_name': 'EmailMessageCcData'},
115+
'data': ('django.db.models.fields.TextField', [], {}),
116+
'email_message': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'cc'", 'unique': 'True', 'primary_key': 'True', 'to': "orm['sendgrid.EmailMessage']"})
117+
},
118+
'sendgrid.emailmessageextraheadersdata': {
119+
'Meta': {'object_name': 'EmailMessageExtraHeadersData'},
120+
'data': ('django.db.models.fields.TextField', [], {}),
121+
'email_message': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'extra_headers'", 'unique': 'True', 'primary_key': 'True', 'to': "orm['sendgrid.EmailMessage']"})
122+
},
123+
'sendgrid.emailmessagesendgridheadersdata': {
124+
'Meta': {'object_name': 'EmailMessageSendGridHeadersData'},
125+
'data': ('django.db.models.fields.TextField', [], {}),
126+
'email_message': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'sendgrid_headers'", 'unique': 'True', 'primary_key': 'True', 'to': "orm['sendgrid.EmailMessage']"})
127+
},
128+
'sendgrid.emailmessagesubjectdata': {
129+
'Meta': {'object_name': 'EmailMessageSubjectData'},
130+
'data': ('django.db.models.fields.TextField', [], {}),
131+
'email_message': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'subject'", 'unique': 'True', 'primary_key': 'True', 'to': "orm['sendgrid.EmailMessage']"})
132+
},
133+
'sendgrid.emailmessagetodata': {
134+
'Meta': {'object_name': 'EmailMessageToData'},
135+
'data': ('django.db.models.fields.TextField', [], {}),
136+
'email_message': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'to'", 'unique': 'True', 'primary_key': 'True', 'to': "orm['sendgrid.EmailMessage']"})
137+
},
138+
'sendgrid.event': {
139+
'Meta': {'object_name': 'Event'},
140+
'creation_time': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
141+
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75'}),
142+
'email_message': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sendgrid.EmailMessage']"}),
143+
'event_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sendgrid.EventType']"}),
144+
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
145+
'last_modified_time': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
146+
'timestamp': ('django.db.models.fields.DateTimeField', [], {'null': 'True'})
147+
},
148+
'sendgrid.eventtype': {
149+
'Meta': {'object_name': 'EventType'},
150+
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
151+
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'})
152+
},
153+
'sendgrid.uniqueargument': {
154+
'Meta': {'object_name': 'UniqueArgument'},
155+
'argument': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sendgrid.Argument']"}),
156+
'creation_time': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
157+
'data': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
158+
'email_message': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sendgrid.EmailMessage']"}),
159+
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
160+
'last_modified_time': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
161+
}
162+
}
163+
164+
complete_apps = ['sendgrid']

0 commit comments

Comments
 (0)