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 'Search'
12 db.create_table('sobol_search', (
13 ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
14 ('string', self.gf('django.db.models.fields.TextField')()),
16 db.send_create_signal('sobol', ['Search'])
18 # Adding model 'ResultURL'
19 db.create_table('sobol_resulturl', (
20 ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
21 ('search', self.gf('django.db.models.fields.related.ForeignKey')(related_name='result_urls', to=orm['sobol.Search'])),
22 ('url', self.gf('django.db.models.fields.TextField')()),
24 db.send_create_signal('sobol', ['ResultURL'])
26 # Adding model 'Click'
27 db.create_table('sobol_click', (
28 ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
29 ('result', self.gf('django.db.models.fields.related.ForeignKey')(related_name='clicks', to=orm['sobol.ResultURL'])),
30 ('datetime', self.gf('django.db.models.fields.DateTimeField')()),
32 db.send_create_signal('sobol', ['Click'])
34 # Adding model 'SearchView'
35 db.create_table('sobol_searchview', (
36 ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
37 ('results_page', self.gf('django.db.models.fields.related.ForeignKey')(related_name='search_results_related', to=orm['philo.Page'])),
38 ('searches', self.gf('philo.models.fields.SlugMultipleChoiceField')()),
39 ('enable_ajax_api', self.gf('django.db.models.fields.BooleanField')(default=True)),
40 ('placeholder_text', self.gf('django.db.models.fields.CharField')(default='Search', max_length=75)),
42 db.send_create_signal('sobol', ['SearchView'])
45 def backwards(self, orm):
47 # Deleting model 'Search'
48 db.delete_table('sobol_search')
50 # Deleting model 'ResultURL'
51 db.delete_table('sobol_resulturl')
53 # Deleting model 'Click'
54 db.delete_table('sobol_click')
56 # Deleting model 'SearchView'
57 db.delete_table('sobol_searchview')
61 'contenttypes.contenttype': {
62 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
63 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
64 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
65 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
66 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
69 'Meta': {'unique_together': "(('key', 'entity_content_type', 'entity_object_id'), ('value_content_type', 'value_object_id'))", 'object_name': 'Attribute'},
70 'entity_content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attribute_entity_set'", 'to': "orm['contenttypes.ContentType']"}),
71 'entity_object_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
72 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
73 'key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
74 'value_content_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'attribute_value_set'", 'null': 'True', 'to': "orm['contenttypes.ContentType']"}),
75 'value_object_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'})
78 'Meta': {'object_name': 'Node'},
79 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
80 'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
81 'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
82 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['philo.Node']"}),
83 'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
84 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '255', 'db_index': 'True'}),
85 'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
86 'view_content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'node_view_set'", 'to': "orm['contenttypes.ContentType']"}),
87 'view_object_id': ('django.db.models.fields.PositiveIntegerField', [], {})
90 'Meta': {'object_name': 'Page'},
91 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
92 'template': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'pages'", 'to': "orm['philo.Template']"}),
93 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
96 'Meta': {'object_name': 'Template'},
97 'code': ('philo.models.fields.TemplateField', [], {}),
98 'documentation': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
99 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
100 'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
101 'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
102 'mimetype': ('django.db.models.fields.CharField', [], {'default': "'text/html'", 'max_length': '255'}),
103 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
104 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['philo.Template']"}),
105 'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
106 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '255', 'db_index': 'True'}),
107 'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'})
110 'Meta': {'ordering': "['datetime']", 'object_name': 'Click'},
111 'datetime': ('django.db.models.fields.DateTimeField', [], {}),
112 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
113 'result': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'clicks'", 'to': "orm['sobol.ResultURL']"})
116 'Meta': {'ordering': "['url']", 'object_name': 'ResultURL'},
117 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
118 'search': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'result_urls'", 'to': "orm['sobol.Search']"}),
119 'url': ('django.db.models.fields.TextField', [], {})
122 'Meta': {'ordering': "['string']", 'object_name': 'Search'},
123 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
124 'string': ('django.db.models.fields.TextField', [], {})
126 'sobol.searchview': {
127 'Meta': {'object_name': 'SearchView'},
128 'enable_ajax_api': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
129 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
130 'placeholder_text': ('django.db.models.fields.CharField', [], {'default': "'Search'", 'max_length': '75'}),
131 'results_page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'search_results_related'", 'to': "orm['philo.Page']"}),
132 'searches': ('philo.models.fields.SlugMultipleChoiceField', [], {})
136 complete_apps = ['sobol']