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 'Location'
12 db.create_table('julian_location', (
13 ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
14 ('name', self.gf('django.db.models.fields.CharField')(max_length=255)),
16 db.send_create_signal('julian', ['Location'])
18 # Adding model 'Event'
19 db.create_table('julian_event', (
20 ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
21 ('start_date', self.gf('django.db.models.fields.DateField')()),
22 ('start_time', self.gf('django.db.models.fields.TimeField')(null=True, blank=True)),
23 ('end_date', self.gf('django.db.models.fields.DateField')()),
24 ('end_time', self.gf('django.db.models.fields.TimeField')(null=True, blank=True)),
25 ('name', self.gf('django.db.models.fields.CharField')(max_length=255)),
26 ('slug', self.gf('django.db.models.fields.SlugField')(max_length=255, db_index=True)),
27 ('location_content_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['contenttypes.ContentType'])),
28 ('location_pk', self.gf('django.db.models.fields.TextField')()),
29 ('description', self.gf('philo.models.fields.TemplateField')()),
30 ('parent_event', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['julian.Event'], null=True, blank=True)),
31 ('owner', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])),
33 db.send_create_signal('julian', ['Event'])
35 # Adding M2M table for field tags on 'Event'
36 db.create_table('julian_event_tags', (
37 ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
38 ('event', models.ForeignKey(orm['julian.event'], null=False)),
39 ('tag', models.ForeignKey(orm['philo.tag'], null=False))
41 db.create_unique('julian_event_tags', ['event_id', 'tag_id'])
43 # Adding model 'Calendar'
44 db.create_table('julian_calendar', (
45 ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
46 ('name', self.gf('django.db.models.fields.CharField')(max_length=100)),
47 ('uuid', self.gf('django.db.models.fields.CharField')(unique=True, max_length=100)),
49 db.send_create_signal('julian', ['Calendar'])
51 # Adding M2M table for field events on 'Calendar'
52 db.create_table('julian_calendar_events', (
53 ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
54 ('calendar', models.ForeignKey(orm['julian.calendar'], null=False)),
55 ('event', models.ForeignKey(orm['julian.event'], null=False))
57 db.create_unique('julian_calendar_events', ['calendar_id', 'event_id'])
60 def backwards(self, orm):
62 # Deleting model 'Location'
63 db.delete_table('julian_location')
65 # Deleting model 'Event'
66 db.delete_table('julian_event')
68 # Removing M2M table for field tags on 'Event'
69 db.delete_table('julian_event_tags')
71 # Deleting model 'Calendar'
72 db.delete_table('julian_calendar')
74 # Removing M2M table for field events on 'Calendar'
75 db.delete_table('julian_calendar_events')
80 'Meta': {'object_name': 'Group'},
81 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
82 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
83 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
86 'Meta': {'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
87 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
88 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
89 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
90 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
93 'Meta': {'object_name': 'User'},
94 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
95 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
96 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
97 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
98 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
99 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
100 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
101 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
102 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
103 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
104 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
105 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
106 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
108 'contenttypes.contenttype': {
109 'Meta': {'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
110 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
111 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
112 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
113 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
116 'Meta': {'object_name': 'Calendar'},
117 'events': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'calendars'", 'symmetrical': 'False', 'to': "orm['julian.Event']"}),
118 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
119 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
120 'uuid': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'})
123 'Meta': {'object_name': 'Event'},
124 'description': ('philo.models.fields.TemplateField', [], {}),
125 'end_date': ('django.db.models.fields.DateField', [], {}),
126 'end_time': ('django.db.models.fields.TimeField', [], {'null': 'True', 'blank': 'True'}),
127 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
128 'location_content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
129 'location_pk': ('django.db.models.fields.TextField', [], {}),
130 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
131 'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}),
132 'parent_event': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['julian.Event']", 'null': 'True', 'blank': 'True'}),
133 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '255', 'db_index': 'True'}),
134 'start_date': ('django.db.models.fields.DateField', [], {}),
135 'start_time': ('django.db.models.fields.TimeField', [], {'null': 'True', 'blank': 'True'}),
136 'tags': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['philo.Tag']", 'null': 'True', 'blank': 'True'})
139 'Meta': {'object_name': 'Location'},
140 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
141 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'})
144 'Meta': {'unique_together': "(('key', 'entity_content_type', 'entity_object_id'), ('value_content_type', 'value_object_id'))", 'object_name': 'Attribute'},
145 'entity_content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attribute_entity_set'", 'to': "orm['contenttypes.ContentType']"}),
146 'entity_object_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
147 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
148 'key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
149 'value_content_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'attribute_value_set'", 'null': 'True', 'to': "orm['contenttypes.ContentType']"}),
150 'value_object_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'})
153 'Meta': {'object_name': 'Tag'},
154 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
155 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
156 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'})
160 complete_apps = ['julian']