1 # -*- coding: utf-8 -*-
3 from south.db import db
4 from south.v2 import SchemaMigration
5 from django.db import models
8 class Migration(SchemaMigration):
10 def forwards(self, orm):
11 # Adding model 'Attachment'
12 db.create_table('contact_attachment', (
13 ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
14 ('contact', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['contact.Contact'])),
15 ('tag', self.gf('django.db.models.fields.CharField')(max_length=64)),
16 ('file', self.gf('django.db.models.fields.files.FileField')(max_length=100)),
18 db.send_create_signal('contact', ['Attachment'])
20 # Adding index on 'Contact', fields ['form_tag']
21 db.create_index('contact_contact', ['form_tag'])
24 def backwards(self, orm):
25 # Removing index on 'Contact', fields ['form_tag']
26 db.delete_index('contact_contact', ['form_tag'])
28 # Deleting model 'Attachment'
29 db.delete_table('contact_attachment')
33 'contact.attachment': {
34 'Meta': {'object_name': 'Attachment'},
35 'contact': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contact.Contact']"}),
36 'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
37 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
38 'tag': ('django.db.models.fields.CharField', [], {'max_length': '64'})
41 'Meta': {'ordering': "('-created_at',)", 'object_name': 'Contact'},
42 'body': ('jsonfield.fields.JSONField', [], {}),
43 'contact': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
44 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
45 'form_tag': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}),
46 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
47 'ip': ('django.db.models.fields.IPAddressField', [], {'max_length': '15'})
51 complete_apps = ['contact']