3 from south.db import db
4 from south.v2 import SchemaMigration
5 from django.db import models
7 class Migration(SchemaMigration):
9 def forwards(self, orm):
11 # Adding model 'Change'
12 db.create_table('dvcs_change', (
13 ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
14 ('author', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True, blank=True)),
15 ('patch', self.gf('django.db.models.fields.TextField')(blank=True)),
16 ('tree', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['dvcs.Document'])),
17 ('parent', self.gf('django.db.models.fields.related.ForeignKey')(default=None, related_name='children', null=True, blank=True, to=orm['dvcs.Change'])),
18 ('merge_parent', self.gf('django.db.models.fields.related.ForeignKey')(default=None, related_name='merge_children', null=True, blank=True, to=orm['dvcs.Change'])),
19 ('description', self.gf('django.db.models.fields.TextField')(default='', blank=True)),
20 ('created_at', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
22 db.send_create_signal('dvcs', ['Change'])
24 # Adding model 'Document'
25 db.create_table('dvcs_document', (
26 ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
27 ('creator', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True, blank=True)),
28 ('head', self.gf('django.db.models.fields.related.ForeignKey')(default=None, to=orm['dvcs.Change'], null=True, blank=True)),
30 db.send_create_signal('dvcs', ['Document'])
33 def backwards(self, orm):
35 # Deleting model 'Change'
36 db.delete_table('dvcs_change')
38 # Deleting model 'Document'
39 db.delete_table('dvcs_document')
44 'Meta': {'object_name': 'Group'},
45 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
46 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
47 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
50 'Meta': {'ordering': "('content_type__app_label', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
51 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
52 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
53 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
54 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
57 'Meta': {'object_name': 'User'},
58 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
59 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
60 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
61 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
62 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
63 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
64 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
65 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
66 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
67 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
68 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
69 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
70 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
72 'contenttypes.contenttype': {
73 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
74 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
75 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
76 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
77 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
80 'Meta': {'ordering': "('created_at',)", 'object_name': 'Change'},
81 'author': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}),
82 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
83 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
84 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
85 'merge_parent': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'merge_children'", 'null': 'True', 'blank': 'True', 'to': "orm['dvcs.Change']"}),
86 'parent': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'children'", 'null': 'True', 'blank': 'True', 'to': "orm['dvcs.Change']"}),
87 'patch': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
88 'tree': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['dvcs.Document']"})
91 'Meta': {'object_name': 'Document'},
92 'creator': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}),
93 'head': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['dvcs.Change']", 'null': 'True', 'blank': 'True'}),
94 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
98 complete_apps = ['dvcs']