| author | rougeronj |
| Tue, 24 Mar 2015 12:16:06 +0100 | |
| changeset 578 | 03d4200ae809 |
| parent 266 | 825ff4d6a8ac |
| permissions | -rw-r--r-- |
|
119
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
1 |
# encoding: utf-8 |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
2 |
import datetime |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
3 |
from south.db import db |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
4 |
from south.v2 import SchemaMigration |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
5 |
from django.db import models |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
6 |
|
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
7 |
class Migration(SchemaMigration): |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
8 |
|
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
9 |
def forwards(self, orm): |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
10 |
|
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
11 |
# Deleting field 'TagYears.end_yar' |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
12 |
db.delete_column('hdalab_tagyears', 'end_yar') |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
13 |
|
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
14 |
# Adding field 'TagYears.end_year' |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
15 |
db.add_column('hdalab_tagyears', 'end_year', self.gf('django.db.models.fields.IntegerField')(default=2012, db_index=True), keep_default=False) |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
16 |
|
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
17 |
|
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
18 |
def backwards(self, orm): |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
19 |
|
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
20 |
# User chose to not deal with backwards NULL issues for 'TagYears.end_yar' |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
21 |
raise RuntimeError("Cannot reverse this migration. 'TagYears.end_yar' and its values cannot be restored.") |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
22 |
|
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
23 |
# Deleting field 'TagYears.end_year' |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
24 |
db.delete_column('hdalab_tagyears', 'end_year') |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
25 |
|
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
26 |
|
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
27 |
models = { |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
28 |
'hdabo.tag': { |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
29 |
'Meta': {'unique_together': "(('label', 'original_label', 'url_status'),)", 'object_name': 'Tag'}, |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
30 |
'alias': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'null': 'True', 'blank': 'True'}), |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
31 |
'alternative_label': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'null': 'True', 'blank': 'True'}), |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
32 |
'alternative_wikipedia_pageid': ('django.db.models.fields.BigIntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
33 |
'alternative_wikipedia_url': ('django.db.models.fields.URLField', [], {'db_index': 'True', 'max_length': '2048', 'null': 'True', 'blank': 'True'}), |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
34 |
'category': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['hdabo.TagCategory']", 'null': 'True', 'blank': 'True'}), |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
35 |
'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
36 |
'dbpedia_uri': ('django.db.models.fields.URLField', [], {'db_index': 'True', 'max_length': '2048', 'null': 'True', 'blank': 'True'}), |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
37 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
38 |
'label': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'db_index': 'True'}), |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
39 |
'normalized_label': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'db_index': 'True'}), |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
40 |
'original_label': ('django.db.models.fields.CharField', [], {'max_length': '1024'}), |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
41 |
'popularity': ('django.db.models.fields.IntegerField', [], {'default': '0', 'db_index': 'True'}), |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
42 |
'url_status': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
43 |
'wikipedia_pageid': ('django.db.models.fields.BigIntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
44 |
'wikipedia_url': ('django.db.models.fields.URLField', [], {'db_index': 'True', 'max_length': '2048', 'null': 'True', 'blank': 'True'}) |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
45 |
}, |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
46 |
'hdabo.tagcategory': { |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
47 |
'Meta': {'object_name': 'TagCategory'}, |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
48 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
49 |
'label': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '512'}) |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
50 |
}, |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
51 |
'hdalab.countrycode': { |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
52 |
'Meta': {'object_name': 'CountryCode'}, |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
53 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
54 |
'isocode': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '3', 'db_index': 'True'}), |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
55 |
'label': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '1024', 'db_index': 'True'}) |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
56 |
}, |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
57 |
'hdalab.dbpediafields': { |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
58 |
'Meta': {'object_name': 'DbpediaFields'}, |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
59 |
'abstract': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
60 |
'dbpedia_uri': ('django.db.models.fields.URLField', [], {'max_length': '2048', 'db_index': 'True'}), |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
61 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
62 |
'label': ('django.db.models.fields.CharField', [], {'max_length': '2048', 'null': 'True', 'blank': 'True'}), |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
63 |
'tag': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'dbpedia_fields'", 'null': 'True', 'to': "orm['hdabo.Tag']"}), |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
64 |
'thumbnail': ('django.db.models.fields.URLField', [], {'max_length': '2048', 'null': 'True', 'blank': 'True'}) |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
65 |
}, |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
66 |
'hdalab.hdasession': { |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
67 |
'Meta': {'object_name': 'HdaSession'}, |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
68 |
'data': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
69 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
70 |
'sessionid': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '36', 'db_index': 'True'}) |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
71 |
}, |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
72 |
'hdalab.infoboxparameter': { |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
73 |
'Meta': {'unique_together': "(('tag_infobox', 'param_name'),)", 'object_name': 'InfoboxParameter'}, |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
74 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
75 |
'param_name': ('django.db.models.fields.CharField', [], {'max_length': '2048'}), |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
76 |
'param_value': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
77 |
'tag_infobox': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['hdalab.TagInfobox']"}) |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
78 |
}, |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
79 |
'hdalab.taginfobox': { |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
80 |
'Meta': {'unique_together': "(('tag', 'name', 'revision_id'),)", 'object_name': 'TagInfobox'}, |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
81 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
82 |
'name': ('django.db.models.fields.CharField', [], {'max_length': '2048'}), |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
83 |
'revision_id': ('django.db.models.fields.BigIntegerField', [], {'null': 'True', 'blank': 'True'}), |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
84 |
'source': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
85 |
'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'infoboxes'", 'to': "orm['hdabo.Tag']"}) |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
86 |
}, |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
87 |
'hdalab.taglinks': { |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
88 |
'Meta': {'object_name': 'TagLinks'}, |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
89 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
90 |
'object': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taglinks_objects'", 'to': "orm['hdabo.Tag']"}), |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
91 |
'subject': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taglinks_subjects'", 'to': "orm['hdabo.Tag']"}) |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
92 |
}, |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
93 |
'hdalab.tagwpcategory': { |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
94 |
'Meta': {'unique_together': "(('tag', 'wp_category', 'hidden'),)", 'object_name': 'TagWpCategory'}, |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
95 |
'hidden': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
96 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
97 |
'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'wp_categories'", 'to': "orm['hdabo.Tag']"}), |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
98 |
'wp_category': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['hdalab.WpCategory']"}) |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
99 |
}, |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
100 |
'hdalab.tagyears': { |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
101 |
'Meta': {'object_name': 'TagYears'}, |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
102 |
'end_year': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}), |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
103 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
104 |
'start_year': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}), |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
105 |
'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'years'", 'to': "orm['hdabo.Tag']"}) |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
106 |
}, |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
107 |
'hdalab.wpcategory': { |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
108 |
'Meta': {'object_name': 'WpCategory'}, |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
109 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
110 |
'label': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '2048'}) |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
111 |
} |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
112 |
} |
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
113 |
|
|
e3ebe3545f72
first implementation of django version.
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
114 |
complete_apps = ['hdalab'] |