def backwards(self, orm):
        db = dbs['stats']
        db.dry_run = south.db.db.dry_run
        
        # Adding model 'HoudiniUsageLog'
        db.create_table(u'houdini_stats_houdiniusagelog', (
            ('stats_machine_config', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['stats_main.MachineConfig'])),
            ('key', self.gf('django.db.models.fields.CharField')(max_length=100)),
            ('date', self.gf('django.db.models.fields.DateTimeField')()),
            ('message', self.gf('django.db.models.fields.TextField')(default='')),
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
        ))
        db.send_create_signal(u'houdini_stats', ['HoudiniUsageLog'])

        # Adding model 'HoudiniUsageFlag'
        db.create_table(u'houdini_stats_houdiniusageflag', (
            ('date', self.gf('django.db.models.fields.DateTimeField')()),
            ('stats_machine_config', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['stats_main.MachineConfig'])),
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('key', self.gf('django.db.models.fields.CharField')(max_length=100)),
        ))
        db.send_create_signal(u'houdini_stats', ['HoudiniUsageFlag'])

        # Deleting model 'HoudiniLog'
        db.delete_table(u'houdini_stats_houdinilog')

        # Deleting model 'HoudiniFlag'
        db.delete_table(u'houdini_stats_houdiniflag')
    def forwards(self, orm):
        db = dbs['stats']
        db.dry_run = south.db.db.dry_run
        
        # Deleting model 'HoudiniUsageLog'
        db.delete_table(u'houdini_stats_houdiniusagelog')

        # Deleting model 'HoudiniUsageFlag'
        db.delete_table(u'houdini_stats_houdiniusageflag')

        # Adding model 'HoudiniLog'
        db.create_table(u'houdini_stats_houdinilog', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('stats_machine_config', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['stats_main.MachineConfig'])),
            ('date', self.gf('django.db.models.fields.DateTimeField')()),
            ('key', self.gf('django.db.models.fields.CharField')(max_length=100)),
            ('timestamp', self.gf('django.db.models.fields.DecimalField')(max_digits=10, decimal_places=6)),
            ('log_entry', self.gf('django.db.models.fields.CharField')(max_length=100)),
        ))
        db.send_create_signal(u'houdini_stats', ['HoudiniLog'])

        # Adding model 'HoudiniFlag'
        db.create_table(u'houdini_stats_houdiniflag', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('stats_machine_config', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['stats_main.MachineConfig'])),
            ('date', self.gf('django.db.models.fields.DateTimeField')()),
            ('key', self.gf('django.db.models.fields.CharField')(max_length=100)),
        ))
        db.send_create_signal(u'houdini_stats', ['HoudiniFlag'])
    def backwards(self, orm):
        # Deleting model 'Machine'
        db = dbs['stats']
        db.dry_run = south.db.db.dry_run
        
        db.delete_table(u'houdini_stats_machine')


        # User chose to not deal with backwards NULL issues for 'MachineConfig.last_active_date'
        raise RuntimeError("Cannot reverse this migration. 'MachineConfig.last_active_date' and its values cannot be restored.")
        
        # The following code is provided here to aid in writing a correct migration        # Adding field 'MachineConfig.last_active_date'
        db.add_column(u'houdini_stats_machineconfig', 'last_active_date',
                      self.gf('django.db.models.fields.DateTimeField')(),
                      keep_default=False)


        # User chose to not deal with backwards NULL issues for 'MachineConfig.hardware_id'
        raise RuntimeError("Cannot reverse this migration. 'MachineConfig.hardware_id' and its values cannot be restored.")
        
        # The following code is provided here to aid in writing a correct migration        # Adding field 'MachineConfig.hardware_id'
        db.add_column(u'houdini_stats_machineconfig', 'hardware_id',
                      self.gf('django.db.models.fields.CharField')(max_length=40),
                      keep_default=False)

        # Deleting field 'MachineConfig.machine'
        db.delete_column(u'houdini_stats_machineconfig', 'machine_id')

        # Deleting field 'MachineConfig.creation_date'
        db.delete_column(u'houdini_stats_machineconfig', 'creation_date')
    def forwards(self, orm):
        db = dbs['stats']
        db.dry_run = south.db.db.dry_run
        
        # Deleting model 'Machine'
        db.delete_table(u'houdini_stats_machine')

        # Deleting model 'MachineConfig'
        db.delete_table(u'houdini_stats_machineconfig')

        # Deleting field 'HoudiniCrash.machine_config'
        db.delete_column(u'houdini_stats_houdinicrash', 'machine_config_id')

        # Deleting field 'HoudiniUsageLog.machine_config'
        db.delete_column(u'houdini_stats_houdiniusagelog', 'machine_config_id')

        # Deleting field 'HoudiniToolUsage.machine_config'
        db.delete_column(u'houdini_stats_houdinitoolusage', 'machine_config_id')

        # Deleting field 'HoudiniUsageCount.machine_config'
        db.delete_column(u'houdini_stats_houdiniusagecount', 'machine_config_id')

        # Deleting field 'Uptime.machine_config'
        db.delete_column(u'houdini_stats_uptime', 'machine_config_id')

        # Deleting field 'HoudiniUsageFlag.machine_config'
        db.delete_column(u'houdini_stats_houdiniusageflag', 'machine_config_id')
    def backwards(self, orm):
        db = dbs['stats']
        db.dry_run = south.db.db.dry_run

        # Deleting model 'HoudiniCrashGroup'
        db.delete_table(u'houdini_stats_houdinicrashgroup')

        # Deleting field 'HoudiniCrash.group'
        db.delete_column(u'houdini_stats_houdinicrash', 'group_id')
    def backwards(self, orm):
        db = dbs['stats']
        db.dry_run = south.db.db.dry_run
        
        # Deleting model 'HoudiniPersistentStats'
        db.delete_table(u'houdini_stats_houdinipersistentstats')


        # Changing field 'HoudiniSumAndCount.sum'
        db.alter_column(u'houdini_stats_houdinisumandcount', 'sum', self.gf('django.db.models.fields.DecimalField')(max_digits=10, decimal_places=6))

        # Changing field 'HoudiniLog.timestamp'
        db.alter_column(u'houdini_stats_houdinilog', 'timestamp', self.gf('django.db.models.fields.DecimalField')(max_digits=10, decimal_places=6))
