Ebooks are now named after the book's slug and overwrite old versions.
[wolnelektury.git] / apps / chunks / migrations / 0001_initial.py
1 # -*- coding: utf-8 -*-
2 import 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 model 'Chunk'
12         db.create_table(u'chunks_chunk', (
13             ('key', self.gf('django.db.models.fields.CharField')(max_length=255, primary_key=True)),
14             ('description', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)),
15             ('content', self.gf('django.db.models.fields.TextField')(blank=True)),
16         ))
17         db.send_create_signal(u'chunks', ['Chunk'])
18
19         # Adding model 'Attachment'
20         db.create_table(u'chunks_attachment', (
21             ('key', self.gf('django.db.models.fields.CharField')(max_length=255, primary_key=True)),
22             ('attachment', self.gf('django.db.models.fields.files.FileField')(max_length=100)),
23         ))
24         db.send_create_signal(u'chunks', ['Attachment'])
25
26
27     def backwards(self, orm):
28         # Deleting model 'Chunk'
29         db.delete_table(u'chunks_chunk')
30
31         # Deleting model 'Attachment'
32         db.delete_table(u'chunks_attachment')
33
34
35     models = {
36         u'chunks.attachment': {
37             'Meta': {'ordering': "('key',)", 'object_name': 'Attachment'},
38             'attachment': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
39             'key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'primary_key': 'True'})
40         },
41         u'chunks.chunk': {
42             'Meta': {'ordering': "('key',)", 'object_name': 'Chunk'},
43             'content': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
44             'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
45             'key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'primary_key': 'True'})
46         }
47     }
48
49     complete_apps = ['chunks']