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):
12 db.create_table('dvcs_tag', (
13 ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
14 ('name', self.gf('django.db.models.fields.CharField')(max_length=64)),
15 ('slug', self.gf('django.db.models.fields.SlugField')(db_index=True, max_length=64, unique=True, null=True, blank=True)),
16 ('ordering', self.gf('django.db.models.fields.IntegerField')()),
18 db.send_create_signal('dvcs', ['Tag'])
20 # Adding M2M table for field tags on 'Change'
21 db.create_table('dvcs_change_tags', (
22 ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
23 ('change', models.ForeignKey(orm['dvcs.change'], null=False)),
24 ('tag', models.ForeignKey(orm['dvcs.tag'], null=False))
26 db.create_unique('dvcs_change_tags', ['change_id', 'tag_id'])
29 def backwards(self, orm):
31 # Deleting model 'Tag'
32 db.delete_table('dvcs_tag')
34 # Removing M2M table for field tags on 'Change'
35 db.delete_table('dvcs_change_tags')
40 'Meta': {'object_name': 'Group'},
41 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
42 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
43 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
46 'Meta': {'ordering': "('content_type__app_label', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
47 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
48 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
49 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
50 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
53 'Meta': {'object_name': 'User'},
54 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
55 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
56 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
57 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
58 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
59 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
60 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
61 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
62 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
63 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
64 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
65 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
66 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
68 'contenttypes.contenttype': {
69 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
70 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
71 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
72 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
73 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
76 'Meta': {'ordering': "('created_at',)", 'unique_together': "(['tree', 'revision'],)", 'object_name': 'Change'},
77 'author': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}),
78 'author_desc': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}),
79 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'db_index': 'True'}),
80 'description': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
81 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
82 'merge_parent': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'merge_children'", 'null': 'True', 'blank': 'True', 'to': "orm['dvcs.Change']"}),
83 'parent': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'children'", 'null': 'True', 'blank': 'True', 'to': "orm['dvcs.Change']"}),
84 'patch': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
85 'revision': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}),
86 'tags': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['dvcs.Tag']", 'symmetrical': 'False'}),
87 'tree': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['dvcs.Document']"})
90 'Meta': {'object_name': 'Document'},
91 'creator': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}),
92 'head': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['dvcs.Change']", 'null': 'True', 'blank': 'True'}),
93 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
96 'Meta': {'ordering': "['ordering']", 'object_name': 'Tag'},
97 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
98 'name': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
99 'ordering': ('django.db.models.fields.IntegerField', [], {}),
100 'slug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '64', 'unique': 'True', 'null': 'True', 'blank': 'True'})
104 complete_apps = ['dvcs']