diff --git a/mayan/apps/acls/migrations/0001_initial.py b/mayan/apps/acls/migrations/0001_initial.py new file mode 100644 index 0000000000..3fc1e6190f --- /dev/null +++ b/mayan/apps/acls/migrations/0001_initial.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('contenttypes', '0001_initial'), + ('permissions', '__first__'), + ] + + operations = [ + migrations.CreateModel( + name='AccessEntry', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('holder_id', models.PositiveIntegerField()), + ('object_id', models.PositiveIntegerField()), + ('content_type', models.ForeignKey(related_name='object_content_type', to='contenttypes.ContentType')), + ('holder_type', models.ForeignKey(related_name='access_holder', to='contenttypes.ContentType')), + ('permission', models.ForeignKey(verbose_name='Permission', to='permissions.StoredPermission')), + ], + options={ + 'verbose_name': 'Access entry', + 'verbose_name_plural': 'Access entries', + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='CreatorSingleton', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ], + options={ + 'verbose_name': 'Creator', + 'verbose_name_plural': 'Creator', + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='DefaultAccessEntry', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('holder_id', models.PositiveIntegerField()), + ('content_type', models.ForeignKey(related_name='default_access_entry_class', to='contenttypes.ContentType')), + ('holder_type', models.ForeignKey(related_name='default_access_entry_holder', to='contenttypes.ContentType')), + ('permission', models.ForeignKey(verbose_name='Permission', to='permissions.StoredPermission')), + ], + options={ + 'verbose_name': 'Default access entry', + 'verbose_name_plural': 'Default access entries', + }, + bases=(models.Model,), + ), + ] diff --git a/mayan/apps/acls/south_migrations/__init__.py b/mayan/apps/acls/migrations/__init__.py similarity index 100% rename from mayan/apps/acls/south_migrations/__init__.py rename to mayan/apps/acls/migrations/__init__.py diff --git a/mayan/apps/acls/south_migrations/0001_initial.py b/mayan/apps/acls/south_migrations/0001_initial.py deleted file mode 100644 index 1870903d8e..0000000000 --- a/mayan/apps/acls/south_migrations/0001_initial.py +++ /dev/null @@ -1,89 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - depends_on = ( - ('permissions', '0002_auto__add_storedpermission__add_unique_storedpermission_namespace_name'), - ) - - def forwards(self, orm): - # Adding model 'AccessEntry' - db.create_table('acls_accessentry', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('permission', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['permissions.StoredPermission'])), - ('holder_type', self.gf('django.db.models.fields.related.ForeignKey')(related_name='access_holder', to=orm['contenttypes.ContentType'])), - ('holder_id', self.gf('django.db.models.fields.PositiveIntegerField')()), - ('content_type', self.gf('django.db.models.fields.related.ForeignKey')(related_name='object_content_type', to=orm['contenttypes.ContentType'])), - ('object_id', self.gf('django.db.models.fields.PositiveIntegerField')()), - )) - db.send_create_signal(u'acls', ['AccessEntry']) - - # Adding model 'DefaultAccessEntry' - db.create_table('acls_defaultaccessentry', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('permission', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['permissions.StoredPermission'])), - ('holder_type', self.gf('django.db.models.fields.related.ForeignKey')(related_name='default_access_entry_holder', to=orm['contenttypes.ContentType'])), - ('holder_id', self.gf('django.db.models.fields.PositiveIntegerField')()), - ('content_type', self.gf('django.db.models.fields.related.ForeignKey')(related_name='default_access_entry_class', to=orm['contenttypes.ContentType'])), - )) - db.send_create_signal(u'acls', ['DefaultAccessEntry']) - - # Adding model 'CreatorSingleton' - db.create_table('acls_creatorsingleton', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('lock_id', self.gf('django.db.models.fields.CharField')(default='1', unique=True, max_length=1)), - )) - db.send_create_signal('acls', ['CreatorSingleton']) - - def backwards(self, orm): - # Deleting model 'AccessEntry' - db.delete_table('acls_accessentry') - - # Deleting model 'DefaultAccessEntry' - db.delete_table('acls_defaultaccessentry') - - # Deleting model 'CreatorSingleton' - db.delete_table('acls_creatorsingleton') - - models = { - 'acls.accessentry': { - 'Meta': {'object_name': 'AccessEntry'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'object_content_type'", 'to': u"orm['contenttypes.ContentType']"}), - 'holder_id': ('django.db.models.fields.PositiveIntegerField', [], {}), - 'holder_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'access_holder'", 'to': u"orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}), - 'permission': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['permissions.StoredPermission']"}) - }, - 'acls.creatorsingleton': { - 'Meta': {'object_name': 'CreatorSingleton'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'lock_id': ('django.db.models.fields.CharField', [], {'default': "'1'", 'unique': 'True', 'max_length': '1'}) - }, - 'acls.defaultaccessentry': { - 'Meta': {'object_name': 'DefaultAccessEntry'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'default_access_entry_class'", 'to': u"orm['contenttypes.ContentType']"}), - 'holder_id': ('django.db.models.fields.PositiveIntegerField', [], {}), - 'holder_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'default_access_entry_holder'", 'to': u"orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'permission': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['permissions.StoredPermission']"}) - }, - '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'}), - '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'}) - }, - 'permissions.storedpermission': { - 'Meta': {'ordering': "('namespace',)", 'unique_together': "(('namespace', 'name'),)", 'object_name': 'StoredPermission'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'namespace': ('django.db.models.fields.CharField', [], {'max_length': '64'}) - } - } - - complete_apps = ['acls'] diff --git a/mayan/apps/acls/south_migrations/0002_auto__del_field_creatorsingleton_lock_id.py b/mayan/apps/acls/south_migrations/0002_auto__del_field_creatorsingleton_lock_id.py deleted file mode 100644 index ac7fd8260e..0000000000 --- a/mayan/apps/acls/south_migrations/0002_auto__del_field_creatorsingleton_lock_id.py +++ /dev/null @@ -1,56 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Deleting field 'CreatorSingleton.lock_id' - db.delete_column('acls_creatorsingleton', 'lock_id') - - def backwards(self, orm): - # Adding field 'CreatorSingleton.lock_id' - db.add_column('acls_creatorsingleton', 'lock_id', - self.gf('django.db.models.fields.CharField')(default='1', max_length=1, unique=True), - keep_default=False) - - models = { - 'acls.accessentry': { - 'Meta': {'object_name': 'AccessEntry'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'object_content_type'", 'to': u"orm['contenttypes.ContentType']"}), - 'holder_id': ('django.db.models.fields.PositiveIntegerField', [], {}), - 'holder_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'access_holder'", 'to': u"orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}), - 'permission': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['permissions.StoredPermission']"}) - }, - 'acls.creatorsingleton': { - 'Meta': {'object_name': 'CreatorSingleton'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'acls.defaultaccessentry': { - 'Meta': {'object_name': 'DefaultAccessEntry'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'default_access_entry_class'", 'to': u"orm['contenttypes.ContentType']"}), - 'holder_id': ('django.db.models.fields.PositiveIntegerField', [], {}), - 'holder_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'default_access_entry_holder'", 'to': u"orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'permission': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['permissions.StoredPermission']"}) - }, - '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'}), - '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'}) - }, - 'permissions.storedpermission': { - 'Meta': {'ordering': "('namespace',)", 'unique_together': "(('namespace', 'name'),)", 'object_name': 'StoredPermission'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'namespace': ('django.db.models.fields.CharField', [], {'max_length': '64'}) - } - } - - complete_apps = ['acls'] diff --git a/mayan/apps/checkouts/migrations/0001_initial.py b/mayan/apps/checkouts/migrations/0001_initial.py new file mode 100644 index 0000000000..d7fcead6e2 --- /dev/null +++ b/mayan/apps/checkouts/migrations/0001_initial.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('documents', '__first__'), + ('contenttypes', '0001_initial'), + ] + + operations = [ + migrations.CreateModel( + name='DocumentCheckout', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('checkout_datetime', models.DateTimeField(auto_now_add=True, verbose_name='Check out date and time')), + ('expiration_datetime', models.DateTimeField(help_text='Amount of time to hold the document checked out in minutes.', verbose_name='Check out expiration date and time')), + ('user_object_id', models.PositiveIntegerField(null=True, blank=True)), + ('block_new_version', models.BooleanField(default=True, help_text='Do not allow new version of this document to be uploaded.', verbose_name='Block new version upload')), + ('document', models.ForeignKey(verbose_name='Document', to='documents.Document', unique=True)), + ('user_content_type', models.ForeignKey(blank=True, to='contenttypes.ContentType', null=True)), + ], + options={ + 'verbose_name': 'Document checkout', + 'verbose_name_plural': 'Document checkouts', + }, + bases=(models.Model,), + ), + ] diff --git a/mayan/apps/checkouts/south_migrations/__init__.py b/mayan/apps/checkouts/migrations/__init__.py similarity index 100% rename from mayan/apps/checkouts/south_migrations/__init__.py rename to mayan/apps/checkouts/migrations/__init__.py diff --git a/mayan/apps/checkouts/south_migrations/0001_initial.py b/mayan/apps/checkouts/south_migrations/0001_initial.py deleted file mode 100644 index 16732c017e..0000000000 --- a/mayan/apps/checkouts/south_migrations/0001_initial.py +++ /dev/null @@ -1,123 +0,0 @@ -# -*- 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): - depends_on = ( - ('documents', '0001_initial'), - ) - - def forwards(self, orm): - # Adding model 'DocumentCheckout' - db.create_table('checkouts_documentcheckout', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('document', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['documents.Document'], unique=True)), - ('checkout_datetime', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2012, 6, 13, 0, 0))), - ('expiration_datetime', self.gf('django.db.models.fields.DateTimeField')()), - ('block_new_version', self.gf('django.db.models.fields.BooleanField')(default=False)), - )) - db.send_create_signal('checkouts', ['DocumentCheckout']) - - def backwards(self, orm): - # Deleting model 'DocumentCheckout' - db.delete_table('checkouts_documentcheckout') - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - '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': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - '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': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - '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': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'checkouts.documentcheckout': { - 'Meta': {'object_name': 'DocumentCheckout'}, - 'block_new_version': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'checkout_datetime': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 6, 13, 0, 0)'}), - 'document': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.Document']", 'unique': 'True'}), - 'expiration_datetime': ('django.db.models.fields.DateTimeField', [], {}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'comments.comment': { - 'Meta': {'ordering': "('submit_date',)", 'object_name': 'Comment', 'db_table': "'django_comments'"}, - 'comment': ('django.db.models.fields.TextField', [], {'max_length': '3000'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'content_type_set_for_comment'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ip_address': ('django.db.models.fields.IPAddressField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}), - 'is_public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_removed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'object_pk': ('django.db.models.fields.TextField', [], {}), - 'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}), - 'submit_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'comment_comments'", 'null': 'True', 'to': "orm['auth.User']"}), - 'user_email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'user_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'user_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) - }, - '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'}), - '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'}) - }, - 'documents.document': { - 'Meta': {'ordering': "['-date_added']", 'object_name': 'Document'}, - 'date_added': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.DocumentType']", 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'max_length': '48', 'blank': 'True'}) - }, - 'documents.documenttype': { - 'Meta': {'ordering': "['name']", 'object_name': 'DocumentType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32'}) - }, - 'sites.site': { - 'Meta': {'ordering': "('domain',)", 'object_name': 'Site', 'db_table': "'django_site'"}, - 'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'taggit.tag': { - 'Meta': {'object_name': 'Tag'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'taggit.taggeditem': { - 'Meta': {'object_name': 'TaggedItem'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}), - 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_items'", 'to': "orm['taggit.Tag']"}) - } - } - - complete_apps = ['checkouts'] diff --git a/mayan/apps/checkouts/south_migrations/0002_auto__add_field_documentcheckout_user_content_type__add_field_document.py b/mayan/apps/checkouts/south_migrations/0002_auto__add_field_documentcheckout_user_content_type__add_field_document.py deleted file mode 100644 index a883b85958..0000000000 --- a/mayan/apps/checkouts/south_migrations/0002_auto__add_field_documentcheckout_user_content_type__add_field_document.py +++ /dev/null @@ -1,130 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'DocumentCheckout.user_content_type' - db.add_column('checkouts_documentcheckout', 'user_content_type', - self.gf('django.db.models.fields.related.ForeignKey')(to=orm['contenttypes.ContentType'], null=True, blank=True), - keep_default=False) - - # Adding field 'DocumentCheckout.user_object_id' - db.add_column('checkouts_documentcheckout', 'user_object_id', - self.gf('django.db.models.fields.PositiveIntegerField')(null=True, blank=True), - keep_default=False) - - # Changing field 'DocumentCheckout.checkout_datetime' - db.alter_column('checkouts_documentcheckout', 'checkout_datetime', self.gf('django.db.models.fields.DateTimeField')(null=True)) - - def backwards(self, orm): - # Deleting field 'DocumentCheckout.user_content_type' - db.delete_column('checkouts_documentcheckout', 'user_content_type_id') - - # Deleting field 'DocumentCheckout.user_object_id' - db.delete_column('checkouts_documentcheckout', 'user_object_id') - - # Changing field 'DocumentCheckout.checkout_datetime' - db.alter_column('checkouts_documentcheckout', 'checkout_datetime', self.gf('django.db.models.fields.DateTimeField')()) - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - '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': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - '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': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - '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': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'checkouts.documentcheckout': { - 'Meta': {'object_name': 'DocumentCheckout'}, - 'block_new_version': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'checkout_datetime': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), - 'document': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.Document']", 'unique': 'True'}), - 'expiration_datetime': ('django.db.models.fields.DateTimeField', [], {}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user_content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']", 'null': 'True', 'blank': 'True'}), - 'user_object_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}) - }, - 'comments.comment': { - 'Meta': {'ordering': "('submit_date',)", 'object_name': 'Comment', 'db_table': "'django_comments'"}, - 'comment': ('django.db.models.fields.TextField', [], {'max_length': '3000'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'content_type_set_for_comment'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ip_address': ('django.db.models.fields.IPAddressField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}), - 'is_public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_removed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'object_pk': ('django.db.models.fields.TextField', [], {}), - 'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}), - 'submit_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'comment_comments'", 'null': 'True', 'to': "orm['auth.User']"}), - 'user_email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'user_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'user_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) - }, - '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'}), - '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'}) - }, - 'documents.document': { - 'Meta': {'ordering': "['-date_added']", 'object_name': 'Document'}, - 'date_added': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.DocumentType']", 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'max_length': '48', 'blank': 'True'}) - }, - 'documents.documenttype': { - 'Meta': {'ordering': "['name']", 'object_name': 'DocumentType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32'}) - }, - 'sites.site': { - 'Meta': {'ordering': "('domain',)", 'object_name': 'Site', 'db_table': "'django_site'"}, - 'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'taggit.tag': { - 'Meta': {'object_name': 'Tag'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'taggit.taggeditem': { - 'Meta': {'object_name': 'TaggedItem'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}), - 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_items'", 'to': "orm['taggit.Tag']"}) - } - } - - complete_apps = ['checkouts'] diff --git a/mayan/apps/checkouts/south_migrations/0003_auto__chg_field_documentcheckout_checkout_datetime.py b/mayan/apps/checkouts/south_migrations/0003_auto__chg_field_documentcheckout_checkout_datetime.py deleted file mode 100644 index 8e85077c73..0000000000 --- a/mayan/apps/checkouts/south_migrations/0003_auto__chg_field_documentcheckout_checkout_datetime.py +++ /dev/null @@ -1,53 +0,0 @@ -# -*- 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): - - # Changing field 'DocumentCheckout.checkout_datetime' - db.alter_column(u'checkouts_documentcheckout', 'checkout_datetime', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, default=datetime.datetime(2014, 10, 18, 0, 0))) - - def backwards(self, orm): - - # Changing field 'DocumentCheckout.checkout_datetime' - db.alter_column(u'checkouts_documentcheckout', 'checkout_datetime', self.gf('django.db.models.fields.DateTimeField')(null=True)) - - models = { - u'checkouts.documentcheckout': { - 'Meta': {'object_name': 'DocumentCheckout'}, - 'block_new_version': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'checkout_datetime': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'document': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['documents.Document']", 'unique': 'True'}), - 'expiration_datetime': ('django.db.models.fields.DateTimeField', [], {}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user_content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']", 'null': 'True', 'blank': 'True'}), - 'user_object_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}) - }, - 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'documents.document': { - 'Meta': {'ordering': "['-date_added']", 'object_name': 'Document'}, - 'date_added': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'documents'", 'null': 'True', 'to': u"orm['documents.DocumentType']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'max_length': '48', 'blank': 'True'}) - }, - u'documents.documenttype': { - 'Meta': {'ordering': "['name']", 'object_name': 'DocumentType'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}) - } - } - - complete_apps = ['checkouts'] diff --git a/mayan/apps/common/migrations/0001_initial.py b/mayan/apps/common/migrations/0001_initial.py new file mode 100644 index 0000000000..201e33c31a --- /dev/null +++ b/mayan/apps/common/migrations/0001_initial.py @@ -0,0 +1,70 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations +from django.conf import settings +import common.models +import storage.backends.filebasedstorage + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='AnonymousUserSingleton', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ], + options={ + 'verbose_name': 'Anonymous user', + 'verbose_name_plural': 'Anonymous user', + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='AutoAdminSingleton', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('password', models.CharField(max_length=128, null=True, verbose_name='Password', blank=True)), + ('password_hash', models.CharField(max_length=128, null=True, verbose_name='Password hash', blank=True)), + ('account', models.ForeignKey(related_name='auto_admin_account', verbose_name='Account', blank=True, to=settings.AUTH_USER_MODEL, null=True)), + ], + options={ + 'verbose_name': 'Auto admin properties', + 'verbose_name_plural': 'Auto admin properties', + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='SharedUploadedFile', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('file', models.FileField(upload_to=common.models.upload_to, storage=storage.backends.filebasedstorage.FileBasedStorage(), verbose_name='File')), + ('filename', models.CharField(max_length=255, verbose_name='Filename')), + ('datatime', models.DateTimeField(auto_now_add=True, verbose_name='Date time')), + ], + options={ + 'verbose_name': 'Shared uploaded file', + 'verbose_name_plural': 'Shared uploaded files', + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='UserLocaleProfile', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('timezone', models.CharField(max_length=48, verbose_name='Timezone', choices=[(b'Africa/Abidjan', b'Africa/Abidjan'), (b'Africa/Accra', b'Africa/Accra'), (b'Africa/Addis_Ababa', b'Africa/Addis_Ababa'), (b'Africa/Algiers', b'Africa/Algiers'), (b'Africa/Asmara', b'Africa/Asmara'), (b'Africa/Bamako', b'Africa/Bamako'), (b'Africa/Bangui', b'Africa/Bangui'), (b'Africa/Banjul', b'Africa/Banjul'), (b'Africa/Bissau', b'Africa/Bissau'), (b'Africa/Blantyre', b'Africa/Blantyre'), (b'Africa/Brazzaville', b'Africa/Brazzaville'), (b'Africa/Bujumbura', b'Africa/Bujumbura'), (b'Africa/Cairo', b'Africa/Cairo'), (b'Africa/Casablanca', b'Africa/Casablanca'), (b'Africa/Ceuta', b'Africa/Ceuta'), (b'Africa/Conakry', b'Africa/Conakry'), (b'Africa/Dakar', b'Africa/Dakar'), (b'Africa/Dar_es_Salaam', b'Africa/Dar_es_Salaam'), (b'Africa/Djibouti', b'Africa/Djibouti'), (b'Africa/Douala', b'Africa/Douala'), (b'Africa/El_Aaiun', b'Africa/El_Aaiun'), (b'Africa/Freetown', b'Africa/Freetown'), (b'Africa/Gaborone', b'Africa/Gaborone'), (b'Africa/Harare', b'Africa/Harare'), (b'Africa/Johannesburg', b'Africa/Johannesburg'), (b'Africa/Juba', b'Africa/Juba'), (b'Africa/Kampala', b'Africa/Kampala'), (b'Africa/Khartoum', b'Africa/Khartoum'), (b'Africa/Kigali', b'Africa/Kigali'), (b'Africa/Kinshasa', b'Africa/Kinshasa'), (b'Africa/Lagos', b'Africa/Lagos'), (b'Africa/Libreville', b'Africa/Libreville'), (b'Africa/Lome', b'Africa/Lome'), (b'Africa/Luanda', b'Africa/Luanda'), (b'Africa/Lubumbashi', b'Africa/Lubumbashi'), (b'Africa/Lusaka', b'Africa/Lusaka'), (b'Africa/Malabo', b'Africa/Malabo'), (b'Africa/Maputo', b'Africa/Maputo'), (b'Africa/Maseru', b'Africa/Maseru'), (b'Africa/Mbabane', b'Africa/Mbabane'), (b'Africa/Mogadishu', b'Africa/Mogadishu'), (b'Africa/Monrovia', b'Africa/Monrovia'), (b'Africa/Nairobi', b'Africa/Nairobi'), (b'Africa/Ndjamena', b'Africa/Ndjamena'), (b'Africa/Niamey', b'Africa/Niamey'), (b'Africa/Nouakchott', b'Africa/Nouakchott'), (b'Africa/Ouagadougou', b'Africa/Ouagadougou'), (b'Africa/Porto-Novo', b'Africa/Porto-Novo'), (b'Africa/Sao_Tome', b'Africa/Sao_Tome'), (b'Africa/Tripoli', b'Africa/Tripoli'), (b'Africa/Tunis', b'Africa/Tunis'), (b'Africa/Windhoek', b'Africa/Windhoek'), (b'America/Adak', b'America/Adak'), (b'America/Anchorage', b'America/Anchorage'), (b'America/Anguilla', b'America/Anguilla'), (b'America/Antigua', b'America/Antigua'), (b'America/Araguaina', b'America/Araguaina'), (b'America/Argentina/Buenos_Aires', b'America/Argentina/Buenos_Aires'), (b'America/Argentina/Catamarca', b'America/Argentina/Catamarca'), (b'America/Argentina/Cordoba', b'America/Argentina/Cordoba'), (b'America/Argentina/Jujuy', b'America/Argentina/Jujuy'), (b'America/Argentina/La_Rioja', b'America/Argentina/La_Rioja'), (b'America/Argentina/Mendoza', b'America/Argentina/Mendoza'), (b'America/Argentina/Rio_Gallegos', b'America/Argentina/Rio_Gallegos'), (b'America/Argentina/Salta', b'America/Argentina/Salta'), (b'America/Argentina/San_Juan', b'America/Argentina/San_Juan'), (b'America/Argentina/San_Luis', b'America/Argentina/San_Luis'), (b'America/Argentina/Tucuman', b'America/Argentina/Tucuman'), (b'America/Argentina/Ushuaia', b'America/Argentina/Ushuaia'), (b'America/Aruba', b'America/Aruba'), (b'America/Asuncion', b'America/Asuncion'), (b'America/Atikokan', b'America/Atikokan'), (b'America/Bahia', b'America/Bahia'), (b'America/Bahia_Banderas', b'America/Bahia_Banderas'), (b'America/Barbados', b'America/Barbados'), (b'America/Belem', b'America/Belem'), (b'America/Belize', b'America/Belize'), (b'America/Blanc-Sablon', b'America/Blanc-Sablon'), (b'America/Boa_Vista', b'America/Boa_Vista'), (b'America/Bogota', b'America/Bogota'), (b'America/Boise', b'America/Boise'), (b'America/Cambridge_Bay', b'America/Cambridge_Bay'), (b'America/Campo_Grande', b'America/Campo_Grande'), (b'America/Cancun', b'America/Cancun'), (b'America/Caracas', b'America/Caracas'), (b'America/Cayenne', b'America/Cayenne'), (b'America/Cayman', b'America/Cayman'), (b'America/Chicago', b'America/Chicago'), (b'America/Chihuahua', b'America/Chihuahua'), (b'America/Costa_Rica', b'America/Costa_Rica'), (b'America/Creston', b'America/Creston'), (b'America/Cuiaba', b'America/Cuiaba'), (b'America/Curacao', b'America/Curacao'), (b'America/Danmarkshavn', b'America/Danmarkshavn'), (b'America/Dawson', b'America/Dawson'), (b'America/Dawson_Creek', b'America/Dawson_Creek'), (b'America/Denver', b'America/Denver'), (b'America/Detroit', b'America/Detroit'), (b'America/Dominica', b'America/Dominica'), (b'America/Edmonton', b'America/Edmonton'), (b'America/Eirunepe', b'America/Eirunepe'), (b'America/El_Salvador', b'America/El_Salvador'), (b'America/Fortaleza', b'America/Fortaleza'), (b'America/Glace_Bay', b'America/Glace_Bay'), (b'America/Godthab', b'America/Godthab'), (b'America/Goose_Bay', b'America/Goose_Bay'), (b'America/Grand_Turk', b'America/Grand_Turk'), (b'America/Grenada', b'America/Grenada'), (b'America/Guadeloupe', b'America/Guadeloupe'), (b'America/Guatemala', b'America/Guatemala'), (b'America/Guayaquil', b'America/Guayaquil'), (b'America/Guyana', b'America/Guyana'), (b'America/Halifax', b'America/Halifax'), (b'America/Havana', b'America/Havana'), (b'America/Hermosillo', b'America/Hermosillo'), (b'America/Indiana/Indianapolis', b'America/Indiana/Indianapolis'), (b'America/Indiana/Knox', b'America/Indiana/Knox'), (b'America/Indiana/Marengo', b'America/Indiana/Marengo'), (b'America/Indiana/Petersburg', b'America/Indiana/Petersburg'), (b'America/Indiana/Tell_City', b'America/Indiana/Tell_City'), (b'America/Indiana/Vevay', b'America/Indiana/Vevay'), (b'America/Indiana/Vincennes', b'America/Indiana/Vincennes'), (b'America/Indiana/Winamac', b'America/Indiana/Winamac'), (b'America/Inuvik', b'America/Inuvik'), (b'America/Iqaluit', b'America/Iqaluit'), (b'America/Jamaica', b'America/Jamaica'), (b'America/Juneau', b'America/Juneau'), (b'America/Kentucky/Louisville', b'America/Kentucky/Louisville'), (b'America/Kentucky/Monticello', b'America/Kentucky/Monticello'), (b'America/Kralendijk', b'America/Kralendijk'), (b'America/La_Paz', b'America/La_Paz'), (b'America/Lima', b'America/Lima'), (b'America/Los_Angeles', b'America/Los_Angeles'), (b'America/Lower_Princes', b'America/Lower_Princes'), (b'America/Maceio', b'America/Maceio'), (b'America/Managua', b'America/Managua'), (b'America/Manaus', b'America/Manaus'), (b'America/Marigot', b'America/Marigot'), (b'America/Martinique', b'America/Martinique'), (b'America/Matamoros', b'America/Matamoros'), (b'America/Mazatlan', b'America/Mazatlan'), (b'America/Menominee', b'America/Menominee'), (b'America/Merida', b'America/Merida'), (b'America/Metlakatla', b'America/Metlakatla'), (b'America/Mexico_City', b'America/Mexico_City'), (b'America/Miquelon', b'America/Miquelon'), (b'America/Moncton', b'America/Moncton'), (b'America/Monterrey', b'America/Monterrey'), (b'America/Montevideo', b'America/Montevideo'), (b'America/Montreal', b'America/Montreal'), (b'America/Montserrat', b'America/Montserrat'), (b'America/Nassau', b'America/Nassau'), (b'America/New_York', b'America/New_York'), (b'America/Nipigon', b'America/Nipigon'), (b'America/Nome', b'America/Nome'), (b'America/Noronha', b'America/Noronha'), (b'America/North_Dakota/Beulah', b'America/North_Dakota/Beulah'), (b'America/North_Dakota/Center', b'America/North_Dakota/Center'), (b'America/North_Dakota/New_Salem', b'America/North_Dakota/New_Salem'), (b'America/Ojinaga', b'America/Ojinaga'), (b'America/Panama', b'America/Panama'), (b'America/Pangnirtung', b'America/Pangnirtung'), (b'America/Paramaribo', b'America/Paramaribo'), (b'America/Phoenix', b'America/Phoenix'), (b'America/Port-au-Prince', b'America/Port-au-Prince'), (b'America/Port_of_Spain', b'America/Port_of_Spain'), (b'America/Porto_Velho', b'America/Porto_Velho'), (b'America/Puerto_Rico', b'America/Puerto_Rico'), (b'America/Rainy_River', b'America/Rainy_River'), (b'America/Rankin_Inlet', b'America/Rankin_Inlet'), (b'America/Recife', b'America/Recife'), (b'America/Regina', b'America/Regina'), (b'America/Resolute', b'America/Resolute'), (b'America/Rio_Branco', b'America/Rio_Branco'), (b'America/Santa_Isabel', b'America/Santa_Isabel'), (b'America/Santarem', b'America/Santarem'), (b'America/Santiago', b'America/Santiago'), (b'America/Santo_Domingo', b'America/Santo_Domingo'), (b'America/Sao_Paulo', b'America/Sao_Paulo'), (b'America/Scoresbysund', b'America/Scoresbysund'), (b'America/Sitka', b'America/Sitka'), (b'America/St_Barthelemy', b'America/St_Barthelemy'), (b'America/St_Johns', b'America/St_Johns'), (b'America/St_Kitts', b'America/St_Kitts'), (b'America/St_Lucia', b'America/St_Lucia'), (b'America/St_Thomas', b'America/St_Thomas'), (b'America/St_Vincent', b'America/St_Vincent'), (b'America/Swift_Current', b'America/Swift_Current'), (b'America/Tegucigalpa', b'America/Tegucigalpa'), (b'America/Thule', b'America/Thule'), (b'America/Thunder_Bay', b'America/Thunder_Bay'), (b'America/Tijuana', b'America/Tijuana'), (b'America/Toronto', b'America/Toronto'), (b'America/Tortola', b'America/Tortola'), (b'America/Vancouver', b'America/Vancouver'), (b'America/Whitehorse', b'America/Whitehorse'), (b'America/Winnipeg', b'America/Winnipeg'), (b'America/Yakutat', b'America/Yakutat'), (b'America/Yellowknife', b'America/Yellowknife'), (b'Antarctica/Casey', b'Antarctica/Casey'), (b'Antarctica/Davis', b'Antarctica/Davis'), (b'Antarctica/DumontDUrville', b'Antarctica/DumontDUrville'), (b'Antarctica/Macquarie', b'Antarctica/Macquarie'), (b'Antarctica/Mawson', b'Antarctica/Mawson'), (b'Antarctica/McMurdo', b'Antarctica/McMurdo'), (b'Antarctica/Palmer', b'Antarctica/Palmer'), (b'Antarctica/Rothera', b'Antarctica/Rothera'), (b'Antarctica/Syowa', b'Antarctica/Syowa'), (b'Antarctica/Troll', b'Antarctica/Troll'), (b'Antarctica/Vostok', b'Antarctica/Vostok'), (b'Arctic/Longyearbyen', b'Arctic/Longyearbyen'), (b'Asia/Aden', b'Asia/Aden'), (b'Asia/Almaty', b'Asia/Almaty'), (b'Asia/Amman', b'Asia/Amman'), (b'Asia/Anadyr', b'Asia/Anadyr'), (b'Asia/Aqtau', b'Asia/Aqtau'), (b'Asia/Aqtobe', b'Asia/Aqtobe'), (b'Asia/Ashgabat', b'Asia/Ashgabat'), (b'Asia/Baghdad', b'Asia/Baghdad'), (b'Asia/Bahrain', b'Asia/Bahrain'), (b'Asia/Baku', b'Asia/Baku'), (b'Asia/Bangkok', b'Asia/Bangkok'), (b'Asia/Beirut', b'Asia/Beirut'), (b'Asia/Bishkek', b'Asia/Bishkek'), (b'Asia/Brunei', b'Asia/Brunei'), (b'Asia/Choibalsan', b'Asia/Choibalsan'), (b'Asia/Chongqing', b'Asia/Chongqing'), (b'Asia/Colombo', b'Asia/Colombo'), (b'Asia/Damascus', b'Asia/Damascus'), (b'Asia/Dhaka', b'Asia/Dhaka'), (b'Asia/Dili', b'Asia/Dili'), (b'Asia/Dubai', b'Asia/Dubai'), (b'Asia/Dushanbe', b'Asia/Dushanbe'), (b'Asia/Gaza', b'Asia/Gaza'), (b'Asia/Harbin', b'Asia/Harbin'), (b'Asia/Hebron', b'Asia/Hebron'), (b'Asia/Ho_Chi_Minh', b'Asia/Ho_Chi_Minh'), (b'Asia/Hong_Kong', b'Asia/Hong_Kong'), (b'Asia/Hovd', b'Asia/Hovd'), (b'Asia/Irkutsk', b'Asia/Irkutsk'), (b'Asia/Jakarta', b'Asia/Jakarta'), (b'Asia/Jayapura', b'Asia/Jayapura'), (b'Asia/Jerusalem', b'Asia/Jerusalem'), (b'Asia/Kabul', b'Asia/Kabul'), (b'Asia/Kamchatka', b'Asia/Kamchatka'), (b'Asia/Karachi', b'Asia/Karachi'), (b'Asia/Kashgar', b'Asia/Kashgar'), (b'Asia/Kathmandu', b'Asia/Kathmandu'), (b'Asia/Khandyga', b'Asia/Khandyga'), (b'Asia/Kolkata', b'Asia/Kolkata'), (b'Asia/Krasnoyarsk', b'Asia/Krasnoyarsk'), (b'Asia/Kuala_Lumpur', b'Asia/Kuala_Lumpur'), (b'Asia/Kuching', b'Asia/Kuching'), (b'Asia/Kuwait', b'Asia/Kuwait'), (b'Asia/Macau', b'Asia/Macau'), (b'Asia/Magadan', b'Asia/Magadan'), (b'Asia/Makassar', b'Asia/Makassar'), (b'Asia/Manila', b'Asia/Manila'), (b'Asia/Muscat', b'Asia/Muscat'), (b'Asia/Nicosia', b'Asia/Nicosia'), (b'Asia/Novokuznetsk', b'Asia/Novokuznetsk'), (b'Asia/Novosibirsk', b'Asia/Novosibirsk'), (b'Asia/Omsk', b'Asia/Omsk'), (b'Asia/Oral', b'Asia/Oral'), (b'Asia/Phnom_Penh', b'Asia/Phnom_Penh'), (b'Asia/Pontianak', b'Asia/Pontianak'), (b'Asia/Pyongyang', b'Asia/Pyongyang'), (b'Asia/Qatar', b'Asia/Qatar'), (b'Asia/Qyzylorda', b'Asia/Qyzylorda'), (b'Asia/Rangoon', b'Asia/Rangoon'), (b'Asia/Riyadh', b'Asia/Riyadh'), (b'Asia/Sakhalin', b'Asia/Sakhalin'), (b'Asia/Samarkand', b'Asia/Samarkand'), (b'Asia/Seoul', b'Asia/Seoul'), (b'Asia/Shanghai', b'Asia/Shanghai'), (b'Asia/Singapore', b'Asia/Singapore'), (b'Asia/Taipei', b'Asia/Taipei'), (b'Asia/Tashkent', b'Asia/Tashkent'), (b'Asia/Tbilisi', b'Asia/Tbilisi'), (b'Asia/Tehran', b'Asia/Tehran'), (b'Asia/Thimphu', b'Asia/Thimphu'), (b'Asia/Tokyo', b'Asia/Tokyo'), (b'Asia/Ulaanbaatar', b'Asia/Ulaanbaatar'), (b'Asia/Urumqi', b'Asia/Urumqi'), (b'Asia/Ust-Nera', b'Asia/Ust-Nera'), (b'Asia/Vientiane', b'Asia/Vientiane'), (b'Asia/Vladivostok', b'Asia/Vladivostok'), (b'Asia/Yakutsk', b'Asia/Yakutsk'), (b'Asia/Yekaterinburg', b'Asia/Yekaterinburg'), (b'Asia/Yerevan', b'Asia/Yerevan'), (b'Atlantic/Azores', b'Atlantic/Azores'), (b'Atlantic/Bermuda', b'Atlantic/Bermuda'), (b'Atlantic/Canary', b'Atlantic/Canary'), (b'Atlantic/Cape_Verde', b'Atlantic/Cape_Verde'), (b'Atlantic/Faroe', b'Atlantic/Faroe'), (b'Atlantic/Madeira', b'Atlantic/Madeira'), (b'Atlantic/Reykjavik', b'Atlantic/Reykjavik'), (b'Atlantic/South_Georgia', b'Atlantic/South_Georgia'), (b'Atlantic/St_Helena', b'Atlantic/St_Helena'), (b'Atlantic/Stanley', b'Atlantic/Stanley'), (b'Australia/Adelaide', b'Australia/Adelaide'), (b'Australia/Brisbane', b'Australia/Brisbane'), (b'Australia/Broken_Hill', b'Australia/Broken_Hill'), (b'Australia/Currie', b'Australia/Currie'), (b'Australia/Darwin', b'Australia/Darwin'), (b'Australia/Eucla', b'Australia/Eucla'), (b'Australia/Hobart', b'Australia/Hobart'), (b'Australia/Lindeman', b'Australia/Lindeman'), (b'Australia/Lord_Howe', b'Australia/Lord_Howe'), (b'Australia/Melbourne', b'Australia/Melbourne'), (b'Australia/Perth', b'Australia/Perth'), (b'Australia/Sydney', b'Australia/Sydney'), (b'Canada/Atlantic', b'Canada/Atlantic'), (b'Canada/Central', b'Canada/Central'), (b'Canada/Eastern', b'Canada/Eastern'), (b'Canada/Mountain', b'Canada/Mountain'), (b'Canada/Newfoundland', b'Canada/Newfoundland'), (b'Canada/Pacific', b'Canada/Pacific'), (b'Europe/Amsterdam', b'Europe/Amsterdam'), (b'Europe/Andorra', b'Europe/Andorra'), (b'Europe/Athens', b'Europe/Athens'), (b'Europe/Belgrade', b'Europe/Belgrade'), (b'Europe/Berlin', b'Europe/Berlin'), (b'Europe/Bratislava', b'Europe/Bratislava'), (b'Europe/Brussels', b'Europe/Brussels'), (b'Europe/Bucharest', b'Europe/Bucharest'), (b'Europe/Budapest', b'Europe/Budapest'), (b'Europe/Busingen', b'Europe/Busingen'), (b'Europe/Chisinau', b'Europe/Chisinau'), (b'Europe/Copenhagen', b'Europe/Copenhagen'), (b'Europe/Dublin', b'Europe/Dublin'), (b'Europe/Gibraltar', b'Europe/Gibraltar'), (b'Europe/Guernsey', b'Europe/Guernsey'), (b'Europe/Helsinki', b'Europe/Helsinki'), (b'Europe/Isle_of_Man', b'Europe/Isle_of_Man'), (b'Europe/Istanbul', b'Europe/Istanbul'), (b'Europe/Jersey', b'Europe/Jersey'), (b'Europe/Kaliningrad', b'Europe/Kaliningrad'), (b'Europe/Kiev', b'Europe/Kiev'), (b'Europe/Lisbon', b'Europe/Lisbon'), (b'Europe/Ljubljana', b'Europe/Ljubljana'), (b'Europe/London', b'Europe/London'), (b'Europe/Luxembourg', b'Europe/Luxembourg'), (b'Europe/Madrid', b'Europe/Madrid'), (b'Europe/Malta', b'Europe/Malta'), (b'Europe/Mariehamn', b'Europe/Mariehamn'), (b'Europe/Minsk', b'Europe/Minsk'), (b'Europe/Monaco', b'Europe/Monaco'), (b'Europe/Moscow', b'Europe/Moscow'), (b'Europe/Oslo', b'Europe/Oslo'), (b'Europe/Paris', b'Europe/Paris'), (b'Europe/Podgorica', b'Europe/Podgorica'), (b'Europe/Prague', b'Europe/Prague'), (b'Europe/Riga', b'Europe/Riga'), (b'Europe/Rome', b'Europe/Rome'), (b'Europe/Samara', b'Europe/Samara'), (b'Europe/San_Marino', b'Europe/San_Marino'), (b'Europe/Sarajevo', b'Europe/Sarajevo'), (b'Europe/Simferopol', b'Europe/Simferopol'), (b'Europe/Skopje', b'Europe/Skopje'), (b'Europe/Sofia', b'Europe/Sofia'), (b'Europe/Stockholm', b'Europe/Stockholm'), (b'Europe/Tallinn', b'Europe/Tallinn'), (b'Europe/Tirane', b'Europe/Tirane'), (b'Europe/Uzhgorod', b'Europe/Uzhgorod'), (b'Europe/Vaduz', b'Europe/Vaduz'), (b'Europe/Vatican', b'Europe/Vatican'), (b'Europe/Vienna', b'Europe/Vienna'), (b'Europe/Vilnius', b'Europe/Vilnius'), (b'Europe/Volgograd', b'Europe/Volgograd'), (b'Europe/Warsaw', b'Europe/Warsaw'), (b'Europe/Zagreb', b'Europe/Zagreb'), (b'Europe/Zaporozhye', b'Europe/Zaporozhye'), (b'Europe/Zurich', b'Europe/Zurich'), (b'GMT', b'GMT'), (b'Indian/Antananarivo', b'Indian/Antananarivo'), (b'Indian/Chagos', b'Indian/Chagos'), (b'Indian/Christmas', b'Indian/Christmas'), (b'Indian/Cocos', b'Indian/Cocos'), (b'Indian/Comoro', b'Indian/Comoro'), (b'Indian/Kerguelen', b'Indian/Kerguelen'), (b'Indian/Mahe', b'Indian/Mahe'), (b'Indian/Maldives', b'Indian/Maldives'), (b'Indian/Mauritius', b'Indian/Mauritius'), (b'Indian/Mayotte', b'Indian/Mayotte'), (b'Indian/Reunion', b'Indian/Reunion'), (b'Pacific/Apia', b'Pacific/Apia'), (b'Pacific/Auckland', b'Pacific/Auckland'), (b'Pacific/Chatham', b'Pacific/Chatham'), (b'Pacific/Chuuk', b'Pacific/Chuuk'), (b'Pacific/Easter', b'Pacific/Easter'), (b'Pacific/Efate', b'Pacific/Efate'), (b'Pacific/Enderbury', b'Pacific/Enderbury'), (b'Pacific/Fakaofo', b'Pacific/Fakaofo'), (b'Pacific/Fiji', b'Pacific/Fiji'), (b'Pacific/Funafuti', b'Pacific/Funafuti'), (b'Pacific/Galapagos', b'Pacific/Galapagos'), (b'Pacific/Gambier', b'Pacific/Gambier'), (b'Pacific/Guadalcanal', b'Pacific/Guadalcanal'), (b'Pacific/Guam', b'Pacific/Guam'), (b'Pacific/Honolulu', b'Pacific/Honolulu'), (b'Pacific/Johnston', b'Pacific/Johnston'), (b'Pacific/Kiritimati', b'Pacific/Kiritimati'), (b'Pacific/Kosrae', b'Pacific/Kosrae'), (b'Pacific/Kwajalein', b'Pacific/Kwajalein'), (b'Pacific/Majuro', b'Pacific/Majuro'), (b'Pacific/Marquesas', b'Pacific/Marquesas'), (b'Pacific/Midway', b'Pacific/Midway'), (b'Pacific/Nauru', b'Pacific/Nauru'), (b'Pacific/Niue', b'Pacific/Niue'), (b'Pacific/Norfolk', b'Pacific/Norfolk'), (b'Pacific/Noumea', b'Pacific/Noumea'), (b'Pacific/Pago_Pago', b'Pacific/Pago_Pago'), (b'Pacific/Palau', b'Pacific/Palau'), (b'Pacific/Pitcairn', b'Pacific/Pitcairn'), (b'Pacific/Pohnpei', b'Pacific/Pohnpei'), (b'Pacific/Port_Moresby', b'Pacific/Port_Moresby'), (b'Pacific/Rarotonga', b'Pacific/Rarotonga'), (b'Pacific/Saipan', b'Pacific/Saipan'), (b'Pacific/Tahiti', b'Pacific/Tahiti'), (b'Pacific/Tarawa', b'Pacific/Tarawa'), (b'Pacific/Tongatapu', b'Pacific/Tongatapu'), (b'Pacific/Wake', b'Pacific/Wake'), (b'Pacific/Wallis', b'Pacific/Wallis'), (b'US/Alaska', b'US/Alaska'), (b'US/Arizona', b'US/Arizona'), (b'US/Central', b'US/Central'), (b'US/Eastern', b'US/Eastern'), (b'US/Hawaii', b'US/Hawaii'), (b'US/Mountain', b'US/Mountain'), (b'US/Pacific', b'US/Pacific'), (b'UTC', b'UTC')])), + ('language', models.CharField(max_length=8, verbose_name='Language', choices=[('ar', 'Arabic'), ('bg', 'Bulgarian'), ('bs', 'Bosnian (Bosnia and Herzegovina)'), ('da', 'Danish'), ('de', 'German (Germany)'), ('en', 'English'), ('es', 'Spanish'), ('fa', 'Persian'), ('fr', 'French'), ('hu', 'Hungarian'), ('hr', 'Croatian'), ('id', 'Indonesian'), ('it', 'Italian'), ('nl', 'Dutch (Nethherlands)'), ('pl', 'Polish'), ('pt', 'Portuguese'), ('pt-br', 'Portuguese (Brazil)'), ('ro', 'Romanian (Romania)'), ('ru', 'Russian'), ('sl', 'Slovenian'), ('tr', 'Turkish'), ('vi', 'Vietnamese (Viet Nam)'), ('zh-cn', 'Chinese (China)')])), + ('user', models.OneToOneField(related_name='locale_profile', verbose_name='User', to=settings.AUTH_USER_MODEL)), + ], + options={ + 'verbose_name': 'User locale profile', + 'verbose_name_plural': 'User locale profiles', + }, + bases=(models.Model,), + ), + ] diff --git a/mayan/apps/common/south_migrations/__init__.py b/mayan/apps/common/migrations/__init__.py similarity index 100% rename from mayan/apps/common/south_migrations/__init__.py rename to mayan/apps/common/migrations/__init__.py diff --git a/mayan/apps/common/south_migrations/0001_initial.py b/mayan/apps/common/south_migrations/0001_initial.py deleted file mode 100644 index 18562a7fea..0000000000 --- a/mayan/apps/common/south_migrations/0001_initial.py +++ /dev/null @@ -1,28 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - def forwards(self, orm): - # Adding model 'AnonymousUserSingleton' - db.create_table('common_anonymoususersingleton', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('lock_id', self.gf('django.db.models.fields.CharField')(default=1, unique=True, max_length=1)), - )) - db.send_create_signal('common', ['AnonymousUserSingleton']) - - def backwards(self, orm): - # Deleting model 'AnonymousUserSingleton' - db.delete_table('common_anonymoususersingleton') - - models = { - 'common.anonymoususersingleton': { - 'Meta': {'object_name': 'AnonymousUserSingleton'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'lock_id': ('django.db.models.fields.CharField', [], {'default': '1', 'unique': 'True', 'max_length': '1'}) - } - } - - complete_apps = ['common'] diff --git a/mayan/apps/common/south_migrations/0002_auto__add_autoadminsingleton.py b/mayan/apps/common/south_migrations/0002_auto__add_autoadminsingleton.py deleted file mode 100644 index a0c168d8c4..0000000000 --- a/mayan/apps/common/south_migrations/0002_auto__add_autoadminsingleton.py +++ /dev/null @@ -1,74 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'AutoAdminSingleton' - db.create_table('common_autoadminsingleton', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('lock_id', self.gf('django.db.models.fields.CharField')(default=1, unique=True, max_length=1)), - ('original_auto_admin_password', self.gf('django.db.models.fields.BooleanField')(default=True)), - ('auto_admin', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True, blank=True)), - )) - db.send_create_signal('common', ['AutoAdminSingleton']) - - def backwards(self, orm): - # Deleting model 'AutoAdminSingleton' - db.delete_table('common_autoadminsingleton') - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - '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': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - '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': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - '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': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'common.anonymoususersingleton': { - 'Meta': {'object_name': 'AnonymousUserSingleton'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'lock_id': ('django.db.models.fields.CharField', [], {'default': '1', 'unique': 'True', 'max_length': '1'}) - }, - 'common.autoadminsingleton': { - 'Meta': {'object_name': 'AutoAdminSingleton'}, - 'auto_admin': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'lock_id': ('django.db.models.fields.CharField', [], {'default': '1', 'unique': 'True', 'max_length': '1'}), - 'original_auto_admin_password': ('django.db.models.fields.BooleanField', [], {'default': 'True'}) - }, - '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'}), - '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'}) - } - } - - complete_apps = ['common'] diff --git a/mayan/apps/common/south_migrations/0003_auto__del_field_autoadminsingleton_original_auto_admin_password__del_f.py b/mayan/apps/common/south_migrations/0003_auto__del_field_autoadminsingleton_original_auto_admin_password__del_f.py deleted file mode 100644 index 345600db63..0000000000 --- a/mayan/apps/common/south_migrations/0003_auto__del_field_autoadminsingleton_original_auto_admin_password__del_f.py +++ /dev/null @@ -1,94 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Deleting field 'AutoAdminSingleton.original_auto_admin_password' - db.delete_column('common_autoadminsingleton', 'original_auto_admin_password') - - # Deleting field 'AutoAdminSingleton.auto_admin' - db.delete_column('common_autoadminsingleton', 'auto_admin_id') - - # Adding field 'AutoAdminSingleton.auto_admin_account' - db.add_column('common_autoadminsingleton', 'auto_admin_account', - self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='auto_admin_account', null=True, to=orm['auth.User']), - keep_default=False) - - # Adding field 'AutoAdminSingleton.auto_admin_password' - db.add_column('common_autoadminsingleton', 'auto_admin_password', - self.gf('django.db.models.fields.CharField')(max_length=128, null=True, blank=True), - keep_default=False) - - def backwards(self, orm): - # Adding field 'AutoAdminSingleton.original_auto_admin_password' - db.add_column('common_autoadminsingleton', 'original_auto_admin_password', - self.gf('django.db.models.fields.BooleanField')(default=True), - keep_default=False) - - # Adding field 'AutoAdminSingleton.auto_admin' - db.add_column('common_autoadminsingleton', 'auto_admin', - self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True, blank=True), - keep_default=False) - - # Deleting field 'AutoAdminSingleton.auto_admin_account' - db.delete_column('common_autoadminsingleton', 'auto_admin_account_id') - - # Deleting field 'AutoAdminSingleton.auto_admin_password' - db.delete_column('common_autoadminsingleton', 'auto_admin_password') - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - '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': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - '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': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - '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': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'common.anonymoususersingleton': { - 'Meta': {'object_name': 'AnonymousUserSingleton'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'lock_id': ('django.db.models.fields.CharField', [], {'default': '1', 'unique': 'True', 'max_length': '1'}) - }, - 'common.autoadminsingleton': { - 'Meta': {'object_name': 'AutoAdminSingleton'}, - 'auto_admin_account': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'auto_admin_account'", 'null': 'True', 'to': "orm['auth.User']"}), - 'auto_admin_password': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'lock_id': ('django.db.models.fields.CharField', [], {'default': '1', 'unique': 'True', 'max_length': '1'}) - }, - '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'}), - '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'}) - } - } - - complete_apps = ['common'] diff --git a/mayan/apps/common/south_migrations/0004_auto__del_field_autoadminsingleton_auto_admin_password__del_field_auto.py b/mayan/apps/common/south_migrations/0004_auto__del_field_autoadminsingleton_auto_admin_password__del_field_auto.py deleted file mode 100644 index da7f16bc27..0000000000 --- a/mayan/apps/common/south_migrations/0004_auto__del_field_autoadminsingleton_auto_admin_password__del_field_auto.py +++ /dev/null @@ -1,103 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Deleting field 'AutoAdminSingleton.auto_admin_password' - db.delete_column('common_autoadminsingleton', 'auto_admin_password') - - # Deleting field 'AutoAdminSingleton.auto_admin_account' - db.delete_column('common_autoadminsingleton', 'auto_admin_account_id') - - # Adding field 'AutoAdminSingleton.account' - db.add_column('common_autoadminsingleton', 'account', - self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='auto_admin_account', null=True, to=orm['auth.User']), - keep_default=False) - - # Adding field 'AutoAdminSingleton.password' - db.add_column('common_autoadminsingleton', 'password', - self.gf('django.db.models.fields.CharField')(max_length=128, null=True, blank=True), - keep_default=False) - - # Adding field 'AutoAdminSingleton.password_hash' - db.add_column('common_autoadminsingleton', 'password_hash', - self.gf('django.db.models.fields.CharField')(max_length=128, null=True, blank=True), - keep_default=False) - - def backwards(self, orm): - # Adding field 'AutoAdminSingleton.auto_admin_password' - db.add_column('common_autoadminsingleton', 'auto_admin_password', - self.gf('django.db.models.fields.CharField')(max_length=128, null=True, blank=True), - keep_default=False) - - # Adding field 'AutoAdminSingleton.auto_admin_account' - db.add_column('common_autoadminsingleton', 'auto_admin_account', - self.gf('django.db.models.fields.related.ForeignKey')(related_name='auto_admin_account', null=True, to=orm['auth.User'], blank=True), - keep_default=False) - - # Deleting field 'AutoAdminSingleton.account' - db.delete_column('common_autoadminsingleton', 'account_id') - - # Deleting field 'AutoAdminSingleton.password' - db.delete_column('common_autoadminsingleton', 'password') - - # Deleting field 'AutoAdminSingleton.password_hash' - db.delete_column('common_autoadminsingleton', 'password_hash') - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - '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': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - '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': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - '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': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'common.anonymoususersingleton': { - 'Meta': {'object_name': 'AnonymousUserSingleton'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'lock_id': ('django.db.models.fields.CharField', [], {'default': '1', 'unique': 'True', 'max_length': '1'}) - }, - 'common.autoadminsingleton': { - 'Meta': {'object_name': 'AutoAdminSingleton'}, - 'account': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'auto_admin_account'", 'null': 'True', 'to': "orm['auth.User']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'lock_id': ('django.db.models.fields.CharField', [], {'default': '1', 'unique': 'True', 'max_length': '1'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}), - 'password_hash': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}) - }, - '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'}), - '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'}) - } - } - - complete_apps = ['common'] diff --git a/mayan/apps/common/south_migrations/0005_auto__del_field_autoadminsingleton_lock_id__del_field_anonymoususersin.py b/mayan/apps/common/south_migrations/0005_auto__del_field_autoadminsingleton_lock_id__del_field_anonymoususersin.py deleted file mode 100644 index a6d9253227..0000000000 --- a/mayan/apps/common/south_migrations/0005_auto__del_field_autoadminsingleton_lock_id__del_field_anonymoususersin.py +++ /dev/null @@ -1,77 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Deleting field 'AutoAdminSingleton.lock_id' - db.delete_column(u'common_autoadminsingleton', 'lock_id') - - # Deleting field 'AnonymousUserSingleton.lock_id' - db.delete_column(u'common_anonymoususersingleton', 'lock_id') - - def backwards(self, orm): - # Adding field 'AutoAdminSingleton.lock_id' - db.add_column(u'common_autoadminsingleton', 'lock_id', - self.gf('django.db.models.fields.CharField')(default=1, max_length=1, unique=True), - keep_default=False) - - # Adding field 'AnonymousUserSingleton.lock_id' - db.add_column(u'common_anonymoususersingleton', 'lock_id', - self.gf('django.db.models.fields.CharField')(default=1, max_length=1, unique=True), - keep_default=False) - - models = { - 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', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Group']"}), - 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', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Permission']"}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - u'common.anonymoususersingleton': { - 'Meta': {'object_name': 'AnonymousUserSingleton'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - u'common.autoadminsingleton': { - 'Meta': {'object_name': 'AutoAdminSingleton'}, - 'account': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'auto_admin_account'", 'null': 'True', 'to': u"orm['auth.User']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}), - 'password_hash': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}) - }, - 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'}) - } - } - - complete_apps = ['common'] diff --git a/mayan/apps/common/south_migrations/0006_auto__add_shareduploadedfile.py b/mayan/apps/common/south_migrations/0006_auto__add_shareduploadedfile.py deleted file mode 100644 index c0d64bcf26..0000000000 --- a/mayan/apps/common/south_migrations/0006_auto__add_shareduploadedfile.py +++ /dev/null @@ -1,76 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'SharedUploadedFile' - db.create_table(u'common_shareduploadedfile', ( - (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('file', self.gf('django.db.models.fields.files.FileField')(max_length=100)), - )) - db.send_create_signal(u'common', ['SharedUploadedFile']) - - def backwards(self, orm): - # Deleting model 'SharedUploadedFile' - db.delete_table(u'common_shareduploadedfile') - - models = { - 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', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Group']"}), - 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', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Permission']"}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - u'common.anonymoususersingleton': { - 'Meta': {'object_name': 'AnonymousUserSingleton'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - u'common.autoadminsingleton': { - 'Meta': {'object_name': 'AutoAdminSingleton'}, - 'account': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'auto_admin_account'", 'null': 'True', 'to': u"orm['auth.User']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}), - 'password_hash': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}) - }, - u'common.shareduploadedfile': { - 'Meta': {'object_name': 'SharedUploadedFile'}, - 'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 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'}) - } - } - - complete_apps = ['common'] diff --git a/mayan/apps/common/south_migrations/0007_auto__add_field_shareduploadedfile_filename.py b/mayan/apps/common/south_migrations/0007_auto__add_field_shareduploadedfile_filename.py deleted file mode 100644 index a835618ad5..0000000000 --- a/mayan/apps/common/south_migrations/0007_auto__add_field_shareduploadedfile_filename.py +++ /dev/null @@ -1,75 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'SharedUploadedFile.filename' - db.add_column(u'common_shareduploadedfile', 'filename', - self.gf('django.db.models.fields.CharField')(default='', max_length=255), - keep_default=False) - - def backwards(self, orm): - # Deleting field 'SharedUploadedFile.filename' - db.delete_column(u'common_shareduploadedfile', 'filename') - - models = { - 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', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Group']"}), - 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', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Permission']"}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - u'common.anonymoususersingleton': { - 'Meta': {'object_name': 'AnonymousUserSingleton'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - u'common.autoadminsingleton': { - 'Meta': {'object_name': 'AutoAdminSingleton'}, - 'account': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'auto_admin_account'", 'null': 'True', 'to': u"orm['auth.User']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}), - 'password_hash': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}) - }, - u'common.shareduploadedfile': { - 'Meta': {'object_name': 'SharedUploadedFile'}, - 'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}), - 'filename': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 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'}) - } - } - - complete_apps = ['common'] diff --git a/mayan/apps/common/south_migrations/0008_auto__add_field_shareduploadedfile_datatime.py b/mayan/apps/common/south_migrations/0008_auto__add_field_shareduploadedfile_datatime.py deleted file mode 100644 index 8548c50407..0000000000 --- a/mayan/apps/common/south_migrations/0008_auto__add_field_shareduploadedfile_datatime.py +++ /dev/null @@ -1,77 +0,0 @@ -# -*- 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 field 'SharedUploadedFile.datatime' - db.add_column(u'common_shareduploadedfile', 'datatime', - self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, default=datetime.datetime(2014, 10, 29, 0, 0), blank=True), - keep_default=False) - - def backwards(self, orm): - # Deleting field 'SharedUploadedFile.datatime' - db.delete_column(u'common_shareduploadedfile', 'datatime') - - models = { - 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', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Group']"}), - 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', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Permission']"}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - u'common.anonymoususersingleton': { - 'Meta': {'object_name': 'AnonymousUserSingleton'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - u'common.autoadminsingleton': { - 'Meta': {'object_name': 'AutoAdminSingleton'}, - 'account': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'auto_admin_account'", 'null': 'True', 'to': u"orm['auth.User']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}), - 'password_hash': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}) - }, - u'common.shareduploadedfile': { - 'Meta': {'object_name': 'SharedUploadedFile'}, - 'datatime': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}), - 'filename': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 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'}) - } - } - - complete_apps = ['common'] diff --git a/mayan/apps/common/south_migrations/0009_auto__add_userlocaleprofile.py b/mayan/apps/common/south_migrations/0009_auto__add_userlocaleprofile.py deleted file mode 100644 index 030b9e3395..0000000000 --- a/mayan/apps/common/south_migrations/0009_auto__add_userlocaleprofile.py +++ /dev/null @@ -1,87 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'UserLocaleProfile' - db.create_table(u'common_userlocaleprofile', ( - (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)), - ('timezone', self.gf('django.db.models.fields.CharField')(max_length=48)), - ('language', self.gf('django.db.models.fields.CharField')(max_length=8)), - )) - db.send_create_signal(u'common', ['UserLocaleProfile']) - - def backwards(self, orm): - # Deleting model 'UserLocaleProfile' - db.delete_table(u'common_userlocaleprofile') - - models = { - 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', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Group']"}), - 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', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Permission']"}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - u'common.anonymoususersingleton': { - 'Meta': {'object_name': 'AnonymousUserSingleton'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - u'common.autoadminsingleton': { - 'Meta': {'object_name': 'AutoAdminSingleton'}, - 'account': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'auto_admin_account'", 'null': 'True', 'to': u"orm['auth.User']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}), - 'password_hash': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}) - }, - u'common.shareduploadedfile': { - 'Meta': {'object_name': 'SharedUploadedFile'}, - 'datatime': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}), - 'filename': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - u'common.userlocaleprofile': { - 'Meta': {'object_name': 'UserLocaleProfile'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'max_length': '8'}), - 'timezone': ('django.db.models.fields.CharField', [], {'max_length': '48'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['auth.User']", 'unique': 'True'}) - }, - 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'}) - } - } - - complete_apps = ['common'] diff --git a/mayan/apps/common/south_migrations/0010_create_locale_profiles.py b/mayan/apps/common/south_migrations/0010_create_locale_profiles.py deleted file mode 100644 index 2c8099d470..0000000000 --- a/mayan/apps/common/south_migrations/0010_create_locale_profiles.py +++ /dev/null @@ -1,89 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import DataMigration -from django.db import models - - -class Migration(DataMigration): - - def forwards(self, orm): - "Write your forwards methods here." - # Note: Don't use "from appname.models import ModelName". - # Use orm.ModelName to refer to models in this application, - # and orm['appname.ModelName'] for models in other applications. - - for user in orm['auth.user'].objects.all(): - try: - orm.UserLocaleProfile.objects.create(user=user) - except Exception: - pass - - def backwards(self, orm): - "Write your backwards methods here." - - models = { - 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', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Group']"}), - 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', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Permission']"}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - u'common.anonymoususersingleton': { - 'Meta': {'object_name': 'AnonymousUserSingleton'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - u'common.autoadminsingleton': { - 'Meta': {'object_name': 'AutoAdminSingleton'}, - 'account': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'auto_admin_account'", 'null': 'True', 'to': u"orm['auth.User']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}), - 'password_hash': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}) - }, - u'common.shareduploadedfile': { - 'Meta': {'object_name': 'SharedUploadedFile'}, - 'datatime': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}), - 'filename': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - u'common.userlocaleprofile': { - 'Meta': {'object_name': 'UserLocaleProfile'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'max_length': '8'}), - 'timezone': ('django.db.models.fields.CharField', [], {'max_length': '48'}), - 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'locale_profile'", 'unique': 'True', 'to': u"orm['auth.User']"}) - }, - 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'}) - } - } - - complete_apps = ['common', 'auth', 'common'] - symmetrical = True diff --git a/mayan/apps/document_indexing/migrations/0001_initial.py b/mayan/apps/document_indexing/migrations/0001_initial.py new file mode 100644 index 0000000000..1759372807 --- /dev/null +++ b/mayan/apps/document_indexing/migrations/0001_initial.py @@ -0,0 +1,79 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations +import mptt.fields + + +class Migration(migrations.Migration): + + dependencies = [ + ('documents', '__first__'), + ] + + operations = [ + migrations.CreateModel( + name='Index', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(help_text='Internal name used to reference this index.', unique=True, max_length=64, verbose_name='Name')), + ('title', models.CharField(help_text='The name that will be visible to users.', unique=True, max_length=128, verbose_name='Title')), + ('enabled', models.BooleanField(default=True, help_text='Causes this index to be visible and updated when document data changes.', verbose_name='Enabled')), + ('document_types', models.ManyToManyField(to='documents.DocumentType', verbose_name='Document types')), + ], + options={ + 'verbose_name': 'Index', + 'verbose_name_plural': 'Indexes', + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='IndexInstanceNode', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('value', models.CharField(max_length=128, verbose_name='Value', blank=True)), + ('lft', models.PositiveIntegerField(editable=False, db_index=True)), + ('rght', models.PositiveIntegerField(editable=False, db_index=True)), + ('tree_id', models.PositiveIntegerField(editable=False, db_index=True)), + ('level', models.PositiveIntegerField(editable=False, db_index=True)), + ('documents', models.ManyToManyField(related_name='node_instances', verbose_name='Documents', to='documents.Document')), + ], + options={ + 'verbose_name': 'Index node instance', + 'verbose_name_plural': 'Indexes node instances', + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='IndexTemplateNode', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('expression', models.CharField(help_text='Enter a python string expression to be evaluated.', max_length=128, verbose_name='Indexing expression')), + ('enabled', models.BooleanField(default=True, help_text='Causes this node to be visible and updated when document data changes.', verbose_name='Enabled')), + ('link_documents', models.BooleanField(default=False, help_text='Check this option to have this node act as a container for documents and not as a parent for further nodes.', verbose_name='Link documents')), + ('lft', models.PositiveIntegerField(editable=False, db_index=True)), + ('rght', models.PositiveIntegerField(editable=False, db_index=True)), + ('tree_id', models.PositiveIntegerField(editable=False, db_index=True)), + ('level', models.PositiveIntegerField(editable=False, db_index=True)), + ('index', models.ForeignKey(related_name='node_templates', verbose_name='Index', to='document_indexing.Index')), + ('parent', mptt.fields.TreeForeignKey(blank=True, to='document_indexing.IndexTemplateNode', null=True)), + ], + options={ + 'verbose_name': 'Index node template', + 'verbose_name_plural': 'Indexes node template', + }, + bases=(models.Model,), + ), + migrations.AddField( + model_name='indexinstancenode', + name='index_template_node', + field=models.ForeignKey(related_name='node_instance', verbose_name='Index template node', to='document_indexing.IndexTemplateNode'), + preserve_default=True, + ), + migrations.AddField( + model_name='indexinstancenode', + name='parent', + field=mptt.fields.TreeForeignKey(blank=True, to='document_indexing.IndexInstanceNode', null=True), + preserve_default=True, + ), + ] diff --git a/mayan/apps/document_indexing/south_migrations/__init__.py b/mayan/apps/document_indexing/migrations/__init__.py similarity index 100% rename from mayan/apps/document_indexing/south_migrations/__init__.py rename to mayan/apps/document_indexing/migrations/__init__.py diff --git a/mayan/apps/document_indexing/south_migrations/0001_initial.py b/mayan/apps/document_indexing/south_migrations/0001_initial.py deleted file mode 100644 index a1d075ac9c..0000000000 --- a/mayan/apps/document_indexing/south_migrations/0001_initial.py +++ /dev/null @@ -1,185 +0,0 @@ -# encoding: utf-8 -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'Index' - db.create_table('document_indexing_index', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('parent', self.gf('mptt.fields.TreeForeignKey')(blank=True, related_name='index_meta_class', null=True, to=orm['document_indexing.Index'])), - ('expression', self.gf('django.db.models.fields.CharField')(max_length=128)), - ('enabled', self.gf('django.db.models.fields.BooleanField')(default=True)), - ('link_documents', self.gf('django.db.models.fields.BooleanField')(default=False)), - ('lft', self.gf('django.db.models.fields.PositiveIntegerField')(db_index=True)), - ('rght', self.gf('django.db.models.fields.PositiveIntegerField')(db_index=True)), - ('tree_id', self.gf('django.db.models.fields.PositiveIntegerField')(db_index=True)), - ('level', self.gf('django.db.models.fields.PositiveIntegerField')(db_index=True)), - )) - db.send_create_signal('document_indexing', ['Index']) - - # Adding model 'IndexInstance' - db.create_table('document_indexing_indexinstance', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('parent', self.gf('mptt.fields.TreeForeignKey')(blank=True, related_name='index_meta_instance', null=True, to=orm['document_indexing.IndexInstance'])), - ('index', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['document_indexing.Index'])), - ('value', self.gf('django.db.models.fields.CharField')(max_length=128, blank=True)), - ('lft', self.gf('django.db.models.fields.PositiveIntegerField')(db_index=True)), - ('rght', self.gf('django.db.models.fields.PositiveIntegerField')(db_index=True)), - ('tree_id', self.gf('django.db.models.fields.PositiveIntegerField')(db_index=True)), - ('level', self.gf('django.db.models.fields.PositiveIntegerField')(db_index=True)), - )) - db.send_create_signal('document_indexing', ['IndexInstance']) - - # Adding M2M table for field documents on 'IndexInstance' - db.create_table('document_indexing_indexinstance_documents', ( - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), - ('indexinstance', models.ForeignKey(orm['document_indexing.indexinstance'], null=False)), - ('document', models.ForeignKey(orm['documents.document'], null=False)) - )) - db.create_unique('document_indexing_indexinstance_documents', ['indexinstance_id', 'document_id']) - - # Adding model 'DocumentRenameCount' - db.create_table('document_indexing_documentrenamecount', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('index_instance', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['document_indexing.IndexInstance'])), - ('document', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['documents.Document'])), - ('suffix', self.gf('django.db.models.fields.PositiveIntegerField')(blank=True)), - )) - db.send_create_signal('document_indexing', ['DocumentRenameCount']) - - def backwards(self, orm): - # Deleting model 'Index' - db.delete_table('document_indexing_index') - - # Deleting model 'IndexInstance' - db.delete_table('document_indexing_indexinstance') - - # Removing M2M table for field documents on 'IndexInstance' - db.delete_table('document_indexing_indexinstance_documents') - - # Deleting model 'DocumentRenameCount' - db.delete_table('document_indexing_documentrenamecount') - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - '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': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - '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': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - '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': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'comments.comment': { - 'Meta': {'ordering': "('submit_date',)", 'object_name': 'Comment', 'db_table': "'django_comments'"}, - 'comment': ('django.db.models.fields.TextField', [], {'max_length': '3000'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'content_type_set_for_comment'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ip_address': ('django.db.models.fields.IPAddressField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}), - 'is_public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_removed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'object_pk': ('django.db.models.fields.TextField', [], {}), - 'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}), - 'submit_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'comment_comments'", 'null': 'True', 'to': "orm['auth.User']"}), - 'user_email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'user_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'user_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) - }, - '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'}), - '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'}) - }, - 'document_indexing.documentrenamecount': { - 'Meta': {'object_name': 'DocumentRenameCount'}, - 'document': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.Document']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'index_instance': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['document_indexing.IndexInstance']"}), - 'suffix': ('django.db.models.fields.PositiveIntegerField', [], {'blank': 'True'}) - }, - 'document_indexing.index': { - 'Meta': {'object_name': 'Index'}, - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'expression': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'link_documents': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'parent': ('mptt.fields.TreeForeignKey', [], {'blank': 'True', 'related_name': "'index_meta_class'", 'null': 'True', 'to': "orm['document_indexing.Index']"}), - 'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}) - }, - 'document_indexing.indexinstance': { - 'Meta': {'object_name': 'IndexInstance'}, - 'documents': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['documents.Document']", 'symmetrical': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'index': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['document_indexing.Index']"}), - 'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'parent': ('mptt.fields.TreeForeignKey', [], {'blank': 'True', 'related_name': "'index_meta_instance'", 'null': 'True', 'to': "orm['document_indexing.IndexInstance']"}), - 'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'value': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}) - }, - 'documents.document': { - 'Meta': {'ordering': "['-date_added']", 'object_name': 'Document'}, - 'date_added': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.DocumentType']", 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'max_length': '48', 'blank': 'True'}) - }, - 'documents.documenttype': { - 'Meta': {'ordering': "['name']", 'object_name': 'DocumentType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32'}) - }, - 'sites.site': { - 'Meta': {'ordering': "('domain',)", 'object_name': 'Site', 'db_table': "'django_site'"}, - 'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'taggit.tag': { - 'Meta': {'object_name': 'Tag'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100', 'db_index': 'True'}) - }, - 'taggit.taggeditem': { - 'Meta': {'object_name': 'TaggedItem'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}), - 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_items'", 'to': "orm['taggit.Tag']"}) - } - } - - complete_apps = ['document_indexing'] diff --git a/mayan/apps/document_indexing/south_migrations/0002_auto__del_documentrenamecount__del_indexinstance__del_index.py b/mayan/apps/document_indexing/south_migrations/0002_auto__del_documentrenamecount__del_indexinstance__del_index.py deleted file mode 100644 index 16402df868..0000000000 --- a/mayan/apps/document_indexing/south_migrations/0002_auto__del_documentrenamecount__del_indexinstance__del_index.py +++ /dev/null @@ -1,71 +0,0 @@ -# encoding: utf-8 -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Deleting model 'DocumentRenameCount' - db.delete_table('document_indexing_documentrenamecount') - - # Deleting model 'IndexInstance' - db.delete_table('document_indexing_indexinstance') - - # Removing M2M table for field documents on 'IndexInstance' - db.delete_table('document_indexing_indexinstance_documents') - - # Deleting model 'Index' - db.delete_table('document_indexing_index') - - def backwards(self, orm): - # Adding model 'DocumentRenameCount' - db.create_table('document_indexing_documentrenamecount', ( - ('suffix', self.gf('django.db.models.fields.PositiveIntegerField')(blank=True)), - ('index_instance', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['document_indexing.IndexInstance'])), - ('document', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['documents.Document'])), - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - )) - db.send_create_signal('document_indexing', ['DocumentRenameCount']) - - # Adding model 'IndexInstance' - db.create_table('document_indexing_indexinstance', ( - ('index', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['document_indexing.Index'])), - ('parent', self.gf('mptt.fields.TreeForeignKey')(related_name='index_meta_instance', null=True, to=orm['document_indexing.IndexInstance'], blank=True)), - ('level', self.gf('django.db.models.fields.PositiveIntegerField')(db_index=True)), - ('lft', self.gf('django.db.models.fields.PositiveIntegerField')(db_index=True)), - ('tree_id', self.gf('django.db.models.fields.PositiveIntegerField')(db_index=True)), - ('rght', self.gf('django.db.models.fields.PositiveIntegerField')(db_index=True)), - ('value', self.gf('django.db.models.fields.CharField')(max_length=128, blank=True)), - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - )) - db.send_create_signal('document_indexing', ['IndexInstance']) - - # Adding M2M table for field documents on 'IndexInstance' - db.create_table('document_indexing_indexinstance_documents', ( - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), - ('indexinstance', models.ForeignKey(orm['document_indexing.indexinstance'], null=False)), - ('document', models.ForeignKey(orm['documents.document'], null=False)) - )) - db.create_unique('document_indexing_indexinstance_documents', ['indexinstance_id', 'document_id']) - - # Adding model 'Index' - db.create_table('document_indexing_index', ( - ('lft', self.gf('django.db.models.fields.PositiveIntegerField')(db_index=True)), - ('parent', self.gf('mptt.fields.TreeForeignKey')(related_name='index_meta_class', null=True, to=orm['document_indexing.Index'], blank=True)), - ('level', self.gf('django.db.models.fields.PositiveIntegerField')(db_index=True)), - ('link_documents', self.gf('django.db.models.fields.BooleanField')(default=False)), - ('expression', self.gf('django.db.models.fields.CharField')(max_length=128)), - ('tree_id', self.gf('django.db.models.fields.PositiveIntegerField')(db_index=True)), - ('enabled', self.gf('django.db.models.fields.BooleanField')(default=True)), - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('rght', self.gf('django.db.models.fields.PositiveIntegerField')(db_index=True)), - )) - db.send_create_signal('document_indexing', ['Index']) - - models = { - - } - - complete_apps = ['document_indexing'] diff --git a/mayan/apps/document_indexing/south_migrations/0003_auto__add_indextemplatenode__add_indexinstancenode__add_index.py b/mayan/apps/document_indexing/south_migrations/0003_auto__add_indextemplatenode__add_indexinstancenode__add_index.py deleted file mode 100644 index 81edaf72bf..0000000000 --- a/mayan/apps/document_indexing/south_migrations/0003_auto__add_indextemplatenode__add_indexinstancenode__add_index.py +++ /dev/null @@ -1,187 +0,0 @@ -# encoding: utf-8 -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'IndexTemplateNode' - db.create_table('document_indexing_indextemplatenode', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('parent', self.gf('mptt.fields.TreeForeignKey')(blank=True, related_name='index_template_node', null=True, to=orm['document_indexing.IndexTemplateNode'])), - ('index', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['document_indexing.Index'])), - ('expression', self.gf('django.db.models.fields.CharField')(max_length=128)), - ('enabled', self.gf('django.db.models.fields.BooleanField')(default=True)), - ('link_documents', self.gf('django.db.models.fields.BooleanField')(default=False)), - ('lft', self.gf('django.db.models.fields.PositiveIntegerField')(db_index=True)), - ('rght', self.gf('django.db.models.fields.PositiveIntegerField')(db_index=True)), - ('tree_id', self.gf('django.db.models.fields.PositiveIntegerField')(db_index=True)), - ('level', self.gf('django.db.models.fields.PositiveIntegerField')(db_index=True)), - )) - db.send_create_signal('document_indexing', ['IndexTemplateNode']) - - # Adding model 'IndexInstanceNode' - db.create_table('document_indexing_indexinstancenode', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('parent', self.gf('mptt.fields.TreeForeignKey')(blank=True, related_name='index_instance_node', null=True, to=orm['document_indexing.IndexInstanceNode'])), - ('index_template_node', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['document_indexing.IndexTemplateNode'])), - ('value', self.gf('django.db.models.fields.CharField')(max_length=128, blank=True)), - ('lft', self.gf('django.db.models.fields.PositiveIntegerField')(db_index=True)), - ('rght', self.gf('django.db.models.fields.PositiveIntegerField')(db_index=True)), - ('tree_id', self.gf('django.db.models.fields.PositiveIntegerField')(db_index=True)), - ('level', self.gf('django.db.models.fields.PositiveIntegerField')(db_index=True)), - )) - db.send_create_signal('document_indexing', ['IndexInstanceNode']) - - # Adding M2M table for field documents on 'IndexInstanceNode' - db.create_table('document_indexing_indexinstancenode_documents', ( - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), - ('indexinstancenode', models.ForeignKey(orm['document_indexing.indexinstancenode'], null=False)), - ('document', models.ForeignKey(orm['documents.document'], null=False)) - )) - db.create_unique('document_indexing_indexinstancenode_documents', ['indexinstancenode_id', 'document_id']) - - # Adding model 'Index' - db.create_table('document_indexing_index', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('name', self.gf('django.db.models.fields.CharField')(max_length=64)), - ('title', self.gf('django.db.models.fields.CharField')(max_length=128)), - ('enabled', self.gf('django.db.models.fields.BooleanField')(default=True)), - )) - db.send_create_signal('document_indexing', ['Index']) - - def backwards(self, orm): - # Deleting model 'IndexTemplateNode' - db.delete_table('document_indexing_indextemplatenode') - - # Deleting model 'IndexInstanceNode' - db.delete_table('document_indexing_indexinstancenode') - - # Removing M2M table for field documents on 'IndexInstanceNode' - db.delete_table('document_indexing_indexinstancenode_documents') - - # Deleting model 'Index' - db.delete_table('document_indexing_index') - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - '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': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - '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': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - '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': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'comments.comment': { - 'Meta': {'ordering': "('submit_date',)", 'object_name': 'Comment', 'db_table': "'django_comments'"}, - 'comment': ('django.db.models.fields.TextField', [], {'max_length': '3000'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'content_type_set_for_comment'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ip_address': ('django.db.models.fields.IPAddressField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}), - 'is_public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_removed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'object_pk': ('django.db.models.fields.TextField', [], {}), - 'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}), - 'submit_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'comment_comments'", 'null': 'True', 'to': "orm['auth.User']"}), - 'user_email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'user_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'user_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) - }, - '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'}), - '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'}) - }, - 'document_indexing.index': { - 'Meta': {'object_name': 'Index'}, - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '128'}) - }, - 'document_indexing.indexinstancenode': { - 'Meta': {'object_name': 'IndexInstanceNode'}, - 'documents': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['documents.Document']", 'symmetrical': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'index_template_node': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['document_indexing.IndexTemplateNode']"}), - 'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'parent': ('mptt.fields.TreeForeignKey', [], {'blank': 'True', 'related_name': "'index_instance_node'", 'null': 'True', 'to': "orm['document_indexing.IndexInstanceNode']"}), - 'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'value': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}) - }, - 'document_indexing.indextemplatenode': { - 'Meta': {'object_name': 'IndexTemplateNode'}, - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'expression': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'index': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['document_indexing.Index']"}), - 'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'link_documents': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'parent': ('mptt.fields.TreeForeignKey', [], {'blank': 'True', 'related_name': "'index_template_node'", 'null': 'True', 'to': "orm['document_indexing.IndexTemplateNode']"}), - 'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}) - }, - 'documents.document': { - 'Meta': {'ordering': "['-date_added']", 'object_name': 'Document'}, - 'date_added': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.DocumentType']", 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'max_length': '48', 'blank': 'True'}) - }, - 'documents.documenttype': { - 'Meta': {'ordering': "['name']", 'object_name': 'DocumentType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32'}) - }, - 'sites.site': { - 'Meta': {'ordering': "('domain',)", 'object_name': 'Site', 'db_table': "'django_site'"}, - 'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'taggit.tag': { - 'Meta': {'object_name': 'Tag'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100', 'db_index': 'True'}) - }, - 'taggit.taggeditem': { - 'Meta': {'object_name': 'TaggedItem'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}), - 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_items'", 'to': "orm['taggit.Tag']"}) - } - } - - complete_apps = ['document_indexing'] diff --git a/mayan/apps/document_indexing/south_migrations/0004_auto__add_documentrenamecount.py b/mayan/apps/document_indexing/south_migrations/0004_auto__add_documentrenamecount.py deleted file mode 100644 index d013d02559..0000000000 --- a/mayan/apps/document_indexing/south_migrations/0004_auto__add_documentrenamecount.py +++ /dev/null @@ -1,149 +0,0 @@ -# encoding: utf-8 -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'DocumentRenameCount' - db.create_table('document_indexing_documentrenamecount', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('index_instance_node', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['document_indexing.IndexInstanceNode'])), - ('document', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['documents.Document'])), - ('suffix', self.gf('django.db.models.fields.PositiveIntegerField')(blank=True)), - )) - db.send_create_signal('document_indexing', ['DocumentRenameCount']) - - def backwards(self, orm): - # Deleting model 'DocumentRenameCount' - db.delete_table('document_indexing_documentrenamecount') - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - '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': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - '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': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - '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': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'comments.comment': { - 'Meta': {'ordering': "('submit_date',)", 'object_name': 'Comment', 'db_table': "'django_comments'"}, - 'comment': ('django.db.models.fields.TextField', [], {'max_length': '3000'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'content_type_set_for_comment'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ip_address': ('django.db.models.fields.IPAddressField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}), - 'is_public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_removed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'object_pk': ('django.db.models.fields.TextField', [], {}), - 'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}), - 'submit_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'comment_comments'", 'null': 'True', 'to': "orm['auth.User']"}), - 'user_email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'user_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'user_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) - }, - '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'}), - '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'}) - }, - 'document_indexing.documentrenamecount': { - 'Meta': {'object_name': 'DocumentRenameCount'}, - 'document': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.Document']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'index_instance_node': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['document_indexing.IndexInstanceNode']"}), - 'suffix': ('django.db.models.fields.PositiveIntegerField', [], {'blank': 'True'}) - }, - 'document_indexing.index': { - 'Meta': {'object_name': 'Index'}, - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '128'}) - }, - 'document_indexing.indexinstancenode': { - 'Meta': {'object_name': 'IndexInstanceNode'}, - 'documents': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['documents.Document']", 'symmetrical': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'index_template_node': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['document_indexing.IndexTemplateNode']"}), - 'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'parent': ('mptt.fields.TreeForeignKey', [], {'blank': 'True', 'related_name': "'index_instance_node'", 'null': 'True', 'to': "orm['document_indexing.IndexInstanceNode']"}), - 'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'value': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}) - }, - 'document_indexing.indextemplatenode': { - 'Meta': {'object_name': 'IndexTemplateNode'}, - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'expression': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'index': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['document_indexing.Index']"}), - 'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'link_documents': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'parent': ('mptt.fields.TreeForeignKey', [], {'blank': 'True', 'related_name': "'index_template_node'", 'null': 'True', 'to': "orm['document_indexing.IndexTemplateNode']"}), - 'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}) - }, - 'documents.document': { - 'Meta': {'ordering': "['-date_added']", 'object_name': 'Document'}, - 'date_added': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.DocumentType']", 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'max_length': '48', 'blank': 'True'}) - }, - 'documents.documenttype': { - 'Meta': {'ordering': "['name']", 'object_name': 'DocumentType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32'}) - }, - 'sites.site': { - 'Meta': {'ordering': "('domain',)", 'object_name': 'Site', 'db_table': "'django_site'"}, - 'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'taggit.tag': { - 'Meta': {'object_name': 'Tag'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100', 'db_index': 'True'}) - }, - 'taggit.taggeditem': { - 'Meta': {'object_name': 'TaggedItem'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}), - 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_items'", 'to': "orm['taggit.Tag']"}) - } - } - - complete_apps = ['document_indexing'] diff --git a/mayan/apps/document_indexing/south_migrations/0005_auto__add_unique_index_name__add_unique_index_title.py b/mayan/apps/document_indexing/south_migrations/0005_auto__add_unique_index_name__add_unique_index_title.py deleted file mode 100644 index 25c35e0eff..0000000000 --- a/mayan/apps/document_indexing/south_migrations/0005_auto__add_unique_index_name__add_unique_index_title.py +++ /dev/null @@ -1,149 +0,0 @@ -# encoding: utf-8 -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding unique constraint on 'Index', fields ['name'] - db.create_unique('document_indexing_index', ['name']) - - # Adding unique constraint on 'Index', fields ['title'] - db.create_unique('document_indexing_index', ['title']) - - def backwards(self, orm): - # Removing unique constraint on 'Index', fields ['title'] - db.delete_unique('document_indexing_index', ['title']) - - # Removing unique constraint on 'Index', fields ['name'] - db.delete_unique('document_indexing_index', ['name']) - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - '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': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - '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': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - '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': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'comments.comment': { - 'Meta': {'ordering': "('submit_date',)", 'object_name': 'Comment', 'db_table': "'django_comments'"}, - 'comment': ('django.db.models.fields.TextField', [], {'max_length': '3000'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'content_type_set_for_comment'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ip_address': ('django.db.models.fields.IPAddressField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}), - 'is_public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_removed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'object_pk': ('django.db.models.fields.TextField', [], {}), - 'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}), - 'submit_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'comment_comments'", 'null': 'True', 'to': "orm['auth.User']"}), - 'user_email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'user_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'user_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) - }, - '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'}), - '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'}) - }, - 'document_indexing.documentrenamecount': { - 'Meta': {'object_name': 'DocumentRenameCount'}, - 'document': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.Document']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'index_instance_node': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['document_indexing.IndexInstanceNode']"}), - 'suffix': ('django.db.models.fields.PositiveIntegerField', [], {'blank': 'True'}) - }, - 'document_indexing.index': { - 'Meta': {'object_name': 'Index'}, - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64'}), - 'title': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'}) - }, - 'document_indexing.indexinstancenode': { - 'Meta': {'object_name': 'IndexInstanceNode'}, - 'documents': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['documents.Document']", 'symmetrical': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'index_template_node': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['document_indexing.IndexTemplateNode']"}), - 'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'parent': ('mptt.fields.TreeForeignKey', [], {'blank': 'True', 'related_name': "'index_instance_node'", 'null': 'True', 'to': "orm['document_indexing.IndexInstanceNode']"}), - 'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'value': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}) - }, - 'document_indexing.indextemplatenode': { - 'Meta': {'object_name': 'IndexTemplateNode'}, - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'expression': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'index': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['document_indexing.Index']"}), - 'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'link_documents': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'parent': ('mptt.fields.TreeForeignKey', [], {'blank': 'True', 'related_name': "'index_template_node'", 'null': 'True', 'to': "orm['document_indexing.IndexTemplateNode']"}), - 'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}) - }, - 'documents.document': { - 'Meta': {'ordering': "['-date_added']", 'object_name': 'Document'}, - 'date_added': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.DocumentType']", 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'max_length': '48', 'blank': 'True'}) - }, - 'documents.documenttype': { - 'Meta': {'ordering': "['name']", 'object_name': 'DocumentType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32'}) - }, - 'sites.site': { - 'Meta': {'ordering': "('domain',)", 'object_name': 'Site', 'db_table': "'django_site'"}, - 'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'taggit.tag': { - 'Meta': {'object_name': 'Tag'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100', 'db_index': 'True'}) - }, - 'taggit.taggeditem': { - 'Meta': {'object_name': 'TaggedItem'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}), - 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_items'", 'to': "orm['taggit.Tag']"}) - } - } - - complete_apps = ['document_indexing'] diff --git a/mayan/apps/document_indexing/south_migrations/0006_auto.py b/mayan/apps/document_indexing/south_migrations/0006_auto.py deleted file mode 100644 index fc6f3c4928..0000000000 --- a/mayan/apps/document_indexing/south_migrations/0006_auto.py +++ /dev/null @@ -1,149 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding M2M table for field document_types on 'Index' - db.create_table('document_indexing_index_document_types', ( - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), - ('index', models.ForeignKey(orm['document_indexing.index'], null=False)), - ('documenttype', models.ForeignKey(orm['documents.documenttype'], null=False)) - )) - db.create_unique('document_indexing_index_document_types', ['index_id', 'documenttype_id']) - - def backwards(self, orm): - # Removing M2M table for field document_types on 'Index' - db.delete_table('document_indexing_index_document_types') - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - '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': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - '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': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - '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': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'comments.comment': { - 'Meta': {'ordering': "('submit_date',)", 'object_name': 'Comment', 'db_table': "'django_comments'"}, - 'comment': ('django.db.models.fields.TextField', [], {'max_length': '3000'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'content_type_set_for_comment'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ip_address': ('django.db.models.fields.IPAddressField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}), - 'is_public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_removed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'object_pk': ('django.db.models.fields.TextField', [], {}), - 'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}), - 'submit_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'comment_comments'", 'null': 'True', 'to': "orm['auth.User']"}), - 'user_email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'user_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'user_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) - }, - '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'}), - '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'}) - }, - 'document_indexing.documentrenamecount': { - 'Meta': {'object_name': 'DocumentRenameCount'}, - 'document': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.Document']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'index_instance_node': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['document_indexing.IndexInstanceNode']"}), - 'suffix': ('django.db.models.fields.PositiveIntegerField', [], {'blank': 'True'}) - }, - 'document_indexing.index': { - 'Meta': {'object_name': 'Index'}, - 'document_types': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['documents.DocumentType']", 'symmetrical': 'False'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64'}), - 'title': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'}) - }, - 'document_indexing.indexinstancenode': { - 'Meta': {'object_name': 'IndexInstanceNode'}, - 'documents': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['documents.Document']", 'symmetrical': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'index_template_node': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['document_indexing.IndexTemplateNode']"}), - 'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'parent': ('mptt.fields.TreeForeignKey', [], {'blank': 'True', 'related_name': "'index_instance_node'", 'null': 'True', 'to': "orm['document_indexing.IndexInstanceNode']"}), - 'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'value': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}) - }, - 'document_indexing.indextemplatenode': { - 'Meta': {'object_name': 'IndexTemplateNode'}, - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'expression': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'index': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['document_indexing.Index']"}), - 'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'link_documents': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'parent': ('mptt.fields.TreeForeignKey', [], {'blank': 'True', 'related_name': "'index_template_node'", 'null': 'True', 'to': "orm['document_indexing.IndexTemplateNode']"}), - 'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}) - }, - 'documents.document': { - 'Meta': {'ordering': "['-date_added']", 'object_name': 'Document'}, - 'date_added': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.DocumentType']", 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'max_length': '48', 'blank': 'True'}) - }, - 'documents.documenttype': { - 'Meta': {'ordering': "['name']", 'object_name': 'DocumentType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32'}) - }, - 'sites.site': { - 'Meta': {'ordering': "('domain',)", 'object_name': 'Site', 'db_table': "'django_site'"}, - 'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'taggit.tag': { - 'Meta': {'object_name': 'Tag'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'taggit.taggeditem': { - 'Meta': {'object_name': 'TaggedItem'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}), - 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_items'", 'to': "orm['taggit.Tag']"}) - } - } - - complete_apps = ['document_indexing'] diff --git a/mayan/apps/document_indexing/south_migrations/0007_auto__del_documentrenamecount.py b/mayan/apps/document_indexing/south_migrations/0007_auto__del_documentrenamecount.py deleted file mode 100644 index 857060e9c4..0000000000 --- a/mayan/apps/document_indexing/south_migrations/0007_auto__del_documentrenamecount.py +++ /dev/null @@ -1,75 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Deleting model 'DocumentRenameCount' - db.delete_table(u'document_indexing_documentrenamecount') - - def backwards(self, orm): - # Adding model 'DocumentRenameCount' - db.create_table(u'document_indexing_documentrenamecount', ( - ('index_instance_node', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['document_indexing.IndexInstanceNode'])), - ('suffix', self.gf('django.db.models.fields.PositiveIntegerField')(blank=True)), - ('document', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['documents.Document'])), - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - )) - db.send_create_signal('document_indexing', ['DocumentRenameCount']) - - models = { - u'document_indexing.index': { - 'Meta': {'object_name': 'Index'}, - 'document_types': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['documents.DocumentType']", 'symmetrical': 'False'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64'}), - 'title': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'}) - }, - u'document_indexing.indexinstancenode': { - 'Meta': {'object_name': 'IndexInstanceNode'}, - 'documents': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'node_instances'", 'symmetrical': 'False', 'to': u"orm['documents.Document']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'index_template_node': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'node_instance'", 'to': u"orm['document_indexing.IndexTemplateNode']"}), - u'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - u'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'parent': ('mptt.fields.TreeForeignKey', [], {'to': u"orm['document_indexing.IndexInstanceNode']", 'null': 'True', 'blank': 'True'}), - u'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - u'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'value': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}) - }, - u'document_indexing.indextemplatenode': { - 'Meta': {'object_name': 'IndexTemplateNode'}, - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'expression': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'index': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'node_templates'", 'to': u"orm['document_indexing.Index']"}), - u'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - u'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - 'link_documents': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'parent': ('mptt.fields.TreeForeignKey', [], {'to': u"orm['document_indexing.IndexTemplateNode']", 'null': 'True', 'blank': 'True'}), - u'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), - u'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}) - }, - u'documents.document': { - 'Meta': {'ordering': "['-date_added']", 'object_name': 'Document'}, - 'date_added': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'documents'", 'to': u"orm['documents.DocumentType']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'default': "u'Uninitialized document'", 'max_length': '255', 'db_index': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'default': "u'eng'", 'max_length': '8'}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "u'da51a157-dabd-4547-8e08-1e76689f869e'", 'max_length': '48'}) - }, - u'documents.documenttype': { - 'Meta': {'ordering': "['name']", 'object_name': 'DocumentType'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}), - 'ocr': ('django.db.models.fields.BooleanField', [], {'default': 'True'}) - } - } - - complete_apps = ['document_indexing'] diff --git a/mayan/apps/document_states/migrations/0001_initial.py b/mayan/apps/document_states/migrations/0001_initial.py new file mode 100644 index 0000000000..df99fd4f24 --- /dev/null +++ b/mayan/apps/document_states/migrations/0001_initial.py @@ -0,0 +1,114 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations +from django.conf import settings + + +class Migration(migrations.Migration): + + dependencies = [ + ('documents', '__first__'), + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='Workflow', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('label', models.CharField(unique=True, max_length=255, verbose_name='Label')), + ('document_types', models.ManyToManyField(related_name='workflows', verbose_name='Document types', to='documents.DocumentType')), + ], + options={ + 'verbose_name': 'Workflow', + 'verbose_name_plural': 'Workflows', + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='WorkflowInstance', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('document', models.ForeignKey(related_name='workflows', verbose_name='Document', to='documents.Document')), + ('workflow', models.ForeignKey(related_name='instances', verbose_name='Workflow', to='document_states.Workflow')), + ], + options={ + 'verbose_name': 'Workflow instance', + 'verbose_name_plural': 'Workflow instances', + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='WorkflowInstanceLogEntry', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('datetime', models.DateTimeField(auto_now_add=True, verbose_name='Datetime', db_index=True)), + ('comment', models.TextField(verbose_name='Comment', blank=True)), + ], + options={ + 'verbose_name': 'Workflow instance log entry', + 'verbose_name_plural': 'Workflow instance log entries', + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='WorkflowState', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('label', models.CharField(max_length=255, verbose_name='Label')), + ('initial', models.BooleanField(default=False, help_text='Select if this will be the state with which you want the workflow to start in. Only one state can be the initial state.', verbose_name='Initial')), + ('workflow', models.ForeignKey(related_name='states', verbose_name='Workflow', to='document_states.Workflow')), + ], + options={ + 'verbose_name': 'Workflow state', + 'verbose_name_plural': 'Workflow states', + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='WorkflowTransition', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('label', models.CharField(max_length=255, verbose_name='Label')), + ('destination_state', models.ForeignKey(related_name='destination_transitions', verbose_name='Destination state', to='document_states.WorkflowState')), + ('origin_state', models.ForeignKey(related_name='origin_transitions', verbose_name='Origin state', to='document_states.WorkflowState')), + ('workflow', models.ForeignKey(related_name='transitions', verbose_name='Workflow', to='document_states.Workflow')), + ], + options={ + 'verbose_name': 'Workflow transition', + 'verbose_name_plural': 'Workflow transitions', + }, + bases=(models.Model,), + ), + migrations.AlterUniqueTogether( + name='workflowtransition', + unique_together=set([('workflow', 'label', 'origin_state', 'destination_state')]), + ), + migrations.AlterUniqueTogether( + name='workflowstate', + unique_together=set([('workflow', 'label')]), + ), + migrations.AddField( + model_name='workflowinstancelogentry', + name='transition', + field=models.ForeignKey(verbose_name='Transition', to='document_states.WorkflowTransition'), + preserve_default=True, + ), + migrations.AddField( + model_name='workflowinstancelogentry', + name='user', + field=models.ForeignKey(verbose_name='User', to=settings.AUTH_USER_MODEL), + preserve_default=True, + ), + migrations.AddField( + model_name='workflowinstancelogentry', + name='workflow_instance', + field=models.ForeignKey(related_name='log_entries', verbose_name='Workflow instance', to='document_states.WorkflowInstance'), + preserve_default=True, + ), + migrations.AlterUniqueTogether( + name='workflowinstance', + unique_together=set([('document', 'workflow')]), + ), + ] diff --git a/mayan/apps/document_states/south_migrations/__init__.py b/mayan/apps/document_states/migrations/__init__.py similarity index 100% rename from mayan/apps/document_states/south_migrations/__init__.py rename to mayan/apps/document_states/migrations/__init__.py diff --git a/mayan/apps/document_states/south_migrations/0001_initial.py b/mayan/apps/document_states/south_migrations/0001_initial.py deleted file mode 100644 index c766932295..0000000000 --- a/mayan/apps/document_states/south_migrations/0001_initial.py +++ /dev/null @@ -1,148 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'Workflow' - db.create_table(u'document_states_workflow', ( - (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('label', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255)), - )) - db.send_create_signal(u'document_states', ['Workflow']) - - # Adding model 'WorkflowState' - db.create_table(u'document_states_workflowstate', ( - (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('workflow', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['document_states.Workflow'])), - ('label', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255)), - ('initial', self.gf('django.db.models.fields.BooleanField')(default=False)), - )) - db.send_create_signal(u'document_states', ['WorkflowState']) - - # Adding model 'WorkflowTransition' - db.create_table(u'document_states_workflowtransition', ( - (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('label', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255)), - ('origin_state', self.gf('django.db.models.fields.related.ForeignKey')(related_name=u'origins', to=orm['document_states.WorkflowState'])), - ('destination_state', self.gf('django.db.models.fields.related.ForeignKey')(related_name=u'destinations', to=orm['document_states.WorkflowState'])), - )) - db.send_create_signal(u'document_states', ['WorkflowTransition']) - - # Adding model 'DocumentTypeWorkflow' - db.create_table(u'document_states_documenttypeworkflow', ( - (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('document_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['documents.DocumentType'])), - ('workflow', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['document_states.Workflow'])), - )) - db.send_create_signal(u'document_states', ['DocumentTypeWorkflow']) - - # Adding unique constraint on 'DocumentTypeWorkflow', fields ['document_type', 'workflow'] - db.create_unique(u'document_states_documenttypeworkflow', ['document_type_id', 'workflow_id']) - - # Adding model 'WorkflowInstance' - db.create_table(u'document_states_workflowinstance', ( - (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('workflow', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['document_states.Workflow'])), - ('document', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['documents.Document'])), - )) - db.send_create_signal(u'document_states', ['WorkflowInstance']) - - # Adding unique constraint on 'WorkflowInstance', fields ['document', 'workflow'] - db.create_unique(u'document_states_workflowinstance', ['document_id', 'workflow_id']) - - # Adding model 'WorkflowInstanceLogEntry' - db.create_table(u'document_states_workflowinstancelogentry', ( - (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('workflow_instace', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['document_states.WorkflowInstance'])), - ('datetime', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - ('document', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['documents.Document'])), - )) - db.send_create_signal(u'document_states', ['WorkflowInstanceLogEntry']) - - def backwards(self, orm): - # Removing unique constraint on 'WorkflowInstance', fields ['document', 'workflow'] - db.delete_unique(u'document_states_workflowinstance', ['document_id', 'workflow_id']) - - # Removing unique constraint on 'DocumentTypeWorkflow', fields ['document_type', 'workflow'] - db.delete_unique(u'document_states_documenttypeworkflow', ['document_type_id', 'workflow_id']) - - # Deleting model 'Workflow' - db.delete_table(u'document_states_workflow') - - # Deleting model 'WorkflowState' - db.delete_table(u'document_states_workflowstate') - - # Deleting model 'WorkflowTransition' - db.delete_table(u'document_states_workflowtransition') - - # Deleting model 'DocumentTypeWorkflow' - db.delete_table(u'document_states_documenttypeworkflow') - - # Deleting model 'WorkflowInstance' - db.delete_table(u'document_states_workflowinstance') - - # Deleting model 'WorkflowInstanceLogEntry' - db.delete_table(u'document_states_workflowinstancelogentry') - - models = { - u'document_states.documenttypeworkflow': { - 'Meta': {'unique_together': "((u'document_type', u'workflow'),)", 'object_name': 'DocumentTypeWorkflow'}, - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['documents.DocumentType']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'workflow': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['document_states.Workflow']"}) - }, - u'document_states.workflow': { - 'Meta': {'object_name': 'Workflow'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) - }, - u'document_states.workflowinstance': { - 'Meta': {'unique_together': "((u'document', u'workflow'),)", 'object_name': 'WorkflowInstance'}, - 'document': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['documents.Document']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'workflow': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['document_states.Workflow']"}) - }, - u'document_states.workflowinstancelogentry': { - 'Meta': {'object_name': 'WorkflowInstanceLogEntry'}, - 'datetime': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'document': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['documents.Document']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'workflow_instace': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['document_states.WorkflowInstance']"}) - }, - u'document_states.workflowstate': { - 'Meta': {'object_name': 'WorkflowState'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'initial': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'label': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'workflow': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['document_states.Workflow']"}) - }, - u'document_states.workflowtransition': { - 'Meta': {'object_name': 'WorkflowTransition'}, - 'destination_state': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'destinations'", 'to': u"orm['document_states.WorkflowState']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'origin_state': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'origins'", 'to': u"orm['document_states.WorkflowState']"}) - }, - u'documents.document': { - 'Meta': {'ordering': "['-date_added']", 'object_name': 'Document'}, - 'date_added': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'documents'", 'to': u"orm['documents.DocumentType']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'default': "u'Uninitialized document'", 'max_length': '255', 'db_index': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'default': "u'eng'", 'max_length': '8'}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "u'8fff74c9-2f45-4a2a-bbdc-2ce727ab9380'", 'max_length': '48'}) - }, - u'documents.documenttype': { - 'Meta': {'ordering': "['name']", 'object_name': 'DocumentType'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}), - 'ocr': ('django.db.models.fields.BooleanField', [], {'default': 'True'}) - } - } - - complete_apps = ['document_states'] diff --git a/mayan/apps/document_states/south_migrations/0002_auto__add_field_workflowtransition_workflow.py b/mayan/apps/document_states/south_migrations/0002_auto__add_field_workflowtransition_workflow.py deleted file mode 100644 index 3a7faaad6b..0000000000 --- a/mayan/apps/document_states/south_migrations/0002_auto__add_field_workflowtransition_workflow.py +++ /dev/null @@ -1,77 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'WorkflowTransition.workflow' - db.add_column(u'document_states_workflowtransition', 'workflow', - self.gf('django.db.models.fields.related.ForeignKey')(default=1, to=orm['document_states.Workflow']), - keep_default=False) - - def backwards(self, orm): - # Deleting field 'WorkflowTransition.workflow' - db.delete_column(u'document_states_workflowtransition', 'workflow_id') - - models = { - u'document_states.documenttypeworkflow': { - 'Meta': {'unique_together': "((u'document_type', u'workflow'),)", 'object_name': 'DocumentTypeWorkflow'}, - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['documents.DocumentType']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'workflow': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['document_states.Workflow']"}) - }, - u'document_states.workflow': { - 'Meta': {'object_name': 'Workflow'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) - }, - u'document_states.workflowinstance': { - 'Meta': {'unique_together': "((u'document', u'workflow'),)", 'object_name': 'WorkflowInstance'}, - 'document': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['documents.Document']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'workflow': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['document_states.Workflow']"}) - }, - u'document_states.workflowinstancelogentry': { - 'Meta': {'object_name': 'WorkflowInstanceLogEntry'}, - 'datetime': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'document': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['documents.Document']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'workflow_instace': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['document_states.WorkflowInstance']"}) - }, - u'document_states.workflowstate': { - 'Meta': {'object_name': 'WorkflowState'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'initial': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'label': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'workflow': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['document_states.Workflow']"}) - }, - u'document_states.workflowtransition': { - 'Meta': {'object_name': 'WorkflowTransition'}, - 'destination_state': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'destinations'", 'to': u"orm['document_states.WorkflowState']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'origin_state': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'origins'", 'to': u"orm['document_states.WorkflowState']"}), - 'workflow': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['document_states.Workflow']"}) - }, - u'documents.document': { - 'Meta': {'ordering': "['-date_added']", 'object_name': 'Document'}, - 'date_added': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'documents'", 'to': u"orm['documents.DocumentType']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'default': "u'Uninitialized document'", 'max_length': '255', 'db_index': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'default': "u'eng'", 'max_length': '8'}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "u'a8398ab2-9234-43c8-849c-a875066971d8'", 'max_length': '48'}) - }, - u'documents.documenttype': { - 'Meta': {'ordering': "['name']", 'object_name': 'DocumentType'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}), - 'ocr': ('django.db.models.fields.BooleanField', [], {'default': 'True'}) - } - } - - complete_apps = ['document_states'] diff --git a/mayan/apps/document_states/south_migrations/0003_auto__add_unique_workflowtransition_workflow_origin_state_destination_.py b/mayan/apps/document_states/south_migrations/0003_auto__add_unique_workflowtransition_workflow_origin_state_destination_.py deleted file mode 100644 index d7b9a2cbf2..0000000000 --- a/mayan/apps/document_states/south_migrations/0003_auto__add_unique_workflowtransition_workflow_origin_state_destination_.py +++ /dev/null @@ -1,75 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding unique constraint on 'WorkflowTransition', fields ['workflow', 'origin_state', 'destination_state'] - db.create_unique(u'document_states_workflowtransition', ['workflow_id', 'origin_state_id', 'destination_state_id']) - - def backwards(self, orm): - # Removing unique constraint on 'WorkflowTransition', fields ['workflow', 'origin_state', 'destination_state'] - db.delete_unique(u'document_states_workflowtransition', ['workflow_id', 'origin_state_id', 'destination_state_id']) - - models = { - u'document_states.documenttypeworkflow': { - 'Meta': {'unique_together': "((u'document_type', u'workflow'),)", 'object_name': 'DocumentTypeWorkflow'}, - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['documents.DocumentType']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'workflow': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['document_states.Workflow']"}) - }, - u'document_states.workflow': { - 'Meta': {'object_name': 'Workflow'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) - }, - u'document_states.workflowinstance': { - 'Meta': {'unique_together': "((u'document', u'workflow'),)", 'object_name': 'WorkflowInstance'}, - 'document': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['documents.Document']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'workflow': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['document_states.Workflow']"}) - }, - u'document_states.workflowinstancelogentry': { - 'Meta': {'object_name': 'WorkflowInstanceLogEntry'}, - 'datetime': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'document': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['documents.Document']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'workflow_instace': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['document_states.WorkflowInstance']"}) - }, - u'document_states.workflowstate': { - 'Meta': {'object_name': 'WorkflowState'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'initial': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'label': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'workflow': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'states'", 'to': u"orm['document_states.Workflow']"}) - }, - u'document_states.workflowtransition': { - 'Meta': {'unique_together': "((u'workflow', u'origin_state', u'destination_state'),)", 'object_name': 'WorkflowTransition'}, - 'destination_state': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'destinations'", 'to': u"orm['document_states.WorkflowState']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'origin_state': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'origins'", 'to': u"orm['document_states.WorkflowState']"}), - 'workflow': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['document_states.Workflow']"}) - }, - u'documents.document': { - 'Meta': {'ordering': "['-date_added']", 'object_name': 'Document'}, - 'date_added': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'documents'", 'to': u"orm['documents.DocumentType']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'default': "u'Uninitialized document'", 'max_length': '255', 'db_index': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'default': "u'eng'", 'max_length': '8'}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "u'1fa4f165-792f-4563-aea9-46283b03ddaf'", 'max_length': '48'}) - }, - u'documents.documenttype': { - 'Meta': {'ordering': "['name']", 'object_name': 'DocumentType'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}), - 'ocr': ('django.db.models.fields.BooleanField', [], {'default': 'True'}) - } - } - - complete_apps = ['document_states'] diff --git a/mayan/apps/document_states/south_migrations/0004_auto__del_field_workflowinstancelogentry_document__del_field_workflowi.py b/mayan/apps/document_states/south_migrations/0004_auto__del_field_workflowinstancelogentry_document__del_field_workflowi.py deleted file mode 100644 index cad6ec63a4..0000000000 --- a/mayan/apps/document_states/south_migrations/0004_auto__del_field_workflowinstancelogentry_document__del_field_workflowi.py +++ /dev/null @@ -1,109 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Deleting field 'WorkflowInstanceLogEntry.document' - db.delete_column(u'document_states_workflowinstancelogentry', 'document_id') - - # Deleting field 'WorkflowInstanceLogEntry.workflow_instace' - db.delete_column(u'document_states_workflowinstancelogentry', 'workflow_instace_id') - - # Adding field 'WorkflowInstanceLogEntry.workflow_instance' - db.add_column(u'document_states_workflowinstancelogentry', 'workflow_instance', - self.gf('django.db.models.fields.related.ForeignKey')(default=1, related_name=u'log_entries', to=orm['document_states.WorkflowInstance']), - keep_default=False) - - # Adding field 'WorkflowInstanceLogEntry.transition' - db.add_column(u'document_states_workflowinstancelogentry', 'transition', - self.gf('django.db.models.fields.related.ForeignKey')(default=1, to=orm['document_states.WorkflowTransition']), - keep_default=False) - - def backwards(self, orm): - - # User chose to not deal with backwards NULL issues for 'WorkflowInstanceLogEntry.document' - raise RuntimeError("Cannot reverse this migration. 'WorkflowInstanceLogEntry.document' and its values cannot be restored.") - - # The following code is provided here to aid in writing a correct migration # Adding field 'WorkflowInstanceLogEntry.document' - db.add_column(u'document_states_workflowinstancelogentry', 'document', - self.gf('django.db.models.fields.related.ForeignKey')(to=orm['documents.Document']), - keep_default=False) - - - # User chose to not deal with backwards NULL issues for 'WorkflowInstanceLogEntry.workflow_instace' - raise RuntimeError("Cannot reverse this migration. 'WorkflowInstanceLogEntry.workflow_instace' and its values cannot be restored.") - - # The following code is provided here to aid in writing a correct migration # Adding field 'WorkflowInstanceLogEntry.workflow_instace' - db.add_column(u'document_states_workflowinstancelogentry', 'workflow_instace', - self.gf('django.db.models.fields.related.ForeignKey')(to=orm['document_states.WorkflowInstance']), - keep_default=False) - - # Deleting field 'WorkflowInstanceLogEntry.workflow_instance' - db.delete_column(u'document_states_workflowinstancelogentry', 'workflow_instance_id') - - # Deleting field 'WorkflowInstanceLogEntry.transition' - db.delete_column(u'document_states_workflowinstancelogentry', 'transition_id') - - models = { - u'document_states.documenttypeworkflow': { - 'Meta': {'unique_together': "((u'document_type', u'workflow'),)", 'object_name': 'DocumentTypeWorkflow'}, - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['documents.DocumentType']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'workflow': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['document_states.Workflow']"}) - }, - u'document_states.workflow': { - 'Meta': {'object_name': 'Workflow'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) - }, - u'document_states.workflowinstance': { - 'Meta': {'unique_together': "((u'document', u'workflow'),)", 'object_name': 'WorkflowInstance'}, - 'document': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['documents.Document']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'workflow': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['document_states.Workflow']"}) - }, - u'document_states.workflowinstancelogentry': { - 'Meta': {'object_name': 'WorkflowInstanceLogEntry'}, - 'datetime': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'transition': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['document_states.WorkflowTransition']"}), - 'workflow_instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'log_entries'", 'to': u"orm['document_states.WorkflowInstance']"}) - }, - u'document_states.workflowstate': { - 'Meta': {'object_name': 'WorkflowState'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'initial': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'label': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'workflow': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'states'", 'to': u"orm['document_states.Workflow']"}) - }, - u'document_states.workflowtransition': { - 'Meta': {'unique_together': "((u'workflow', u'origin_state', u'destination_state'),)", 'object_name': 'WorkflowTransition'}, - 'destination_state': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'destinations'", 'to': u"orm['document_states.WorkflowState']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'origin_state': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'origins'", 'to': u"orm['document_states.WorkflowState']"}), - 'workflow': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'transitions'", 'to': u"orm['document_states.Workflow']"}) - }, - u'documents.document': { - 'Meta': {'ordering': "['-date_added']", 'object_name': 'Document'}, - 'date_added': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'documents'", 'to': u"orm['documents.DocumentType']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'default': "u'Uninitialized document'", 'max_length': '255', 'db_index': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'default': "u'eng'", 'max_length': '8'}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "u'3d36ed9d-3356-4f96-ae65-da677128e0c3'", 'max_length': '48'}) - }, - u'documents.documenttype': { - 'Meta': {'ordering': "['name']", 'object_name': 'DocumentType'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}), - 'ocr': ('django.db.models.fields.BooleanField', [], {'default': 'True'}) - } - } - - complete_apps = ['document_states'] diff --git a/mayan/apps/document_states/south_migrations/0005_auto__del_unique_workflowstate_label__add_unique_workflowstate_workflo.py b/mayan/apps/document_states/south_migrations/0005_auto__del_unique_workflowstate_label__add_unique_workflowstate_workflo.py deleted file mode 100644 index c47f132ba5..0000000000 --- a/mayan/apps/document_states/south_migrations/0005_auto__del_unique_workflowstate_label__add_unique_workflowstate_workflo.py +++ /dev/null @@ -1,81 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Removing unique constraint on 'WorkflowState', fields ['label'] - db.delete_unique(u'document_states_workflowstate', ['label']) - - # Adding unique constraint on 'WorkflowState', fields ['workflow', 'label'] - db.create_unique(u'document_states_workflowstate', ['workflow_id', 'label']) - - def backwards(self, orm): - # Removing unique constraint on 'WorkflowState', fields ['workflow', 'label'] - db.delete_unique(u'document_states_workflowstate', ['workflow_id', 'label']) - - # Adding unique constraint on 'WorkflowState', fields ['label'] - db.create_unique(u'document_states_workflowstate', ['label']) - - models = { - u'document_states.documenttypeworkflow': { - 'Meta': {'unique_together': "((u'document_type', u'workflow'),)", 'object_name': 'DocumentTypeWorkflow'}, - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['documents.DocumentType']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'workflow': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['document_states.Workflow']"}) - }, - u'document_states.workflow': { - 'Meta': {'object_name': 'Workflow'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) - }, - u'document_states.workflowinstance': { - 'Meta': {'unique_together': "((u'document', u'workflow'),)", 'object_name': 'WorkflowInstance'}, - 'document': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['documents.Document']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'workflow': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['document_states.Workflow']"}) - }, - u'document_states.workflowinstancelogentry': { - 'Meta': {'object_name': 'WorkflowInstanceLogEntry'}, - 'datetime': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'transition': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['document_states.WorkflowTransition']"}), - 'workflow_instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'log_entries'", 'to': u"orm['document_states.WorkflowInstance']"}) - }, - u'document_states.workflowstate': { - 'Meta': {'unique_together': "((u'workflow', u'label'),)", 'object_name': 'WorkflowState'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'initial': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'workflow': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'states'", 'to': u"orm['document_states.Workflow']"}) - }, - u'document_states.workflowtransition': { - 'Meta': {'unique_together': "((u'workflow', u'origin_state', u'destination_state'),)", 'object_name': 'WorkflowTransition'}, - 'destination_state': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'destinations'", 'to': u"orm['document_states.WorkflowState']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'origin_state': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'origins'", 'to': u"orm['document_states.WorkflowState']"}), - 'workflow': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'transitions'", 'to': u"orm['document_states.Workflow']"}) - }, - u'documents.document': { - 'Meta': {'ordering': "['-date_added']", 'object_name': 'Document'}, - 'date_added': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'documents'", 'to': u"orm['documents.DocumentType']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'default': "u'Uninitialized document'", 'max_length': '255', 'db_index': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'default': "u'eng'", 'max_length': '8'}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "u'1ee5fe5a-7e48-4166-a7d0-3b2acc8fb81b'", 'max_length': '48'}) - }, - u'documents.documenttype': { - 'Meta': {'ordering': "['name']", 'object_name': 'DocumentType'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}), - 'ocr': ('django.db.models.fields.BooleanField', [], {'default': 'True'}) - } - } - - complete_apps = ['document_states'] diff --git a/mayan/apps/document_states/south_migrations/0006_auto__del_unique_workflowtransition_label__del_unique_workflowtransiti.py b/mayan/apps/document_states/south_migrations/0006_auto__del_unique_workflowtransition_label__del_unique_workflowtransiti.py deleted file mode 100644 index 035cf2aeed..0000000000 --- a/mayan/apps/document_states/south_migrations/0006_auto__del_unique_workflowtransition_label__del_unique_workflowtransiti.py +++ /dev/null @@ -1,87 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Removing unique constraint on 'WorkflowTransition', fields ['workflow', 'origin_state', 'destination_state'] - db.delete_unique(u'document_states_workflowtransition', ['workflow_id', 'origin_state_id', 'destination_state_id']) - - # Removing unique constraint on 'WorkflowTransition', fields ['label'] - db.delete_unique(u'document_states_workflowtransition', ['label']) - - # Adding unique constraint on 'WorkflowTransition', fields ['workflow', 'label', 'origin_state', 'destination_state'] - db.create_unique(u'document_states_workflowtransition', ['workflow_id', 'label', 'origin_state_id', 'destination_state_id']) - - def backwards(self, orm): - # Removing unique constraint on 'WorkflowTransition', fields ['workflow', 'label', 'origin_state', 'destination_state'] - db.delete_unique(u'document_states_workflowtransition', ['workflow_id', 'label', 'origin_state_id', 'destination_state_id']) - - # Adding unique constraint on 'WorkflowTransition', fields ['label'] - db.create_unique(u'document_states_workflowtransition', ['label']) - - # Adding unique constraint on 'WorkflowTransition', fields ['workflow', 'origin_state', 'destination_state'] - db.create_unique(u'document_states_workflowtransition', ['workflow_id', 'origin_state_id', 'destination_state_id']) - - models = { - u'document_states.documenttypeworkflow': { - 'Meta': {'unique_together': "((u'document_type', u'workflow'),)", 'object_name': 'DocumentTypeWorkflow'}, - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['documents.DocumentType']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'workflow': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['document_states.Workflow']"}) - }, - u'document_states.workflow': { - 'Meta': {'object_name': 'Workflow'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) - }, - u'document_states.workflowinstance': { - 'Meta': {'unique_together': "((u'document', u'workflow'),)", 'object_name': 'WorkflowInstance'}, - 'document': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['documents.Document']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'workflow': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['document_states.Workflow']"}) - }, - u'document_states.workflowinstancelogentry': { - 'Meta': {'object_name': 'WorkflowInstanceLogEntry'}, - 'datetime': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'transition': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['document_states.WorkflowTransition']"}), - 'workflow_instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'log_entries'", 'to': u"orm['document_states.WorkflowInstance']"}) - }, - u'document_states.workflowstate': { - 'Meta': {'unique_together': "((u'workflow', u'label'),)", 'object_name': 'WorkflowState'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'initial': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'workflow': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'states'", 'to': u"orm['document_states.Workflow']"}) - }, - u'document_states.workflowtransition': { - 'Meta': {'unique_together': "((u'workflow', u'label', u'origin_state', u'destination_state'),)", 'object_name': 'WorkflowTransition'}, - 'destination_state': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'destinations'", 'to': u"orm['document_states.WorkflowState']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'origin_state': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'origins'", 'to': u"orm['document_states.WorkflowState']"}), - 'workflow': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'transitions'", 'to': u"orm['document_states.Workflow']"}) - }, - u'documents.document': { - 'Meta': {'ordering': "['-date_added']", 'object_name': 'Document'}, - 'date_added': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'documents'", 'to': u"orm['documents.DocumentType']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'default': "u'Uninitialized document'", 'max_length': '255', 'db_index': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'default': "u'eng'", 'max_length': '8'}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "u'59ce9910-80b7-48b3-8a1a-e9ac0fb412f0'", 'max_length': '48'}) - }, - u'documents.documenttype': { - 'Meta': {'ordering': "['name']", 'object_name': 'DocumentType'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}), - 'ocr': ('django.db.models.fields.BooleanField', [], {'default': 'True'}) - } - } - - complete_apps = ['document_states'] diff --git a/mayan/apps/document_states/south_migrations/0007_auto__del_documenttypeworkflow__del_unique_documenttypeworkflow_docume.py b/mayan/apps/document_states/south_migrations/0007_auto__del_documenttypeworkflow__del_unique_documenttypeworkflow_docume.py deleted file mode 100644 index 93a37322a8..0000000000 --- a/mayan/apps/document_states/south_migrations/0007_auto__del_documenttypeworkflow__del_unique_documenttypeworkflow_docume.py +++ /dev/null @@ -1,93 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Removing unique constraint on 'DocumentTypeWorkflow', fields ['document_type', 'workflow'] - db.delete_unique(u'document_states_documenttypeworkflow', ['document_type_id', 'workflow_id']) - - # Deleting model 'DocumentTypeWorkflow' - db.delete_table(u'document_states_documenttypeworkflow') - - # Adding M2M table for field document_types on 'Workflow' - m2m_table_name = db.shorten_name(u'document_states_workflow_document_types') - db.create_table(m2m_table_name, ( - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), - ('workflow', models.ForeignKey(orm[u'document_states.workflow'], null=False)), - ('documenttype', models.ForeignKey(orm[u'documents.documenttype'], null=False)) - )) - db.create_unique(m2m_table_name, ['workflow_id', 'documenttype_id']) - - def backwards(self, orm): - # Adding model 'DocumentTypeWorkflow' - db.create_table(u'document_states_documenttypeworkflow', ( - ('document_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['documents.DocumentType'])), - (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('workflow', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['document_states.Workflow'])), - )) - db.send_create_signal(u'document_states', ['DocumentTypeWorkflow']) - - # Adding unique constraint on 'DocumentTypeWorkflow', fields ['document_type', 'workflow'] - db.create_unique(u'document_states_documenttypeworkflow', ['document_type_id', 'workflow_id']) - - # Removing M2M table for field document_types on 'Workflow' - db.delete_table(db.shorten_name(u'document_states_workflow_document_types')) - - models = { - u'document_states.workflow': { - 'Meta': {'object_name': 'Workflow'}, - 'document_types': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['documents.DocumentType']", 'symmetrical': 'False'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) - }, - u'document_states.workflowinstance': { - 'Meta': {'unique_together': "((u'document', u'workflow'),)", 'object_name': 'WorkflowInstance'}, - 'document': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['documents.Document']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'workflow': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['document_states.Workflow']"}) - }, - u'document_states.workflowinstancelogentry': { - 'Meta': {'object_name': 'WorkflowInstanceLogEntry'}, - 'datetime': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'transition': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['document_states.WorkflowTransition']"}), - 'workflow_instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'log_entries'", 'to': u"orm['document_states.WorkflowInstance']"}) - }, - u'document_states.workflowstate': { - 'Meta': {'unique_together': "((u'workflow', u'label'),)", 'object_name': 'WorkflowState'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'initial': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'workflow': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'states'", 'to': u"orm['document_states.Workflow']"}) - }, - u'document_states.workflowtransition': { - 'Meta': {'unique_together': "((u'workflow', u'label', u'origin_state', u'destination_state'),)", 'object_name': 'WorkflowTransition'}, - 'destination_state': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'destinations'", 'to': u"orm['document_states.WorkflowState']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'origin_state': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'origins'", 'to': u"orm['document_states.WorkflowState']"}), - 'workflow': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'transitions'", 'to': u"orm['document_states.Workflow']"}) - }, - u'documents.document': { - 'Meta': {'ordering': "['-date_added']", 'object_name': 'Document'}, - 'date_added': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'documents'", 'to': u"orm['documents.DocumentType']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'default': "u'Uninitialized document'", 'max_length': '255', 'db_index': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'default': "u'eng'", 'max_length': '8'}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "u'fbd029e5-0f29-4863-b72c-e8cd1373b9f3'", 'max_length': '48'}) - }, - u'documents.documenttype': { - 'Meta': {'ordering': "['name']", 'object_name': 'DocumentType'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}), - 'ocr': ('django.db.models.fields.BooleanField', [], {'default': 'True'}) - } - } - - complete_apps = ['document_states'] diff --git a/mayan/apps/document_states/south_migrations/0008_auto__add_field_workflowinstancelogentry_user__add_field_workflowinsta.py b/mayan/apps/document_states/south_migrations/0008_auto__add_field_workflowinstancelogentry_user__add_field_workflowinsta.py deleted file mode 100644 index 69809d7fed..0000000000 --- a/mayan/apps/document_states/south_migrations/0008_auto__add_field_workflowinstancelogentry_user__add_field_workflowinsta.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'WorkflowInstanceLogEntry.user' - db.add_column(u'document_states_workflowinstancelogentry', 'user', - self.gf('django.db.models.fields.related.ForeignKey')(default=1, to=orm['auth.User']), - keep_default=False) - - # Adding field 'WorkflowInstanceLogEntry.comment' - db.add_column(u'document_states_workflowinstancelogentry', 'comment', - self.gf('django.db.models.fields.TextField')(default='', blank=True), - keep_default=False) - - def backwards(self, orm): - # Deleting field 'WorkflowInstanceLogEntry.user' - db.delete_column(u'document_states_workflowinstancelogentry', 'user_id') - - # Deleting field 'WorkflowInstanceLogEntry.comment' - db.delete_column(u'document_states_workflowinstancelogentry', 'comment') - - models = { - 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', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Group']"}), - 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', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Permission']"}), - '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'document_states.workflow': { - 'Meta': {'object_name': 'Workflow'}, - 'document_types': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "u'workflows'", 'symmetrical': 'False', 'to': u"orm['documents.DocumentType']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) - }, - u'document_states.workflowinstance': { - 'Meta': {'unique_together': "((u'document', u'workflow'),)", 'object_name': 'WorkflowInstance'}, - 'document': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'workflows'", 'to': u"orm['documents.Document']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'workflow': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'instances'", 'to': u"orm['document_states.Workflow']"}) - }, - u'document_states.workflowinstancelogentry': { - 'Meta': {'object_name': 'WorkflowInstanceLogEntry'}, - 'comment': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'datetime': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'transition': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['document_states.WorkflowTransition']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}), - 'workflow_instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'log_entries'", 'to': u"orm['document_states.WorkflowInstance']"}) - }, - u'document_states.workflowstate': { - 'Meta': {'unique_together': "((u'workflow', u'label'),)", 'object_name': 'WorkflowState'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'initial': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'workflow': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'states'", 'to': u"orm['document_states.Workflow']"}) - }, - u'document_states.workflowtransition': { - 'Meta': {'unique_together': "((u'workflow', u'label', u'origin_state', u'destination_state'),)", 'object_name': 'WorkflowTransition'}, - 'destination_state': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'destination_transitions'", 'to': u"orm['document_states.WorkflowState']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'origin_state': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'origin_transitions'", 'to': u"orm['document_states.WorkflowState']"}), - 'workflow': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'transitions'", 'to': u"orm['document_states.Workflow']"}) - }, - u'documents.document': { - 'Meta': {'ordering': "[u'-date_added']", 'object_name': 'Document'}, - 'date_added': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'documents'", 'to': u"orm['documents.DocumentType']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'default': "u'Uninitialized document'", 'max_length': '255', 'db_index': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'default': "u'eng'", 'max_length': '8'}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "u'9c109575-8a14-44ac-b32d-6f1d6ff056ee'", 'max_length': '48'}) - }, - u'documents.documenttype': { - 'Meta': {'ordering': "[u'name']", 'object_name': 'DocumentType'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}), - 'ocr': ('django.db.models.fields.BooleanField', [], {'default': 'True'}) - } - } - - complete_apps = ['document_states'] diff --git a/mayan/apps/document_states/south_migrations/0009_auto__add_index_workflowinstancelogentry_datetime.py b/mayan/apps/document_states/south_migrations/0009_auto__add_index_workflowinstancelogentry_datetime.py deleted file mode 100644 index 57772863c5..0000000000 --- a/mayan/apps/document_states/south_migrations/0009_auto__add_index_workflowinstancelogentry_datetime.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding index on 'WorkflowInstanceLogEntry', fields ['datetime'] - db.create_index(u'document_states_workflowinstancelogentry', ['datetime']) - - def backwards(self, orm): - # Removing index on 'WorkflowInstanceLogEntry', fields ['datetime'] - db.delete_index(u'document_states_workflowinstancelogentry', ['datetime']) - - models = { - 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', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Group']"}), - 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', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Permission']"}), - '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'document_states.workflow': { - 'Meta': {'object_name': 'Workflow'}, - 'document_types': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "u'workflows'", 'symmetrical': 'False', 'to': u"orm['documents.DocumentType']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) - }, - u'document_states.workflowinstance': { - 'Meta': {'unique_together': "((u'document', u'workflow'),)", 'object_name': 'WorkflowInstance'}, - 'document': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'workflows'", 'to': u"orm['documents.Document']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'workflow': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'instances'", 'to': u"orm['document_states.Workflow']"}) - }, - u'document_states.workflowinstancelogentry': { - 'Meta': {'object_name': 'WorkflowInstanceLogEntry'}, - 'comment': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'datetime': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'transition': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['document_states.WorkflowTransition']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}), - 'workflow_instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'log_entries'", 'to': u"orm['document_states.WorkflowInstance']"}) - }, - u'document_states.workflowstate': { - 'Meta': {'unique_together': "((u'workflow', u'label'),)", 'object_name': 'WorkflowState'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'initial': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'workflow': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'states'", 'to': u"orm['document_states.Workflow']"}) - }, - u'document_states.workflowtransition': { - 'Meta': {'unique_together': "((u'workflow', u'label', u'origin_state', u'destination_state'),)", 'object_name': 'WorkflowTransition'}, - 'destination_state': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'destination_transitions'", 'to': u"orm['document_states.WorkflowState']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'origin_state': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'origin_transitions'", 'to': u"orm['document_states.WorkflowState']"}), - 'workflow': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'transitions'", 'to': u"orm['document_states.Workflow']"}) - }, - u'documents.document': { - 'Meta': {'ordering': "[u'-date_added']", 'object_name': 'Document'}, - 'date_added': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'documents'", 'to': u"orm['documents.DocumentType']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'default': "u'Uninitialized document'", 'max_length': '255', 'db_index': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'default': "u'eng'", 'max_length': '8'}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "u'56623f41-d7c2-40b2-9f01-c53fd42b2abd'", 'max_length': '48'}) - }, - u'documents.documenttype': { - 'Meta': {'ordering': "[u'name']", 'object_name': 'DocumentType'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}), - 'ocr': ('django.db.models.fields.BooleanField', [], {'default': 'True'}) - } - } - - complete_apps = ['document_states'] diff --git a/mayan/apps/dynamic_search/migrations/0001_initial.py b/mayan/apps/dynamic_search/migrations/0001_initial.py new file mode 100644 index 0000000000..77c96365be --- /dev/null +++ b/mayan/apps/dynamic_search/migrations/0001_initial.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations +from django.conf import settings + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='RecentSearch', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('query', models.TextField(verbose_name='Query', editable=False)), + ('datetime_created', models.DateTimeField(auto_now=True, verbose_name='Datetime created', db_index=True)), + ('hits', models.IntegerField(verbose_name='Hits', editable=False)), + ('user', models.ForeignKey(verbose_name='User', to=settings.AUTH_USER_MODEL)), + ], + options={ + 'ordering': ('-datetime_created',), + 'verbose_name': 'Recent search', + 'verbose_name_plural': 'Recent searches', + }, + bases=(models.Model,), + ), + ] diff --git a/mayan/apps/dynamic_search/south_migrations/__init__.py b/mayan/apps/dynamic_search/migrations/__init__.py similarity index 100% rename from mayan/apps/dynamic_search/south_migrations/__init__.py rename to mayan/apps/dynamic_search/migrations/__init__.py diff --git a/mayan/apps/dynamic_search/south_migrations/0001_initial.py b/mayan/apps/dynamic_search/south_migrations/0001_initial.py deleted file mode 100644 index dcdae0b4ff..0000000000 --- a/mayan/apps/dynamic_search/south_migrations/0001_initial.py +++ /dev/null @@ -1,71 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'RecentSearch' - db.create_table(u'dynamic_search_recentsearch', ( - (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), - ('query', self.gf('django.db.models.fields.TextField')()), - ('datetime_created', self.gf('django.db.models.fields.DateTimeField')()), - ('hits', self.gf('django.db.models.fields.IntegerField')()), - )) - db.send_create_signal(u'dynamic_search', ['RecentSearch']) - - def backwards(self, orm): - # Deleting model 'RecentSearch' - db.delete_table(u'dynamic_search_recentsearch') - - models = { - 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', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Group']"}), - 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', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Permission']"}), - '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'dynamic_search.recentsearch': { - 'Meta': {'ordering': "('-datetime_created',)", 'object_name': 'RecentSearch'}, - 'datetime_created': ('django.db.models.fields.DateTimeField', [], {}), - 'hits': ('django.db.models.fields.IntegerField', [], {}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'query': ('django.db.models.fields.TextField', [], {}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}) - } - } - - complete_apps = ['dynamic_search'] diff --git a/mayan/apps/dynamic_search/south_migrations/0002_auto__chg_field_recentsearch_datetime_created__add_index_recentsearch_.py b/mayan/apps/dynamic_search/south_migrations/0002_auto__chg_field_recentsearch_datetime_created__add_index_recentsearch_.py deleted file mode 100644 index 6f34c7eedf..0000000000 --- a/mayan/apps/dynamic_search/south_migrations/0002_auto__chg_field_recentsearch_datetime_created__add_index_recentsearch_.py +++ /dev/null @@ -1,70 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Changing field 'RecentSearch.datetime_created' - db.alter_column(u'dynamic_search_recentsearch', 'datetime_created', self.gf('django.db.models.fields.DateTimeField')(auto_now=True)) - # Adding index on 'RecentSearch', fields ['datetime_created'] - db.create_index(u'dynamic_search_recentsearch', ['datetime_created']) - - def backwards(self, orm): - # Removing index on 'RecentSearch', fields ['datetime_created'] - db.delete_index(u'dynamic_search_recentsearch', ['datetime_created']) - - # Changing field 'RecentSearch.datetime_created' - db.alter_column(u'dynamic_search_recentsearch', 'datetime_created', self.gf('django.db.models.fields.DateTimeField')()) - - models = { - 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', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Group']"}), - 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', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Permission']"}), - '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'dynamic_search.recentsearch': { - 'Meta': {'ordering': "('-datetime_created',)", 'object_name': 'RecentSearch'}, - 'datetime_created': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'hits': ('django.db.models.fields.IntegerField', [], {}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'query': ('django.db.models.fields.TextField', [], {}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}) - } - } - - complete_apps = ['dynamic_search'] diff --git a/mayan/apps/events/migrations/0001_initial.py b/mayan/apps/events/migrations/0001_initial.py new file mode 100644 index 0000000000..74c7e035a5 --- /dev/null +++ b/mayan/apps/events/migrations/0001_initial.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='EventType', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(unique=True, max_length=64, verbose_name='Name')), + ], + options={ + 'verbose_name': 'Event type', + 'verbose_name_plural': 'Event types', + }, + bases=(models.Model,), + ), + ] diff --git a/mayan/apps/events/south_migrations/__init__.py b/mayan/apps/events/migrations/__init__.py similarity index 100% rename from mayan/apps/events/south_migrations/__init__.py rename to mayan/apps/events/migrations/__init__.py diff --git a/mayan/apps/events/south_migrations/0001_initial.py b/mayan/apps/events/south_migrations/0001_initial.py deleted file mode 100644 index c3d85fd450..0000000000 --- a/mayan/apps/events/south_migrations/0001_initial.py +++ /dev/null @@ -1,29 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'EventType' - db.create_table(u'events_eventtype', ( - (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=64)), - )) - db.send_create_signal(u'events', ['EventType']) - - def backwards(self, orm): - # Deleting model 'EventType' - db.delete_table(u'events_eventtype') - - models = { - u'events.eventtype': { - 'Meta': {'object_name': 'EventType'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64'}) - } - } - - complete_apps = ['events'] diff --git a/mayan/apps/events/south_migrations/0002_migrate_history_data.py b/mayan/apps/events/south_migrations/0002_migrate_history_data.py deleted file mode 100644 index 7f39550f18..0000000000 --- a/mayan/apps/events/south_migrations/0002_migrate_history_data.py +++ /dev/null @@ -1,199 +0,0 @@ -# -*- coding: utf-8 -*- -import json - -from south.db import db -from south.v2 import DataMigration -from django.db import models - -type_equivalence = { - 'documents.document_created': 'documents_document_create', - 'documents.document_edited': 'documents_document_edit', - 'checkouts.document_checked_out': 'checkouts_document_check_out', - 'checkouts.document_checked_in': 'checkouts_document_check_in', - 'checkouts.document_auto_checked_in': 'checkouts_document_auto_check_in', - 'checkouts.document_forefull_check_in': 'checkouts_document_forceful_check_in', -} - - -class Migration(DataMigration): - - depends_on = ( - ('actstream', '0001_initial'), - ('history', '0002_auto__chg_field_history_datetime'), - ) - - def forwards(self, orm): - "Write your forwards methods here." - # Note: Don't use "from appname.models import ModelName". - # Use orm.ModelName to refer to models in this application, - # and orm['appname.ModelName'] for models in other applications. - - user_content_type = orm['contenttypes.contenttype'].objects.get(app_label='auth', model='user') - - for history_event in orm['history.history'].objects.all(): - user_pk = None - if history_event.dictionary: - loaded_dictionary = json.loads(history_event.dictionary) - if 'user' in loaded_dictionary: - user_pk = json.loads(loaded_dictionary['user']['value'])[0]['pk'] - - try: - orm['documents.document'].objects.get(pk=history_event.object_id) - except Exception: - pass - else: - if user_pk and history_event.object_id: - action = orm['actstream.action']( - timestamp=history_event.datetime, - actor_content_type=user_content_type, - actor_object_id=user_pk, - verb=type_equivalence['{0}.{1}'.format(history_event.history_type.namespace, history_event.history_type.name)], - target_content_type=history_event.content_type, - target_object_id=history_event.object_id - ) - action.save() - - def backwards(self, orm): - "Write your backwards methods here." - - models = { - u'actstream.action': { - 'Meta': {'ordering': "('-timestamp',)", 'object_name': 'Action'}, - 'action_object_content_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'action_object'", 'null': 'True', 'to': u"orm['contenttypes.ContentType']"}), - 'action_object_object_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'actor_content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'actor'", 'to': u"orm['contenttypes.ContentType']"}), - 'actor_object_id': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'target_content_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'target'", 'null': 'True', 'to': u"orm['contenttypes.ContentType']"}), - 'target_object_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'timestamp': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'verb': ('django.db.models.fields.CharField', [], {'max_length': '255'}) - }, - u'actstream.follow': { - 'Meta': {'unique_together': "(('user', 'content_type', 'object_id'),)", 'object_name': 'Follow'}, - 'actor_only': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'object_id': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'started': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}) - }, - 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', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Group']"}), - 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', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Permission']"}), - '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'documents.document': { - 'Meta': {'ordering': "['-date_added']", 'object_name': 'Document'}, - 'date_added': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'documents'", 'to': u"orm['documents.DocumentType']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'default': "u'Uninitialized document'", 'max_length': '255', 'db_index': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'default': "u'eng'", 'max_length': '8'}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "u'bbce0d8c-5707-4b0d-a996-4f4780787b53'", 'max_length': '48'}) - }, - u'documents.documentpage': { - 'Meta': {'ordering': "['page_number']", 'object_name': 'DocumentPage'}, - 'content': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'document_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'pages'", 'to': u"orm['documents.DocumentVersion']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'page_label': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True', 'blank': 'True'}), - 'page_number': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1', 'db_index': 'True'}) - }, - u'documents.documentpagetransformation': { - 'Meta': {'ordering': "('order',)", 'object_name': 'DocumentPageTransformation'}, - 'arguments': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'document_page': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['documents.DocumentPage']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), - 'transformation': ('django.db.models.fields.CharField', [], {'max_length': '128'}) - }, - u'documents.documenttype': { - 'Meta': {'ordering': "['name']", 'object_name': 'DocumentType'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}), - 'ocr': ('django.db.models.fields.BooleanField', [], {'default': 'True'}) - }, - u'documents.documenttypefilename': { - 'Meta': {'ordering': "['filename']", 'unique_together': "(('document_type', 'filename'),)", 'object_name': 'DocumentTypeFilename'}, - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'filenames'", 'to': u"orm['documents.DocumentType']"}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'filename': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - u'documents.documentversion': { - 'Meta': {'object_name': 'DocumentVersion'}, - 'checksum': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'document': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'versions'", 'to': u"orm['documents.Document']"}), - 'encoding': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True', 'blank': 'True'}), - 'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'mimetype': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'timestamp': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}) - }, - u'documents.recentdocument': { - 'Meta': {'ordering': "('-datetime_accessed',)", 'object_name': 'RecentDocument'}, - 'datetime_accessed': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'document': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['documents.Document']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}) - }, - u'events.eventtype': { - 'Meta': {'object_name': 'EventType'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64'}) - }, - u'history.history': { - 'Meta': {'ordering': "('-datetime',)", 'object_name': 'History'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']", 'null': 'True', 'blank': 'True'}), - 'datetime': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'dictionary': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'history_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['history.HistoryType']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}) - }, - u'history.historytype': { - 'Meta': {'ordering': "('namespace', 'name')", 'unique_together': "(('namespace', 'name'),)", 'object_name': 'HistoryType'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'namespace': ('django.db.models.fields.CharField', [], {'max_length': '64'}) - } - } - - complete_apps = ['history', 'auth', 'actstream', 'documents', 'events'] - symmetrical = True diff --git a/mayan/apps/folders/migrations/0001_initial.py b/mayan/apps/folders/migrations/0001_initial.py new file mode 100644 index 0000000000..15a9eb0499 --- /dev/null +++ b/mayan/apps/folders/migrations/0001_initial.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations +from django.conf import settings + + +class Migration(migrations.Migration): + + dependencies = [ + ('documents', '__first__'), + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='Folder', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('title', models.CharField(max_length=128, verbose_name='Title', db_index=True)), + ('datetime_created', models.DateTimeField(auto_now_add=True, verbose_name='Datetime created')), + ('documents', models.ManyToManyField(related_name='folders', verbose_name='Documents', to='documents.Document')), + ('user', models.ForeignKey(verbose_name='User', to=settings.AUTH_USER_MODEL)), + ], + options={ + 'ordering': ('title',), + 'verbose_name': 'Folder', + 'verbose_name_plural': 'Folders', + }, + bases=(models.Model,), + ), + migrations.AlterUniqueTogether( + name='folder', + unique_together=set([('title', 'user')]), + ), + ] diff --git a/mayan/apps/folders/south_migrations/__init__.py b/mayan/apps/folders/migrations/__init__.py similarity index 100% rename from mayan/apps/folders/south_migrations/__init__.py rename to mayan/apps/folders/migrations/__init__.py diff --git a/mayan/apps/folders/south_migrations/0001_initial.py b/mayan/apps/folders/south_migrations/0001_initial.py deleted file mode 100644 index 25babd00a8..0000000000 --- a/mayan/apps/folders/south_migrations/0001_initial.py +++ /dev/null @@ -1,145 +0,0 @@ -# encoding: utf-8 -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - depends_on = ( - ('documents', '0001_initial'), - ) - - def forwards(self, orm): - - # Adding model 'Folder' - db.create_table('folders_folder', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('title', self.gf('django.db.models.fields.CharField')(max_length=32, db_index=True)), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), - ('datetime_created', self.gf('django.db.models.fields.DateTimeField')()), - )) - db.send_create_signal('folders', ['Folder']) - - # Adding unique constraint on 'Folder', fields ['title', 'user'] - db.create_unique('folders_folder', ['title', 'user_id']) - - # Adding model 'FolderDocument' - db.create_table('folders_folderdocument', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('folder', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['folders.Folder'])), - ('document', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['documents.Document'])), - )) - db.send_create_signal('folders', ['FolderDocument']) - - def backwards(self, orm): - - # Removing unique constraint on 'Folder', fields ['title', 'user'] - db.delete_unique('folders_folder', ['title', 'user_id']) - - # Deleting model 'Folder' - db.delete_table('folders_folder') - - # Deleting model 'FolderDocument' - db.delete_table('folders_folderdocument') - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - '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': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - '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': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - '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': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'comments.comment': { - 'Meta': {'ordering': "('submit_date',)", 'object_name': 'Comment', 'db_table': "'django_comments'"}, - 'comment': ('django.db.models.fields.TextField', [], {'max_length': '3000'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'content_type_set_for_comment'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ip_address': ('django.db.models.fields.IPAddressField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}), - 'is_public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_removed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'object_pk': ('django.db.models.fields.TextField', [], {}), - 'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}), - 'submit_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'comment_comments'", 'null': 'True', 'to': "orm['auth.User']"}), - 'user_email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'user_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'user_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) - }, - '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'}), - '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'}) - }, - 'documents.document': { - 'Meta': {'ordering': "['-date_added']", 'object_name': 'Document'}, - 'date_added': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.DocumentType']", 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'max_length': '48', 'blank': 'True'}) - }, - 'documents.documenttype': { - 'Meta': {'ordering': "['name']", 'object_name': 'DocumentType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32'}) - }, - 'folders.folder': { - 'Meta': {'ordering': "('title',)", 'unique_together': "(('title', 'user'),)", 'object_name': 'Folder'}, - 'datetime_created': ('django.db.models.fields.DateTimeField', [], {}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'folders.folderdocument': { - 'Meta': {'object_name': 'FolderDocument'}, - 'document': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.Document']"}), - 'folder': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['folders.Folder']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'sites.site': { - 'Meta': {'ordering': "('domain',)", 'object_name': 'Site', 'db_table': "'django_site'"}, - 'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'taggit.tag': { - 'Meta': {'object_name': 'Tag'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100', 'db_index': 'True'}) - }, - 'taggit.taggeditem': { - 'Meta': {'object_name': 'TaggedItem'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}), - 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_items'", 'to': "orm['taggit.Tag']"}) - } - } - - complete_apps = ['folders'] diff --git a/mayan/apps/folders/south_migrations/0002_increase_title_size.py b/mayan/apps/folders/south_migrations/0002_increase_title_size.py deleted file mode 100644 index eeee5ed480..0000000000 --- a/mayan/apps/folders/south_migrations/0002_increase_title_size.py +++ /dev/null @@ -1,119 +0,0 @@ -# encoding: utf-8 -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Changing field 'Folder.title' - db.alter_column('folders_folder', 'title', self.gf('django.db.models.fields.CharField')(max_length=128)) - - def backwards(self, orm): - - # Changing field 'Folder.title' - db.alter_column('folders_folder', 'title', self.gf('django.db.models.fields.CharField')(max_length=32)) - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - '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': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - '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': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - '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': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'comments.comment': { - 'Meta': {'ordering': "('submit_date',)", 'object_name': 'Comment', 'db_table': "'django_comments'"}, - 'comment': ('django.db.models.fields.TextField', [], {'max_length': '3000'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'content_type_set_for_comment'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ip_address': ('django.db.models.fields.IPAddressField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}), - 'is_public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_removed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'object_pk': ('django.db.models.fields.TextField', [], {}), - 'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}), - 'submit_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'comment_comments'", 'null': 'True', 'to': "orm['auth.User']"}), - 'user_email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'user_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'user_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) - }, - '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'}), - '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'}) - }, - 'documents.document': { - 'Meta': {'ordering': "['-date_added']", 'object_name': 'Document'}, - 'date_added': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.DocumentType']", 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'max_length': '48', 'blank': 'True'}) - }, - 'documents.documenttype': { - 'Meta': {'ordering': "['name']", 'object_name': 'DocumentType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '32'}) - }, - 'folders.folder': { - 'Meta': {'ordering': "('title',)", 'unique_together': "(('title', 'user'),)", 'object_name': 'Folder'}, - 'datetime_created': ('django.db.models.fields.DateTimeField', [], {}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'folders.folderdocument': { - 'Meta': {'object_name': 'FolderDocument'}, - 'document': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.Document']"}), - 'folder': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['folders.Folder']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'sites.site': { - 'Meta': {'ordering': "('domain',)", 'object_name': 'Site', 'db_table': "'django_site'"}, - 'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'taggit.tag': { - 'Meta': {'object_name': 'Tag'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100', 'db_index': 'True'}) - }, - 'taggit.taggeditem': { - 'Meta': {'object_name': 'TaggedItem'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}), - 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_items'", 'to': "orm['taggit.Tag']"}) - } - } - - complete_apps = ['folders'] diff --git a/mayan/apps/folders/south_migrations/0003_auto.py b/mayan/apps/folders/south_migrations/0003_auto.py deleted file mode 100644 index 89eff37278..0000000000 --- a/mayan/apps/folders/south_migrations/0003_auto.py +++ /dev/null @@ -1,89 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding M2M table for field documents on 'Folder' - m2m_table_name = db.shorten_name(u'folders_folder_documents') - db.create_table(m2m_table_name, ( - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), - ('folder', models.ForeignKey(orm[u'folders.folder'], null=False)), - ('document', models.ForeignKey(orm[u'documents.document'], null=False)) - )) - db.create_unique(m2m_table_name, ['folder_id', 'document_id']) - - def backwards(self, orm): - # Removing M2M table for field documents on 'Folder' - db.delete_table(db.shorten_name(u'folders_folder_documents')) - - models = { - 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', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Group']"}), - 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', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Permission']"}), - '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'documents.document': { - 'Meta': {'ordering': "['-date_added']", 'object_name': 'Document'}, - 'date_added': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'documents'", 'null': 'True', 'to': u"orm['documents.DocumentType']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'max_length': '48', 'blank': 'True'}) - }, - u'documents.documenttype': { - 'Meta': {'ordering': "['name']", 'object_name': 'DocumentType'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}) - }, - u'folders.folder': { - 'Meta': {'ordering': "('title',)", 'unique_together': "(('title', 'user'),)", 'object_name': 'Folder'}, - 'datetime_created': ('django.db.models.fields.DateTimeField', [], {}), - 'documents': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['documents.Document']", 'symmetrical': 'False'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}) - }, - u'folders.folderdocument': { - 'Meta': {'object_name': 'FolderDocument'}, - 'document': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['documents.Document']"}), - 'folder': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['folders.Folder']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - } - } - - complete_apps = ['folders'] diff --git a/mayan/apps/folders/south_migrations/0004_m2m_fields.py b/mayan/apps/folders/south_migrations/0004_m2m_fields.py deleted file mode 100644 index 6ee979bbb2..0000000000 --- a/mayan/apps/folders/south_migrations/0004_m2m_fields.py +++ /dev/null @@ -1,88 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import DataMigration -from django.db import models - - -class Migration(DataMigration): - - def forwards(self, orm): - "Write your forwards methods here." - # Note: Don't use "from appname.models import ModelName". - # Use orm.ModelName to refer to models in this application, - # and orm['appname.ModelName'] for models in other applications. - for folder in orm.Folder.objects.all(): - for folder_document in orm.FolderDocument.objects.filter(folder=folder): - folder.documents.add(folder_document.document) - - def backwards(self, orm): - "Write your backwards methods here." - - models = { - 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', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Group']"}), - 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', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Permission']"}), - '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'documents.document': { - 'Meta': {'ordering': "['-date_added']", 'object_name': 'Document'}, - 'date_added': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'documents'", 'null': 'True', 'to': u"orm['documents.DocumentType']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'max_length': '48', 'blank': 'True'}) - }, - u'documents.documenttype': { - 'Meta': {'ordering': "['name']", 'object_name': 'DocumentType'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}) - }, - u'folders.folder': { - 'Meta': {'ordering': "('title',)", 'unique_together': "(('title', 'user'),)", 'object_name': 'Folder'}, - 'datetime_created': ('django.db.models.fields.DateTimeField', [], {}), - 'documents': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['documents.Document']", 'symmetrical': 'False'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}) - }, - u'folders.folderdocument': { - 'Meta': {'object_name': 'FolderDocument'}, - 'document': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['documents.Document']"}), - 'folder': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['folders.Folder']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - } - } - - complete_apps = ['folders'] - symmetrical = True diff --git a/mayan/apps/folders/south_migrations/0005_auto__del_folderdocument.py b/mayan/apps/folders/south_migrations/0005_auto__del_folderdocument.py deleted file mode 100644 index 38cfb44e84..0000000000 --- a/mayan/apps/folders/south_migrations/0005_auto__del_folderdocument.py +++ /dev/null @@ -1,82 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Deleting model 'FolderDocument' - db.delete_table(u'folders_folderdocument') - - def backwards(self, orm): - # Adding model 'FolderDocument' - db.create_table(u'folders_folderdocument', ( - ('folder', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['folders.Folder'])), - ('document', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['documents.Document'])), - (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - )) - db.send_create_signal(u'folders', ['FolderDocument']) - - models = { - 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', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Group']"}), - 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', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Permission']"}), - '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'documents.document': { - 'Meta': {'ordering': "['-date_added']", 'object_name': 'Document'}, - 'date_added': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'documents'", 'null': 'True', 'to': u"orm['documents.DocumentType']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'max_length': '48', 'blank': 'True'}) - }, - u'documents.documenttype': { - 'Meta': {'ordering': "['name']", 'object_name': 'DocumentType'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}) - }, - u'folders.folder': { - 'Meta': {'ordering': "('title',)", 'unique_together': "(('title', 'user'),)", 'object_name': 'Folder'}, - 'datetime_created': ('django.db.models.fields.DateTimeField', [], {}), - 'documents': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['documents.Document']", 'symmetrical': 'False'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}) - } - } - - complete_apps = ['folders'] diff --git a/mayan/apps/folders/south_migrations/0006_auto__chg_field_folder_datetime_created.py b/mayan/apps/folders/south_migrations/0006_auto__chg_field_folder_datetime_created.py deleted file mode 100644 index e1a36491cd..0000000000 --- a/mayan/apps/folders/south_migrations/0006_auto__chg_field_folder_datetime_created.py +++ /dev/null @@ -1,79 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Changing field 'Folder.datetime_created' - db.alter_column(u'folders_folder', 'datetime_created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True)) - - def backwards(self, orm): - - # Changing field 'Folder.datetime_created' - db.alter_column(u'folders_folder', 'datetime_created', self.gf('django.db.models.fields.DateTimeField')()) - - models = { - 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', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Group']"}), - 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', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Permission']"}), - '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'documents.document': { - 'Meta': {'ordering': "['-date_added']", 'object_name': 'Document'}, - 'date_added': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'documents'", 'null': 'True', 'to': u"orm['documents.DocumentType']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'max_length': '48', 'blank': 'True'}) - }, - u'documents.documenttype': { - 'Meta': {'ordering': "['name']", 'object_name': 'DocumentType'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}) - }, - u'folders.folder': { - 'Meta': {'ordering': "('title',)", 'unique_together': "(('title', 'user'),)", 'object_name': 'Folder'}, - 'datetime_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'documents': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['documents.Document']", 'symmetrical': 'False'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}) - } - } - - complete_apps = ['folders'] diff --git a/mayan/apps/linking/migrations/0001_initial.py b/mayan/apps/linking/migrations/0001_initial.py new file mode 100644 index 0000000000..8afc9fae60 --- /dev/null +++ b/mayan/apps/linking/migrations/0001_initial.py @@ -0,0 +1,47 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('documents', '__first__'), + ] + + operations = [ + migrations.CreateModel( + name='SmartLink', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('title', models.CharField(max_length=96, verbose_name='Title')), + ('dynamic_title', models.CharField(help_text='This expression will be evaluated against the current selected document.', max_length=96, verbose_name='Dynamic title', blank=True)), + ('enabled', models.BooleanField(default=True, verbose_name='Enabled')), + ('document_types', models.ManyToManyField(to='documents.DocumentType', verbose_name='Document types')), + ], + options={ + 'verbose_name': 'Smart link', + 'verbose_name_plural': 'Smart links', + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='SmartLinkCondition', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('inclusion', models.CharField(default='&', help_text='The inclusion is ignored for the first item.', max_length=16, choices=[('&', 'and'), ('|', 'or')])), + ('foreign_document_data', models.CharField(help_text='This represents the metadata of all other documents.', max_length=128, verbose_name='Foreign document attribute')), + ('operator', models.CharField(max_length=16, choices=[('exact', 'is equal to'), ('iexact', 'is equal to (case insensitive)'), ('contains', 'contains'), ('icontains', 'contains (case insensitive)'), ('in', 'is in'), ('gt', 'is greater than'), ('gte', 'is greater than or equal to'), ('lt', 'is less than'), ('lte', 'is less than or equal to'), ('startswith', 'starts with'), ('istartswith', 'starts with (case insensitive)'), ('endswith', 'ends with'), ('iendswith', 'ends with (case insensitive)'), ('regex', 'is in regular expression'), ('iregex', 'is in regular expression (case insensitive)')])), + ('expression', models.TextField(help_text='This expression will be evaluated against the current document.', verbose_name='Expression')), + ('negated', models.BooleanField(default=False, help_text='Inverts the logic of the operator.', verbose_name='Negated')), + ('enabled', models.BooleanField(default=True, verbose_name='Enabled')), + ('smart_link', models.ForeignKey(related_name='conditions', verbose_name='Smart link', to='linking.SmartLink')), + ], + options={ + 'verbose_name': 'Link condition', + 'verbose_name_plural': 'Link conditions', + }, + bases=(models.Model,), + ), + ] diff --git a/mayan/apps/linking/south_migrations/__init__.py b/mayan/apps/linking/migrations/__init__.py similarity index 100% rename from mayan/apps/linking/south_migrations/__init__.py rename to mayan/apps/linking/migrations/__init__.py diff --git a/mayan/apps/linking/south_migrations/0001_initial.py b/mayan/apps/linking/south_migrations/0001_initial.py deleted file mode 100644 index 7af48b8ca1..0000000000 --- a/mayan/apps/linking/south_migrations/0001_initial.py +++ /dev/null @@ -1,60 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'SmartLink' - db.create_table(u'linking_smartlink', ( - (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('title', self.gf('django.db.models.fields.CharField')(max_length=96)), - ('dynamic_title', self.gf('django.db.models.fields.CharField')(max_length=96, blank=True)), - ('enabled', self.gf('django.db.models.fields.BooleanField')(default=True)), - )) - db.send_create_signal(u'linking', ['SmartLink']) - - # Adding model 'SmartLinkCondition' - db.create_table(u'linking_smartlinkcondition', ( - (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('smart_link', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['linking.SmartLink'])), - ('inclusion', self.gf('django.db.models.fields.CharField')(default=u'&', max_length=16)), - ('foreign_document_data', self.gf('django.db.models.fields.CharField')(max_length=32)), - ('operator', self.gf('django.db.models.fields.CharField')(max_length=16)), - ('expression', self.gf('django.db.models.fields.TextField')()), - ('negated', self.gf('django.db.models.fields.BooleanField')(default=False)), - ('enabled', self.gf('django.db.models.fields.BooleanField')(default=True)), - )) - db.send_create_signal(u'linking', ['SmartLinkCondition']) - - def backwards(self, orm): - # Deleting model 'SmartLink' - db.delete_table(u'linking_smartlink') - - # Deleting model 'SmartLinkCondition' - db.delete_table(u'linking_smartlinkcondition') - - models = { - u'linking.smartlink': { - 'Meta': {'object_name': 'SmartLink'}, - 'dynamic_title': ('django.db.models.fields.CharField', [], {'max_length': '96', 'blank': 'True'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '96'}) - }, - u'linking.smartlinkcondition': { - 'Meta': {'object_name': 'SmartLinkCondition'}, - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'expression': ('django.db.models.fields.TextField', [], {}), - 'foreign_document_data': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'inclusion': ('django.db.models.fields.CharField', [], {'default': "u'&'", 'max_length': '16'}), - 'negated': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'operator': ('django.db.models.fields.CharField', [], {'max_length': '16'}), - 'smart_link': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['linking.SmartLink']"}) - } - } - - complete_apps = ['linking'] diff --git a/mayan/apps/linking/south_migrations/0002_auto.py b/mayan/apps/linking/south_migrations/0002_auto.py deleted file mode 100644 index 8fea41e9f6..0000000000 --- a/mayan/apps/linking/south_migrations/0002_auto.py +++ /dev/null @@ -1,51 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding M2M table for field document_types on 'SmartLink' - m2m_table_name = db.shorten_name(u'linking_smartlink_document_types') - db.create_table(m2m_table_name, ( - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), - ('smartlink', models.ForeignKey(orm[u'linking.smartlink'], null=False)), - ('documenttype', models.ForeignKey(orm[u'documents.documenttype'], null=False)) - )) - db.create_unique(m2m_table_name, ['smartlink_id', 'documenttype_id']) - - def backwards(self, orm): - # Removing M2M table for field document_types on 'SmartLink' - db.delete_table(db.shorten_name(u'linking_smartlink_document_types')) - - models = { - u'documents.documenttype': { - 'Meta': {'ordering': "['name']", 'object_name': 'DocumentType'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}), - 'ocr': ('django.db.models.fields.BooleanField', [], {'default': 'True'}) - }, - u'linking.smartlink': { - 'Meta': {'object_name': 'SmartLink'}, - 'document_types': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['documents.DocumentType']", 'symmetrical': 'False'}), - 'dynamic_title': ('django.db.models.fields.CharField', [], {'max_length': '96', 'blank': 'True'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '96'}) - }, - u'linking.smartlinkcondition': { - 'Meta': {'object_name': 'SmartLinkCondition'}, - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'expression': ('django.db.models.fields.TextField', [], {}), - 'foreign_document_data': ('django.db.models.fields.CharField', [], {'max_length': '32'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'inclusion': ('django.db.models.fields.CharField', [], {'default': "u'&'", 'max_length': '16'}), - 'negated': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'operator': ('django.db.models.fields.CharField', [], {'max_length': '16'}), - 'smart_link': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['linking.SmartLink']"}) - } - } - - complete_apps = ['linking'] diff --git a/mayan/apps/linking/south_migrations/0003_auto__chg_field_smartlinkcondition_foreign_document_data.py b/mayan/apps/linking/south_migrations/0003_auto__chg_field_smartlinkcondition_foreign_document_data.py deleted file mode 100644 index 4d131e05b2..0000000000 --- a/mayan/apps/linking/south_migrations/0003_auto__chg_field_smartlinkcondition_foreign_document_data.py +++ /dev/null @@ -1,47 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Changing field 'SmartLinkCondition.foreign_document_data' - db.alter_column(u'linking_smartlinkcondition', 'foreign_document_data', self.gf('django.db.models.fields.CharField')(max_length=128)) - - def backwards(self, orm): - - # Changing field 'SmartLinkCondition.foreign_document_data' - db.alter_column(u'linking_smartlinkcondition', 'foreign_document_data', self.gf('django.db.models.fields.CharField')(max_length=32)) - - models = { - u'documents.documenttype': { - 'Meta': {'ordering': "['name']", 'object_name': 'DocumentType'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}), - 'ocr': ('django.db.models.fields.BooleanField', [], {'default': 'True'}) - }, - u'linking.smartlink': { - 'Meta': {'object_name': 'SmartLink'}, - 'document_types': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['documents.DocumentType']", 'symmetrical': 'False'}), - 'dynamic_title': ('django.db.models.fields.CharField', [], {'max_length': '96', 'blank': 'True'}), - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '96'}) - }, - u'linking.smartlinkcondition': { - 'Meta': {'object_name': 'SmartLinkCondition'}, - 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'expression': ('django.db.models.fields.TextField', [], {}), - 'foreign_document_data': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'inclusion': ('django.db.models.fields.CharField', [], {'default': "u'&'", 'max_length': '16'}), - 'negated': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'operator': ('django.db.models.fields.CharField', [], {'max_length': '16'}), - 'smart_link': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['linking.SmartLink']"}) - } - } - - complete_apps = ['linking'] diff --git a/mayan/apps/lock_manager/migrations/0001_initial.py b/mayan/apps/lock_manager/migrations/0001_initial.py new file mode 100644 index 0000000000..1c1a981e1f --- /dev/null +++ b/mayan/apps/lock_manager/migrations/0001_initial.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='Lock', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('creation_datetime', models.DateTimeField(auto_now_add=True, verbose_name='Creation datetime')), + ('timeout', models.IntegerField(default=30, verbose_name='Timeout')), + ('name', models.CharField(unique=True, max_length=48, verbose_name='Name')), + ], + options={ + 'verbose_name': 'Lock', + 'verbose_name_plural': 'Locks', + }, + bases=(models.Model,), + ), + ] diff --git a/mayan/apps/lock_manager/south_migrations/__init__.py b/mayan/apps/lock_manager/migrations/__init__.py similarity index 100% rename from mayan/apps/lock_manager/south_migrations/__init__.py rename to mayan/apps/lock_manager/migrations/__init__.py diff --git a/mayan/apps/lock_manager/south_migrations/0001_initial.py b/mayan/apps/lock_manager/south_migrations/0001_initial.py deleted file mode 100644 index dd6637e508..0000000000 --- a/mayan/apps/lock_manager/south_migrations/0001_initial.py +++ /dev/null @@ -1,33 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'Lock' - db.create_table(u'lock_manager_lock', ( - (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('creation_datetime', self.gf('django.db.models.fields.DateTimeField')()), - ('timeout', self.gf('django.db.models.fields.IntegerField')(default=30)), - ('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=48)), - )) - db.send_create_signal(u'lock_manager', ['Lock']) - - def backwards(self, orm): - # Deleting model 'Lock' - db.delete_table(u'lock_manager_lock') - - models = { - u'lock_manager.lock': { - 'Meta': {'object_name': 'Lock'}, - 'creation_datetime': ('django.db.models.fields.DateTimeField', [], {}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '48'}), - 'timeout': ('django.db.models.fields.IntegerField', [], {'default': '30'}) - } - } - - complete_apps = ['lock_manager'] diff --git a/mayan/apps/lock_manager/south_migrations/0002_auto__chg_field_lock_creation_datetime.py b/mayan/apps/lock_manager/south_migrations/0002_auto__chg_field_lock_creation_datetime.py deleted file mode 100644 index bb5d8c25b0..0000000000 --- a/mayan/apps/lock_manager/south_migrations/0002_auto__chg_field_lock_creation_datetime.py +++ /dev/null @@ -1,29 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Changing field 'Lock.creation_datetime' - db.alter_column(u'lock_manager_lock', 'creation_datetime', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True)) - - def backwards(self, orm): - - # Changing field 'Lock.creation_datetime' - db.alter_column(u'lock_manager_lock', 'creation_datetime', self.gf('django.db.models.fields.DateTimeField')()) - - models = { - u'lock_manager.lock': { - 'Meta': {'object_name': 'Lock'}, - 'creation_datetime': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '48'}), - 'timeout': ('django.db.models.fields.IntegerField', [], {'default': '30'}) - } - } - - complete_apps = ['lock_manager'] diff --git a/mayan/apps/metadata/migrations/0001_initial.py b/mayan/apps/metadata/migrations/0001_initial.py new file mode 100644 index 0000000000..2641a64828 --- /dev/null +++ b/mayan/apps/metadata/migrations/0001_initial.py @@ -0,0 +1,77 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('documents', '__first__'), + ] + + operations = [ + migrations.CreateModel( + name='DocumentMetadata', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('value', models.CharField(db_index=True, max_length=255, null=True, verbose_name='Value', blank=True)), + ('document', models.ForeignKey(related_name='metadata', verbose_name='Document', to='documents.Document')), + ], + options={ + 'verbose_name': 'Document metadata', + 'verbose_name_plural': 'Document metadata', + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='DocumentTypeMetadataType', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('required', models.BooleanField(default=False, verbose_name='Required')), + ('document_type', models.ForeignKey(related_name='metadata', verbose_name='Document type', to='documents.DocumentType')), + ], + options={ + 'verbose_name': 'Document type metadata type options', + 'verbose_name_plural': 'Document type metadata types options', + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='MetadataType', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(help_text='Do not use python reserved words, or spaces.', unique=True, max_length=48, verbose_name='Name')), + ('title', models.CharField(max_length=48, verbose_name='Title')), + ('default', models.CharField(help_text='Enter a string to be evaluated.', max_length=128, null=True, verbose_name='Default', blank=True)), + ('lookup', models.TextField(help_text='Enter a string to be evaluated that returns an iterable.', null=True, verbose_name='Lookup', blank=True)), + ('validation', models.CharField(blank=True, max_length=64, verbose_name='Validation function name', choices=[('Parse date', 'Parse date'), ('Parse date and time', 'Parse date and time'), ('Parse time', 'Parse time')])), + ], + options={ + 'ordering': ('title',), + 'verbose_name': 'Metadata type', + 'verbose_name_plural': 'Metadata types', + }, + bases=(models.Model,), + ), + migrations.AddField( + model_name='documenttypemetadatatype', + name='metadata_type', + field=models.ForeignKey(verbose_name='Metadata type', to='metadata.MetadataType'), + preserve_default=True, + ), + migrations.AlterUniqueTogether( + name='documenttypemetadatatype', + unique_together=set([('document_type', 'metadata_type')]), + ), + migrations.AddField( + model_name='documentmetadata', + name='metadata_type', + field=models.ForeignKey(verbose_name='Type', to='metadata.MetadataType'), + preserve_default=True, + ), + migrations.AlterUniqueTogether( + name='documentmetadata', + unique_together=set([('document', 'metadata_type')]), + ), + ] diff --git a/mayan/apps/metadata/south_migrations/__init__.py b/mayan/apps/metadata/migrations/__init__.py similarity index 100% rename from mayan/apps/metadata/south_migrations/__init__.py rename to mayan/apps/metadata/migrations/__init__.py diff --git a/mayan/apps/metadata/south_migrations/0001_initial.py b/mayan/apps/metadata/south_migrations/0001_initial.py deleted file mode 100644 index d50a900fe0..0000000000 --- a/mayan/apps/metadata/south_migrations/0001_initial.py +++ /dev/null @@ -1,209 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'MetadataType' - db.create_table('metadata_metadatatype', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=48)), - ('title', self.gf('django.db.models.fields.CharField')(max_length=48, null=True, blank=True)), - ('default', self.gf('django.db.models.fields.CharField')(max_length=128, null=True, blank=True)), - ('lookup', self.gf('django.db.models.fields.CharField')(max_length=128, null=True, blank=True)), - )) - db.send_create_signal('metadata', ['MetadataType']) - - # Adding model 'MetadataSet' - db.create_table('metadata_metadataset', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('title', self.gf('django.db.models.fields.CharField')(max_length=48)), - )) - db.send_create_signal('metadata', ['MetadataSet']) - - # Adding model 'MetadataSetItem' - db.create_table('metadata_metadatasetitem', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('metadata_set', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['metadata.MetadataSet'])), - ('metadata_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['metadata.MetadataType'])), - )) - db.send_create_signal('metadata', ['MetadataSetItem']) - - # Adding model 'DocumentMetadata' - db.create_table('metadata_documentmetadata', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('document', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['documents.Document'])), - ('metadata_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['metadata.MetadataType'])), - ('value', self.gf('django.db.models.fields.CharField')(db_index=True, max_length=255, blank=True)), - )) - db.send_create_signal('metadata', ['DocumentMetadata']) - - # Adding model 'DocumentTypeDefaults' - db.create_table('metadata_documenttypedefaults', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('document_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['documents.DocumentType'])), - )) - db.send_create_signal('metadata', ['DocumentTypeDefaults']) - - # Adding M2M table for field default_metadata_sets on 'DocumentTypeDefaults' - db.create_table('metadata_documenttypedefaults_default_metadata_sets', ( - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), - ('documenttypedefaults', models.ForeignKey(orm['metadata.documenttypedefaults'], null=False)), - ('metadataset', models.ForeignKey(orm['metadata.metadataset'], null=False)) - )) - db.create_unique('metadata_documenttypedefaults_default_metadata_sets', ['documenttypedefaults_id', 'metadataset_id']) - - # Adding M2M table for field default_metadata on 'DocumentTypeDefaults' - db.create_table('metadata_documenttypedefaults_default_metadata', ( - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), - ('documenttypedefaults', models.ForeignKey(orm['metadata.documenttypedefaults'], null=False)), - ('metadatatype', models.ForeignKey(orm['metadata.metadatatype'], null=False)) - )) - db.create_unique('metadata_documenttypedefaults_default_metadata', ['documenttypedefaults_id', 'metadatatype_id']) - - def backwards(self, orm): - # Deleting model 'MetadataType' - db.delete_table('metadata_metadatatype') - - # Deleting model 'MetadataSet' - db.delete_table('metadata_metadataset') - - # Deleting model 'MetadataSetItem' - db.delete_table('metadata_metadatasetitem') - - # Deleting model 'DocumentMetadata' - db.delete_table('metadata_documentmetadata') - - # Deleting model 'DocumentTypeDefaults' - db.delete_table('metadata_documenttypedefaults') - - # Removing M2M table for field default_metadata_sets on 'DocumentTypeDefaults' - db.delete_table('metadata_documenttypedefaults_default_metadata_sets') - - # Removing M2M table for field default_metadata on 'DocumentTypeDefaults' - db.delete_table('metadata_documenttypedefaults_default_metadata') - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - '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': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - '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': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - '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': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'comments.comment': { - 'Meta': {'ordering': "('submit_date',)", 'object_name': 'Comment', 'db_table': "'django_comments'"}, - 'comment': ('django.db.models.fields.TextField', [], {'max_length': '3000'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'content_type_set_for_comment'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ip_address': ('django.db.models.fields.IPAddressField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}), - 'is_public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_removed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'object_pk': ('django.db.models.fields.TextField', [], {}), - 'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}), - 'submit_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'comment_comments'", 'null': 'True', 'to': "orm['auth.User']"}), - 'user_email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'user_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'user_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) - }, - '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'}), - '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'}) - }, - 'documents.document': { - 'Meta': {'ordering': "['-date_added']", 'object_name': 'Document'}, - 'date_added': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.DocumentType']", 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'max_length': '48', 'blank': 'True'}) - }, - 'documents.documenttype': { - 'Meta': {'ordering': "['name']", 'object_name': 'DocumentType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}) - }, - 'metadata.documentmetadata': { - 'Meta': {'object_name': 'DocumentMetadata'}, - 'document': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.Document']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'metadata_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['metadata.MetadataType']"}), - 'value': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '256', 'blank': 'True'}) - }, - 'metadata.documenttypedefaults': { - 'Meta': {'object_name': 'DocumentTypeDefaults'}, - 'default_metadata': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['metadata.MetadataType']", 'symmetrical': 'False', 'blank': 'True'}), - 'default_metadata_sets': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['metadata.MetadataSet']", 'symmetrical': 'False', 'blank': 'True'}), - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.DocumentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'metadata.metadataset': { - 'Meta': {'ordering': "('title',)", 'object_name': 'MetadataSet'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '48'}) - }, - 'metadata.metadatasetitem': { - 'Meta': {'object_name': 'MetadataSetItem'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'metadata_set': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['metadata.MetadataSet']"}), - 'metadata_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['metadata.MetadataType']"}) - }, - 'metadata.metadatatype': { - 'Meta': {'ordering': "('title',)", 'object_name': 'MetadataType'}, - 'default': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'lookup': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '48'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '48', 'null': 'True', 'blank': 'True'}) - }, - 'sites.site': { - 'Meta': {'ordering': "('domain',)", 'object_name': 'Site', 'db_table': "'django_site'"}, - 'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'taggit.tag': { - 'Meta': {'object_name': 'Tag'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'taggit.taggeditem': { - 'Meta': {'object_name': 'TaggedItem'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}), - 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_items'", 'to': "orm['taggit.Tag']"}) - } - } - - complete_apps = ['metadata'] diff --git a/mayan/apps/metadata/south_migrations/0002_auto__add_unique_metadataset_title.py b/mayan/apps/metadata/south_migrations/0002_auto__add_unique_metadataset_title.py deleted file mode 100644 index 81c8697ce6..0000000000 --- a/mayan/apps/metadata/south_migrations/0002_auto__add_unique_metadataset_title.py +++ /dev/null @@ -1,137 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding unique constraint on 'MetadataSet', fields ['title'] - db.create_unique('metadata_metadataset', ['title']) - - def backwards(self, orm): - # Removing unique constraint on 'MetadataSet', fields ['title'] - db.delete_unique('metadata_metadataset', ['title']) - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - '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': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - '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': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - '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': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'comments.comment': { - 'Meta': {'ordering': "('submit_date',)", 'object_name': 'Comment', 'db_table': "'django_comments'"}, - 'comment': ('django.db.models.fields.TextField', [], {'max_length': '3000'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'content_type_set_for_comment'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ip_address': ('django.db.models.fields.IPAddressField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}), - 'is_public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_removed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'object_pk': ('django.db.models.fields.TextField', [], {}), - 'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}), - 'submit_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'comment_comments'", 'null': 'True', 'to': "orm['auth.User']"}), - 'user_email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'user_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'user_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) - }, - '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'}), - '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'}) - }, - 'documents.document': { - 'Meta': {'ordering': "['-date_added']", 'object_name': 'Document'}, - 'date_added': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.DocumentType']", 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'max_length': '48', 'blank': 'True'}) - }, - 'documents.documenttype': { - 'Meta': {'ordering': "['name']", 'object_name': 'DocumentType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}) - }, - 'metadata.documentmetadata': { - 'Meta': {'object_name': 'DocumentMetadata'}, - 'document': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.Document']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'metadata_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['metadata.MetadataType']"}), - 'value': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '256', 'blank': 'True'}) - }, - 'metadata.documenttypedefaults': { - 'Meta': {'object_name': 'DocumentTypeDefaults'}, - 'default_metadata': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['metadata.MetadataType']", 'symmetrical': 'False', 'blank': 'True'}), - 'default_metadata_sets': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['metadata.MetadataSet']", 'symmetrical': 'False', 'blank': 'True'}), - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.DocumentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'metadata.metadataset': { - 'Meta': {'ordering': "('title',)", 'object_name': 'MetadataSet'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'title': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '48'}) - }, - 'metadata.metadatasetitem': { - 'Meta': {'object_name': 'MetadataSetItem'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'metadata_set': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['metadata.MetadataSet']"}), - 'metadata_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['metadata.MetadataType']"}) - }, - 'metadata.metadatatype': { - 'Meta': {'ordering': "('title',)", 'object_name': 'MetadataType'}, - 'default': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'lookup': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '48'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '48', 'null': 'True', 'blank': 'True'}) - }, - 'sites.site': { - 'Meta': {'ordering': "('domain',)", 'object_name': 'Site', 'db_table': "'django_site'"}, - 'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'taggit.tag': { - 'Meta': {'object_name': 'Tag'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'taggit.taggeditem': { - 'Meta': {'object_name': 'TaggedItem'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}), - 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_items'", 'to': "orm['taggit.Tag']"}) - } - } - - complete_apps = ['metadata'] diff --git a/mayan/apps/metadata/south_migrations/0003_auto__chg_field_metadatatype_lookup.py b/mayan/apps/metadata/south_migrations/0003_auto__chg_field_metadatatype_lookup.py deleted file mode 100644 index 7dad4102b3..0000000000 --- a/mayan/apps/metadata/south_migrations/0003_auto__chg_field_metadatatype_lookup.py +++ /dev/null @@ -1,137 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Changing field 'MetadataType.lookup' - db.alter_column('metadata_metadatatype', 'lookup', self.gf('django.db.models.fields.TextField')(null=True)) - - def backwards(self, orm): - # Changing field 'MetadataType.lookup' - db.alter_column('metadata_metadatatype', 'lookup', self.gf('django.db.models.fields.CharField')(max_length=128, null=True)) - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - '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': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - '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': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - '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': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'comments.comment': { - 'Meta': {'ordering': "('submit_date',)", 'object_name': 'Comment', 'db_table': "'django_comments'"}, - 'comment': ('django.db.models.fields.TextField', [], {'max_length': '3000'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'content_type_set_for_comment'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ip_address': ('django.db.models.fields.IPAddressField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}), - 'is_public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_removed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'object_pk': ('django.db.models.fields.TextField', [], {}), - 'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}), - 'submit_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'comment_comments'", 'null': 'True', 'to': "orm['auth.User']"}), - 'user_email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'user_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'user_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) - }, - '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'}), - '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'}) - }, - 'documents.document': { - 'Meta': {'ordering': "['-date_added']", 'object_name': 'Document'}, - 'date_added': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.DocumentType']", 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'max_length': '48', 'blank': 'True'}) - }, - 'documents.documenttype': { - 'Meta': {'ordering': "['name']", 'object_name': 'DocumentType'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}) - }, - 'metadata.documentmetadata': { - 'Meta': {'object_name': 'DocumentMetadata'}, - 'document': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.Document']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'metadata_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['metadata.MetadataType']"}), - 'value': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '256', 'blank': 'True'}) - }, - 'metadata.documenttypedefaults': { - 'Meta': {'object_name': 'DocumentTypeDefaults'}, - 'default_metadata': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['metadata.MetadataType']", 'symmetrical': 'False', 'blank': 'True'}), - 'default_metadata_sets': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['metadata.MetadataSet']", 'symmetrical': 'False', 'blank': 'True'}), - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.DocumentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'metadata.metadataset': { - 'Meta': {'ordering': "('title',)", 'object_name': 'MetadataSet'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'title': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '48'}) - }, - 'metadata.metadatasetitem': { - 'Meta': {'object_name': 'MetadataSetItem'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'metadata_set': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['metadata.MetadataSet']"}), - 'metadata_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['metadata.MetadataType']"}) - }, - 'metadata.metadatatype': { - 'Meta': {'ordering': "('title',)", 'object_name': 'MetadataType'}, - 'default': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'lookup': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '48'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '48', 'null': 'True', 'blank': 'True'}) - }, - 'sites.site': { - 'Meta': {'ordering': "('domain',)", 'object_name': 'Site', 'db_table': "'django_site'"}, - 'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'taggit.tag': { - 'Meta': {'object_name': 'Tag'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'}) - }, - 'taggit.taggeditem': { - 'Meta': {'object_name': 'TaggedItem'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}), - 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_items'", 'to': "orm['taggit.Tag']"}) - } - } - - complete_apps = ['metadata'] diff --git a/mayan/apps/metadata/south_migrations/0004_auto__del_metadataset__del_metadatasetitem__chg_field_documentmetadata.py b/mayan/apps/metadata/south_migrations/0004_auto__del_metadataset__del_metadatasetitem__chg_field_documentmetadata.py deleted file mode 100644 index e16b3bba55..0000000000 --- a/mayan/apps/metadata/south_migrations/0004_auto__del_metadataset__del_metadatasetitem__chg_field_documentmetadata.py +++ /dev/null @@ -1,88 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Deleting model 'MetadataSet' - db.delete_table(u'metadata_metadataset') - - # Deleting model 'MetadataSetItem' - db.delete_table(u'metadata_metadatasetitem') - - # Removing M2M table for field default_metadata_sets on 'DocumentTypeDefaults' - db.delete_table(db.shorten_name(u'metadata_documenttypedefaults_default_metadata_sets')) - - # Changing field 'DocumentMetadata.value' - db.alter_column(u'metadata_documentmetadata', 'value', self.gf('django.db.models.fields.CharField')(max_length=255)) - - def backwards(self, orm): - # Adding model 'MetadataSet' - db.create_table(u'metadata_metadataset', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('title', self.gf('django.db.models.fields.CharField')(max_length=48, unique=True)), - )) - db.send_create_signal('metadata', ['MetadataSet']) - - # Adding model 'MetadataSetItem' - db.create_table(u'metadata_metadatasetitem', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('metadata_set', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['metadata.MetadataSet'])), - ('metadata_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['metadata.MetadataType'])), - )) - db.send_create_signal('metadata', ['MetadataSetItem']) - - # Adding M2M table for field default_metadata_sets on 'DocumentTypeDefaults' - m2m_table_name = db.shorten_name(u'metadata_documenttypedefaults_default_metadata_sets') - db.create_table(m2m_table_name, ( - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), - ('documenttypedefaults', models.ForeignKey(orm['metadata.documenttypedefaults'], null=False)), - ('metadataset', models.ForeignKey(orm['metadata.metadataset'], null=False)) - )) - db.create_unique(m2m_table_name, ['documenttypedefaults_id', 'metadataset_id']) - - # Changing field 'DocumentMetadata.value' - db.alter_column(u'metadata_documentmetadata', 'value', self.gf('django.db.models.fields.CharField')(max_length=256)) - - models = { - u'documents.document': { - 'Meta': {'ordering': "['-date_added']", 'object_name': 'Document'}, - 'date_added': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'documents'", 'to': u"orm['documents.DocumentType']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'max_length': '48', 'blank': 'True'}) - }, - u'documents.documenttype': { - 'Meta': {'ordering': "['name']", 'object_name': 'DocumentType'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}), - 'ocr': ('django.db.models.fields.BooleanField', [], {'default': 'True'}) - }, - u'metadata.documentmetadata': { - 'Meta': {'object_name': 'DocumentMetadata'}, - 'document': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'metadata'", 'to': u"orm['documents.Document']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'metadata_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['metadata.MetadataType']"}), - 'value': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'blank': 'True'}) - }, - u'metadata.documenttypedefaults': { - 'Meta': {'object_name': 'DocumentTypeDefaults'}, - 'default_metadata': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['metadata.MetadataType']", 'symmetrical': 'False', 'blank': 'True'}), - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['documents.DocumentType']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - u'metadata.metadatatype': { - 'Meta': {'ordering': "('title',)", 'object_name': 'MetadataType'}, - 'default': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'lookup': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '48'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '48', 'null': 'True', 'blank': 'True'}) - } - } - - complete_apps = ['metadata'] diff --git a/mayan/apps/metadata/south_migrations/0005_auto__chg_field_documentmetadata_value.py b/mayan/apps/metadata/south_migrations/0005_auto__chg_field_documentmetadata_value.py deleted file mode 100644 index 749b0d9ab0..0000000000 --- a/mayan/apps/metadata/south_migrations/0005_auto__chg_field_documentmetadata_value.py +++ /dev/null @@ -1,59 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Changing field 'DocumentMetadata.value' - db.alter_column(u'metadata_documentmetadata', 'value', self.gf('django.db.models.fields.CharField')(max_length=255, null=True)) - - def backwards(self, orm): - - # Changing field 'DocumentMetadata.value' - db.alter_column(u'metadata_documentmetadata', 'value', self.gf('django.db.models.fields.CharField')(default='', max_length=255)) - - models = { - u'documents.document': { - 'Meta': {'ordering': "['-date_added']", 'object_name': 'Document'}, - 'date_added': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'documents'", 'to': u"orm['documents.DocumentType']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'default': "u'Uninitialized document'", 'max_length': '255', 'db_index': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'default': "u'eng'", 'max_length': '8'}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "u'fe2e53a3-f1b5-4703-b151-1716e70dbd36'", 'max_length': '48'}) - }, - u'documents.documenttype': { - 'Meta': {'ordering': "['name']", 'object_name': 'DocumentType'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}), - 'ocr': ('django.db.models.fields.BooleanField', [], {'default': 'True'}) - }, - u'metadata.documentmetadata': { - 'Meta': {'object_name': 'DocumentMetadata'}, - 'document': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'metadata'", 'to': u"orm['documents.Document']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'metadata_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['metadata.MetadataType']"}), - 'value': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'null': 'True', 'blank': 'True'}) - }, - u'metadata.documenttypedefaults': { - 'Meta': {'object_name': 'DocumentTypeDefaults'}, - 'default_metadata': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['metadata.MetadataType']", 'symmetrical': 'False', 'blank': 'True'}), - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['documents.DocumentType']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - u'metadata.metadatatype': { - 'Meta': {'ordering': "('title',)", 'object_name': 'MetadataType'}, - 'default': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'lookup': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '48'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '48', 'null': 'True', 'blank': 'True'}) - } - } - - complete_apps = ['metadata'] diff --git a/mayan/apps/metadata/south_migrations/0006_auto__add_documenttypemetadatatypeoptions.py b/mayan/apps/metadata/south_migrations/0006_auto__add_documenttypemetadatatypeoptions.py deleted file mode 100644 index 5ba5a66cd9..0000000000 --- a/mayan/apps/metadata/south_migrations/0006_auto__add_documenttypemetadatatypeoptions.py +++ /dev/null @@ -1,82 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'DocumentTypeMetadataTypeOptions' - db.create_table(u'metadata_documenttypemetadatatypeoptions', ( - (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('document_type_defaults', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['metadata.DocumentTypeDefaults'])), - ('metadata_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['metadata.MetadataType'])), - ('required', self.gf('django.db.models.fields.BooleanField')(default=False)), - )) - db.send_create_signal(u'metadata', ['DocumentTypeMetadataTypeOptions']) - - # Removing M2M table for field default_metadata on 'DocumentTypeDefaults' - db.delete_table(db.shorten_name(u'metadata_documenttypedefaults_default_metadata')) - - def backwards(self, orm): - # Deleting model 'DocumentTypeMetadataTypeOptions' - db.delete_table(u'metadata_documenttypemetadatatypeoptions') - - # Adding M2M table for field default_metadata on 'DocumentTypeDefaults' - m2m_table_name = db.shorten_name(u'metadata_documenttypedefaults_default_metadata') - db.create_table(m2m_table_name, ( - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), - ('documenttypedefaults', models.ForeignKey(orm[u'metadata.documenttypedefaults'], null=False)), - ('metadatatype', models.ForeignKey(orm[u'metadata.metadatatype'], null=False)) - )) - db.create_unique(m2m_table_name, ['documenttypedefaults_id', 'metadatatype_id']) - - models = { - u'documents.document': { - 'Meta': {'ordering': "['-date_added']", 'object_name': 'Document'}, - 'date_added': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'documents'", 'to': u"orm['documents.DocumentType']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'default': "u'Uninitialized document'", 'max_length': '255', 'db_index': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'default': "u'eng'", 'max_length': '8'}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "u'e432f139-04cf-49e3-a9d1-3644dda3026e'", 'max_length': '48'}) - }, - u'documents.documenttype': { - 'Meta': {'ordering': "['name']", 'object_name': 'DocumentType'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}), - 'ocr': ('django.db.models.fields.BooleanField', [], {'default': 'True'}) - }, - u'metadata.documentmetadata': { - 'Meta': {'object_name': 'DocumentMetadata'}, - 'document': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'metadata'", 'to': u"orm['documents.Document']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'metadata_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['metadata.MetadataType']"}), - 'value': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'null': 'True', 'blank': 'True'}) - }, - u'metadata.documenttypedefaults': { - 'Meta': {'object_name': 'DocumentTypeDefaults'}, - 'default_metadata': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['metadata.MetadataType']", 'symmetrical': 'False', 'through': u"orm['metadata.DocumentTypeMetadataTypeOptions']", 'blank': 'True'}), - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['documents.DocumentType']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - u'metadata.documenttypemetadatatypeoptions': { - 'Meta': {'object_name': 'DocumentTypeMetadataTypeOptions'}, - 'document_type_defaults': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['metadata.DocumentTypeDefaults']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'metadata_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['metadata.MetadataType']"}), - 'required': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - }, - u'metadata.metadatatype': { - 'Meta': {'ordering': "('title',)", 'object_name': 'MetadataType'}, - 'default': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'lookup': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '48'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '48', 'null': 'True', 'blank': 'True'}) - } - } - - complete_apps = ['metadata'] diff --git a/mayan/apps/metadata/south_migrations/0007_auto__del_documenttypedefaults__del_documenttypemetadatatypeoptions__a.py b/mayan/apps/metadata/south_migrations/0007_auto__del_documenttypedefaults__del_documenttypemetadatatypeoptions__a.py deleted file mode 100644 index 3ee5983e14..0000000000 --- a/mayan/apps/metadata/south_migrations/0007_auto__del_documenttypedefaults__del_documenttypemetadatatypeoptions__a.py +++ /dev/null @@ -1,86 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Deleting model 'DocumentTypeDefaults' - db.delete_table(u'metadata_documenttypedefaults') - - # Deleting model 'DocumentTypeMetadataTypeOptions' - db.delete_table(u'metadata_documenttypemetadatatypeoptions') - - # Adding model 'DocumentTypeMetadataType' - db.create_table(u'metadata_documenttypemetadatatype', ( - (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('document_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['documents.DocumentType'])), - ('metadata_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['metadata.MetadataType'])), - ('required', self.gf('django.db.models.fields.BooleanField')(default=False)), - )) - db.send_create_signal(u'metadata', ['DocumentTypeMetadataType']) - - def backwards(self, orm): - # Adding model 'DocumentTypeDefaults' - db.create_table(u'metadata_documenttypedefaults', ( - ('document_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['documents.DocumentType'])), - (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - )) - db.send_create_signal(u'metadata', ['DocumentTypeDefaults']) - - # Adding model 'DocumentTypeMetadataTypeOptions' - db.create_table(u'metadata_documenttypemetadatatypeoptions', ( - ('required', self.gf('django.db.models.fields.BooleanField')(default=False)), - ('metadata_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['metadata.MetadataType'])), - ('document_type_defaults', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['metadata.DocumentTypeDefaults'])), - (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - )) - db.send_create_signal(u'metadata', ['DocumentTypeMetadataTypeOptions']) - - # Deleting model 'DocumentTypeMetadataType' - db.delete_table(u'metadata_documenttypemetadatatype') - - models = { - u'documents.document': { - 'Meta': {'ordering': "['-date_added']", 'object_name': 'Document'}, - 'date_added': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'documents'", 'to': u"orm['documents.DocumentType']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'default': "u'Uninitialized document'", 'max_length': '255', 'db_index': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'default': "u'eng'", 'max_length': '8'}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "u'7f0e4ea9-c307-4395-ab9e-63979ea1c4ae'", 'max_length': '48'}) - }, - u'documents.documenttype': { - 'Meta': {'ordering': "['name']", 'object_name': 'DocumentType'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}), - 'ocr': ('django.db.models.fields.BooleanField', [], {'default': 'True'}) - }, - u'metadata.documentmetadata': { - 'Meta': {'object_name': 'DocumentMetadata'}, - 'document': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'metadata'", 'to': u"orm['documents.Document']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'metadata_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['metadata.MetadataType']"}), - 'value': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'null': 'True', 'blank': 'True'}) - }, - u'metadata.documenttypemetadatatype': { - 'Meta': {'object_name': 'DocumentTypeMetadataType'}, - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['documents.DocumentType']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'metadata_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['metadata.MetadataType']"}), - 'required': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - }, - u'metadata.metadatatype': { - 'Meta': {'ordering': "('title',)", 'object_name': 'MetadataType'}, - 'default': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'lookup': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '48'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '48', 'null': 'True', 'blank': 'True'}) - } - } - - complete_apps = ['metadata'] diff --git a/mayan/apps/metadata/south_migrations/0008_auto__add_unique_documenttypemetadatatype_document_type_metadata_type.py b/mayan/apps/metadata/south_migrations/0008_auto__add_unique_documenttypemetadatatype_document_type_metadata_type.py deleted file mode 100644 index 5adc099a0f..0000000000 --- a/mayan/apps/metadata/south_migrations/0008_auto__add_unique_documenttypemetadatatype_document_type_metadata_type.py +++ /dev/null @@ -1,58 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding unique constraint on 'DocumentTypeMetadataType', fields ['document_type', 'metadata_type'] - db.create_unique(u'metadata_documenttypemetadatatype', ['document_type_id', 'metadata_type_id']) - - def backwards(self, orm): - # Removing unique constraint on 'DocumentTypeMetadataType', fields ['document_type', 'metadata_type'] - db.delete_unique(u'metadata_documenttypemetadatatype', ['document_type_id', 'metadata_type_id']) - - models = { - u'documents.document': { - 'Meta': {'ordering': "['-date_added']", 'object_name': 'Document'}, - 'date_added': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'documents'", 'to': u"orm['documents.DocumentType']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'default': "u'Uninitialized document'", 'max_length': '255', 'db_index': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'default': "u'eng'", 'max_length': '8'}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "u'709ad67d-4f71-4901-ba6d-a5b3cc0632d0'", 'max_length': '48'}) - }, - u'documents.documenttype': { - 'Meta': {'ordering': "['name']", 'object_name': 'DocumentType'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}), - 'ocr': ('django.db.models.fields.BooleanField', [], {'default': 'True'}) - }, - u'metadata.documentmetadata': { - 'Meta': {'object_name': 'DocumentMetadata'}, - 'document': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'metadata'", 'to': u"orm['documents.Document']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'metadata_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['metadata.MetadataType']"}), - 'value': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'null': 'True', 'blank': 'True'}) - }, - u'metadata.documenttypemetadatatype': { - 'Meta': {'unique_together': "(('document_type', 'metadata_type'),)", 'object_name': 'DocumentTypeMetadataType'}, - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['documents.DocumentType']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'metadata_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['metadata.MetadataType']"}), - 'required': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - }, - u'metadata.metadatatype': { - 'Meta': {'ordering': "('title',)", 'object_name': 'MetadataType'}, - 'default': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'lookup': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '48'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '48', 'null': 'True', 'blank': 'True'}) - } - } - - complete_apps = ['metadata'] diff --git a/mayan/apps/metadata/south_migrations/0009_auto__chg_field_metadatatype_title.py b/mayan/apps/metadata/south_migrations/0009_auto__chg_field_metadatatype_title.py deleted file mode 100644 index 01378a8b86..0000000000 --- a/mayan/apps/metadata/south_migrations/0009_auto__chg_field_metadatatype_title.py +++ /dev/null @@ -1,60 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Changing field 'MetadataType.title' - db.alter_column(u'metadata_metadatatype', 'title', self.gf('django.db.models.fields.CharField')(default='', max_length=48)) - - def backwards(self, orm): - - # Changing field 'MetadataType.title' - db.alter_column(u'metadata_metadatatype', 'title', self.gf('django.db.models.fields.CharField')(max_length=48, null=True)) - - models = { - u'documents.document': { - 'Meta': {'ordering': "['-date_added']", 'object_name': 'Document'}, - 'date_added': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'documents'", 'to': u"orm['documents.DocumentType']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'default': "u'Uninitialized document'", 'max_length': '255', 'db_index': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'default': "u'eng'", 'max_length': '8'}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "u'473b4653-adff-407a-90bf-35d290a168fb'", 'max_length': '48'}) - }, - u'documents.documenttype': { - 'Meta': {'ordering': "['name']", 'object_name': 'DocumentType'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}), - 'ocr': ('django.db.models.fields.BooleanField', [], {'default': 'True'}) - }, - u'metadata.documentmetadata': { - 'Meta': {'object_name': 'DocumentMetadata'}, - 'document': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'document_metadata'", 'to': u"orm['documents.Document']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'metadata_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['metadata.MetadataType']"}), - 'value': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'null': 'True', 'blank': 'True'}) - }, - u'metadata.documenttypemetadatatype': { - 'Meta': {'unique_together': "(('document_type', 'metadata_type'),)", 'object_name': 'DocumentTypeMetadataType'}, - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['documents.DocumentType']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'metadata_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['metadata.MetadataType']"}), - 'required': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - }, - u'metadata.metadatatype': { - 'Meta': {'ordering': "('title',)", 'object_name': 'MetadataType'}, - 'default': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'lookup': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '48'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '48'}) - } - } - - complete_apps = ['metadata'] diff --git a/mayan/apps/metadata/south_migrations/0010_auto__add_unique_documentmetadata_document_metadata_type.py b/mayan/apps/metadata/south_migrations/0010_auto__add_unique_documentmetadata_document_metadata_type.py deleted file mode 100644 index 7b6c4f4841..0000000000 --- a/mayan/apps/metadata/south_migrations/0010_auto__add_unique_documentmetadata_document_metadata_type.py +++ /dev/null @@ -1,58 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding unique constraint on 'DocumentMetadata', fields ['document', 'metadata_type'] - db.create_unique(u'metadata_documentmetadata', ['document_id', 'metadata_type_id']) - - def backwards(self, orm): - # Removing unique constraint on 'DocumentMetadata', fields ['document', 'metadata_type'] - db.delete_unique(u'metadata_documentmetadata', ['document_id', 'metadata_type_id']) - - models = { - u'documents.document': { - 'Meta': {'ordering': "['-date_added']", 'object_name': 'Document'}, - 'date_added': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'documents'", 'to': u"orm['documents.DocumentType']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'default': "u'Uninitialized document'", 'max_length': '255', 'db_index': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'default': "u'eng'", 'max_length': '8'}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "u'd55c3d30-544c-4ac2-90ac-112f4a4e235a'", 'max_length': '48'}) - }, - u'documents.documenttype': { - 'Meta': {'ordering': "['name']", 'object_name': 'DocumentType'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}), - 'ocr': ('django.db.models.fields.BooleanField', [], {'default': 'True'}) - }, - u'metadata.documentmetadata': { - 'Meta': {'unique_together': "(('document', 'metadata_type'),)", 'object_name': 'DocumentMetadata'}, - 'document': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'document_metadata'", 'to': u"orm['documents.Document']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'metadata_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['metadata.MetadataType']"}), - 'value': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'null': 'True', 'blank': 'True'}) - }, - u'metadata.documenttypemetadatatype': { - 'Meta': {'unique_together': "(('document_type', 'metadata_type'),)", 'object_name': 'DocumentTypeMetadataType'}, - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['documents.DocumentType']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'metadata_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['metadata.MetadataType']"}), - 'required': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - }, - u'metadata.metadatatype': { - 'Meta': {'ordering': "('title',)", 'object_name': 'MetadataType'}, - 'default': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'lookup': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '48'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '48'}) - } - } - - complete_apps = ['metadata'] diff --git a/mayan/apps/metadata/south_migrations/0011_auto__add_field_metadatatype_validation.py b/mayan/apps/metadata/south_migrations/0011_auto__add_field_metadatatype_validation.py deleted file mode 100644 index 19d4ffb036..0000000000 --- a/mayan/apps/metadata/south_migrations/0011_auto__add_field_metadatatype_validation.py +++ /dev/null @@ -1,61 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'MetadataType.validation' - db.add_column(u'metadata_metadatatype', 'validation', - self.gf('django.db.models.fields.CharField')(default='', max_length=64), - keep_default=False) - - def backwards(self, orm): - # Deleting field 'MetadataType.validation' - db.delete_column(u'metadata_metadatatype', 'validation') - - models = { - u'documents.document': { - 'Meta': {'ordering': "['-date_added']", 'object_name': 'Document'}, - 'date_added': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'documents'", 'to': u"orm['documents.DocumentType']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'default': "u'Uninitialized document'", 'max_length': '255', 'db_index': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'default': "u'eng'", 'max_length': '8'}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "u'8fd13d23-fcd0-438c-a1b3-7421a1d0eed5'", 'max_length': '48'}) - }, - u'documents.documenttype': { - 'Meta': {'ordering': "['name']", 'object_name': 'DocumentType'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}), - 'ocr': ('django.db.models.fields.BooleanField', [], {'default': 'True'}) - }, - u'metadata.documentmetadata': { - 'Meta': {'unique_together': "(('document', 'metadata_type'),)", 'object_name': 'DocumentMetadata'}, - 'document': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'metadata'", 'to': u"orm['documents.Document']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'metadata_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['metadata.MetadataType']"}), - 'value': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'null': 'True', 'blank': 'True'}) - }, - u'metadata.documenttypemetadatatype': { - 'Meta': {'unique_together': "(('document_type', 'metadata_type'),)", 'object_name': 'DocumentTypeMetadataType'}, - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'metadata'", 'to': u"orm['documents.DocumentType']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'metadata_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['metadata.MetadataType']"}), - 'required': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) - }, - u'metadata.metadatatype': { - 'Meta': {'ordering': "('title',)", 'object_name': 'MetadataType'}, - 'default': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'lookup': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '48'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '48'}), - 'validation': ('django.db.models.fields.CharField', [], {'max_length': '64'}) - } - } - - complete_apps = ['metadata'] diff --git a/mayan/apps/ocr/migrations/0001_initial.py b/mayan/apps/ocr/migrations/0001_initial.py new file mode 100644 index 0000000000..f9310b60db --- /dev/null +++ b/mayan/apps/ocr/migrations/0001_initial.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('documents', '__first__'), + ] + + operations = [ + migrations.CreateModel( + name='DocumentVersionOCRError', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('datetime_submitted', models.DateTimeField(auto_now=True, verbose_name='Date time submitted', db_index=True)), + ('result', models.TextField(null=True, verbose_name='Result', blank=True)), + ('document_version', models.ForeignKey(verbose_name='Document version', to='documents.DocumentVersion')), + ], + options={ + 'ordering': ('datetime_submitted',), + 'verbose_name': 'Document Version OCR Error', + 'verbose_name_plural': 'Document Version OCR Errors', + }, + bases=(models.Model,), + ), + ] diff --git a/mayan/apps/ocr/south_migrations/__init__.py b/mayan/apps/ocr/migrations/__init__.py similarity index 100% rename from mayan/apps/ocr/south_migrations/__init__.py rename to mayan/apps/ocr/migrations/__init__.py diff --git a/mayan/apps/ocr/south_migrations/0001_initial.py b/mayan/apps/ocr/south_migrations/0001_initial.py deleted file mode 100644 index 08f4511aa8..0000000000 --- a/mayan/apps/ocr/south_migrations/0001_initial.py +++ /dev/null @@ -1,73 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'DocumentQueue' - db.create_table(u'ocr_documentqueue', ( - (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=64)), - ('label', self.gf('django.db.models.fields.CharField')(max_length=64)), - ('state', self.gf('django.db.models.fields.CharField')(default='a', max_length=4)), - )) - db.send_create_signal(u'ocr', ['DocumentQueue']) - - # Adding model 'QueueDocument' - db.create_table(u'ocr_queuedocument', ( - (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('document_queue', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ocr.DocumentQueue'])), - ('document', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['documents.Document'])), - ('datetime_submitted', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, db_index=True, blank=True)), - ('delay', self.gf('django.db.models.fields.BooleanField')(default=False)), - ('state', self.gf('django.db.models.fields.CharField')(default='p', max_length=4)), - ('result', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), - ('node_name', self.gf('django.db.models.fields.CharField')(max_length=32, null=True, blank=True)), - )) - db.send_create_signal(u'ocr', ['QueueDocument']) - - def backwards(self, orm): - # Deleting model 'DocumentQueue' - db.delete_table(u'ocr_documentqueue') - - # Deleting model 'QueueDocument' - db.delete_table(u'ocr_queuedocument') - - models = { - u'documents.document': { - 'Meta': {'ordering': "['-date_added']", 'object_name': 'Document'}, - 'date_added': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['documents.DocumentType']", 'null': 'True', 'blank': 'True'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'max_length': '48', 'blank': 'True'}) - }, - u'documents.documenttype': { - 'Meta': {'ordering': "['name']", 'object_name': 'DocumentType'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}) - }, - u'ocr.documentqueue': { - 'Meta': {'object_name': 'DocumentQueue'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64'}), - 'state': ('django.db.models.fields.CharField', [], {'default': "'a'", 'max_length': '4'}) - }, - u'ocr.queuedocument': { - 'Meta': {'ordering': "('datetime_submitted',)", 'object_name': 'QueueDocument'}, - 'datetime_submitted': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'delay': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'document': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['documents.Document']"}), - 'document_queue': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['ocr.DocumentQueue']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'node_name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}), - 'result': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'state': ('django.db.models.fields.CharField', [], {'default': "'p'", 'max_length': '4'}) - } - } - - complete_apps = ['ocr'] diff --git a/mayan/apps/ocr/south_migrations/0002_auto__del_field_documentqueue_state__del_field_queuedocument_delay__de.py b/mayan/apps/ocr/south_migrations/0002_auto__del_field_documentqueue_state__del_field_queuedocument_delay__de.py deleted file mode 100644 index 7f0b9286b9..0000000000 --- a/mayan/apps/ocr/south_migrations/0002_auto__del_field_documentqueue_state__del_field_queuedocument_delay__de.py +++ /dev/null @@ -1,66 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Deleting field 'DocumentQueue.state' - db.delete_column(u'ocr_documentqueue', 'state') - - # Deleting field 'QueueDocument.delay' - db.delete_column(u'ocr_queuedocument', 'delay') - - # Deleting field 'QueueDocument.state' - db.delete_column(u'ocr_queuedocument', 'state') - - def backwards(self, orm): - # Adding field 'DocumentQueue.state' - db.add_column(u'ocr_documentqueue', 'state', - self.gf('django.db.models.fields.CharField')(default='a', max_length=4), - keep_default=False) - - # Adding field 'QueueDocument.delay' - db.add_column(u'ocr_queuedocument', 'delay', - self.gf('django.db.models.fields.BooleanField')(default=False), - keep_default=False) - - # Adding field 'QueueDocument.state' - db.add_column(u'ocr_queuedocument', 'state', - self.gf('django.db.models.fields.CharField')(default='p', max_length=4), - keep_default=False) - - models = { - u'documents.document': { - 'Meta': {'ordering': "['-date_added']", 'object_name': 'Document'}, - 'date_added': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['documents.DocumentType']", 'null': 'True', 'blank': 'True'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'max_length': '48', 'blank': 'True'}) - }, - u'documents.documenttype': { - 'Meta': {'ordering': "['name']", 'object_name': 'DocumentType'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}) - }, - u'ocr.documentqueue': { - 'Meta': {'object_name': 'DocumentQueue'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64'}) - }, - u'ocr.queuedocument': { - 'Meta': {'ordering': "('datetime_submitted',)", 'object_name': 'QueueDocument'}, - 'datetime_submitted': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'document': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['documents.Document']"}), - 'document_queue': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'documents'", 'to': u"orm['ocr.DocumentQueue']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'node_name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}), - 'result': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}) - } - } - - complete_apps = ['ocr'] diff --git a/mayan/apps/ocr/south_migrations/0003_auto__chg_field_queuedocument_node_name__chg_field_queuedocument_datet.py b/mayan/apps/ocr/south_migrations/0003_auto__chg_field_queuedocument_node_name__chg_field_queuedocument_datet.py deleted file mode 100644 index dabda93f6a..0000000000 --- a/mayan/apps/ocr/south_migrations/0003_auto__chg_field_queuedocument_node_name__chg_field_queuedocument_datet.py +++ /dev/null @@ -1,59 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Changing field 'QueueDocument.node_name' - db.alter_column(u'ocr_queuedocument', 'node_name', self.gf('django.db.models.fields.CharField')(max_length=256, null=True)) - - # Changing field 'QueueDocument.datetime_submitted' - db.alter_column(u'ocr_queuedocument', 'datetime_submitted', self.gf('django.db.models.fields.DateTimeField')(auto_now=True)) - - def backwards(self, orm): - - # Changing field 'QueueDocument.node_name' - db.alter_column(u'ocr_queuedocument', 'node_name', self.gf('django.db.models.fields.CharField')(max_length=32, null=True)) - - # Changing field 'QueueDocument.datetime_submitted' - db.alter_column(u'ocr_queuedocument', 'datetime_submitted', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True)) - - models = { - u'documents.document': { - 'Meta': {'ordering': "['-date_added']", 'object_name': 'Document'}, - 'date_added': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'documents'", 'to': u"orm['documents.DocumentType']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'default': "u'Uninitialized document'", 'max_length': '255', 'db_index': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'default': "u'eng'", 'max_length': '8'}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "u'4371aa11-0222-4718-bd94-c198fd7998e0'", 'max_length': '48'}) - }, - u'documents.documenttype': { - 'Meta': {'ordering': "['name']", 'object_name': 'DocumentType'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}), - 'ocr': ('django.db.models.fields.BooleanField', [], {'default': 'True'}) - }, - u'ocr.documentqueue': { - 'Meta': {'object_name': 'DocumentQueue'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64'}) - }, - u'ocr.queuedocument': { - 'Meta': {'ordering': "('datetime_submitted',)", 'object_name': 'QueueDocument'}, - 'datetime_submitted': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'document': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['documents.Document']"}), - 'document_queue': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'documents'", 'to': u"orm['ocr.DocumentQueue']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'node_name': ('django.db.models.fields.CharField', [], {'max_length': '256', 'null': 'True', 'blank': 'True'}), - 'result': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}) - } - } - - complete_apps = ['ocr'] diff --git a/mayan/apps/ocr/south_migrations/0004_auto__del_documentqueue__del_queuedocument__add_documentversionocrerro.py b/mayan/apps/ocr/south_migrations/0004_auto__del_documentqueue__del_queuedocument__add_documentversionocrerro.py deleted file mode 100644 index 72b292ff23..0000000000 --- a/mayan/apps/ocr/south_migrations/0004_auto__del_documentqueue__del_queuedocument__add_documentversionocrerro.py +++ /dev/null @@ -1,85 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Deleting model 'DocumentQueue' - db.delete_table(u'ocr_documentqueue') - - # Deleting model 'QueueDocument' - db.delete_table(u'ocr_queuedocument') - - # Adding model 'DocumentVersionOCRError' - db.create_table(u'ocr_documentversionocrerror', ( - (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('document_version', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['documents.DocumentVersion'])), - ('datetime_submitted', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, db_index=True, blank=True)), - ('result', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), - )) - db.send_create_signal(u'ocr', ['DocumentVersionOCRError']) - - def backwards(self, orm): - # Adding model 'DocumentQueue' - db.create_table(u'ocr_documentqueue', ( - (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('name', self.gf('django.db.models.fields.CharField')(max_length=64, unique=True)), - ('label', self.gf('django.db.models.fields.CharField')(max_length=64)), - )) - db.send_create_signal(u'ocr', ['DocumentQueue']) - - # Adding model 'QueueDocument' - db.create_table(u'ocr_queuedocument', ( - ('node_name', self.gf('django.db.models.fields.CharField')(max_length=256, null=True, blank=True)), - ('result', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), - ('datetime_submitted', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True, db_index=True)), - ('document_queue', self.gf('django.db.models.fields.related.ForeignKey')(related_name='documents', to=orm['ocr.DocumentQueue'])), - ('document', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['documents.Document'])), - (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - )) - db.send_create_signal(u'ocr', ['QueueDocument']) - - # Deleting model 'DocumentVersionOCRError' - db.delete_table(u'ocr_documentversionocrerror') - - models = { - u'documents.document': { - 'Meta': {'ordering': "['-date_added']", 'object_name': 'Document'}, - 'date_added': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'documents'", 'to': u"orm['documents.DocumentType']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'default': "u'Uninitialized document'", 'max_length': '255', 'db_index': 'True'}), - 'language': ('django.db.models.fields.CharField', [], {'default': "u'eng'", 'max_length': '8'}), - 'uuid': ('django.db.models.fields.CharField', [], {'default': "u'b5b498b5-ffe5-4b70-b8a6-6c875ed11bf2'", 'max_length': '48'}) - }, - u'documents.documenttype': { - 'Meta': {'ordering': "['name']", 'object_name': 'DocumentType'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}), - 'ocr': ('django.db.models.fields.BooleanField', [], {'default': 'True'}) - }, - u'documents.documentversion': { - 'Meta': {'object_name': 'DocumentVersion'}, - 'checksum': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'document': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'versions'", 'to': u"orm['documents.Document']"}), - 'encoding': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True', 'blank': 'True'}), - 'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'mimetype': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'timestamp': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}) - }, - u'ocr.documentversionocrerror': { - 'Meta': {'ordering': "('datetime_submitted',)", 'object_name': 'DocumentVersionOCRError'}, - 'datetime_submitted': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'document_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['documents.DocumentVersion']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'result': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}) - } - } - - complete_apps = ['ocr'] diff --git a/mayan/apps/permissions/migrations/0001_initial.py b/mayan/apps/permissions/migrations/0001_initial.py new file mode 100644 index 0000000000..b132a011d9 --- /dev/null +++ b/mayan/apps/permissions/migrations/0001_initial.py @@ -0,0 +1,79 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('contenttypes', '0001_initial'), + ] + + operations = [ + migrations.CreateModel( + name='PermissionHolder', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('holder_id', models.PositiveIntegerField()), + ('holder_type', models.ForeignKey(related_name='permission_holder', to='contenttypes.ContentType')), + ], + options={ + 'verbose_name': 'Permission holder', + 'verbose_name_plural': 'Permission holders', + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='Role', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(unique=True, max_length=64)), + ('label', models.CharField(unique=True, max_length=64, verbose_name='Label')), + ], + options={ + 'ordering': ('label',), + 'verbose_name': 'Role', + 'verbose_name_plural': 'Roles', + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='RoleMember', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('member_id', models.PositiveIntegerField()), + ('member_type', models.ForeignKey(related_name='role_member', to='contenttypes.ContentType')), + ('role', models.ForeignKey(verbose_name='Role', to='permissions.Role')), + ], + options={ + 'verbose_name': 'Role member', + 'verbose_name_plural': 'Role members', + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='StoredPermission', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('namespace', models.CharField(max_length=64, verbose_name='Namespace')), + ('name', models.CharField(max_length=64, verbose_name='Name')), + ], + options={ + 'ordering': ('namespace',), + 'verbose_name': 'Permission', + 'verbose_name_plural': 'Permissions', + }, + bases=(models.Model,), + ), + migrations.AlterUniqueTogether( + name='storedpermission', + unique_together=set([('namespace', 'name')]), + ), + migrations.AddField( + model_name='permissionholder', + name='permission', + field=models.ForeignKey(verbose_name='Permission', to='permissions.StoredPermission'), + preserve_default=True, + ), + ] diff --git a/mayan/apps/permissions/south_migrations/__init__.py b/mayan/apps/permissions/migrations/__init__.py similarity index 100% rename from mayan/apps/permissions/south_migrations/__init__.py rename to mayan/apps/permissions/migrations/__init__.py diff --git a/mayan/apps/permissions/south_migrations/0001_initial.py b/mayan/apps/permissions/south_migrations/0001_initial.py deleted file mode 100644 index 35738e0009..0000000000 --- a/mayan/apps/permissions/south_migrations/0001_initial.py +++ /dev/null @@ -1,101 +0,0 @@ -# encoding: utf-8 -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'Permission' - db.create_table('permissions_permission', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('namespace', self.gf('django.db.models.fields.CharField')(max_length=64)), - ('name', self.gf('django.db.models.fields.CharField')(max_length=64)), - ('label', self.gf('django.db.models.fields.CharField')(max_length=96)), - )) - db.send_create_signal('permissions', ['Permission']) - - # Adding unique constraint on 'Permission', fields ['namespace', 'name'] - db.create_unique('permissions_permission', ['namespace', 'name']) - - # Adding model 'PermissionHolder' - db.create_table('permissions_permissionholder', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('permission', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['permissions.Permission'])), - ('holder_type', self.gf('django.db.models.fields.related.ForeignKey')(related_name='permission_holder', to=orm['contenttypes.ContentType'])), - ('holder_id', self.gf('django.db.models.fields.PositiveIntegerField')()), - )) - db.send_create_signal('permissions', ['PermissionHolder']) - - # Adding model 'Role' - db.create_table('permissions_role', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=64)), - ('label', self.gf('django.db.models.fields.CharField')(unique=True, max_length=64)), - )) - db.send_create_signal('permissions', ['Role']) - - # Adding model 'RoleMember' - db.create_table('permissions_rolemember', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('role', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['permissions.Role'])), - ('member_type', self.gf('django.db.models.fields.related.ForeignKey')(related_name='role_member', to=orm['contenttypes.ContentType'])), - ('member_id', self.gf('django.db.models.fields.PositiveIntegerField')()), - )) - db.send_create_signal('permissions', ['RoleMember']) - - def backwards(self, orm): - # Removing unique constraint on 'Permission', fields ['namespace', 'name'] - db.delete_unique('permissions_permission', ['namespace', 'name']) - - # Deleting model 'Permission' - db.delete_table('permissions_permission') - - # Deleting model 'PermissionHolder' - db.delete_table('permissions_permissionholder') - - # Deleting model 'Role' - db.delete_table('permissions_role') - - # Deleting model 'RoleMember' - db.delete_table('permissions_rolemember') - - models = { - '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'}), - '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'}) - }, - 'permissions.permission': { - 'Meta': {'ordering': "('namespace', 'label')", 'unique_together': "(('namespace', 'name'),)", 'object_name': 'Permission'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '96'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'namespace': ('django.db.models.fields.CharField', [], {'max_length': '64'}) - }, - 'permissions.permissionholder': { - 'Meta': {'object_name': 'PermissionHolder'}, - 'holder_id': ('django.db.models.fields.PositiveIntegerField', [], {}), - 'holder_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'permission_holder'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'permission': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['permissions.Permission']"}) - }, - 'permissions.role': { - 'Meta': {'ordering': "('label',)", 'object_name': 'Role'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64'}) - }, - 'permissions.rolemember': { - 'Meta': {'object_name': 'RoleMember'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'member_id': ('django.db.models.fields.PositiveIntegerField', [], {}), - 'member_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'role_member'", 'to': "orm['contenttypes.ContentType']"}), - 'role': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['permissions.Role']"}) - } - } - - complete_apps = ['permissions'] diff --git a/mayan/apps/permissions/south_migrations/0002_auto__add_storedpermission__add_unique_storedpermission_namespace_name.py b/mayan/apps/permissions/south_migrations/0002_auto__add_storedpermission__add_unique_storedpermission_namespace_name.py deleted file mode 100644 index 27c3fbbf36..0000000000 --- a/mayan/apps/permissions/south_migrations/0002_auto__add_storedpermission__add_unique_storedpermission_namespace_name.py +++ /dev/null @@ -1,77 +0,0 @@ -# encoding: utf-8 -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'StoredPermission' - db.create_table('permissions_storedpermission', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('namespace', self.gf('django.db.models.fields.CharField')(max_length=64)), - ('name', self.gf('django.db.models.fields.CharField')(max_length=64)), - )) - db.send_create_signal('permissions', ['StoredPermission']) - - # Adding unique constraint on 'StoredPermission', fields ['namespace', 'name'] - db.create_unique('permissions_storedpermission', ['namespace', 'name']) - - # Changing field 'PermissionHolder.permission' - db.alter_column('permissions_permissionholder', 'permission_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['permissions.StoredPermission'])) - - def backwards(self, orm): - # Removing unique constraint on 'StoredPermission', fields ['namespace', 'name'] - db.delete_unique('permissions_storedpermission', ['namespace', 'name']) - - # Deleting model 'StoredPermission' - db.delete_table('permissions_storedpermission') - - # Changing field 'PermissionHolder.permission' - db.alter_column('permissions_permissionholder', 'permission_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['permissions.Permission'])) - - models = { - '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'}), - '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'}) - }, - 'permissions.permission': { - 'Meta': {'ordering': "('namespace',)", 'unique_together': "(('namespace', 'name'),)", 'object_name': 'Permission'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '96'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'namespace': ('django.db.models.fields.CharField', [], {'max_length': '64'}) - }, - 'permissions.permissionholder': { - 'Meta': {'object_name': 'PermissionHolder'}, - 'holder_id': ('django.db.models.fields.PositiveIntegerField', [], {}), - 'holder_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'permission_holder'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'permission': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['permissions.StoredPermission']"}) - }, - 'permissions.role': { - 'Meta': {'ordering': "('label',)", 'object_name': 'Role'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64'}) - }, - 'permissions.rolemember': { - 'Meta': {'object_name': 'RoleMember'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'member_id': ('django.db.models.fields.PositiveIntegerField', [], {}), - 'member_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'role_member'", 'to': "orm['contenttypes.ContentType']"}), - 'role': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['permissions.Role']"}) - }, - 'permissions.storedpermission': { - 'Meta': {'ordering': "('namespace',)", 'unique_together': "(('namespace', 'name'),)", 'object_name': 'StoredPermission'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'namespace': ('django.db.models.fields.CharField', [], {'max_length': '64'}) - } - } - - complete_apps = ['permissions'] diff --git a/mayan/apps/permissions/south_migrations/0003_clear_permission_holders.py b/mayan/apps/permissions/south_migrations/0003_clear_permission_holders.py deleted file mode 100644 index acca01ce5d..0000000000 --- a/mayan/apps/permissions/south_migrations/0003_clear_permission_holders.py +++ /dev/null @@ -1,59 +0,0 @@ -# encoding: utf-8 -from south.db import db -from south.v2 import DataMigration -from django.db import models - - -class Migration(DataMigration): - - def forwards(self, orm): - for permission_holder in orm.PermissionHolder.objects.all(): - permission_holder.delete() - - def backwards(self, orm): - raise RuntimeError("Cannot reverse this migration.") - - models = { - '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'}), - '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'}) - }, - 'permissions.permission': { - 'Meta': {'ordering': "('namespace',)", 'unique_together': "(('namespace', 'name'),)", 'object_name': 'Permission'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '96'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'namespace': ('django.db.models.fields.CharField', [], {'max_length': '64'}) - }, - 'permissions.permissionholder': { - 'Meta': {'object_name': 'PermissionHolder'}, - 'holder_id': ('django.db.models.fields.PositiveIntegerField', [], {}), - 'holder_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'permission_holder'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'permission': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['permissions.StoredPermission']"}) - }, - 'permissions.role': { - 'Meta': {'ordering': "('label',)", 'object_name': 'Role'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64'}) - }, - 'permissions.rolemember': { - 'Meta': {'object_name': 'RoleMember'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'member_id': ('django.db.models.fields.PositiveIntegerField', [], {}), - 'member_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'role_member'", 'to': "orm['contenttypes.ContentType']"}), - 'role': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['permissions.Role']"}) - }, - 'permissions.storedpermission': { - 'Meta': {'ordering': "('namespace',)", 'unique_together': "(('namespace', 'name'),)", 'object_name': 'StoredPermission'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'namespace': ('django.db.models.fields.CharField', [], {'max_length': '64'}) - } - } - - complete_apps = ['permissions'] diff --git a/mayan/apps/permissions/south_migrations/0004_auto__del_permission__del_unique_permission_namespace_name.py b/mayan/apps/permissions/south_migrations/0004_auto__del_permission__del_unique_permission_namespace_name.py deleted file mode 100644 index 46199f109f..0000000000 --- a/mayan/apps/permissions/south_migrations/0004_auto__del_permission__del_unique_permission_namespace_name.py +++ /dev/null @@ -1,65 +0,0 @@ -# encoding: utf-8 -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Removing unique constraint on 'Permission', fields ['namespace', 'name'] - db.delete_unique('permissions_permission', ['namespace', 'name']) - - # Deleting model 'Permission' - db.delete_table('permissions_permission') - - def backwards(self, orm): - # Adding model 'Permission' - db.create_table('permissions_permission', ( - ('namespace', self.gf('django.db.models.fields.CharField')(max_length=64)), - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('name', self.gf('django.db.models.fields.CharField')(max_length=64)), - ('label', self.gf('django.db.models.fields.CharField')(max_length=96)), - )) - db.send_create_signal('permissions', ['Permission']) - - # Adding unique constraint on 'Permission', fields ['namespace', 'name'] - db.create_unique('permissions_permission', ['namespace', 'name']) - - models = { - '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'}), - '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'}) - }, - 'permissions.permissionholder': { - 'Meta': {'object_name': 'PermissionHolder'}, - 'holder_id': ('django.db.models.fields.PositiveIntegerField', [], {}), - 'holder_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'permission_holder'", 'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'permission': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['permissions.StoredPermission']"}) - }, - 'permissions.role': { - 'Meta': {'ordering': "('label',)", 'object_name': 'Role'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64'}) - }, - 'permissions.rolemember': { - 'Meta': {'object_name': 'RoleMember'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'member_id': ('django.db.models.fields.PositiveIntegerField', [], {}), - 'member_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'role_member'", 'to': "orm['contenttypes.ContentType']"}), - 'role': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['permissions.Role']"}) - }, - 'permissions.storedpermission': { - 'Meta': {'ordering': "('namespace',)", 'unique_together': "(('namespace', 'name'),)", 'object_name': 'StoredPermission'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '64'}), - 'namespace': ('django.db.models.fields.CharField', [], {'max_length': '64'}) - } - } - - complete_apps = ['permissions'] diff --git a/mayan/apps/tags/migrations/0001_initial.py b/mayan/apps/tags/migrations/0001_initial.py new file mode 100644 index 0000000000..b4668dfd07 --- /dev/null +++ b/mayan/apps/tags/migrations/0001_initial.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('documents', '__first__'), + ] + + operations = [ + migrations.CreateModel( + name='Tag', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('label', models.CharField(unique=True, max_length=128, verbose_name='Label', db_index=True)), + ('color', models.CharField(max_length=3, verbose_name='Color', choices=[('blu', 'Blue'), ('cya', 'Cyan'), ('crl', 'Coral'), ('gry', 'Green-Yellow'), ('kki', 'Khaki'), ('lig', 'LightGrey'), ('mag', 'Magenta'), ('red', 'Red'), ('org', 'Orange'), ('yel', 'Yellow')])), + ('documents', models.ManyToManyField(related_name='tags', verbose_name='Documents', to='documents.Document')), + ], + options={ + 'verbose_name': 'Tag', + 'verbose_name_plural': 'Tags', + }, + bases=(models.Model,), + ), + ] diff --git a/mayan/apps/tags/south_migrations/__init__.py b/mayan/apps/tags/migrations/__init__.py similarity index 100% rename from mayan/apps/tags/south_migrations/__init__.py rename to mayan/apps/tags/migrations/__init__.py diff --git a/mayan/apps/tags/south_migrations/0001_initial.py b/mayan/apps/tags/south_migrations/0001_initial.py deleted file mode 100644 index 033a4e5480..0000000000 --- a/mayan/apps/tags/south_migrations/0001_initial.py +++ /dev/null @@ -1,37 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'TagProperties' - db.create_table(u'tags_tagproperties', ( - (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('tag_id', self.gf('django.db.models.fields.IntegerField')()), - ('color', self.gf('django.db.models.fields.CharField')(max_length=3)), - )) - db.send_create_signal(u'tags', ['TagProperties']) - - def backwards(self, orm): - # Deleting model 'TagProperties' - db.delete_table(u'tags_tagproperties') - - models = { - u'taggit.tag': { - 'Meta': {'object_name': 'Tag'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'}) - }, - u'tags.tagproperties': { - 'Meta': {'object_name': 'TagProperties'}, - 'color': ('django.db.models.fields.CharField', [], {'max_length': '3'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'tag_id': ('django.db.models.fields.IntegerField', [], {}) - } - } - - complete_apps = ['tags'] diff --git a/mayan/apps/tags/south_migrations/0002_auto__add_tag__chg_field_tagproperties_tag.py b/mayan/apps/tags/south_migrations/0002_auto__add_tag__chg_field_tagproperties_tag.py deleted file mode 100644 index f44b5bea00..0000000000 --- a/mayan/apps/tags/south_migrations/0002_auto__add_tag__chg_field_tagproperties_tag.py +++ /dev/null @@ -1,73 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - depends_on = ( - ('documents', '0001_initial'), - ('actstream', '0007_auto__add_field_follow_started'), - ) - - def forwards(self, orm): - # Adding model 'Tag' - db.create_table(u'tags_tag', ( - (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('label', self.gf('django.db.models.fields.CharField')(max_length=128, db_index=True)), - ('color', self.gf('django.db.models.fields.CharField')(max_length=3)), - )) - db.send_create_signal(u'tags', ['Tag']) - - # Adding M2M table for field document on 'Tag' - m2m_table_name = db.shorten_name(u'tags_tag_document') - db.create_table(m2m_table_name, ( - ('id', models.AutoField(primary_key=True, auto_created=True)), - ('tag', models.ForeignKey(orm[u'tags.tag'], null=False)), - ('document', models.ForeignKey(orm[u'documents.document'], null=False)) - )) - db.create_unique(m2m_table_name, ['tag_id', 'document_id']) - - def backwards(self, orm): - # Deleting model 'Tag' - db.delete_table(u'tags_tag') - - # Removing M2M table for field document on 'Tag' - db.delete_table(db.shorten_name(u'tags_tag_document')) - - models = { - u'documents.document': { - 'Meta': {'ordering': "['-date_added']", 'object_name': 'Document'}, - 'date_added': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'documents'", 'null': 'True', 'to': u"orm['documents.DocumentType']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'max_length': '48', 'blank': 'True'}) - }, - u'documents.documenttype': { - 'Meta': {'ordering': "['name']", 'object_name': 'DocumentType'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}) - }, - u'taggit.tag': { - 'Meta': {'object_name': 'Tag'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'}) - }, - u'tags.tag': { - 'Meta': {'object_name': 'Tag'}, - 'color': ('django.db.models.fields.CharField', [], {'max_length': '3'}), - 'document': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['documents.Document']", 'symmetrical': 'False'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}) - }, - u'tags.tagproperties': { - 'Meta': {'object_name': 'TagProperties'}, - 'color': ('django.db.models.fields.CharField', [], {'max_length': '3'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'properties'", 'to': u"orm['tags.Tag']"}) - } - } - - complete_apps = ['tags'] diff --git a/mayan/apps/tags/south_migrations/0003_remove_taggit.py b/mayan/apps/tags/south_migrations/0003_remove_taggit.py deleted file mode 100644 index da9665655f..0000000000 --- a/mayan/apps/tags/south_migrations/0003_remove_taggit.py +++ /dev/null @@ -1,64 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import DataMigration -from django.db import models, transaction -from django.db.utils import ProgrammingError - - -class Migration(DataMigration): - def forwards(self, orm): - "Write your forwards methods here." - # Note: Don't use "from appname.models import ModelName". - # Use orm.ModelName to refer to models in this application, - # and orm['appname.ModelName'] for models in other applications. - - try: - with transaction.atomic(): - for tag in orm['taggit.tag'].objects.all(): - color = orm.TagProperties.objects.get(tag=tag).color - orm.Tag.objects.create(label=tag.name, color=color) - except ProgrammingError: - # Ignore this error because it is expected when migrating a new - # install, in this situation the django-taggit table never existed - pass - - def backwards(self, orm): - "Write your backwards methods here." - - models = { - u'documents.document': { - 'Meta': {'ordering': "['-date_added']", 'object_name': 'Document'}, - 'date_added': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'documents'", 'null': 'True', 'to': u"orm['documents.DocumentType']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'max_length': '48', 'blank': 'True'}) - }, - u'documents.documenttype': { - 'Meta': {'ordering': "['name']", 'object_name': 'DocumentType'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}) - }, - u'taggit.tag': { - 'Meta': {'object_name': 'Tag'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'}) - }, - u'tags.tag': { - 'Meta': {'object_name': 'Tag'}, - 'color': ('django.db.models.fields.CharField', [], {'max_length': '3'}), - 'document': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['documents.Document']", 'symmetrical': 'False'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}) - }, - u'tags.tagproperties': { - 'Meta': {'object_name': 'TagProperties'}, - 'color': ('django.db.models.fields.CharField', [], {'max_length': '3'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'properties'", 'to': u"orm['tags.Tag']"}) - } - } - - complete_apps = ['tags'] - symmetrical = True diff --git a/mayan/apps/tags/south_migrations/0004_auto.py b/mayan/apps/tags/south_migrations/0004_auto.py deleted file mode 100644 index 1ff7232adf..0000000000 --- a/mayan/apps/tags/south_migrations/0004_auto.py +++ /dev/null @@ -1,64 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Removing M2M table for field document on 'Tag' - db.delete_table(db.shorten_name(u'tags_tag_document')) - - # Adding M2M table for field documents on 'Tag' - m2m_table_name = db.shorten_name(u'tags_tag_documents') - db.create_table(m2m_table_name, ( - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), - ('tag', models.ForeignKey(orm[u'tags.tag'], null=False)), - ('document', models.ForeignKey(orm[u'documents.document'], null=False)) - )) - db.create_unique(m2m_table_name, ['tag_id', 'document_id']) - - def backwards(self, orm): - # Adding M2M table for field document on 'Tag' - m2m_table_name = db.shorten_name(u'tags_tag_document') - db.create_table(m2m_table_name, ( - ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), - ('tag', models.ForeignKey(orm[u'tags.tag'], null=False)), - ('document', models.ForeignKey(orm[u'documents.document'], null=False)) - )) - db.create_unique(m2m_table_name, ['tag_id', 'document_id']) - - # Removing M2M table for field documents on 'Tag' - db.delete_table(db.shorten_name(u'tags_tag_documents')) - - models = { - u'documents.document': { - 'Meta': {'ordering': "['-date_added']", 'object_name': 'Document'}, - 'date_added': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'documents'", 'null': 'True', 'to': u"orm['documents.DocumentType']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'max_length': '48', 'blank': 'True'}) - }, - u'documents.documenttype': { - 'Meta': {'ordering': "['name']", 'object_name': 'DocumentType'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}) - }, - u'tags.tag': { - 'Meta': {'object_name': 'Tag'}, - 'color': ('django.db.models.fields.CharField', [], {'max_length': '3'}), - 'documents': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['documents.Document']", 'symmetrical': 'False'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}) - }, - u'tags.tagproperties': { - 'Meta': {'object_name': 'TagProperties'}, - 'color': ('django.db.models.fields.CharField', [], {'max_length': '3'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'properties'", 'to': u"orm['tags.Tag']"}) - } - } - - complete_apps = ['tags'] diff --git a/mayan/apps/tags/south_migrations/0005_auto__add_unique_tag_label.py b/mayan/apps/tags/south_migrations/0005_auto__add_unique_tag_label.py deleted file mode 100644 index b00980ab17..0000000000 --- a/mayan/apps/tags/south_migrations/0005_auto__add_unique_tag_label.py +++ /dev/null @@ -1,46 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding unique constraint on 'Tag', fields ['label'] - db.create_unique(u'tags_tag', ['label']) - - def backwards(self, orm): - # Removing unique constraint on 'Tag', fields ['label'] - db.delete_unique(u'tags_tag', ['label']) - - models = { - u'documents.document': { - 'Meta': {'ordering': "['-date_added']", 'object_name': 'Document'}, - 'date_added': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'documents'", 'null': 'True', 'to': u"orm['documents.DocumentType']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'max_length': '48', 'blank': 'True'}) - }, - u'documents.documenttype': { - 'Meta': {'ordering': "['name']", 'object_name': 'DocumentType'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}) - }, - u'tags.tag': { - 'Meta': {'object_name': 'Tag'}, - 'color': ('django.db.models.fields.CharField', [], {'max_length': '3'}), - 'documents': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['documents.Document']", 'symmetrical': 'False'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128', 'db_index': 'True'}) - }, - u'tags.tagproperties': { - 'Meta': {'object_name': 'TagProperties'}, - 'color': ('django.db.models.fields.CharField', [], {'max_length': '3'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'properties'", 'to': u"orm['tags.Tag']"}) - } - } - - complete_apps = ['tags'] diff --git a/mayan/apps/tags/south_migrations/0006_auto__del_tagproperties.py b/mayan/apps/tags/south_migrations/0006_auto__del_tagproperties.py deleted file mode 100644 index 0e96240c77..0000000000 --- a/mayan/apps/tags/south_migrations/0006_auto__del_tagproperties.py +++ /dev/null @@ -1,45 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Deleting model 'TagProperties' - db.delete_table(u'tags_tagproperties') - - def backwards(self, orm): - # Adding model 'TagProperties' - db.create_table(u'tags_tagproperties', ( - ('color', self.gf('django.db.models.fields.CharField')(max_length=3)), - ('tag', self.gf('django.db.models.fields.related.ForeignKey')(related_name='properties', to=orm['tags.Tag'])), - (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - )) - db.send_create_signal(u'tags', ['TagProperties']) - - models = { - u'documents.document': { - 'Meta': {'ordering': "['-date_added']", 'object_name': 'Document'}, - 'date_added': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), - 'document_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'documents'", 'null': 'True', 'to': u"orm['documents.DocumentType']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'uuid': ('django.db.models.fields.CharField', [], {'max_length': '48', 'blank': 'True'}) - }, - u'documents.documenttype': { - 'Meta': {'ordering': "['name']", 'object_name': 'DocumentType'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}) - }, - u'tags.tag': { - 'Meta': {'object_name': 'Tag'}, - 'color': ('django.db.models.fields.CharField', [], {'max_length': '3'}), - 'documents': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['documents.Document']", 'symmetrical': 'False'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128', 'db_index': 'True'}) - } - } - - complete_apps = ['tags']