Initial commit
[copyspeak.git] / src / 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('markupfield.fields.MarkupField')(rendered_field=True, blank=True)),
16             ('content_markup_type', self.gf('django.db.models.fields.CharField')(default='textile', max_length=30, blank=True)),
17             ('_content_rendered', self.gf('django.db.models.fields.TextField')()),
18         ))
19         db.send_create_signal(u'chunks', ['Chunk'])
20
21         # Adding model 'Attachment'
22         db.create_table(u'chunks_attachment', (
23             ('key', self.gf('django.db.models.fields.CharField')(max_length=255, primary_key=True)),
24             ('attachment', self.gf('django.db.models.fields.files.FileField')(max_length=100)),
25         ))
26         db.send_create_signal(u'chunks', ['Attachment'])
27
28
29     def backwards(self, orm):
30         # Deleting model 'Chunk'
31         db.delete_table(u'chunks_chunk')
32
33         # Deleting model 'Attachment'
34         db.delete_table(u'chunks_attachment')
35
36
37     models = {
38         u'chunks.attachment': {
39             'Meta': {'ordering': "('key',)", 'object_name': 'Attachment'},
40             'attachment': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
41             'key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'primary_key': 'True'})
42         },
43         u'chunks.chunk': {
44             'Meta': {'ordering': "('key',)", 'object_name': 'Chunk'},
45             '_content_rendered': ('django.db.models.fields.TextField', [], {}),
46             'content': ('markupfield.fields.MarkupField', [], {'rendered_field': 'True', 'blank': 'True'}),
47             'content_markup_type': ('django.db.models.fields.CharField', [], {'default': "'textile'", 'max_length': '30', 'blank': 'True'}),
48             'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
49             'key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'primary_key': 'True'})
50         }
51     }
52
53     complete_apps = ['chunks']