Source

superwiki / superwiki / migrations / 0001_initial.py

Full commit
# -*- coding: utf-8 -*-

from south.db import db
from django.db import models
from superwiki.models import *

class Migration:
    
    def forwards(self, orm):
        
        # Adding model 'WikiPage'
        db.create_table('wiki', (
            ('body', orm['superwiki.WikiPage:body']),
            ('author', orm['superwiki.WikiPage:author']),
            ('url', orm['superwiki.WikiPage:url']),
            ('rendered_body', orm['superwiki.WikiPage:rendered_body']),
            ('object_id', orm['superwiki.WikiPage:object_id']),
            ('created', orm['superwiki.WikiPage:created']),
            ('content_type', orm['superwiki.WikiPage:content_type']),
            ('id', orm['superwiki.WikiPage:id']),
        ))
        db.send_create_signal('wiki', ['WikiPage'])
        
        # Creating unique_together for [object_id, content_type, url] on WikiPage.
        db.create_unique('wiki', ['object_id', 'content_type_id', 'url'])
        
    
    
    def backwards(self, orm):
        
        # Deleting model 'WikiPage'
        db.delete_table('wiki')
        
        # Deleting unique_together for [object_id, content_type, url] on WikiPage.
        db.delete_unique('wiki', ['object_id', 'content_type_id', 'url'])
        
    
    
    models = {
        'auth.user': {
            'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2009, 7, 7, 15, 58, 56, 72220)'}),
            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
            'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'blank': 'True'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
            'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
            'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
            'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2009, 7, 7, 15, 58, 56, 72100)'}),
            'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
            'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
            'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'blank': 'True'}),
            'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
        },
        'auth.group': {
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
            'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'blank': 'True'})
        },
        'contenttypes.contenttype': {
            'Meta': {'unique_together': "(('app_label', 'model'),)", 'db_table': "'django_content_type'"},
            'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
        },
        'auth.permission': {
            'Meta': {'unique_together': "(('content_type', 'codename'),)"},
            'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
            'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
        },
        'superwiki.wikipage': {
            'Meta': {'unique_together': "(('object_id', 'content_type', 'url'),)", 'db_table': "'wiki'"},
            'author': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}),
            'body': ('django.db.models.fields.TextField', [], {}),
            'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}),
            'rendered_body': ('django.db.models.fields.TextField', [], {}),
            'url': ('django.db.models.fields.CharField', [], {'max_length': '100'})
        }
    }
    
    complete_apps = ['superwiki']