• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python db.delete_index函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: backwards

    def backwards(self, orm):

        # Removing index on 'iSCSITarget', fields ['iscsi_target_initiatorgroup']
        db.delete_index("services_iscsitarget", ["iscsi_target_initiatorgroup_id"])

        # Removing index on 'iSCSITarget', fields ['iscsi_target_portalgroup']
        db.delete_index("services_iscsitarget", ["iscsi_target_portalgroup_id"])

        # Renaming column for 'iSCSITarget.iscsi_target_portalgroup' to match new field type.
        db.rename_column("services_iscsitarget", "iscsi_target_portalgroup_id", "iscsi_target_portalgroup")
        # Changing field 'iSCSITarget.iscsi_target_portalgroup'
        db.alter_column(
            "services_iscsitarget",
            "iscsi_target_portalgroup",
            self.gf("django.db.models.fields.IntegerField")(max_length=120),
        )

        # Renaming column for 'iSCSITarget.iscsi_target_initiatorgroup' to match new field type.
        db.rename_column("services_iscsitarget", "iscsi_target_initiatorgroup_id", "iscsi_target_initiatorgroup")
        # Changing field 'iSCSITarget.iscsi_target_initiatorgroup'
        db.alter_column(
            "services_iscsitarget",
            "iscsi_target_initiatorgroup",
            self.gf("django.db.models.fields.IntegerField")(max_length=120),
        )
开发者ID:BillTheBest,项目名称:MetaNAS,代码行数:25,代码来源:0017_auto__chg_field_iscsitarget_iscsi_target_portalgroup__chg_field_iscsit.py


示例17: backwards

    def backwards(self, orm):
        try:
            # Removing index on 'PricingObject', fields ['type']
            db.delete_index(u'ralph_scrooge_pricingobject', ['type_id'])
        except utils.DatabaseError:
            pass

        # Removing unique constraint on 'TeamManager', fields ['manager', 'team']
        db.delete_unique(u'ralph_scrooge_teammanager', ['manager_id', 'team_id'])

        # Deleting model 'PricingObjectType'
        db.delete_table(u'ralph_scrooge_pricingobjecttype')

        # Deleting model 'PricingObjectModel'
        db.delete_table(u'ralph_scrooge_pricingobjectmodel')

        # Deleting model 'TeamManager'
        db.delete_table(u'ralph_scrooge_teammanager')

        # Adding field 'AssetInfo.model'
        db.rename_column(u'ralph_scrooge_assetinfo', 'model_old_id', 'model_id')

        # Adding field 'PricingObject.color'
        db.add_column(u'ralph_scrooge_pricingobject', 'color',
                      self.gf('django.db.models.fields.PositiveIntegerField')(default=255),
                      keep_default=False)

        # Deleting field 'PricingObject.model'
        db.delete_column(u'ralph_scrooge_pricingobject', 'model_id')

        # Renaming column for 'PricingObject.type' to match new field type.
        db.rename_column(u'ralph_scrooge_pricingobject', 'type_id', 'type')
        # Changing field 'PricingObject.type'
        db.alter_column(u'ralph_scrooge_pricingobject', 'type', self.gf('django.db.models.fields.PositiveIntegerField')())
开发者ID:allegro,项目名称:ralph_pricing,代码行数:34,代码来源:0005_auto__add_pricingobjecttype__add_pricingobjectmodel__add_teammanager__.py


示例18: backwards

    def backwards(self, orm):
        # Removing index on 'Interval', fields ['IntervalSerialNumber']
        db.delete_index(u'srb_interval', ['IntervalSerialNumber'])


        # Changing field 'Interval.IntervalSerialNumber'
        db.alter_column(u'srb_interval', 'IntervalSerialNumber', self.gf('django.db.models.fields.IntegerField')(max_length=45))
开发者ID:alvinwt,项目名称:DjangoSRBdB,代码行数:7,代码来源:0100_auto__chg_field_interval_IntervalSerialNumber__add_index_interval_Inte.py


示例19: backwards

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


        # Changing field 'Song.slug'
        db.alter_column(u'lyrics_song', 'slug', self.gf('django.db.models.fields.CharField')(max_length=30, unique=True))
开发者ID:iansjk,项目名称:samidare,代码行数:7,代码来源:0007_auto__chg_field_song_slug__add_index_song_slug.py


示例20: backwards

    def backwards(self, orm):
        # Removing index on 'Representative', fields ['faction']
        db.delete_index('representative_representative', ['faction_id'])

        # Deleting model 'Faction'
        db.delete_table('representative_faction')

        # Adding field 'Representative.faction_en'
        db.add_column('representative_representative', 'faction_en',
                      self.gf('django.db.models.fields.TextField')(null=True, blank=True),
                      keep_default=False)

        # Adding field 'Representative.faction_ka'
        db.add_column('representative_representative', 'faction_ka',
                      self.gf('django.db.models.fields.TextField')(null=True, blank=True),
                      keep_default=False)


        # Renaming column for 'Representative.faction' to match new field type.
        db.rename_column('representative_representative', 'faction_id', 'faction')
        # Changing field 'Representative.faction'
        db.alter_column('representative_representative', 'faction', self.gf('django.db.models.fields.TextField')(null=True))
        # Adding M2M table for field parties on 'Cabinet'
        m2m_table_name = db.shorten_name('representative_cabinet_parties')
        db.create_table(m2m_table_name, (
            ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
            ('cabinet', models.ForeignKey(orm['representative.cabinet'], null=False)),
            ('party', models.ForeignKey(orm['representative.party'], null=False))
        ))
        db.create_unique(m2m_table_name, ['cabinet_id', 'party_id'])

        # Removing M2M table for field factions on 'Cabinet'
        db.delete_table(db.shorten_name('representative_cabinet_factions'))
开发者ID:araneta,项目名称:shenmartav,代码行数:33,代码来源:0024_auto__add_faction__del_field_representative_faction_en__del_field_repr.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python db.delete_table函数代码示例发布时间:2022-05-27
下一篇:
Python db.delete_foreign_key函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap