def forwards(self, orm):

        # Changing field 'Category.slug'
        db.alter_column('qa_category', 'slug', self.gf('django.db.models.fields.SlugField')(unique=True, max_length=255))

        # Changing field 'Category.name'
        db.alter_column('qa_category', 'name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255))

        # Changing field 'Reference.name'
        db.alter_column('qa_reference', 'name', self.gf('django.db.models.fields.CharField')(max_length=255))

        # Changing field 'Test.name'
        db.alter_column('qa_test', 'name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255))

        if 'sql_server' in engine:
            sql_server_idxs = (('qa_testlist', 'name'), ('qa_testlistcycle', 'name'),)
            for table_name, column_name in sql_server_idxs:
                try:
                    db.drop_index(table_name, column_name)
                except:
                    pass
                # sqlserver_utils.drop_index(db,table_name,column_name)

        # Changing field 'TestList.name'
        db.alter_column('qa_testlist', 'name', self.gf('django.db.models.fields.CharField')(max_length=255))

        # Changing field 'TestListCycle.name'
        db.alter_column('qa_testlistcycle', 'name', self.gf('django.db.models.fields.CharField')(max_length=255))

        if 'sql_server' in engine:
            for table_name, column_name in sql_server_idxs:
                db.create_index(table_name, [column_name])
예제 #2
0
    def backwards(self, orm):

        # Changing field 'CrawlAgregates.start_time'
        # (to signature: django.db.models.fields.DateTimeField())
        db.alter_column('main_crawlagregates', 'start_time',
                        orm['main.crawlagregates:start_time'])
        db.drop_index('main_crawlagregates', ['start_time'])
예제 #3
0
    def backwards(self, orm):
        db.add_column(
            'core_placement', 'target_ct',
            models.ForeignKey(orm['contenttypes.ContentType'], null=True))
        db.add_column('core_placement', 'target_id',
                      models.IntegerField(null=True))

        db.drop_index('core_placement', ['publishable_id'])
        db.alter_column('core_placement', 'publishable_id',
                        models.IntegerField(null=True))
    def forwards(self, orm):

        # Changing field 'Category.slug'
        db.alter_column(
            'qa_category', 'slug',
            self.gf('django.db.models.fields.SlugField')(unique=True,
                                                         max_length=255))

        # Changing field 'Category.name'
        db.alter_column(
            'qa_category', 'name',
            self.gf('django.db.models.fields.CharField')(unique=True,
                                                         max_length=255))

        # Changing field 'Reference.name'
        db.alter_column(
            'qa_reference', 'name',
            self.gf('django.db.models.fields.CharField')(max_length=255))

        # Changing field 'Test.name'
        db.alter_column(
            'qa_test', 'name',
            self.gf('django.db.models.fields.CharField')(unique=True,
                                                         max_length=255))

        if 'sql_server' in engine:
            sql_server_idxs = (
                ('qa_testlist', 'name'),
                ('qa_testlistcycle', 'name'),
            )
            for table_name, column_name in sql_server_idxs:
                try:
                    db.drop_index(table_name, column_name)
                except:
                    pass
                # sqlserver_utils.drop_index(db,table_name,column_name)

        # Changing field 'TestList.name'
        db.alter_column(
            'qa_testlist', 'name',
            self.gf('django.db.models.fields.CharField')(max_length=255))

        # Changing field 'TestListCycle.name'
        db.alter_column(
            'qa_testlistcycle', 'name',
            self.gf('django.db.models.fields.CharField')(max_length=255))

        if 'sql_server' in engine:
            for table_name, column_name in sql_server_idxs:
                db.create_index(table_name, [column_name])
예제 #5
0
    def backwards(self, orm):
        db.add_column('core_placement', 'target_ct', models.ForeignKey(orm['contenttypes.ContentType'], null=True))
        db.add_column('core_placement', 'target_id', models.IntegerField(null=True))

        db.drop_index('core_placement', ['publishable_id'])
        db.alter_column('core_placement', 'publishable_id', models.IntegerField(null=True))
예제 #6
0
 def backwards(self):
     db.drop_index("x_managedobject_addressprefix")
예제 #7
0
 def forwards(self, orm):
     db.drop_index('hits_mv', ['hits_diff'])
 def backwards(self, orm):
     db.drop_index("sentry_filtervalue", ["project_id", "value", "times_seen"])
 def backwards(self, orm):
     db.drop_index('sentry_filtervalue', ['project_id', 'value', 'first_seen'])
 def backwards(self, orm):
     
     # Changing field 'CrawlAgregates.start_time'
     # (to signature: django.db.models.fields.DateTimeField())
     db.alter_column('main_crawlagregates', 'start_time', orm['main.crawlagregates:start_time'])
     db.drop_index('main_crawlagregates', ['start_time'])
 def backwards(self, orm):
     db.drop_index('hits_mv', ['start_time'])
     db.drop_index('hits_mv', ['crawl_id'])
     db.drop_index('hits_mv', ['group_id'])
 def backwards(self, orm):
     db.drop_index('main_hitgroupcontent', ['group_id'])
 def backwards(self, orm):
     db.drop_index('main_hitgroupstatus', ['group_id'])
 def backwards(self, orm):
     db.drop_index('main_hitgroupcontent', ['group_id'])
예제 #15
0
 def backwards(self, orm):
     db.drop_index('hits_mv', ['hits_diff'])
     pass
 def backwards(self, orm):
     
     # Changing field 'HitGroupContent.requester_id'
     # (to signature: django.db.models.fields.CharField(max_length=50))
     db.drop_index('main_hitgroupcontent', ['requester_id'])
예제 #17
0
def drop_indexes():
    db.drop_index('hits_mv', ['start_time'])
    db.drop_index('hits_mv', ['crawl_id'])
    db.drop_index('hits_mv', ['group_id'])
    db.drop_index('hits_mv', ['is_spam'])
    db.execute("DROP INDEX hits_mv_start_time_group_id;")
예제 #18
0
 def backwards(self, orm):
     db.drop_index('hits_mv', ['hits_diff'])
     pass
예제 #19
0
 def backwards(self, orm):
     db.drop_index('main_hitgroupstatus', ['group_id'])
 def backwards(self, orm):
     db.drop_index('hits_mv', ['start_time'])
     db.drop_index('hits_mv', ['crawl_id'])
     db.drop_index('hits_mv', ['group_id'])
예제 #21
0
 def backwards(self, orm):
     db.drop_index('sentry_filtervalue',
                   ['project_id', 'value', 'first_seen'])
예제 #22
0
    def backwards(self, orm):

        # Changing field 'HitGroupContent.requester_id'
        # (to signature: django.db.models.fields.CharField(max_length=50))
        db.drop_index('main_hitgroupcontent', ['requester_id'])