Commits

Dimitris Glezos  committed 52855b5

bugfix: Cleanup some migrations and fix latest regression.

  • Participants
  • Parent commits 56a3fd2

Comments (0)

Files changed (8)

File transifex/codebases/migrations/0002_precoll.py

-
-from south.db import db
-from django.db import models
-from codebases.models import *
-
-class Migration:
-    
-    def forwards(self, orm):
-        
-        # Changing field 'Unit.name'
-        # (to signature: django.db.models.fields.CharField(unique=True, max_length=100))
-        db.alter_column('codebases_unit', 'name', orm['codebases.unit:name'])
-        
-        # Changing field 'Unit.last_checkout'
-        # (to signature: django.db.models.fields.DateTimeField(null=True))
-        db.alter_column('codebases_unit', 'last_checkout', orm['codebases.unit:last_checkout'])
-        
-        # Changing field 'Unit.created'
-        # (to signature: django.db.models.fields.DateTimeField(auto_now_add=True, blank=True))
-        db.alter_column('codebases_unit', 'created', orm['codebases.unit:created'])
-        
-        # Changing field 'Unit.type'
-        # (to signature: django.db.models.fields.CharField(max_length=10))
-        db.alter_column('codebases_unit', 'type', orm['codebases.unit:type'])
-        
-        # Changing field 'Unit.modified'
-        # (to signature: django.db.models.fields.DateTimeField(auto_now=True, blank=True))
-        db.alter_column('codebases_unit', 'modified', orm['codebases.unit:modified'])
-        
-        # Changing field 'Unit.root'
-        # (to signature: django.db.models.fields.CharField(max_length=255))
-        db.alter_column('codebases_unit', 'root', orm['codebases.unit:root'])
-        
-    
-    
-    def backwards(self, orm):
-        
-        # Changing field 'Unit.name'
-        # (to signature: models.CharField(_('Name'), unique=True, max_length=100))
-        db.alter_column('codebases_unit', 'name', orm['codebases.unit:name'])
-        
-        # Changing field 'Unit.last_checkout'
-        # (to signature: models.DateTimeField(null=True, editable=False))
-        db.alter_column('codebases_unit', 'last_checkout', orm['codebases.unit:last_checkout'])
-        
-        # Changing field 'Unit.created'
-        # (to signature: models.DateTimeField(auto_now_add=True, editable=False))
-        db.alter_column('codebases_unit', 'created', orm['codebases.unit:created'])
-        
-        # Changing field 'Unit.type'
-        # (to signature: models.CharField(_('Type'), max_length=10))
-        db.alter_column('codebases_unit', 'type', orm['codebases.unit:type'])
-        
-        # Changing field 'Unit.modified'
-        # (to signature: models.DateTimeField(auto_now=True, editable=False))
-        db.alter_column('codebases_unit', 'modified', orm['codebases.unit:modified'])
-        
-        # Changing field 'Unit.root'
-        # (to signature: models.CharField(_('Root'), max_length=255))
-        db.alter_column('codebases_unit', 'root', orm['codebases.unit:root'])
-        
-    
-    
-    models = {
-        'codebases.unit': {
-            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
-            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'last_checkout': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
-            'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}),
-            'root': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            'type': ('django.db.models.fields.CharField', [], {'max_length': '10'})
-        }
-    }
-    
-    complete_apps = ['codebases']

File transifex/languages/migrations/0002_precoll.py

-
-from south.db import db
-from django.db import models
-from languages.models import *
-
-class Migration:
-    
-    def forwards(self, orm):
-        
-        # Changing field 'Language.code_aliases'
-        # (to signature: django.db.models.fields.CharField(max_length=100, null=True))
-        db.alter_column('translations_language', 'code_aliases', orm['languages.language:code_aliases'])
-        
-        # Changing field 'Language.code'
-        # (to signature: django.db.models.fields.CharField(unique=True, max_length=50))
-        db.alter_column('translations_language', 'code', orm['languages.language:code'])
-        
-        # Changing field 'Language.description'
-        # (to signature: django.db.models.fields.CharField(max_length=255, blank=True))
-        db.alter_column('translations_language', 'description', orm['languages.language:description'])
-        
-        # Changing field 'Language.pluralequation'
-        # (to signature: django.db.models.fields.CharField(max_length=255, blank=True))
-        db.alter_column('translations_language', 'pluralequation', orm['languages.language:pluralequation'])
-        
-        # Changing field 'Language.name'
-        # (to signature: django.db.models.fields.CharField(unique=True, max_length=50))
-        db.alter_column('translations_language', 'name', orm['languages.language:name'])
-        
-        # Changing field 'Language.specialchars'
-        # (to signature: django.db.models.fields.CharField(max_length=255, blank=True))
-        db.alter_column('translations_language', 'specialchars', orm['languages.language:specialchars'])
-        
-        # Changing field 'Language.nplurals'
-        # (to signature: django.db.models.fields.SmallIntegerField())
-        db.alter_column('translations_language', 'nplurals', orm['languages.language:nplurals'])
-        
-    
-    
-    def backwards(self, orm):
-        
-        # Changing field 'Language.code_aliases'
-        # (to signature: models.CharField(_('Code aliases'), max_length=100, null=True))
-        db.alter_column('translations_language', 'code_aliases', orm['languages.language:code_aliases'])
-        
-        # Changing field 'Language.code'
-        # (to signature: models.CharField(_('Code'), unique=True, max_length=50))
-        db.alter_column('translations_language', 'code', orm['languages.language:code'])
-        
-        # Changing field 'Language.description'
-        # (to signature: models.CharField(_('Description'), max_length=255, blank=True))
-        db.alter_column('translations_language', 'description', orm['languages.language:description'])
-        
-        # Changing field 'Language.pluralequation'
-        # (to signature: models.CharField(_("Plural Equation"), max_length=255, blank=True))
-        db.alter_column('translations_language', 'pluralequation', orm['languages.language:pluralequation'])
-        
-        # Changing field 'Language.name'
-        # (to signature: models.CharField(_('Name'), unique=True, max_length=50))
-        db.alter_column('translations_language', 'name', orm['languages.language:name'])
-        
-        # Changing field 'Language.specialchars'
-        # (to signature: models.CharField(_("Special Chars"), max_length=255, blank=True))
-        db.alter_column('translations_language', 'specialchars', orm['languages.language:specialchars'])
-        
-        # Changing field 'Language.nplurals'
-        # (to signature: models.SmallIntegerField(_("Number of Plurals")))
-        db.alter_column('translations_language', 'nplurals', orm['languages.language:nplurals'])
-        
-    
-    
-    models = {
-        'languages.language': {
-            'Meta': {'db_table': "'translations_language'"},
-            'code': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '50'}),
-            'code_aliases': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100', 'null': 'True'}),
-            'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
-            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '50'}),
-            'nplurals': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}),
-            'pluralequation': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
-            'specialchars': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'})
-        }
-    }
-    
-    complete_apps = ['languages']

File transifex/reviews/migrations/0001_init.py

