0001_initial.py 17.2 KB
# -*- coding: utf-8 -*-
from south.utils import datetime_utils as 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 'UserSettings'
        db.create_table(u'accounts_usersettings', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('user', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['auth.User'], unique=True)),
            ('incremental_search', self.gf('django.db.models.fields.BooleanField')(default=True)),
            ('default_owner', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['dictionary.Vocabulary'], null=True, blank=True)),
        ))
        db.send_create_signal(u'accounts', ['UserSettings'])


    def backwards(self, orm):
        # Deleting model 'UserSettings'
        db.delete_table(u'accounts_usersettings')


    models = {
        u'accounts.usersettings': {
            'Meta': {'object_name': 'UserSettings'},
            'default_owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.Vocabulary']", 'null': 'True', 'blank': 'True'}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'incremental_search': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
            'user': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['auth.User']", 'unique': 'True'})
        },
        u'auth.group': {
            'Meta': {'object_name': 'Group'},
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
            'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
        },
        u'auth.permission': {
            'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
            'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
            'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
        },
        u'auth.user': {
            'Meta': {'object_name': 'User'},
            'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
            'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
            'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
            'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
            'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
            'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
            'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
            'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
            'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
        },
        u'contenttypes.contenttype': {
            'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
            'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
        },
        u'dictionary.baseformlabel': {
            'Meta': {'ordering': "['index']", 'unique_together': "(['symbol', 'lexical_class'],)", 'object_name': 'BaseFormLabel', 'db_table': "'efobazy'"},
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'index': ('django.db.models.fields.IntegerField', [], {}),
            'lexical_class': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.LexicalClass']"}),
            'symbol': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_column': "'efobaz'", 'blank': 'True'})
        },
        u'dictionary.borrowingsource': {
            'Meta': {'object_name': 'BorrowingSource'},
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'label': ('django.db.models.fields.CharField', [], {'max_length': '32'})
        },
        u'dictionary.classification': {
            'Meta': {'object_name': 'Classification', 'db_table': "'klasyfikacje'"},
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64', 'db_column': "'nazwa'"}),
            'parts_of_speech': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['dictionary.PartOfSpeech']", 'symmetrical': 'False'})
        },
        u'dictionary.gender': {
            'Meta': {'object_name': 'Gender'},
            'basic_form_label': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.BaseFormLabel']"}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'symbol': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '4'})
        },
        u'dictionary.lexeme': {
            'Meta': {'object_name': 'Lexeme', 'db_table': "'leksemy'"},
            'borrowing_source': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.BorrowingSource']", 'null': 'True', 'blank': 'True'}),
            'comment': ('django.db.models.fields.TextField', [], {'db_column': "'komentarz'", 'blank': 'True'}),
            'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_column': "'usuniety'"}),
            'entry': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '64', 'db_column': "'haslo'", 'blank': 'True'}),
            'entry_suffix': ('django.db.models.fields.CharField', [], {'max_length': '16', 'db_column': "'haslosuf'", 'blank': 'True'}),
            'extended_note': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
            'gloss': ('django.db.models.fields.TextField', [], {'db_column': "'glosa'", 'blank': 'True'}),
            'homonym_number': ('django.db.models.fields.IntegerField', [], {'default': '1', 'db_column': "'hom'"}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'last_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_column': "'data_modyfikacji'", 'blank': 'True'}),
            'note': ('django.db.models.fields.TextField', [], {'db_column': "'nota'", 'blank': 'True'}),
            'owner_vocabulary': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'owned_lexemes'", 'db_column': "'slownik'", 'to': u"orm['dictionary.Vocabulary']"}),
            'part_of_speech': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.PartOfSpeech']", 'db_column': "'pos'"}),
            'patterns': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['dictionary.Pattern']", 'through': u"orm['dictionary.LexemeInflectionPattern']", 'symmetrical': 'False'}),
            'pronunciation': ('django.db.models.fields.TextField', [], {'db_column': "'wymowa'", 'blank': 'True'}),
            'qualifiers': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['dictionary.Qualifier']", 'symmetrical': 'False', 'db_table': "'kwalifikatory_leksemow'", 'blank': 'True'}),
            'qualifiers_cache': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'all_lexemes'", 'symmetrical': 'False', 'through': u"orm['dictionary.LexemeFormQualifier']", 'to': u"orm['dictionary.Qualifier']"}),
            'qualifiers_dor': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
            'qualifiers_scope': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
            'qualifiers_style': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
            'responsible': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'null': 'True', 'db_column': "'odpowiedzialny'", 'blank': 'True'}),
            'source': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_column': "'zrodlo'", 'blank': 'True'}),
            'source_id': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
            'specialist': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
            'status': ('django.db.models.fields.CharField', [], {'max_length': '8', 'db_column': "'status'"}),
            'valence': ('django.db.models.fields.TextField', [], {'blank': 'True'})
        },
        u'dictionary.lexemeassociation': {
            'Meta': {'unique_together': "(['lexeme', 'vocabulary'],)", 'object_name': 'LexemeAssociation', 'db_table': "'leksemy_w_slownikach'"},
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'lexeme': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.Lexeme']", 'db_column': "'l_id'"}),
            'vocabulary': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.Vocabulary']", 'db_column': "'slownik'"})
        },
        u'dictionary.lexemeformqualifier': {
            'Meta': {'object_name': 'LexemeFormQualifier'},
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'lexeme': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.Lexeme']"}),
            'qualifier': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.Qualifier']"})
        },
        u'dictionary.lexemeinflectionpattern': {
            'Meta': {'ordering': "['index']", 'unique_together': "(('lexeme', 'index'),)", 'object_name': 'LexemeInflectionPattern', 'db_table': "'odmieniasie'"},
            'gender': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.Gender']", 'null': 'True', 'blank': 'True'}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'index': ('django.db.models.fields.IntegerField', [], {'db_column': "'oind'"}),
            'lexeme': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.Lexeme']", 'db_column': "'l_id'"}),
            'pattern': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.Pattern']", 'db_column': "'w_id'"}),
            'qualifiers': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['dictionary.Qualifier']", 'symmetrical': 'False', 'db_table': "'kwalifikatory_odmieniasiow'", 'blank': 'True'}),
            'root': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_column': "'rdzen'"})
        },
        u'dictionary.lexicalclass': {
            'Meta': {'object_name': 'LexicalClass', 'db_table': "'czescimowy'"},
            'symbol': ('django.db.models.fields.CharField', [], {'max_length': '16', 'primary_key': 'True', 'db_column': "'czm'"})
        },
        u'dictionary.partofspeech': {
            'Meta': {'ordering': "['index']", 'object_name': 'PartOfSpeech', 'db_table': "'klasygramatyczne'"},
            'color_scheme': ('django.db.models.fields.IntegerField', [], {}),
            'full_name': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_column': "'nazwa'"}),
            'index': ('django.db.models.fields.IntegerField', [], {}),
            'lexical_class': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.LexicalClass']", 'db_column': "'czm'"}),
            'symbol': ('django.db.models.fields.CharField', [], {'max_length': '16', 'primary_key': 'True', 'db_column': "'pos'"})
        },
        u'dictionary.pattern': {
            'Meta': {'ordering': "['name']", 'object_name': 'Pattern', 'db_table': "'wzory'"},
            'basic_form_ending': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_column': "'zakp'", 'blank': 'True'}),
            'comment': ('django.db.models.fields.TextField', [], {'db_column': "'komentarz'", 'blank': 'True'}),
            'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
            'example': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_column': "'przyklad'", 'blank': 'True'}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_column': "'w_id'"}),
            'status': ('django.db.models.fields.CharField', [], {'max_length': '8'}),
            'type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.PatternType']", 'db_column': "'typ'"})
        },
        u'dictionary.patterntype': {
            'Meta': {'ordering': "['symbol']", 'object_name': 'PatternType', 'db_table': "'typywzorow'"},
            'base_form_labels': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['dictionary.BaseFormLabel']", 'symmetrical': 'False'}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'lexical_class': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.LexicalClass']", 'db_column': "'czm'"}),
            'symbol': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_column': "'wtyp'", 'blank': 'True'})
        },
        u'dictionary.qualifier': {
            'Meta': {'ordering': "['label']", 'unique_together': "(('label', 'vocabulary'),)", 'object_name': 'Qualifier', 'db_table': "'kwalifikatory'"},
            'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_column': "'usuniety'"}),
            'exclusion_class': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.QualifierExclusionClass']", 'null': 'True', 'db_column': "'klasa'", 'blank': 'True'}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'label': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_column': "'kwal'"}),
            'type': ('django.db.models.fields.CharField', [], {'max_length': '4'}),
            'vocabulary': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'qualifiers'", 'db_column': "'slownik'", 'to': u"orm['dictionary.Vocabulary']"})
        },
        u'dictionary.qualifierexclusionclass': {
            'Meta': {'object_name': 'QualifierExclusionClass', 'db_table': "'klasy_wykluczania'"},
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64', 'db_column': "'nazwa'"}),
            'vocabulary': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.Vocabulary']", 'db_column': "'slownik'"})
        },
        u'dictionary.vocabulary': {
            'Meta': {'ordering': "['id']", 'object_name': 'Vocabulary', 'db_table': "'slowniki'"},
            'classifications': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'vocabularies'", 'blank': 'True', 'to': u"orm['dictionary.Classification']"}),
            'editors': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'editable_vocabularies'", 'blank': 'True', 'to': u"orm['auth.User']"}),
            'id': ('django.db.models.fields.CharField', [], {'max_length': '64', 'primary_key': 'True', 'db_column': "'slownik'"}),
            'lexemes': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'vocabularies'", 'blank': 'True', 'through': u"orm['dictionary.LexemeAssociation']", 'to': u"orm['dictionary.Lexeme']"}),
            'managers': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'managed_vocabularies'", 'blank': 'True', 'to': u"orm['auth.User']"}),
            'viewers': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'visible_vocabularies'", 'blank': 'True', 'to': u"orm['auth.User']"})
        }
    }

    complete_apps = ['accounts']