Ejemplo n.º 7
0
    def backwards(self, orm):
	db = dbs['stats']
        db.dry_run = south.db.db.dry_run

        # Deleting model 'Machine'
        db.delete_table(u'stats_main_machine')

        # Deleting model 'MachineConfig'
        db.delete_table(u'stats_main_machineconfig')

        # Deleting model 'LogId'
        db.delete_table(u'stats_main_logid')

        # Deleting model 'Event'
        db.delete_table(u'stats_main_event')
Ejemplo n.º 8
0
    def backwards(self, orm):
        db = dbs['stats']
        db.dry_run = south.db.db.dry_run

        # Deleting model 'MachineConfig'
        db.delete_table('houdini_stats_machineconfig')

        # Deleting model 'HoudiniCrash'
        db.delete_table('houdini_stats_houdinicrash')

        # Deleting model 'NodeTypeUsage'
        db.delete_table('houdini_stats_nodetypeusage')

        # Deleting model 'Uptime'
        db.delete_table('houdini_stats_uptime')
    def backwards(self, orm):
        db = dbs['stats']
        db.dry_run = south.db.db.dry_run    
        # Deleting model 'HoudiniUsageLog'
        db.delete_table(u'houdini_stats_houdiniusagelog')

        # Deleting model 'HoudiniUsageFlag'
        db.delete_table(u'houdini_stats_houdiniusageflag')

        # Deleting model 'HoudiniUsageCount'
        db.delete_table(u'houdini_stats_houdiniusagecount')
    def backwards(self, orm):
        db = dbs['stats']
        db.dry_run = south.db.db.dry_run
        
        # Deleting model 'HoudiniPersistentStatsEntry'
        db.delete_table(u'houdini_stats_houdinipersistentstatsentry')

        # Deleting model 'HoudiniPersistentStatsKeyValuePair'
        db.delete_table(u'houdini_stats_houdinipersistentstatskeyvaluepair')

        # Deleting model 'HoudiniPersistentStats'
        db.delete_table(u'houdini_stats_houdinipersistentstats')
 def backwards(self, orm):
     db = dbs['stats']
     db.dry_run = south.db.db.dry_run
     
     # Deleting model 'ErrorLog'
     db.delete_table(u'stats_main_errorlog')
 def backwards(self, orm):
     db = dbs['stats']
     db.dry_run = south.db.db.dry_run
     
     # Deleting model 'Event'
     db.delete_table(u'houdini_stats_event')
 def backwards(self, orm):
     db = dbs['stats']
     db.dry_run = south.db.db.dry_run
     
     # Deleting model 'HoudiniSumAndCount'
     db.delete_table(u'houdini_stats_houdinisumandcount')
 def backwards(self, orm):
     db = dbs['stats']
     db.dry_run = south.db.db.dry_run    
     # Deleting model 'LogId'
     db.delete_table(u'houdini_stats_logid')
 def forwards(self, orm):
     db = dbs['stats']
     db.dry_run = south.db.db.dry_run
     
     # Deleting model 'HoudiniPersistentStats'
     db.delete_table(u'houdini_stats_houdinipersistentstats')
    def backwards(self, orm):
        db = dbs['stats']
        db.dry_run = south.db.db.dry_run

        # Deleting model 'HoudiniString'
        db.delete_table(u'houdini_stats_houdinistring')