当前位置: 首页>>代码示例>>Python>>正文


Python db.delete_index函数代码示例

本文整理汇总了Python中south.db.db.delete_index函数的典型用法代码示例。如果您正苦于以下问题:Python delete_index函数的具体用法?Python delete_index怎么用?Python delete_index使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了delete_index函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: backwards

    def backwards(self, orm):

        # Removing index on 'EntityGroupName', fields ['language_code']
        db.delete_index("places_entitygroupname", ["language_code"])

        # Removing index on 'EntityTypeName', fields ['language_code']
        db.delete_index("places_entitytypename", ["language_code"])
开发者ID:RCGTDev,项目名称:mollyproject,代码行数:7,代码来源:0015_add_index_EntityTypeName_language_code_add_index_EntityGroupName_language_code.py

示例2: backwards

    def backwards(self, orm):
        # Removing index on 'ImageCropApplication', fields ['content_type', 'object_id', 'field_name']
        db.delete_index(u'mediacat_imagecropapplication', ['content_type_id', 'object_id', 'field_name'])

        # Removing unique constraint on 'ImageCropApplication', fields ['content_type', 'object_id', 'field_name']
        db.delete_unique(u'mediacat_imagecropapplication', ['content_type_id', 'object_id', 'field_name'])

        # Removing index on 'ImageAssociation', fields ['image', 'content_type', 'object_id']
        db.delete_index(u'mediacat_imageassociation', ['image_id', 'content_type_id', 'object_id'])

        # Removing unique constraint on 'ImageAssociation', fields ['image', 'content_type', 'object_id']
        db.delete_unique(u'mediacat_imageassociation', ['image_id', 'content_type_id', 'object_id'])

        # Deleting model 'Image'
        db.delete_table(u'mediacat_image')

        # Deleting model 'ImageMetadata'
        db.delete_table(u'mediacat_imagemetadata')

        # Deleting model 'ImageAssociation'
        db.delete_table(u'mediacat_imageassociation')

        # Deleting model 'ImageCrop'
        db.delete_table(u'mediacat_imagecrop')

        # Deleting model 'ImageCropApplication'
        db.delete_table(u'mediacat_imagecropapplication')
开发者ID:gitter-badger,项目名称:django-mediacat,代码行数:27,代码来源:0001_initial.py

示例3: backwards

    def backwards(self, orm):
        # Removing index on 'CampusApplication', fields ['access_token']
        db.delete_index(u'permissions_campusapplication', ['access_token'])


        # Changing field 'CampusApplication.access_token'
        db.alter_column(u'permissions_campusapplication', 'access_token', self.gf('django.db.models.fields.CharField')(max_length=36))
开发者ID:kpi-ua,项目名称:campus.security-service,代码行数:7,代码来源:0006_auto__chg_field_campusapplication_access_token__add_index_campusapplic.py

示例4: backwards

    def backwards(self, orm):
        
        # Removing index on 'Page', fields ['titre_url']
        db.delete_index('story_page', ['titre_url'])

        # Changing field 'Page.titre_url'
        db.alter_column('story_page', 'titre_url', self.gf('django.db.models.fields.CharField')(max_length=32))
开发者ID:MrGecko,项目名称:jpdebonbon,代码行数:7,代码来源:0002_auto__chg_field_page_titre_url.py

示例5: backwards

    def backwards(self, orm):
        
        # Adding field 'SellerRateChart.ext_category_id'
        db.add_column('catalog_sellerratechart', 'ext_category_id', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True), keep_default=False)

        # Adding field 'SellerRateChart.ext_category_name'
        db.add_column('catalog_sellerratechart', 'ext_category_name', self.gf('django.db.models.fields.CharField')(default='', max_length=25, blank=True), keep_default=False)

        # Adding field 'SellerRateChart.unit_list_price'
        db.add_column('catalog_sellerratechart', 'unit_list_price', self.gf('django.db.models.fields.DecimalField')(null=True, max_digits=10, decimal_places=2), keep_default=False)

        # Adding field 'SellerRateChart.unit_offer_price'
        db.add_column('catalog_sellerratechart', 'unit_offer_price', self.gf('django.db.models.fields.DecimalField')(null=True, max_digits=10, decimal_places=2), keep_default=False)

        # Adding field 'SellerRateChart.old_id'
        db.add_column('catalog_sellerratechart', 'old_id', self.gf('django.db.models.fields.CharField')(default='', max_length=40, blank=True), keep_default=False)

        # Adding field 'SellerRateChart.unit_transfer_price'
        db.add_column('catalog_sellerratechart', 'unit_transfer_price', self.gf('django.db.models.fields.DecimalField')(null=True, max_digits=10, decimal_places=2), keep_default=False)

        # Deleting field 'SellerRateChart.list_price'
        db.delete_column('catalog_sellerratechart', 'list_price')

        # Deleting field 'SellerRateChart.transfer_price'
        db.delete_column('catalog_sellerratechart', 'transfer_price')

        # Deleting field 'SellerRateChart.offer_price'
        db.delete_column('catalog_sellerratechart', 'offer_price')

        # Deleting field 'SellerRateChart.status'
        db.delete_column('catalog_sellerratechart', 'status')

        # Removing index on 'SellerRateChart', fields ['sku']
        db.delete_index('catalog_sellerratechart', ['sku'])
