Commits

Diego Búrigo Zacarão committed 9d959dd

Added 0.6-0.7 schema migration

- It needs a 0.6 schema (with no later changes)
- To migrate run:
- ./manage.py syncdb
- ./manage.py migrate 0001_initial --all --fake
- ./manage.py migrate

Comments (0)

Files changed (4)

transifex/projects/migrations/0002_release_06_07.py

+# -*- coding: utf-8 -*-
+
+from south.db import db
+from django.db import models
+from projects.models import *
+
+class Migration:
+    
+    def forwards(self, orm):
+        
+        # Adding field 'Component.should_calculate'
+        db.add_column('projects_component', 'should_calculate', models.BooleanField(_('Calculate statistics?'), default=True))
+        
+        # Adding field 'Component.submission_type'
+        db.add_column('projects_component', 'submission_type', models.CharField(_('Submit to'), max_length=10, blank=True, default=''))
+        
+    
+    
+    def backwards(self, orm):
+        
+        # Deleting field 'Component.should_calculate'
+        db.delete_column('projects_component', 'should_calculate')
+        
+        # Deleting field 'Component.submission_type'
+        db.delete_column('projects_component', 'submission_type')
+        
+    
+    
+    models = {
+        'codebases.unit': {
+            'Meta': {'ordering': "('name',)", 'get_latest_by': "'created'"},
+            '_stub': True,
+            'id': ('models.AutoField', [], {'primary_key': 'True'})
+        },
+        'projects.component': {
+            'Meta': {'unique_together': '("project","slug")', 'get_latest_by': "'created'", 'ordering': "('name',)", 'db_table': "'projects_component'", 'permissions': '(("clear_cache","Can clear cache"),("refresh_stats","Can refresh statistics"),("submit_file","Can submit file"),)'},
+            '_unit': ('models.OneToOneField', ['Unit'], {'editable': 'False', 'null': 'True', 'verbose_name': "_('Unit')", 'db_column': "'unit_id'", 'blank': 'True'}),
+            'allows_submission': ('models.BooleanField', ["_('Allows submission')"], {'default': 'False'}),
+            'created': ('models.DateTimeField', [], {'auto_now_add': 'True', 'editable': 'False'}),
+            'description': ('models.CharField', ["_('Description')"], {'max_length': '255', 'blank': 'True'}),
+            'enabled': ('models.BooleanField', ["_('Enabled')"], {'default': 'True', 'editable': 'False'}),
+            'file_filter': ('models.CharField', ["_('File filter')"], {'max_length': '50'}),
+            'full_name': ('models.CharField', [], {'max_length': '100', 'editable': 'False'}),
+            'hidden': ('models.BooleanField', ["_('Hidden')"], {'default': 'False', 'editable': 'False'}),
+            'i18n_type': ('models.CharField', ["_('I18n type')"], {'max_length': '20'}),
+            'id': ('models.AutoField', [], {'primary_key': 'True'}),
+            'long_description': ('models.TextField', ["_('Long description')"], {'max_length': '1000', 'blank': 'True'}),
+            'long_description_html': ('models.TextField', ["_('HTML Description')"], {'max_length': '1000', 'editable': 'False', 'blank': 'True'}),
+            'modified': ('models.DateTimeField', [], {'auto_now': 'True', 'editable': 'False'}),
+            'name': ('models.CharField', ["_('Name')"], {'max_length': '50'}),
+            # It's NOT a real field
+            #'pofiles': ('generic.GenericRelation', ['POFile'], {}),
+            'project': ('models.ForeignKey', ['Project'], {'verbose_name': "_('Project')"}),
+            'releases': ('models.ManyToManyField', ['CollectionRelease'], {'related_name': "'components'", 'null': 'True', 'verbose_name': "_('Releases')", 'blank': 'True'}),
+            'should_calculate': ('models.BooleanField', ["_('Calculate statistics?')"], {'default': 'True'}),
+            'slug': ('models.SlugField', ["_('Slug')"], {'max_length': '30'}),
+            'source_lang': ('models.CharField', ["_('Source language')"], {'max_length': '50'}),
+            'submission_type': ('models.CharField', ["_('Submit to')"], {'default': "''", 'max_length': '10', 'blank': 'True'})
+        },
+        'auth.user': {
+            '_stub': True,
+            'id': ('models.AutoField', [], {'primary_key': 'True'})
+        },
+        'txcollections.collection': {
+            'Meta': {'ordering': "('name',)", 'db_table': "'txcollections_collection'", 'get_latest_by': "'created'"},
+            '_stub': True,
+            'id': ('models.AutoField', [], {'primary_key': 'True'})
+        },
+        'txcollections.collectionrelease': {
+            'Meta': {'unique_together': "['slug','collection']", 'db_table': "'collections_release'"},
+            '_stub': True,
+            'id': ('models.AutoField', [], {'primary_key': 'True'})
+        },
+        'projects.project': {
+            'Meta': {'ordering': "('name',)", 'db_table': "'projects_project'", 'get_latest_by': "'created'"},
+            'bug_tracker': ('models.URLField', ["_('Bug tracker')"], {'blank': 'True'}),
+            'collections': ('models.ManyToManyField', ['Collection'], {'related_name': "'projects'", 'null': 'True', 'verbose_name': "_('Collections')", 'blank': 'True'}),
+            'created': ('models.DateTimeField', [], {'auto_now_add': 'True', 'editable': 'False'}),
+            'description': ('models.CharField', ["_('Description')"], {'max_length': '255', 'blank': 'True'}),
+            'enabled': ('models.BooleanField', ["_('Enabled')"], {'default': 'True', 'editable': 'False'}),
+            'feed': ('models.CharField', ["_('Feed')"], {'max_length': '255', 'blank': 'True'}),
+            'hidden': ('models.BooleanField', ["_('Hidden')"], {'default': 'False', 'editable': 'False'}),
+            'homepage': ('models.URLField', ["_('Homepage')"], {'verify_exists': 'False', 'blank': 'True'}),
+            'id': ('models.AutoField', [], {'primary_key': 'True'}),
+            'long_description': ('models.TextField', ["_('Long description')"], {'max_length': '1000', 'blank': 'True'}),
+            'long_description_html': ('models.TextField', ["_('HTML Description')"], {'max_length': '1000', 'editable': 'False', 'blank': 'True'}),
+            'maintainers': ('models.ManyToManyField', ['User'], {'related_name': "'projects_maintaining'", 'null': 'True', 'verbose_name': "_('Maintainers')", 'blank': 'False'}),
+            'modified': ('models.DateTimeField', [], {'auto_now': 'True', 'editable': 'False'}),
+            'name': ('models.CharField', ["_('Name')"], {'max_length': '50'}),
+            'slug': ('models.SlugField', ["_('Slug')"], {'unique': 'True', 'max_length': '30'}),
+            'tags': ('TagField', [], {'verbose_name': "_('Tags')"})
+        }
+    }
+    
+    complete_apps = ['projects']

