]> git.parisson.com Git - pdfannotator.git/blob
8c7e2faa608f86cb15523f8c5fcb8448bb13cb72
[pdfannotator.git] /
1 # -*- coding: utf-8 -*-
2 from south.utils import datetime_utils as datetime
3 from south.db import db
4 from south.v2 import SchemaMigration
5 from django.db import models
6
7
8 class Migration(SchemaMigration):
9
10 def forwards(self, orm):
11 # Adding index on 'AnnotationComment', fields ['uuid']
12 db.create_index('pdfannotator_annotationcomment', ['uuid'])
13
14 # Adding index on 'Annotation', fields ['uuid']
15 db.create_index('pdfannotator_annotation', ['uuid'])
16
17 # Adding index on 'Annotation', fields ['annotation_id']
18 db.create_index('pdfannotator_annotation', ['annotation_id'])
19
20
21 def backwards(self, orm):
22 # Removing index on 'Annotation', fields ['annotation_id']
23 db.delete_index('pdfannotator_annotation', ['annotation_id'])
24
25 # Removing index on 'Annotation', fields ['uuid']
26 db.delete_index('pdfannotator_annotation', ['uuid'])
27
28 # Removing index on 'AnnotationComment', fields ['uuid']
29 db.delete_index('pdfannotator_annotationcomment', ['uuid'])
30
31
32 models = {
33 'pdfannotator.annotation': {
34 'Meta': {'object_name': 'Annotation'},
35 'annotation_id': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
36 'content': ('django.db.models.fields.TextField', [], {}),
37 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
38 'order': ('django.db.models.fields.CharField', [], {'max_length': '10'}),
39 'page': ('django.db.models.fields.IntegerField', [], {}),
40 'uuid': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'})
41 },
42 'pdfannotator.annotationcomment': {
43 'Meta': {'object_name': 'AnnotationComment'},
44 'annotation_id': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
45 'content': ('django.db.models.fields.TextField', [], {}),
46 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
47 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
48 'uuid': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'})
49 }
50 }
51
52 complete_apps = ['pdfannotator']