Commits

dready committed aa99e18

add south to prepare for model changes

Comments (0)

Files changed (4)

 -e git://github.com/bitprophet/fabric.git#egg=fabric
 -e svn+http://code.djangoproject.com/svn/django/trunk#egg=django
+-e hg+http://bitbucket.org/andrewgodwin/south/@853f767dbf55a67ced45839fb5c4bd19575827f0#egg=South-tip

src/factory/migrations/0001_initial.py

+# encoding: utf-8
+import datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+class Migration(SchemaMigration):
+
+    def forwards(self, orm):
+        
+        # Adding model 'FabfileRecipe'
+        db.create_table('factory_fabfilerecipe', (
+            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+            ('name', self.gf('django.db.models.fields.CharField')(max_length=255)),
+            ('slug', self.gf('django.db.models.fields.SlugField')(max_length=50, db_index=True)),
+            ('notify', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)),
+            ('schedule', self.gf('django.db.models.fields.BooleanField')(default=False)),
+            ('file', self.gf('django.db.models.fields.files.FileField')(max_length=100)),
+            ('repos', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)),
+            ('projdir', self.gf('django.db.models.fields.CharField')(max_length=255)),
+        ))
+        db.send_create_signal('factory', ['FabfileRecipe'])
+
+        # Adding model 'Build'
+        db.create_table('factory_build', (
+            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+            ('name', self.gf('django.db.models.fields.CharField')(max_length=255)),
+            ('task', self.gf('django.db.models.fields.CharField')(max_length=255)),
+            ('fabfile_recipe', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['factory.FabfileRecipe'])),
+            ('revision', self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True)),
+            ('executed', self.gf('django.db.models.fields.BooleanField')(default=False)),
+            ('executed_datetime', self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True)),
+            ('success', self.gf('django.db.models.fields.BooleanField')(default=False)),
+            ('environement', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
+            ('output', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
+            ('error', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
+            ('created_datetime', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, auto_now_add=True, blank=True)),
+        ))
+        db.send_create_signal('factory', ['Build'])
+
+
+    def backwards(self, orm):
+        
+        # Deleting model 'FabfileRecipe'
+        db.delete_table('factory_fabfilerecipe')
+
+        # Deleting model 'Build'
+        db.delete_table('factory_build')
+
+
+    models = {
+        'factory.build': {
+            'Meta': {'object_name': 'Build'},
+            'created_datetime': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'auto_now_add': 'True', 'blank': 'True'}),
+            'environement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+            'error': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+            'executed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+            'executed_datetime': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+            'fabfile_recipe': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['factory.FabfileRecipe']"}),
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+            'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+            'output': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+            'revision': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
+            'success': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+            'task': ('django.db.models.fields.CharField', [], {'max_length': '255'})
+        },
+        'factory.fabfilerecipe': {
+            'Meta': {'object_name': 'FabfileRecipe'},
+            'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+            'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+            'notify': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
+            'projdir': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+            'repos': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
+            'schedule': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+            'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'})
+        }
+    }
+
+    complete_apps = ['factory']

src/factory/migrations/__init__.py

Empty file added.

src/project/settings.py

     'django.contrib.sessions',
     'django.contrib.sites',
     'django.contrib.admin',
+    'south',
     
     'factory',
     "worker", # added only to be able to run the test suite