X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/60b06883b6d5a336ef47c01103ec1ce25aafae69..6b9c5843b31661562ee76ee75a360219de0397a6:/apps/dictionary/migrations/0001_initial.py?ds=inline diff --git a/apps/dictionary/migrations/0001_initial.py b/apps/dictionary/migrations/0001_initial.py index cf0c311fa..1908a840a 100644 --- a/apps/dictionary/migrations/0001_initial.py +++ b/apps/dictionary/migrations/0001_initial.py @@ -1,59 +1,28 @@ -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models +# -*- coding: utf-8 -*- +from __future__ import unicode_literals -class Migration(SchemaMigration): +from django.db import models, migrations - def forwards(self, orm): - - # Adding model 'Note' - db.create_table('dictionary_note', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('book', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['catalogue.Book'])), - ('anchor', self.gf('django.db.models.fields.CharField')(max_length=64)), - ('html', self.gf('django.db.models.fields.TextField')()), - ('sort_key', self.gf('django.db.models.fields.CharField')(max_length=128, db_index=True)), - )) - db.send_create_signal('dictionary', ['Note']) +class Migration(migrations.Migration): - def backwards(self, orm): - - # Deleting model 'Note' - db.delete_table('dictionary_note') + dependencies = [ + ('catalogue', '0001_initial'), + ] - - models = { - 'catalogue.book': { - 'Meta': {'ordering': "('sort_key',)", 'object_name': 'Book'}, - 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'epub_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}), - 'extra_info': ('catalogue.fields.JSONField', [], {'default': "'{}'"}), - 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}), - 'html_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', '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']"}), - 'parent_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'pdf_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '120', 'db_index': 'True'}), - 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '120'}), - 'txt_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}), - 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}), - 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}) - }, - 'dictionary.note': { - 'Meta': {'ordering': "['sort_key']", 'object_name': 'Note'}, - 'anchor': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'book': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Book']"}), - 'html': ('django.db.models.fields.TextField', [], {}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}) - } - } - - complete_apps = ['dictionary'] + operations = [ + migrations.CreateModel( + name='Note', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('anchor', models.CharField(max_length=64)), + ('html', models.TextField()), + ('sort_key', models.CharField(max_length=128, db_index=True)), + ('book', models.ForeignKey(to='catalogue.Book')), + ], + options={ + 'ordering': ['sort_key'], + }, + bases=(models.Model,), + ), + ]