transifex/translations/migrations/0002_release_06_07.py

+# -*- coding: utf-8 -*-
+
+from south.db import db
+from django.db import models
+from translations.models import *
+
+class Migration:
+    
+    def forwards(self, orm):
+        
+        # Adding field 'POFile.rev'
+        db.add_column('translations_pofile', 'rev', IntegerTupleField(max_length=64, null=True))
+        
+        # Changing field 'POFile.filename'
+        db.alter_column('translations_pofile', 'filename', models.CharField(max_length=255, null=False, db_index=True))
+        
+        # Changing field 'POFile.is_pot'
+        db.alter_column('translations_pofile', 'is_pot', models.BooleanField(default=False, editable=False, db_index=True))
+        
+    
+    
+    def backwards(self, orm):
+        
+        # Deleting field 'POFile.rev'
+        db.delete_column('translations_pofile', 'rev')
+        
+        # Changing field 'POFile.filename'
+        db.alter_column('translations_pofile', 'filename', models.CharField(max_length=255, null=False))
+        
+        # Changing field 'POFile.is_pot'
+        db.alter_column('translations_pofile', 'is_pot', models.BooleanField(default=False, editable=False))
+        
+    
+    
+    models = {
+        'auth.user': {
+            '_stub': True,
+            'id': ('models.AutoField', [], {'primary_key': 'True'})
+        },
+        'translations.pofilelock': {
+            'Meta': {'unique_together': "('pofile','owner')", 'db_table': "'translations_pofile_lock'"},
+            'created': ('models.DateTimeField', [], {'auto_now_add': 'True', 'editable': 'False'}),
+            'enabled': ('models.BooleanField', [], {'default': 'True'}),
+            'id': ('models.AutoField', [], {'primary_key': 'True'}),
+            'modified': ('models.DateTimeField', [], {'auto_now': 'True', 'editable': 'False'}),
+            'name': ('models.CharField', [], {'max_length': '255', 'null': 'True'}),
+            'owner': ('models.ForeignKey', ['User'], {}),
+            'pofile': ('models.ForeignKey', ['POFile'], {'related_name': "'locks'", 'null': 'True'})
+        },
+        'contenttypes.contenttype': {
+            'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label','model'),)", 'db_table': "'django_content_type'"},
+            '_stub': True,
+            'id': ('models.AutoField', [], {'primary_key': 'True'})
+        },
+        'translations.pofile': {
+            'Meta': {'unique_together': '("content_type","object_id","filename")', 'get_latest_by': "'created'", 'ordering': "('language__name',)", 'db_table': "'translations_pofile'"},
+            'content_type': ('models.ForeignKey', ['ContentType'], {}),
+            'created': ('models.DateTimeField', [], {'auto_now_add': 'True', 'editable': 'False'}),
+            'enabled': ('models.BooleanField', [], {'default': 'True', 'editable': 'False'}),
+            'error': ('models.BooleanField', [], {'default': 'False', 'editable': 'False'}),
+            'filename': ('models.CharField', [], {'max_length': '255', 'null': 'False', 'db_index': 'True'}),
+            'fuzzy': ('models.PositiveIntegerField', [], {'default': '0'}),
+            'fuzzy_perc': ('models.PositiveIntegerField', [], {'default': '0', 'editable': 'False'}),
+            'id': ('models.AutoField', [], {'primary_key': 'True'}),
+            'is_msgmerged': ('models.BooleanField', [], {'default': 'True', 'editable': 'False'}),
+            'is_pot': ('models.BooleanField', [], {'default': 'False', 'editable': 'False', 'db_index': 'True'}),
+            'language': ('models.ForeignKey', ['Language'], {'null': 'True'}),
+            'language_code': ('models.CharField', [], {'max_length': '20', 'null': 'True'}),
+            'modified': ('models.DateTimeField', [], {'auto_now': 'True', 'editable': 'False'}),
+            'object_id': ('models.PositiveIntegerField', [], {}),
+            'rev': ('IntegerTupleField', [], {'max_length': '64', 'null': 'True'}),
+            'total': ('models.PositiveIntegerField', [], {'default': '0'}),
+            'trans': ('models.PositiveIntegerField', [], {'default': '0'}),
+            'trans_perc': ('models.PositiveIntegerField', [], {'default': '0', 'editable': 'False'}),
+            'untrans': ('models.PositiveIntegerField', [], {'default': '0'}),
+            'untrans_perc': ('models.PositiveIntegerField', [], {'default': '100', 'editable': 'False'})
+        },
+        'languages.language': {
+            'Meta': {'ordering': "('name',)", 'db_table': "'translations_language'"},
+            '_stub': True,
+            'id': ('models.AutoField', [], {'primary_key': 'True'})
+        }
+    }
+    
+    complete_apps = ['translations']