开发者ID:Morphnus-IT-Solutions,项目名称:riba,代码行数:34,代码来源:0013_auto__del_field_sellerratechart_ext_category_id__del_field_sellerratec.py

示例6: backwards

    def backwards(self, orm):
        # Removing index on 'Admin1Code', fields ['code']
        db.delete_index('geonames_admin1code', ['code'])


        # Changing field 'Admin1Code.code'
        db.alter_column('geonames_admin1code', 'code', self.gf('django.db.models.fields.CharField')(max_length=6))
开发者ID:danfairs,项目名称:django-geonames,代码行数:7,代码来源:0002_auto__chg_field_admin1code_code.py

示例7: backwards

    def backwards(self, orm):
        
        # Removing index on 'ScriptAttribute', fields ['db_key']
        db.delete_index('scripts_scriptattribute', ['db_key'])

        # Removing index on 'ScriptDB', fields ['db_key']
        db.delete_index('scripts_scriptdb', ['db_key'])
开发者ID:Aumnren,项目名称:evennia,代码行数:7,代码来源:0004_auto.py

示例8: backwards

    def backwards(self, orm):
        # Removing index on 'Sponsor', fields ['organization']
        db.delete_index(u'sponsor_sponsor', ['organization_id'])

        # Deleting model 'Organization'
        db.delete_table(u'sponsor_organization')

        # Adding field 'Sponsor.name_user'
        db.add_column(u'sponsor_sponsor', 'name_user',
                      self.gf('django.db.models.fields.CharField')(default=1, max_length=50),
                      keep_default=False)

        # Adding field 'Sponsor.join_date'
        db.add_column(u'sponsor_sponsor', 'join_date',
                      self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, default=1, blank=True),
                      keep_default=False)

        # Adding field 'Sponsor.password'
        db.add_column(u'sponsor_sponsor', 'password',
                      self.gf('django.db.models.fields.CharField')(default=1, max_length=50),
                      keep_default=False)

        # Adding field 'Sponsor.email'
        db.add_column(u'sponsor_sponsor', 'email',
                      self.gf('django.db.models.fields.EmailField')(default=1, max_length=75, unique=True),
                      keep_default=False)

        # Deleting field 'Sponsor.user'
        db.delete_column(u'sponsor_sponsor', 'user_id')


        # Renaming column for 'Sponsor.organization' to match new field type.
        db.rename_column(u'sponsor_sponsor', 'organization_id', 'organization')
        # Changing field 'Sponsor.organization'
        db.alter_column(u'sponsor_sponsor', 'organization', self.gf('django.db.models.fields.CharField')(max_length=50))
开发者ID:darkmatter08,项目名称:Kommonly,代码行数:35,代码来源:0006_auto__add_organization__del_field_sponsor_name_user__del_field_sponsor.py

示例9: backwards

    def backwards(self, orm):
        # Removing index on 'ThreadedComment', fields ['object_pk']
        db.delete_index('threadedcomments_comment', ['object_pk'])


        # Changing field 'ThreadedComment.object_pk'
        db.alter_column('threadedcomments_comment', 'object_pk', self.gf('django.db.models.fields.TextField')())
开发者ID:SmithsonianEnterprises,项目名称:django-threadedcomments,代码行数:7,代码来源:0002_auto__chg_field_threadedcomment_object_pk__add_index_threadedcomment_o.py

示例10: backwards

    def backwards(orm):
        if django.VERSION[0] == 1 and django.VERSION[1] > 4:
            # Removing index on 'Email', fields ['content_type', 'object_id']
            db.delete_index(u'sendgrid_email', ['content_type_id', 'object_id'])

        # Deleting model 'Email'
        db.delete_table(u'sendgrid_email')
开发者ID:resmio,项目名称:django-sendgrid,代码行数:7,代码来源:0001_initial.py