-
-from south.db import db
-from django.db import models
-from reviews.models import *
-from txcommon.db.models import IntegerTupleField
-
-class Migration:
-    
-    def forwards(self, orm):
-        
-        # Adding model 'ReviewLike'
-        db.create_table('reviews_reviewlike', (
-            ('id', orm['reviews.ReviewLike:id']),
-            ('like', orm['reviews.ReviewLike:like']),
-            ('reviewrequest', orm['reviews.ReviewLike:reviewrequest']),
-            ('user', orm['reviews.ReviewLike:user']),
-        ))
-        db.send_create_signal('reviews', ['ReviewLike'])
-        
-        # Adding model 'POReviewRequest'
-        db.create_table('reviews_poreviewrequest', (
-            ('id', orm['reviews.POReviewRequest:id']),
-            ('description', orm['reviews.POReviewRequest:description']),
-            ('status', orm['reviews.POReviewRequest:status']),
-            ('resolution', orm['reviews.POReviewRequest:resolution']),
-            ('created_on', orm['reviews.POReviewRequest:created_on']),
-            ('last_updated', orm['reviews.POReviewRequest:last_updated']),
-            ('file_name', orm['reviews.POReviewRequest:file_name']),
-            ('target_filename', orm['reviews.POReviewRequest:target_filename']),
-            ('lang_code', orm['reviews.POReviewRequest:lang_code']),
-            ('component', orm['reviews.POReviewRequest:component']),
-            ('author', orm['reviews.POReviewRequest:author']),
-        ))
-        db.send_create_signal('reviews', ['POReviewRequest'])
-        
-    
-    
-    def backwards(self, orm):
-        
-        # Deleting model 'ReviewLike'
-        db.delete_table('reviews_reviewlike')
-        
-        # Deleting model 'POReviewRequest'
-        db.delete_table('reviews_poreviewrequest')
-        
-    
-    
-    models = {
-        'auth.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']", 'blank': 'True'})
-        },
-        'auth.permission': {
-            'Meta': {'unique_together': "(('content_type', 'codename'),)"},
-            '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': {
-            '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']", 'blank': 'True'}),
-            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
-            'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
-            'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
-            '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']", 'blank': 'True'}),
-            'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
-        },
-        'codebases.unit': {
-            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
-            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'last_checkout': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
-            'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}),
-            'root': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            'type': ('django.db.models.fields.CharField', [], {'max_length': '10'})
-        },
-        'contenttypes.contenttype': {
-            'Meta': {'unique_together': "(('app_label', 'model'),)", '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'})
-        },
-        'languages.language': {
-            'Meta': {'db_table': "'translations_language'"},
-            'code': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '50'}),
-            'code_aliases': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100', 'null': 'True'}),
-            'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
-            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '50'}),
-            'nplurals': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}),
-            'pluralequation': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
-            'specialchars': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'})
-        },
-        'projects.component': {
-            'Meta': {'unique_together': "(('project', 'slug'),)"},
-            '_unit': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['codebases.Unit']", 'unique': 'True', 'null': 'True', 'db_column': "'unit_id'", 'blank': 'True'}),
-            'allows_submission': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
-            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
-            'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
-            'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
-            'file_filter': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'full_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'hidden': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
-            'i18n_type': ('django.db.models.fields.CharField', [], {'max_length': '20'}),
-            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'long_description': ('django.db.models.fields.TextField', [], {'max_length': '1000', 'blank': 'True'}),
-            'long_description_html': ('django.db.models.fields.TextField', [], {'max_length': '1000', 'blank': 'True'}),
-            'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'pofiles': ('django.contrib.contenttypes.generic.GenericRelation', [], {'to': "orm['translations.POFile']"}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['projects.Project']"}),
-            'should_calculate': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
-            'slug': ('django.db.models.fields.SlugField', [], {'max_length': '30', 'db_index': 'True'}),
-            'source_lang': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'submission_type': ('django.db.models.fields.CharField', [], {'max_length': '10', 'blank': 'True'})
-        },
-        'projects.project': {
-            'anyone_submit': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
-            'bug_tracker': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
-            'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
-            'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
-            'feed': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
-            'hidden': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
-            'homepage': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'long_description': ('django.db.models.fields.TextField', [], {'max_length': '1000', 'blank': 'True'}),
-            'long_description_html': ('django.db.models.fields.TextField', [], {'max_length': '1000', 'blank': 'True'}),
-            'maintainers': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'null': 'True'}),
-            'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '30', 'db_index': 'True'}),
-            'tags': ('tagging.fields.TagField', [], {})
-        },
-        'reviews.poreviewrequest': {
-            'author': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}),
-            'component': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'reviews'", 'to': "orm['projects.Component']"}),
-            'created_on': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
-            'description': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}),
-            'file_name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
-            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'lang_code': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
-            'last_updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
-            'resolution': ('django.db.models.fields.CharField', [], {'default': "'N'", 'max_length': '1'}),
-            'scorers': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']"}),
-            'status': ('django.db.models.fields.CharField', [], {'default': "'O'", 'max_length': '1'}),
-            'target_filename': ('django.db.models.fields.CharField', [], {'max_length': '255'})
-        },
-        'reviews.reviewlike': {
-            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'like': ('django.db.models.fields.NullBooleanField', [], {'default': 'None', 'null': 'True'}),
-            'reviewrequest': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['reviews.POReviewRequest']"}),
-            'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"})
-        },
-        'translations.pofile': {
-            'Meta': {'unique_together': "(('content_type', 'object_id', 'filename'),)"},
-            'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
-            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
-            'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
-            'error': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
-            'filename': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
-            'fuzzy': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
-            'fuzzy_perc': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
-            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'is_msgmerged': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
-            'is_pot': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True', 'blank': 'True'}),
-            'language': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['languages.Language']", 'null': 'True'}),
-            'language_code': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True'}),
-            'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
-            'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}),
-            'rev': ('IntegerTupleField', [], {'max_length': '64', 'null': 'True'}),
-            'total': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
-            'trans': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
-            'trans_perc': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
-            'untrans': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
-            'untrans_perc': ('django.db.models.fields.PositiveIntegerField', [], {'default': '100'})
-        }
-    }
-    
-    complete_apps = ['reviews']

File transifex/reviews/migrations/__init__.py

Empty file removed.

File transifex/settings/50-project.conf

     'contact_form',
     'ajax_select',
     'threadedcomments',
+
     # Transifex specific apps:
     'txcommon',
     'codebases', # need to be before vcs
     'authority',
     'txpermissions',
     'teams',
-    'txcollections',
+
+    # Extra bits:
+    'txcollections', # Kept for compatibility reasons, to make migrations work
 ]

File transifex/txcollections/README

-This application isn't really used.
-
-It is here to allow South to do its migrations peacefully,
-because it doesn't support the removal of applications.
-
-In future versions of Transifex, and South, this could be removed.

File transifex/txcollections/__init__.py

+"""
+The txcollections application used to work, but today it isn't being used. 
+
+It is here to allow South to do its migrations peacefully, because it
+doesn't yet support the removal of applications. In future versions of
+Transifex and South, this application will be removed.
+"""

File transifex/txcollections/models.py

 from django.db import models
-