transifex/txcollections/migrations/0002_release_06_07.py

+
+from south.db import db
+from django.db import models
+from txcollections.models import *
+
+class Migration:
+    
+    def forwards(self, orm):
+        
+        # Changing field 'Collection.slug'
+        db.alter_column('txcollections_collection', 'slug', models.SlugField(_('Slug'), unique=True, max_length=30))
+        
+    
+    def backwards(self, orm):
+        
+        # Changing field 'Collection.slug'
+        db.alter_column('txcollections_collection', 'slug', models.SlugField(_('Slug'), max_length=30))
+        
+    
+    
+    models = {
+        'txcollections.collectionrelease': {
+            'Meta': {'unique_together': "['slug','collection']", 'db_table': "'collections_release'"},
+            'collection': ('models.ForeignKey', ['Collection'], {'related_name': "'releases'"}),
+            'created': ('models.DateTimeField', [], {'auto_now_add': 'True', 'editable': 'False'}),
+            'description': ('models.CharField', ["_('Description')"], {'max_length': '255', 'blank': 'True'}),
+            'develfreeze_date': ('models.DateTimeField', ["_('Devel freeze date')"], {'null': 'True', 'blank': 'True'}),
+            'enabled': ('models.BooleanField', ["_('Enabled')"], {'default': 'True', 'editable': 'False'}),
+            'hidden': ('models.BooleanField', ["_('Hidden')"], {'default': 'False', 'editable': 'False'}),
+            'homepage': ('models.URLField', [], {'verify_exists': 'False', 'blank': 'True'}),
+            'id': ('models.AutoField', [], {'primary_key': 'True'}),
+            'long_description': ('models.TextField', ["_('Long description')"], {'max_length': '1000', 'blank': 'True'}),
+            'long_description_html': ('models.TextField', ["_('HTML Description')"], {'max_length': '1000', 'editable': 'False', 'blank': 'True'}),
+            'modified': ('models.DateTimeField', [], {'auto_now': 'True', 'editable': 'False'}),
+            'name': ('models.CharField', ["_('Name')"], {'max_length': '50'}),
+            'release_date': ('models.DateTimeField', ["_('Release date')"], {'null': 'True', 'blank': 'True'}),
+            'slug': ('models.SlugField', ["_('Slug')"], {'max_length': '30'}),
+            'stringfreeze_date': ('models.DateTimeField', ["_('String freeze date')"], {'null': 'True', 'blank': 'True'})
+        },
+        'txcollections.collection': {
+            'Meta': {'ordering': "('name',)", 'db_table': "'txcollections_collection'", 'get_latest_by': "'created'"},
+            'created': ('models.DateTimeField', [], {'auto_now_add': 'True', 'editable': 'False'}),
+            'description': ('models.CharField', ["_('Description')"], {'max_length': '255', 'blank': 'True'}),
+            'enabled': ('models.BooleanField', ["_('Enabled')"], {'default': 'True', 'editable': 'False'}),
+            'hidden': ('models.BooleanField', ["_('Hidden')"], {'default': 'False', 'editable': 'False'}),
+            'homepage': ('models.URLField', ["_('Homepage')"], {'verify_exists': 'False', 'blank': 'True'}),
+            'id': ('models.AutoField', [], {'primary_key': 'True'}),
+            'long_description': ('models.TextField', ["_('Long description')"], {'max_length': '1000', 'blank': 'True'}),
+            'long_description_html': ('models.TextField', ["_('HTML Description')"], {'max_length': '1000', 'editable': 'False', 'blank': 'True'}),
+            'modified': ('models.DateTimeField', [], {'auto_now': 'True', 'editable': 'False'}),
+            'name': ('models.CharField', ["_('Name')"], {'max_length': '50'}),
+            'slug': ('models.SlugField', ["_('Slug')"], {'unique': 'True', 'max_length': '30'}),
+            'tags': ('TagField', [], {})
+        }
+    }
+    
+    complete_apps = ['txcollections']