示例11: backwards

    def backwards(self, orm):
        # Removing index on 'Invoice', fields ['state']
        db.delete_index('invoice_invoice', ['state'])

        # Deleting field 'Row.identifier'
        db.delete_column('invoice_row', 'identifier')

        # Deleting field 'Row.title'
        db.delete_column('invoice_row', 'title')

        # Deleting field 'Row.price'
        db.delete_column('invoice_row', 'price')

        # Deleting field 'Row.currency'
        db.delete_column('invoice_row', 'currency_id')


        # Changing field 'Row.deal'
        db.alter_column('invoice_row', 'deal_id', self.gf('django.db.models.fields.related.ForeignKey')(default=1, to=orm['deals.Deal']))
        # Deleting field 'Invoice.title'
        db.delete_column('invoice_invoice', 'title')


        # Changing field 'Invoice.our_reference'
        db.alter_column('invoice_invoice', 'our_reference_id', self.gf('django.db.models.fields.related.ForeignKey')(null=True, to=orm['accounts.UserProfile']))

        # Changing field 'Invoice.your_reference'
        db.alter_column('invoice_invoice', 'your_reference_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['accounts.UserProfile']))
开发者ID:hayk912,项目名称:bidpart,代码行数:28,代码来源:0008_auto__add_field_row_identifier__add_field_row_title__add_field_row_pri.py

示例12: backwards

    def backwards(self, orm):
        # Removing index on 'Institution', fields ['institution_id', 'year']
        db.delete_index(u'respondents_institution', ['institution_id', 'year'])

        # Removing unique constraint on 'Institution', fields ['institution_id', 'year']
        db.delete_unique(u'respondents_institution', ['institution_id', 'year'])

        # Removing unique constraint on 'ZipcodeCityState', fields ['zip_code', 'city']
        db.delete_unique(u'respondents_zipcodecitystate', ['zip_code', 'city'])

        # Deleting model 'ZipcodeCityState'
        db.delete_table(u'respondents_zipcodecitystate')

        # Deleting model 'Agency'
        db.delete_table(u'respondents_agency')

        # Deleting model 'ParentInstitution'
        db.delete_table(u'respondents_parentinstitution')

        # Deleting model 'Institution'
        db.delete_table(u'respondents_institution')

        # Deleting model 'LenderHierarchy'
        db.delete_table(u'respondents_lenderhierarchy')

        # Deleting model 'Branch'
        db.delete_table(u'respondents_branch')
开发者ID:mehtadev17,项目名称:mapusaurus,代码行数:27,代码来源:0001_initial.py

示例13: backwards

    def backwards(self, orm):
        # Removing index on 'Restaurant', fields ['location']
        db.delete_index(u'api_restaurant', ['location_id'])

        # Adding model 'Restaurant_Holiday'
        db.create_table(u'api_restaurant_holiday', (
            ('closed_date', self.gf('django.db.models.fields.DateTimeField')()),
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('restaurant', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['api.Restaurant'])),
        ))
        db.send_create_signal(u'api', ['Restaurant_Holiday'])

        # Deleting model 'RestaurantOpenHours'
        db.delete_table(u'api_restaurantopenhours')

        # Deleting model 'RestaurantHoliday'
        db.delete_table(u'api_restaurantholiday')

        # Deleting model 'Location'
        db.delete_table(u'api_location')

        # Adding field 'Restaurant.closed_every_other_weekend_initial_weekend'
        db.add_column(u'api_restaurant', 'closed_every_other_weekend_initial_weekend',
                      self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True),
                      keep_default=False)

        # Deleting field 'Restaurant.closed_every_other_weekend_initial_weekend_sat'
        db.delete_column(u'api_restaurant', 'closed_every_other_weekend_initial_weekend_sat')


        # Renaming column for 'Restaurant.location' to match new field type.
        db.rename_column(u'api_restaurant', 'location_id', 'location')
        # Changing field 'Restaurant.location'
        db.alter_column(u'api_restaurant', 'location', self.gf('django.db.models.fields.IntegerField')())
开发者ID:heronyang,项目名称:plate-api,代码行数:34,代码来源:0007_auto__del_restaurant_holiday__add_restaurantopenhours__add_restauranth.py

示例14: backwards

    def backwards(self, orm):
        # Removing index on 'ProductTranslation', fields ['slug']
        db.delete_index(u'products_product_translation', ['slug'])


        # Changing field 'ProductTranslation.slug'
        db.alter_column(u'products_product_translation', 'slug', self.gf('django.db.models.fields.CharField')(max_length=128))
开发者ID:ShaunS92,项目名称:staff-app-demo,代码行数:7,代码来源:0003_auto__chg_field_producttranslation_slug__add_index_producttranslation_.py

示例15: backwards

    def backwards(self, orm):
        
        # Removing index on 'Spell', fields ['altname']
        db.delete_index('spell', ['altname'])

        # Changing field 'Spell.altname'
        db.alter_column('spell', 'altname', self.gf('django.db.models.fields.CharField')(max_length=64))
开发者ID:PathfinderRPG,项目名称:django-srd20,代码行数:7,代码来源:0005_auto__chg_field_spell_altname.py


注:本文中的south.db.db.delete_index函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。