73 lines
4.6 KiB
Python
73 lines
4.6 KiB
Python
|
# -*- coding: utf-8 -*-
|
||
|
import datetime
|
||
|
from south.db import db
|
||
|
from south.v2 import SchemaMigration
|
||
|
from django.db import models
|
||
|
|
||
|
|
||
|
class Migration(SchemaMigration):
|
||
|
|
||
|
def forwards(self, orm):
|
||
|
# Adding model 'MARCRecord'
|
||
|
db.create_table('marc_marcrecord', (
|
||
|
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
|
||
|
('guts', self.gf('django.db.models.fields.TextField')()),
|
||
|
('edition', self.gf('django.db.models.fields.related.ForeignKey')(related_name='MARCRecords', null=True, to=orm['core.Edition'])),
|
||
|
))
|
||
|
db.send_create_signal('marc', ['MARCRecord'])
|
||
|
|
||
|
|
||
|
def backwards(self, orm):
|
||
|
# Deleting model 'MARCRecord'
|
||
|
db.delete_table('marc_marcrecord')
|
||
|
|
||
|
|
||
|
models = {
|
||
|
'core.edition': {
|
||
|
'Meta': {'object_name': 'Edition'},
|
||
|
'cover_image': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
|
||
|
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
|
||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||
|
'publication_date': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '50', 'null': 'True', 'blank': 'True'}),
|
||
|
'publisher_name': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'editions'", 'null': 'True', 'to': "orm['core.PublisherName']"}),
|
||
|
'title': ('django.db.models.fields.CharField', [], {'max_length': '1000'}),
|
||
|
'unglued': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
|
||
|
'work': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'editions'", 'null': 'True', 'to': "orm['core.Work']"})
|
||
|
},
|
||
|
'core.publisher': {
|
||
|
'Meta': {'object_name': 'Publisher'},
|
||
|
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
|
||
|
'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True', 'blank': 'True'}),
|
||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||
|
'logo_url': ('django.db.models.fields.URLField', [], {'max_length': '1024', 'null': 'True', 'blank': 'True'}),
|
||
|
'name': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'key_publisher'", 'to': "orm['core.PublisherName']"}),
|
||
|
'url': ('django.db.models.fields.URLField', [], {'max_length': '1024', 'null': 'True', 'blank': 'True'})
|
||
|
},
|
||
|
'core.publishername': {
|
||
|
'Meta': {'object_name': 'PublisherName'},
|
||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||
|
'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
|
||
|
'publisher': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'alternate_names'", 'null': 'True', 'to': "orm['core.Publisher']"})
|
||
|
},
|
||
|
'core.work': {
|
||
|
'Meta': {'ordering': "['title']", 'object_name': 'Work'},
|
||
|
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
|
||
|
'description': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True', 'blank': 'True'}),
|
||
|
'earliest_publication': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True'}),
|
||
|
'featured': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}),
|
||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||
|
'language': ('django.db.models.fields.CharField', [], {'default': "'en'", 'max_length': '5', 'db_index': 'True'}),
|
||
|
'num_wishes': ('django.db.models.fields.IntegerField', [], {'default': '0', 'db_index': 'True'}),
|
||
|
'openlibrary_lookup': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
|
||
|
'selected_edition': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'selected_works'", 'null': 'True', 'to': "orm['core.Edition']"}),
|
||
|
'title': ('django.db.models.fields.CharField', [], {'max_length': '1000'})
|
||
|
},
|
||
|
'marc.marcrecord': {
|
||
|
'Meta': {'object_name': 'MARCRecord'},
|
||
|
'edition': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'MARCRecords'", 'null': 'True', 'to': "orm['core.Edition']"}),
|
||
|
'guts': ('django.db.models.fields.TextField', [], {}),
|
||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
|
||
|
}
|
||
|
}
|
||
|
|
||
|
complete_apps = ['marc']
|