from south.v2 import SchemaMigration
from django.db import models
-
class Migration(SchemaMigration):
def forwards(self, orm):
('gallery', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)),
('parent', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='children', null=True, to=orm['catalogue.Book'])),
('parent_number', self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True)),
+ ('_short_html', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
+ ('_single', self.gf('django.db.models.fields.NullBooleanField')(db_index=True, null=True, blank=True)),
+ ('_new_publishable', self.gf('django.db.models.fields.NullBooleanField')(null=True, blank=True)),
+ ('_published', self.gf('django.db.models.fields.NullBooleanField')(null=True, blank=True)),
))
db.send_create_signal('catalogue', ['Book'])
('book', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['catalogue.Book'])),
('number', self.gf('django.db.models.fields.IntegerField')()),
('slug', self.gf('django.db.models.fields.SlugField')(max_length=50, db_index=True)),
- ('comment', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)),
+ ('title', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)),
+ ('_short_html', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
+ ('_hidden', self.gf('django.db.models.fields.NullBooleanField')(null=True, blank=True)),
+ ('_changed', self.gf('django.db.models.fields.NullBooleanField')(null=True, blank=True)),
('stage', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['catalogue.ChunkTag'], null=True, blank=True)),
('head', self.gf('django.db.models.fields.related.ForeignKey')(default=None, to=orm['catalogue.ChunkChange'], null=True, blank=True)),
))
('author', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True, blank=True)),
('author_name', self.gf('django.db.models.fields.CharField')(max_length=128, null=True, blank=True)),
('author_email', self.gf('django.db.models.fields.CharField')(max_length=128, null=True, blank=True)),
- ('data', self.gf('django.db.models.fields.files.FileField')(max_length=100)),
('revision', self.gf('django.db.models.fields.IntegerField')(db_index=True)),
('parent', self.gf('django.db.models.fields.related.ForeignKey')(default=None, related_name='children', null=True, blank=True, to=orm['catalogue.ChunkChange'])),
('merge_parent', self.gf('django.db.models.fields.related.ForeignKey')(default=None, related_name='merge_children', null=True, blank=True, to=orm['catalogue.ChunkChange'])),
('created_at', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now, db_index=True)),
('publishable', self.gf('django.db.models.fields.BooleanField')(default=False)),
('tree', self.gf('django.db.models.fields.related.ForeignKey')(related_name='change_set', to=orm['catalogue.Chunk'])),
+ ('data', self.gf('django.db.models.fields.files.FileField')(max_length=100)),
))
db.send_create_signal('catalogue', ['ChunkChange'])
# Adding model 'BookPublishRecord'
db.create_table('catalogue_bookpublishrecord', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
- ('book', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['catalogue.Book'])),
+ ('book', self.gf('django.db.models.fields.related.ForeignKey')(related_name='publish_log', to=orm['catalogue.Book'])),
('timestamp', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])),
))
db.create_table('catalogue_chunkpublishrecord', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('book_record', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['catalogue.BookPublishRecord'])),
- ('change', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['catalogue.ChunkChange'])),
+ ('change', self.gf('django.db.models.fields.related.ForeignKey')(related_name='publish_log', to=orm['catalogue.ChunkChange'])),
))
db.send_create_signal('catalogue', ['ChunkPublishRecord'])
- if not db.dry_run:
- from django.core.management import call_command
- call_command("loaddata", "stages.json")
-
def backwards(self, orm):
},
'catalogue.book': {
'Meta': {'ordering': "['parent_number', 'title']", 'object_name': 'Book'},
+ '_new_publishable': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
+ '_published': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
+ '_short_html': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ '_single': ('django.db.models.fields.NullBooleanField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
'gallery': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['catalogue.Book']"}),
},
'catalogue.bookpublishrecord': {
'Meta': {'ordering': "['-timestamp']", 'object_name': 'BookPublishRecord'},
- 'book': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Book']"}),
+ 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'publish_log'", 'to': "orm['catalogue.Book']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'timestamp': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"})
},
'catalogue.chunk': {
'Meta': {'ordering': "['number']", 'unique_together': "[['book', 'number'], ['book', 'slug']]", 'object_name': 'Chunk'},
+ '_changed': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
+ '_hidden': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
+ '_short_html': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
'book': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Book']"}),
- 'comment': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'created_documents'", 'null': 'True', 'to': "orm['auth.User']"}),
'head': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['catalogue.ChunkChange']", 'null': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'number': ('django.db.models.fields.IntegerField', [], {}),
'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}),
'stage': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.ChunkTag']", 'null': 'True', 'blank': 'True'}),
+ 'title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'})
},
'catalogue.chunkchange': {
'catalogue.chunkpublishrecord': {
'Meta': {'object_name': 'ChunkPublishRecord'},
'book_record': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.BookPublishRecord']"}),
- 'change': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.ChunkChange']"}),
+ 'change': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'publish_log'", 'to': "orm['catalogue.ChunkChange']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
},
'catalogue.chunktag': {