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
8 class Migration(SchemaMigration):
10 def forwards(self, orm):
11 # Adding field 'Audiobook.part_name'
12 db.add_column(u'archive_audiobook', 'part_name',
13 self.gf('django.db.models.fields.CharField')(default='', max_length=255, blank=True),
16 # Adding field 'Audiobook.index'
17 db.add_column(u'archive_audiobook', 'index',
18 self.gf('django.db.models.fields.IntegerField')(default=0),
21 # Adding field 'Audiobook.parts_count'
22 db.add_column(u'archive_audiobook', 'parts_count',
23 self.gf('django.db.models.fields.IntegerField')(default=1),
27 def backwards(self, orm):
28 # Deleting field 'Audiobook.part_name'
29 db.delete_column(u'archive_audiobook', 'part_name')
31 # Deleting field 'Audiobook.index'
32 db.delete_column(u'archive_audiobook', 'index')
34 # Deleting field 'Audiobook.parts_count'
35 db.delete_column(u'archive_audiobook', 'parts_count')
39 u'archive.audiobook': {
40 'Meta': {'ordering': "('title',)", 'object_name': 'Audiobook'},
41 'artist': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
42 'conductor': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
43 'date': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
44 'encoded_by': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
45 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
46 'index': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
47 'modified': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
48 'mp3_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}),
49 'mp3_published': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
50 'mp3_published_tags': ('jsonfield.fields.JSONField', [], {'null': 'True'}),
51 'mp3_status': ('django.db.models.fields.SmallIntegerField', [], {'null': 'True'}),
52 'mp3_tags': ('jsonfield.fields.JSONField', [], {'null': 'True'}),
53 'mp3_task': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True'}),
54 'ogg_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True'}),
55 'ogg_published': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
56 'ogg_published_tags': ('jsonfield.fields.JSONField', [], {'null': 'True'}),
57 'ogg_status': ('django.db.models.fields.SmallIntegerField', [], {'null': 'True'}),
58 'ogg_tags': ('jsonfield.fields.JSONField', [], {'null': 'True'}),
59 'ogg_task': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True'}),
60 'part_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255', 'blank': 'True'}),
61 'parts_count': ('django.db.models.fields.IntegerField', [], {'default': '1'}),
62 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['archive.Project']"}),
63 'source_file': ('django.db.models.fields.files.FileField', [], {'max_length': '255'}),
64 'source_sha1': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
65 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
66 'translator': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
67 'url': ('django.db.models.fields.URLField', [], {'max_length': '255'})
70 'Meta': {'ordering': "('name',)", 'object_name': 'Project'},
71 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
72 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128', 'db_index': 'True'}),
73 'sponsors': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'})
77 complete_apps = ['archive']