Download raw (3.1 KB)
# -*- 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 M2M table for field individuals on 'Organization' db.create_table('people_organization_individuals', ( ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), ('organization', models.ForeignKey(orm['people.organization'], null=False)), ('individual', models.ForeignKey(orm['people.individual'], null=False)) )) db.create_unique('people_organization_individuals', ['organization_id', 'individual_id']) def backwards(self, orm): # Removing M2M table for field individuals on 'Organization' db.delete_table('people_organization_individuals') models = { 'people.individual': { 'Meta': {'object_name': 'Individual', '_ormbases': ['people.People']}, 'firstname': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), 'people_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['people.People']", 'unique': 'True', 'primary_key': 'True'}) }, 'people.organization': { 'Meta': {'object_name': 'Organization', '_ormbases': ['people.People']}, 'contact_person': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'contact_person'", 'null': 'True', 'to': "orm['people.Individual']"}), 'individuals': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'individual_set'", 'symmetrical': 'False', 'to': "orm['people.Individual']"}), 'people_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['people.People']", 'unique': 'True', 'primary_key': 'True'}) }, 'people.people': { 'Meta': {'object_name': 'People'}, 'address': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), 'biography': ('django.db.models.fields.TextField', [], {'blank': 'True'}), 'city': ('django.db.models.fields.CharField', [], {'max_length': '80', 'null': 'True', 'blank': 'True'}), 'email': ('django.db.models.fields.EmailField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'link': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), 'phone': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}), 'prefix': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}) } } complete_apps = ['people']