Commit a37a6299 authored by Adrián Ribao's avatar Adrián Ribao
Browse files

use django migrations

parent 162f95e2
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Contact'
db.create_table('cartero_contact', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
('modified', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)),
('site', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['sites.Site'])),
('first_name', self.gf('django.db.models.fields.CharField')(max_length=150)),
('last_name', self.gf('django.db.models.fields.CharField')(max_length=150)),
('email', self.gf('django.db.models.fields.EmailField')(max_length=200)),
('data', self.gf('django.db.models.fields.TextField')(blank=True)),
('sent', self.gf('django.db.models.fields.BooleanField')(default=False)),
('bounced', self.gf('django.db.models.fields.BooleanField')(default=False)),
))
db.send_create_signal('cartero', ['Contact'])
# Adding model 'EmailTemplate'
db.create_table('cartero_emailtemplate', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
('modified', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)),
('site', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['sites.Site'])),
('name', self.gf('django.db.models.fields.CharField')(max_length=150)),
('template', self.gf('django.db.models.fields.FilePathField')(path='/home/antares/paginas_web/adcxml/cartero/templates/cartero/', max_length=255, match='*.html')),
('html', self.gf('django.db.models.fields.TextField')(blank=True)),
('plain', self.gf('django.db.models.fields.TextField')(blank=True)),
))
db.send_create_signal('cartero', ['EmailTemplate'])
# Adding model 'Campaign'
db.create_table('cartero_campaign', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
('modified', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)),
('site', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['sites.Site'])),
('name', self.gf('django.db.models.fields.CharField')(max_length=150)),
('subject', self.gf('django.db.models.fields.CharField')(max_length=150)),
('reply_to', self.gf('django.db.models.fields.CharField')(max_length=150, blank=True)),
('email_template', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['cartero.EmailTemplate'])),
('sent', self.gf('django.db.models.fields.BooleanField')(default=False)),
))
db.send_create_signal('cartero', ['Campaign'])
from __future__ import unicode_literals
# Adding M2M table for field contacts on 'Campaign'
db.create_table('cartero_campaign_contacts', (
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
('campaign', models.ForeignKey(orm['cartero.campaign'], null=False)),
('contact', models.ForeignKey(orm['cartero.contact'], null=False))
))
db.create_unique('cartero_campaign_contacts', ['campaign_id', 'contact_id'])
def backwards(self, orm):
# Deleting model 'Contact'
db.delete_table('cartero_contact')
# Deleting model 'EmailTemplate'
db.delete_table('cartero_emailtemplate')
# Deleting model 'Campaign'
db.delete_table('cartero_campaign')
from django.db import migrations, models
import datetime
# Removing M2M table for field contacts on 'Campaign'
db.delete_table('cartero_campaign_contacts')
class Migration(migrations.Migration):
models = {
'cartero.campaign': {
'Meta': {'object_name': 'Campaign'},
'contacts': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['cartero.Contact']", 'symmetrical': 'False', 'blank': 'True'}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'email_template': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cartero.EmailTemplate']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '150'}),
'reply_to': ('django.db.models.fields.CharField', [], {'max_length': '150', 'blank': 'True'}),
'sent': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}),
'subject': ('django.db.models.fields.CharField', [], {'max_length': '150'})
},
'cartero.contact': {
'Meta': {'object_name': 'Contact'},
'bounced': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'data': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '200'}),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '150'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '150'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'sent': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"})
},
'cartero.emailtemplate': {
'Meta': {'object_name': 'EmailTemplate'},
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'html': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '150'}),
'plain': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}),
'template': ('django.db.models.fields.FilePathField', [], {'path': "'/home/antares/paginas_web/adcxml/cartero/templates/cartero/'", 'max_length': '255', 'match': "'*.html'"})
},
'sites.site': {
'Meta': {'ordering': "('domain',)", 'object_name': 'Site', 'db_table': "'django_site'"},
'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
}
}
dependencies = [
('sites', '0001_initial'),
]
complete_apps = ['cartero']
\ No newline at end of file
operations = [
migrations.CreateModel(
name='Campaign',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('created', models.DateTimeField(auto_now_add=True)),
('modified', models.DateTimeField(auto_now=True)),
('name', models.CharField(help_text='Name of the campaign.', max_length=150, verbose_name='Name')),
('subject', models.CharField(help_text='Subject for the email.', max_length=150, verbose_name='Subject')),
('start', models.DateTimeField(default=datetime.datetime(2016, 2, 2, 15, 22, 12, 940545), help_text='The date and time when the campaign sould be sent.', verbose_name='Start after')),
('from_email', models.CharField(help_text='From email that will be shown as sender name. Can be in the form: Text you want <me@email.com>', max_length=255, verbose_name='From email', blank=True)),
('reply_to', models.CharField(help_text='Email address used to reply the emails sent in the campaign.', max_length=150, verbose_name='Reply to', blank=True)),
('status', models.CharField(default=b'dr', max_length=2, choices=[(b'dr', 'Draft'), (b'rs', 'Ready to be sent'), (b'se', 'Sending...'), (b'st', 'Sent'), (b'ca', 'Cancelled')])),
('rate_limit_amount', models.PositiveSmallIntegerField(default=10000, help_text='Rate limit amount', verbose_name='Rate limit amount')),
('rate_limit_interval', models.CharField(default=b'h', max_length=1, verbose_name='Rate limit interval', choices=[(b's', 'per second'), (b'm', 'per minute'), (b'h', 'per hour')])),
],
options={
'verbose_name': 'Campaign',
'verbose_name_plural': 'Campaigns',
},
),
migrations.CreateModel(
name='Contact',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('created', models.DateTimeField(auto_now_add=True)),
('modified', models.DateTimeField(auto_now=True)),
('first_name', models.CharField(help_text='First name of the contact.', max_length=150, verbose_name='First name')),
('last_name', models.CharField(help_text='Last name of the contact.', max_length=150, verbose_name='Last name')),
('email', models.EmailField(max_length=200)),
('data', models.TextField(help_text='JSON data thas is going into the template as the Context.', verbose_name='JSON Data', blank=True)),
('sent', models.BooleanField(default=False, verbose_name='Sent')),
('bounced', models.BooleanField(default=False, verbose_name='Bounced')),
('testing', models.BooleanField(default=False, help_text='If this field is selected, the contact receives the testing emails.', verbose_name='Testing')),
('site', models.ForeignKey(default=1, verbose_name='Site', to='sites.Site')),
],
options={
'verbose_name': 'Contact',
'verbose_name_plural': 'Contacts',
},
),
migrations.CreateModel(
name='EmailTemplate',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('created', models.DateTimeField(auto_now_add=True)),
('modified', models.DateTimeField(auto_now=True)),
('name', models.CharField(help_text='Name of the template.', max_length=150, verbose_name='Name')),
('template', models.FilePathField(path=b'/project/adcxml/templates/mails/campaigns', max_length=255, match=b'\\.html$')),
('context', models.TextField(help_text='JSON context pased to the template.', verbose_name='JSON context', blank=True)),
('html', models.TextField(help_text='HTML template', verbose_name='HTML content', blank=True)),
('plain', models.TextField(help_text='HTML template', verbose_name='Plain content', blank=True)),
('site', models.ForeignKey(verbose_name='Site', to='sites.Site')),
],
options={
'verbose_name': 'Email template',
'verbose_name_plural': 'Email templates',
},
),
migrations.CreateModel(
name='ExcludedEmail',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('created', models.DateTimeField(auto_now_add=True)),
('modified', models.DateTimeField(auto_now=True)),
('email', models.EmailField(unique=True, max_length=200)),
('reason', models.CharField(help_text='Reason to be excluded.', max_length=2, verbose_name='Reason', choices=[(b'HB', 'Hard bounce'), (b'HB', 'Soft bounce'), (b'SP', 'Spam'), (b'UN', 'Unsubscribed')])),
('comments', models.TextField(help_text='Store here any comments about the exclusion.', verbose_name='Comments', blank=True)),
],
options={
'verbose_name': 'Excluded Email',
'verbose_name_plural': 'Excluded Emails',
},
),
migrations.CreateModel(
name='Image',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('created', models.DateTimeField(auto_now_add=True)),
('modified', models.DateTimeField(auto_now=True)),
('name', models.CharField(help_text='Name of the campaign.', max_length=150, verbose_name='Name')),
('slug', models.SlugField(unique=True, max_length=255)),
('file', models.ImageField(help_text='Image file', upload_to=b'cartero/images/', verbose_name='Image File')),
('site', models.ForeignKey(default=1, verbose_name='Site', to='sites.Site')),
],
options={
'verbose_name': 'Image',
'verbose_name_plural': 'Images',
},
),
migrations.CreateModel(
name='LinkClick',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('created', models.DateTimeField(auto_now_add=True)),
('modified', models.DateTimeField(auto_now=True)),
('ip_address', models.GenericIPAddressField(null=True, verbose_name='IP Address', db_index=True)),
('campaign', models.ForeignKey(verbose_name='Campaign', to='cartero.Campaign')),
],
options={
'verbose_name': 'Link Click',
'verbose_name_plural': 'Link Clicks',
},
),
migrations.CreateModel(
name='MailTracks',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('created', models.DateTimeField(auto_now_add=True)),
('campaign', models.ForeignKey(verbose_name='Campaign', to='cartero.Campaign')),
('contact', models.ForeignKey(verbose_name='Contact', to='cartero.Contact')),
],
options={
'verbose_name': 'Mail Track',
'verbose_name_plural': 'Mail Tracks',
},
),
migrations.CreateModel(
name='OpenEmail',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('created', models.DateTimeField(auto_now_add=True)),
('modified', models.DateTimeField(auto_now=True)),
('ip_address', models.GenericIPAddressField(null=True, verbose_name='IP Address', db_index=True)),
('campaign', models.ForeignKey(verbose_name='Campaign', to='cartero.Campaign')),
('contact', models.ForeignKey(verbose_name='Contact', to='cartero.Contact')),
],
options={
'verbose_name': 'Open Mail',
'verbose_name_plural': 'Open Mails',
},
),
migrations.CreateModel(
name='ShortURL',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('created', models.DateTimeField(auto_now_add=True)),
('modified', models.DateTimeField(auto_now=True)),
('url', models.CharField(max_length=255, verbose_name='URL', db_index=True)),
('code', models.CharField(unique=True, max_length=75, verbose_name='Code', db_index=True)),
],
options={
'verbose_name': 'Short URL',
'verbose_name_plural': 'Short URLs',
},
),
migrations.AddField(
model_name='linkclick',
name='url',
field=models.ForeignKey(verbose_name='url', to='cartero.ShortURL'),
),
migrations.AddField(
model_name='campaign',
name='contacts',
field=models.ManyToManyField(help_text='Contacts to send the emails.', to='cartero.Contact', verbose_name='Contacts', blank=True),
),
migrations.AddField(
model_name='campaign',
name='email_template',
field=models.ForeignKey(verbose_name='Email template', to='cartero.EmailTemplate'),
),
migrations.AddField(
model_name='campaign',
name='site',
field=models.ForeignKey(default=1, verbose_name='Site', to='sites.Site'),
),
]
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Contact.testing'
db.add_column('cartero_contact', 'testing',
self.gf('django.db.models.fields.BooleanField')(default=False),
keep_default=False)
def backwards(self, orm):
# Deleting field 'Contact.testing'
db.delete_column('cartero_contact', 'testing')
models = {
'cartero.campaign': {
'Meta': {'object_name': 'Campaign'},
'contacts': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['cartero.Contact']", 'symmetrical': 'False', 'blank': 'True'}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'email_template': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cartero.EmailTemplate']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '150'}),
'reply_to': ('django.db.models.fields.CharField', [], {'max_length': '150', 'blank': 'True'}),
'sent': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}),
'subject': ('django.db.models.fields.CharField', [], {'max_length': '150'})
},
'cartero.contact': {
'Meta': {'object_name': 'Contact'},
'bounced': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'data': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '200'}),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '150'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '150'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'sent': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}),
'testing': ('django.db.models.fields.BooleanField', [], {'default': 'False'})
},
'cartero.emailtemplate': {
'Meta': {'object_name': 'EmailTemplate'},
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'html': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '150'}),
'plain': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}),
'template': ('django.db.models.fields.FilePathField', [], {'path': "'/home/antares/paginas_web/adcxml/cartero/templates/cartero/'", 'max_length': '255', 'match': "'*.html'"})
},
'sites.site': {
'Meta': {'ordering': "('domain',)", 'object_name': 'Site', 'db_table': "'django_site'"},
'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
}
}
complete_apps = ['cartero']
\ No newline at end of file
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Campaign.start'
db.add_column('cartero_campaign', 'start',
self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2013, 1, 25, 0, 0)),
keep_default=False)
# Changing field 'EmailTemplate.template'
db.alter_column('cartero_emailtemplate', 'template', self.gf('django.db.models.fields.FilePathField')(path='/home/antares/paginas_web/adcxml/cartero/templates/cartero/', max_length=255, match='\\.html$'))
def backwards(self, orm):
# Deleting field 'Campaign.start'
db.delete_column('cartero_campaign', 'start')
# Changing field 'EmailTemplate.template'
db.alter_column('cartero_emailtemplate', 'template', self.gf('django.db.models.fields.FilePathField')(path='/home/antares/paginas_web/adcxml/cartero/templates/cartero/', max_length=255, match='*.html'))
models = {
'cartero.campaign': {
'Meta': {'object_name': 'Campaign'},
'contacts': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['cartero.Contact']", 'symmetrical': 'False', 'blank': 'True'}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'email_template': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cartero.EmailTemplate']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '150'}),
'reply_to': ('django.db.models.fields.CharField', [], {'max_length': '150', 'blank': 'True'}),
'sent': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}),
'start': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2013, 1, 25, 0, 0)'}),
'subject': ('django.db.models.fields.CharField', [], {'max_length': '150'})
},
'cartero.contact': {
'Meta': {'object_name': 'Contact'},
'bounced': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'data': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '200'}),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '150'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '150'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'sent': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}),
'testing': ('django.db.models.fields.BooleanField', [], {'default': 'False'})
},
'cartero.emailtemplate': {
'Meta': {'object_name': 'EmailTemplate'},
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'html': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '150'}),
'plain': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}),
'template': ('django.db.models.fields.FilePathField', [], {'path': "'/home/antares/paginas_web/adcxml/cartero/templates/cartero/'", 'max_length': '255', 'match': "'\\\\.html$'"})
},
'sites.site': {
'Meta': {'ordering': "('domain',)", 'object_name': 'Site', 'db_table': "'django_site'"},
'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
}
}
complete_apps = ['cartero']
\ No newline at end of file
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'EmailTemplate.context'
db.add_column('cartero_emailtemplate', 'context',
self.gf('django.db.models.fields.TextField')(default='', blank=True),
keep_default=False)
def backwards(self, orm):
# Deleting field 'EmailTemplate.context'
db.delete_column('cartero_emailtemplate', 'context')
models = {
'cartero.campaign': {
'Meta': {'object_name': 'Campaign'},
'contacts': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['cartero.Contact']", 'symmetrical': 'False', 'blank': 'True'}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'email_template': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cartero.EmailTemplate']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '150'}),
'reply_to': ('django.db.models.fields.CharField', [], {'max_length': '150', 'blank': 'True'}),
'sent': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}),
'start': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2013, 1, 25, 0, 0)'}),
'subject': ('django.db.models.fields.CharField', [], {'max_length': '150'})
},
'cartero.contact': {
'Meta': {'object_name': 'Contact'},
'bounced': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'data': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '200'}),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '150'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '150'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'sent': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}),
'testing': ('django.db.models.fields.BooleanField', [], {'default': 'False'})
},
'cartero.emailtemplate': {
'Meta': {'object_name': 'EmailTemplate'},
'context': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'html': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '150'}),
'plain': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}),
'template': ('django.db.models.fields.FilePathField', [], {'path': "'/home/antares/paginas_web/adcxml/cartero/templates/cartero/'", 'max_length': '255', 'match': "'\\\\.html$'"})
},
'sites.site': {
'Meta': {'ordering': "('domain',)", 'object_name': 'Site', 'db_table': "'django_site'"},
'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
}
}
complete_apps = ['cartero']
\ No newline at end of file
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Campaign.ready'
db.add_column('cartero_campaign', 'ready',
self.gf('django.db.models.fields.BooleanField')(default=False),
keep_default=False)
def backwards(self, orm):
# Deleting field 'Campaign.ready'
db.delete_column('cartero_campaign', 'ready')
models = {
'cartero.campaign': {
'Meta': {'object_name': 'Campaign'},
'contacts': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['cartero.Contact']", 'symmetrical': 'False', 'blank': 'True'}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'email_template': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cartero.EmailTemplate']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),