transifex/txcommon/migrations/0002_release_06_07.py

+# -*- coding: utf-8 -*-
+
+from south.db import db
+from django.db import models
+from txcommon.models import *
+from userprofile.countries import CountryField
+
+class Migration:
+    
+    def forwards(self, orm):
+        
+        # Adding model 'Profile'
+        db.create_table('txcommon_profile', (
+            ('looking_for_work', models.BooleanField(_('Looking for work?'), default=False)),
+            ('about', models.TextField(_('About yourself'), max_length=140, blank=True)),
+            ('surname', models.CharField(_('Surname'), max_length=255, blank=True)),
+            ('firstname', models.CharField(_('First name'), max_length=255, blank=True)),
+            ('country', CountryField(null=True, blank=True)),
+            ('twitter', models.URLField(_('Twitter'), blank=True)),
+            ('native_language', models.ForeignKey(orm['languages.Language'], null=True, verbose_name=_('Native Language'), blank=True)),
+            ('longitude', models.DecimalField(null=True, max_digits=10, decimal_places=6, blank=True)),
+            ('creation_date', models.DateTimeField(default=datetime.datetime(2009, 7, 30, 13, 13, 50, 217271))),
+            ('blog', models.URLField(_('Blog'), blank=True)),
+            ('user', models.ForeignKey(orm['auth.User'], unique=True)),
+            ('latitude', models.DecimalField(null=True, max_digits=10, decimal_places=6, blank=True)),
+            ('linked_in', models.URLField(_('LinkedIn'), blank=True)),
+            ('id', models.AutoField(primary_key=True)),
+            ('location', models.CharField(max_length=255, blank=True)),
+        ))
+        db.send_create_signal('txcommon', ['Profile'])
+        
+    
+    
+    def backwards(self, orm):
+        
+        # Deleting model 'Profile'
+        db.delete_table('txcommon_profile')
+        
+    
+    
+    models = {
+        'auth.user': {
+            '_stub': True,
+            'id': ('models.AutoField', [], {'primary_key': 'True'})
+        },
+        'languages.language': {
+            'Meta': {'ordering': "('name',)", 'db_table': "'translations_language'"},
+            '_stub': True,
+            'id': ('models.AutoField', [], {'primary_key': 'True'})
+        },
+        'txcommon.profile': {
+            'about': ('models.TextField', ["_('About yourself')"], {'max_length': '140', 'blank': 'True'}),
+            'blog': ('models.URLField', ["_('Blog')"], {'blank': 'True'}),
+            'country': ('CountryField', [], {'null': 'True', 'blank': 'True'}),
+            'creation_date': ('models.DateTimeField', [], {'default': 'datetime.datetime(2009, 7, 30, 13, 13, 50, 293400)'}),
+            'firstname': ('models.CharField', ["_('First name')"], {'max_length': '255', 'blank': 'True'}),
+            'id': ('models.AutoField', [], {'primary_key': 'True'}),
+            'latitude': ('models.DecimalField', [], {'null': 'True', 'max_digits': '10', 'decimal_places': '6', 'blank': 'True'}),
+            'linked_in': ('models.URLField', ["_('LinkedIn')"], {'blank': 'True'}),
+            'location': ('models.CharField', [], {'max_length': '255', 'blank': 'True'}),
+            'longitude': ('models.DecimalField', [], {'null': 'True', 'max_digits': '10', 'decimal_places': '6', 'blank': 'True'}),
+            'looking_for_work': ('models.BooleanField', ["_('Looking for work?')"], {'default': 'False'}),
+            'native_language': ('models.ForeignKey', ['Language'], {'null': 'True', 'verbose_name': "_('Native Language')", 'blank': 'True'}),
+            'surname': ('models.CharField', ["_('Surname')"], {'max_length': '255', 'blank': 'True'}),
+            'twitter': ('models.URLField', ["_('Twitter')"], {'blank': 'True'}),
+            'user': ('models.ForeignKey', ['User'], {'unique': 'True'})
+        }
+    }
+    
+    complete_apps = ['txcommon']