<commit_before># -*- coding: 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):
        # Fix table
        db.add_column(u'stacks_stackaction', 'status_changed',
                      self.gf('model_utils.fields.MonitorField')(default=datetime.datetime.now, monitor='status'),
                      keep_default=False)

        db.alter_column(u'stacks_stackaction', 'status',
                        self.gf('model_utils.fields.StatusField')(default='waiting', max_length=100, no_check_for_status=True))

        # Adding model 'StackAction'
        # db.create_table(u'stacks_stackaction', (
        #     (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
        #     ('status', self.gf('model_utils.fields.StatusField')(default='waiting', max_length=100, no_check_for_status=True)),
        #     ('status_changed', self.gf('model_utils.fields.MonitorField')(default=datetime.datetime.now, monitor='status')),
        #     ('created', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now, blank=True)),
        #     ('modified', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now, blank=True)),
        #     ('stack', self.gf('django.db.models.fields.related.ForeignKey')(related_name='actions', to=orm['stacks.Stack'])),
        #     ('start', self.gf('django.db.models.fields.DateTimeField')()),
        #     ('type', self.gf('django.db.models.fields.CharField')(max_length=50)),
        #     ('host_target', self.gf('django.db.models.fields.CharField')(max_length=255)),
        #     ('command', self.gf('django.db.models.fields.TextField')()),
        #     ('std_out_storage', self.gf('django.db.models.fields.TextField')()),
        #     ('std_err_storage', self.gf('django.db.models.fields.TextField')()),
        # ))
        # db.send_create_signal(u'stacks', ['StackAction'])

        # Adding field 'StackHistory.status_changed'
        db.add_column(u'stacks_stackhistory', 'status_changed',
                      self.gf('model_utils.fields.MonitorField')(default=datetime.datetime.now, monitor='status'),
                      keep_default=False)

        # Adding field 'StackHistory.status_detail'
        db.add_column(u'stacks_stackhistory', 'status_detail',
                      self.gf('django.db.models.fields.TextField')(default='', blank=True),
                      keep_default=False)


        # Changing field 'StackHistory.status'
        db.alter_column(u'stacks_stackhistory', 'status', self.gf('model_utils.fields.StatusField')(max_length=100, no_check_for_status=True))
        # Adding field 'Stack.status'
        db.add_column(u'stacks_stack', 'status',
                      self.gf('model_utils.fields.StatusField')(default='pending', max_length=100, no_check_for_status=True),
                      keep_default=False)

        # Adding field 'Stack.status_changed'
        db.add_column(u'stacks_stack', 'status_changed',
                      self.gf('model_utils.fields.MonitorField')(default=datetime.datetime.now, monitor='status'),
                      keep_default=False)


    def backwards(self, orm):
        db.delete_column(u'stacks_stackaction', 'status_changed')

        db.alter_column(u'stacks_stackaction', 'status',
                        self.gf('django.db.models.fields.CharField')(default='waiting', max_length=8))

        # Deleting model 'StackAction'
        # db.delete_table(u'stacks_stackaction')

        # Deleting field 'StackHistory.status_changed'
        db.delete_column(u'stacks_stackhistory', 'status_changed')

        # Deleting field 'StackHistory.status_detail'
        db.delete_column(u'stacks_stackhistory', 'status_detail')


        # Changing field 'StackHistory.status'
        db.alter_column(u'stacks_stackhistory', 'status', self.gf('django.db.models.fields.TextField')())
        # Deleting field 'Stack.status'
        db.delete_column(u'stacks_stack', 'status')

        # Deleting field 'Stack.status_changed'
        db.delete_column(u'stacks_stack', 'status_changed')


    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'}),<commit_msg>Fixed migration to get rid of errors<commit_after># -*- coding: 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):
        # Fix table
        db.add_column(u'stacks_stackaction', 'status_changed',
                      self.gf('model_utils.fields.MonitorField')(default=datetime.datetime.now, monitor='status'),
                      keep_default=False)

        db.alter_column(u'stacks_stackaction', 'status',
                        self.gf('model_utils.fields.StatusField')(default='waiting', max_length=100, no_check_for_status=True))

        # Adding model 'StackAction'
        # db.create_table(u'stacks_stackaction', (
        #     (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
        #     ('status', self.gf('model_utils.fields.StatusField')(default='waiting', max_length=100, no_check_for_status=True)),
        #     ('status_changed', self.gf('model_utils.fields.MonitorField')(default=datetime.datetime.now, monitor='status')),
        #     ('created', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now, blank=True)),
        #     ('modified', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now, blank=True)),
        #     ('stack', self.gf('django.db.models.fields.related.ForeignKey')(related_name='actions', to=orm['stacks.Stack'])),
        #     ('start', self.gf('django.db.models.fields.DateTimeField')()),
        #     ('type', self.gf('django.db.models.fields.CharField')(max_length=50)),
        #     ('host_target', self.gf('django.db.models.fields.CharField')(max_length=255)),
        #     ('command', self.gf('django.db.models.fields.TextField')()),
        #     ('std_out_storage', self.gf('django.db.models.fields.TextField')()),
        #     ('std_err_storage', self.gf('django.db.models.fields.TextField')()),
        # ))
        # db.send_create_signal(u'stacks', ['StackAction'])

        # Adding field 'StackHistory.status_changed'
        db.add_column(u'stacks_stackhistory', 'status_changed',
                      self.gf('model_utils.fields.MonitorField')(default=datetime.datetime.now, monitor='status'),
                      keep_default=False)

        # Rename status column
        db.rename_column(u'stacks_stackhistory', 'status', 'status_detail')

        # Adding field 'StackHistory.status_detail'
        db.alter_column(u'stacks_stackhistory', 'status_detail',
                        self.gf('django.db.models.fields.TextField')(default='', blank=True),
                        keep_default=False)


        # Changing field 'StackHistory.status'
        db.add_column(u'stacks_stackhistory', 'status', self.gf('model_utils.fields.StatusField')(max_length=100, no_check_for_status=True))
        # Adding field 'Stack.status'
        db.add_column(u'stacks_stack', 'status',
                      self.gf('model_utils.fields.StatusField')(default='pending', max_length=100, no_check_for_status=True),
                      keep_default=False)

        # Adding field 'Stack.status_changed'
        db.add_column(u'stacks_stack', 'status_changed',
                      self.gf('model_utils.fields.MonitorField')(default=datetime.datetime.now, monitor='status'),
                      keep_default=False)


    def backwards(self, orm):
        db.delete_column(u'stacks_stackaction', 'status_changed')

        db.alter_column(u'stacks_stackaction', 'status',
                        self.gf('django.db.models.fields.CharField')(default='waiting', max_length=8))

        # Deleting model 'StackAction'
        # db.delete_table(u'stacks_stackaction')

        # Deleting field 'StackHistory.status_changed'
        db.delete_column(u'stacks_stackhistory', 'status_changed')

        # delete status field 'StackHistory.status'
        db.delete_column(u'stacks_stackhistory', 'status')

        # renaming field 'StackHistory.status_detail' back to status
        db.rename_column(u'stacks_stackhistory', 'status_detail', 'status')

        # Altering the status field
        db.alter_column(u'stacks_stackhistory', 'status', self.gf('django.db.models.fields.TextField')())

        # Deleting field 'Stack.status'
        db.delete_column(u'stacks_stack', 'status')

        # Deleting field 'Stack.status_changed'
        db.delete_column(u'stacks_stack', 'status_changed')


    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'}),
{'fraction_non_alphanumeric': 0.1514592600629272, 'fraction_numerical': 0.004773787566453293, 'mean_word_length': 3.1225402504472273, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1789464', 'n_tokens_mistral': 2857, 'n_tokens_neox': 2712, 'n_words': 350}