Source

django-petition / petition / migrations / 0001_initial.py

Full commit
# -*- 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 'Signature'
        db.create_table('petition_signature', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('first_name', self.gf('django.db.models.fields.CharField')(max_length=60)),
            ('last_name', self.gf('django.db.models.fields.CharField')(max_length=60)),
            ('email', self.gf('django.db.models.fields.EmailField')(max_length=75)),
            ('state', self.gf('django.db.models.fields.CharField')(max_length=40)),
            ('country', self.gf('petition.fields.CountryField')(default='US', max_length=2)),
            ('date_signed', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
        ))
        db.send_create_signal('petition', ['Signature'])


    def backwards(self, orm):
        # Deleting model 'Signature'
        db.delete_table('petition_signature')


    models = {
        'petition.signature': {
            'Meta': {'object_name': 'Signature'},
            'country': ('petition.fields.CountryField', [], {'default': "'US'", 'max_length': '2'}),
            'date_signed': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75'}),
            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '60'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'last_name': ('django.db.models.fields.CharField', [], {'max_length': '60'}),
            'state': ('django.db.models.fields.CharField', [], {'max_length': '40'})
        }
    }

    complete_apps = ['petition']