Fix south migration orders
authorKostas Papadimitriou <kpap@grnet.gr>
Mon, 30 Jul 2012 12:49:56 +0000 (15:49 +0300)
committerKostas Papadimitriou <kpap@grnet.gr>
Mon, 30 Jul 2012 12:49:56 +0000 (15:49 +0300)
proper dependecies for migrations scrips to prevent south migrations
from failing

cloudcms/migrate/cloudcmsfaq/0001_initial.py
cloudcms/migrate/page/0005_auto__chg_field_twitterfeed_retweets__chg_field_twitterfeed_replies__c.py
cloudcms/migrations/0001_initial.py
cloudcms/migrations/0009_auto__add_service__add_servicetranslation.py

index 42b8e10..d2a88bf 100644 (file)
@@ -5,9 +5,13 @@ from south.v2 import SchemaMigration
 from django.db import models
 
 class Migration(SchemaMigration):
-    
+
+    depends_on = (
+        ("cloudcms", "0011_auto__del_field_service_title_faq__del_field_service_title_userguide__"),
+    )
+
     def forwards(self, orm):
-        
+
         # Adding model 'Category'
         db.create_table('cloudcmsfaq_category', (
             ('ordering', self.gf('django.db.models.fields.SmallIntegerField')(default=0)),
@@ -49,10 +53,10 @@ class Migration(SchemaMigration):
             ('application', models.ForeignKey(orm['cloudcms.application'], null=False))
         ))
         db.create_unique('cloudcmsfaq_question_application', ['question_id', 'application_id'])
-    
-    
+
+
     def backwards(self, orm):
-        
+
         # Deleting model 'Category'
         db.delete_table('cloudcmsfaq_category')
 
@@ -64,8 +68,8 @@ class Migration(SchemaMigration):
 
         # Removing M2M table for field application on 'Question'
         db.delete_table('cloudcmsfaq_question_application')
-    
-    
+
+
     models = {
         'auth.group': {
             'Meta': {'object_name': 'Group'},
@@ -174,5 +178,5 @@ class Migration(SchemaMigration):
             'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
         }
     }
-    
+
     complete_apps = ['cloudcmsfaq']
index 574fa7a..30b84da 100644 (file)
@@ -5,9 +5,14 @@ from south.v2 import SchemaMigration
 from django.db import models
 
 class Migration(SchemaMigration):
-    
+    depends_on = (
+        ("medialibrary", "0001_initial"),
+        ("cloudcms", "0001_initial"),
+    )
+
+
     def forwards(self, orm):
-        
+
         # Changing field 'TwitterFeed.retweets'
         db.alter_column('page_page_twitterfeed', 'retweets', self.gf('django.db.models.fields.BooleanField')(blank=True))
 
@@ -31,10 +36,10 @@ class Migration(SchemaMigration):
 
         # Changing field 'Page.active'
         db.alter_column('page_page', 'active', self.gf('django.db.models.fields.BooleanField')(blank=True))
-    
-    
+
+
     def backwards(self, orm):
-        
+
         # Changing field 'TwitterFeed.retweets'
         db.alter_column('page_page_twitterfeed', 'retweets', self.gf('django.db.models.fields.BooleanField')())
 
@@ -58,8 +63,8 @@ class Migration(SchemaMigration):
 
         # Changing field 'Page.active'
         db.alter_column('page_page', 'active', self.gf('django.db.models.fields.BooleanField')())
-    
-    
+
+
     models = {
         'medialibrary.category': {
             'Meta': {'object_name': 'Category'},
@@ -254,5 +259,5 @@ class Migration(SchemaMigration):
             'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
         }
     }
-    
+
     complete_apps = ['page']
index 72a8429..39daf84 100644 (file)
@@ -5,9 +5,13 @@ from south.v2 import SchemaMigration
 from django.db import models
 
 class Migration(SchemaMigration):
-    
+
+    depends_on = (
+        ("medialibrary", "0001_initial"),
+    )
+
     def forwards(self, orm):
-        
+
         # Adding model 'Application'
         db.create_table('cloudcms_application', (
             ('app_url', self.gf('django.db.models.fields.URLField')(max_length=200, null=True, blank=True)),
@@ -22,14 +26,14 @@ class Migration(SchemaMigration):
             ('show_twitter_feed_on_top', self.gf('django.db.models.fields.BooleanField')(default=False, blank=True)),
         ))
         db.send_create_signal('cloudcms', ['Application'])
-    
-    
+
+
     def backwards(self, orm):
-        
+
         # Deleting model 'Application'
         db.delete_table('cloudcms_application')
-    
-    
+
+
     models = {
         'cloudcms.application': {
             'Meta': {'object_name': 'Application'},
@@ -68,5 +72,5 @@ class Migration(SchemaMigration):
             'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
         }
     }
-    
+
     complete_apps = ['cloudcms']
index fbab377..da368ea 100644 (file)
@@ -7,6 +7,10 @@ from django.db import models
 
 class Migration(SchemaMigration):
 
+    depends_on = (
+        ("page", "0001_initial"),
+    )
+
     def forwards(self, orm):
         # Adding model 'Service'
         db.create_table('cloudcms_service', (
@@ -143,4 +147,4 @@ class Migration(SchemaMigration):
         }
     }
 
-    complete_apps = ['cloudcms']
\ No newline at end of file
+    complete_apps = ['cloudcms']