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)),
15 ('slug', self.gf('django.db.models.fields.SlugField')(unique=True, max_length=255, db_index=True)),
17 db.send_create_signal('julian', ['Location'])
19 # Adding model 'Event'
20 db.create_table('julian_event', (
21 ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
22 ('start_date', self.gf('django.db.models.fields.DateField')()),
23 ('start_time', self.gf('django.db.models.fields.TimeField')(null=True, blank=True)),
24 ('end_date', self.gf('django.db.models.fields.DateField')()),
25 ('end_time', self.gf('django.db.models.fields.TimeField')(null=True, blank=True)),
26 ('name', self.gf('django.db.models.fields.CharField')(max_length=255)),
27 ('slug', self.gf('django.db.models.fields.SlugField')(max_length=255, db_index=True)),
28 ('location_content_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['contenttypes.ContentType'], null=True, blank=True)),
29 ('location_pk', self.gf('django.db.models.fields.TextField')(blank=True)),
30 ('description', self.gf('philo.models.fields.TemplateField')()),
31 ('parent_event', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['julian.Event'], null=True, blank=True)),
32 ('owner', self.gf('django.db.models.fields.related.ForeignKey')(related_name='owned_events', to=orm['auth.User'])),
33 ('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
34 ('last_modified', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)),
35 ('site', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['sites.Site'])),
37 db.send_create_signal('julian', ['Event'])
39 # Adding unique constraint on 'Event', fields ['site', 'created']
40 db.create_unique('julian_event', ['site_id', 'created'])
42 # Adding M2M table for field tags on 'Event'
43 db.create_table('julian_event_tags', (
44 ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
45 ('event', models.ForeignKey(orm['julian.event'], null=False)),
46 ('tag', models.ForeignKey(orm['philo.tag'], null=False))
48 db.create_unique('julian_event_tags', ['event_id', 'tag_id'])
50 # Adding model 'Calendar'
51 db.create_table('julian_calendar', (
52 ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
53 ('name', self.gf('django.db.models.fields.CharField')(max_length=100)),
54 ('slug', self.gf('django.db.models.fields.SlugField')(max_length=100, db_index=True)),
55 ('description', self.gf('django.db.models.fields.TextField')(blank=True)),
56 ('site', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['sites.Site'])),
57 ('language', self.gf('django.db.models.fields.CharField')(default='en', max_length=5)),
59 db.send_create_signal('julian', ['Calendar'])
61 # Adding unique constraint on 'Calendar', fields ['name', 'site', 'language']
62 db.create_unique('julian_calendar', ['name', 'site_id', 'language'])
64 # Adding M2M table for field events on 'Calendar'
65 db.create_table('julian_calendar_events', (
66 ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
67 ('calendar', models.ForeignKey(orm['julian.calendar'], null=False)),
68 ('event', models.ForeignKey(orm['julian.event'], null=False))
70 db.create_unique('julian_calendar_events', ['calendar_id', 'event_id'])
72 # Adding model 'CalendarView'
73 db.create_table('julian_calendarview', (
74 ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
75 ('feed_type', self.gf('django.db.models.fields.CharField')(default='text/calendar', max_length=50)),
76 ('feed_suffix', self.gf('django.db.models.fields.CharField')(default='feed', max_length=255)),
77 ('feeds_enabled', self.gf('django.db.models.fields.BooleanField')(default=True)),
78 ('feed_length', self.gf('django.db.models.fields.PositiveIntegerField')(default=15, null=True, blank=True)),
79 ('item_title_template', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='julian_calendarview_title_related', null=True, to=orm['philo.Template'])),
80 ('item_description_template', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='julian_calendarview_description_related', null=True, to=orm['philo.Template'])),
81 ('calendar', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['julian.Calendar'])),
82 ('index_page', self.gf('django.db.models.fields.related.ForeignKey')(related_name='calendar_index_related', to=orm['philo.Page'])),
83 ('event_detail_page', self.gf('django.db.models.fields.related.ForeignKey')(related_name='calendar_detail_related', to=orm['philo.Page'])),
84 ('timespan_page', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='calendar_timespan_related', null=True, to=orm['philo.Page'])),
85 ('tag_page', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='calendar_tag_related', null=True, to=orm['philo.Page'])),
86 ('location_page', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='calendar_location_related', null=True, to=orm['philo.Page'])),
87 ('owner_page', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='calendar_owner_related', null=True, to=orm['philo.Page'])),
88 ('tag_archive_page', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='calendar_tag_archive_related', null=True, to=orm['philo.Page'])),
89 ('location_archive_page', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='calendar_location_archive_related', null=True, to=orm['philo.Page'])),
90 ('owner_archive_page', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='calendar_owner_archive_related', null=True, to=orm['philo.Page'])),
91 ('tag_permalink_base', self.gf('django.db.models.fields.CharField')(default='tags', max_length=30)),
92 ('owner_permalink_base', self.gf('django.db.models.fields.CharField')(default='owners', max_length=30)),
93 ('location_permalink_base', self.gf('django.db.models.fields.CharField')(default='locations', max_length=30)),
94 ('events_per_page', self.gf('django.db.models.fields.PositiveIntegerField')(null=True, blank=True)),
96 db.send_create_signal('julian', ['CalendarView'])
99 def backwards(self, orm):
101 # Removing unique constraint on 'Calendar', fields ['name', 'site', 'language']
102 db.delete_unique('julian_calendar', ['name', 'site_id', 'language'])
104 # Removing unique constraint on 'Event', fields ['site', 'created']
105 db.delete_unique('julian_event', ['site_id', 'created'])
107 # Deleting model 'Location'
108 db.delete_table('julian_location')
110 # Deleting model 'Event'
111 db.delete_table('julian_event')
113 # Removing M2M table for field tags on 'Event'
114 db.delete_table('julian_event_tags')
116 # Deleting model 'Calendar'
117 db.delete_table('julian_calendar')
119 # Removing M2M table for field events on 'Calendar'
120 db.delete_table('julian_calendar_events')
122 # Deleting model 'CalendarView'
123 db.delete_table('julian_calendarview')
128 'Meta': {'object_name': 'Group'},
129 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
130 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
131 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
134 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
135 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
136 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
137 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
138 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
141 'Meta': {'object_name': 'User'},
142 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
143 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
144 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
145 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
146 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
147 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
148 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
149 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
150 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
151 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
152 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
153 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
154 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
156 'contenttypes.contenttype': {
157 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
158 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
159 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
160 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
161 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
164 'Meta': {'unique_together': "(('name', 'site', 'language'),)", 'object_name': 'Calendar'},
165 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
166 'events': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'calendars'", 'blank': 'True', 'to': "orm['julian.Event']"}),
167 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
168 'language': ('django.db.models.fields.CharField', [], {'default': "'en'", 'max_length': '5'}),
169 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
170 'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}),
171 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '100', 'db_index': 'True'})
173 'julian.calendarview': {
174 'Meta': {'object_name': 'CalendarView'},
175 'calendar': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['julian.Calendar']"}),
176 'event_detail_page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'calendar_detail_related'", 'to': "orm['philo.Page']"}),
177 'events_per_page': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
178 'feed_length': ('django.db.models.fields.PositiveIntegerField', [], {'default': '15', 'null': 'True', 'blank': 'True'}),
179 'feed_suffix': ('django.db.models.fields.CharField', [], {'default': "'feed'", 'max_length': '255'}),
180 'feed_type': ('django.db.models.fields.CharField', [], {'default': "'text/calendar'", 'max_length': '50'}),
181 'feeds_enabled': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
182 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
183 'index_page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'calendar_index_related'", 'to': "orm['philo.Page']"}),
184 'item_description_template': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'julian_calendarview_description_related'", 'null': 'True', 'to': "orm['philo.Template']"}),
185 'item_title_template': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'julian_calendarview_title_related'", 'null': 'True', 'to': "orm['philo.Template']"}),
186 'location_archive_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'calendar_location_archive_related'", 'null': 'True', 'to': "orm['philo.Page']"}),
187 'location_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'calendar_location_related'", 'null': 'True', 'to': "orm['philo.Page']"}),
188 'location_permalink_base': ('django.db.models.fields.CharField', [], {'default': "'locations'", 'max_length': '30'}),
189 'owner_archive_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'calendar_owner_archive_related'", 'null': 'True', 'to': "orm['philo.Page']"}),
190 'owner_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'calendar_owner_related'", 'null': 'True', 'to': "orm['philo.Page']"}),
191 'owner_permalink_base': ('django.db.models.fields.CharField', [], {'default': "'owners'", 'max_length': '30'}),
192 'tag_archive_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'calendar_tag_archive_related'", 'null': 'True', 'to': "orm['philo.Page']"}),
193 'tag_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'calendar_tag_related'", 'null': 'True', 'to': "orm['philo.Page']"}),
194 'tag_permalink_base': ('django.db.models.fields.CharField', [], {'default': "'tags'", 'max_length': '30'}),
195 'timespan_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'calendar_timespan_related'", 'null': 'True', 'to': "orm['philo.Page']"})
198 'Meta': {'unique_together': "(('site', 'created'),)", 'object_name': 'Event'},
199 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
200 'description': ('philo.models.fields.TemplateField', [], {}),
201 'end_date': ('django.db.models.fields.DateField', [], {}),
202 'end_time': ('django.db.models.fields.TimeField', [], {'null': 'True', 'blank': 'True'}),
203 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
204 'last_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
205 'location_content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']", 'null': 'True', 'blank': 'True'}),
206 'location_pk': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
207 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
208 'owner': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'owned_events'", 'to': "orm['auth.User']"}),
209 'parent_event': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['julian.Event']", 'null': 'True', 'blank': 'True'}),
210 'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}),
211 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '255', 'db_index': 'True'}),
212 'start_date': ('django.db.models.fields.DateField', [], {}),
213 'start_time': ('django.db.models.fields.TimeField', [], {'null': 'True', 'blank': 'True'}),
214 'tags': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'events'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['philo.Tag']"})
217 'Meta': {'object_name': 'Location'},
218 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
219 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
220 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'})
223 'Meta': {'unique_together': "(('key', 'entity_content_type', 'entity_object_id'), ('value_content_type', 'value_object_id'))", 'object_name': 'Attribute'},
224 'entity_content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attribute_entity_set'", 'to': "orm['contenttypes.ContentType']"}),
225 'entity_object_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
226 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
227 'key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
228 'value_content_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'attribute_value_set'", 'null': 'True', 'to': "orm['contenttypes.ContentType']"}),
229 'value_object_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'})
232 'Meta': {'object_name': 'Node'},
233 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
234 'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
235 'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
236 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['philo.Node']"}),
237 'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
238 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '255', 'db_index': 'True'}),
239 'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
240 'view_content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'node_view_set'", 'to': "orm['contenttypes.ContentType']"}),
241 'view_object_id': ('django.db.models.fields.PositiveIntegerField', [], {})
244 'Meta': {'object_name': 'Page'},
245 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
246 'template': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'pages'", 'to': "orm['philo.Template']"}),
247 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
250 'Meta': {'ordering': "('name',)", 'object_name': 'Tag'},
251 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
252 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
253 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'})
256 'Meta': {'object_name': 'Template'},
257 'code': ('philo.models.fields.TemplateField', [], {}),
258 'documentation': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
259 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
260 'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
261 'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
262 'mimetype': ('django.db.models.fields.CharField', [], {'default': "'text/html'", 'max_length': '255'}),
263 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
264 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['philo.Template']"}),
265 'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
266 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '255', 'db_index': 'True'}),
267 'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'})
270 'Meta': {'ordering': "('domain',)", 'object_name': 'Site', 'db_table': "'django_site'"},
271 'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
272 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
273 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
274 'root_node': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'sites'", 'null': 'True', 'to': "orm['philo.Node']"})
278 complete_apps = ['julian']