當前位置: 首頁>>代碼示例>>Python>>正文


Python db.delete_index方法代碼示例

本文整理匯總了Python中south.db.db.delete_index方法的典型用法代碼示例。如果您正苦於以下問題:Python db.delete_index方法的具體用法?Python db.delete_index怎麽用?Python db.delete_index使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在south.db.db的用法示例。


在下文中一共展示了db.delete_index方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: backwards

# 需要導入模塊: from south.db import db [as 別名]
# 或者: from south.db.db import delete_index [as 別名]
def backwards(self, orm):
        
        # Removing index on 'Comment', fields ['reply_content']
        db.delete_index('canvas_comment', ['reply_content_id'])

        # Removing index on 'Comment', fields ['parent_content']
        db.delete_index('canvas_comment', ['parent_content_id'])

        # Renaming column for 'Comment.parent_content' to match new field type.
        db.rename_column('canvas_comment', 'parent_content_id', 'parent_content')
        # Changing field 'Comment.parent_content'
        db.alter_column('canvas_comment', 'parent_content', self.gf('django.db.models.fields.CharField')(max_length=32))

        # Renaming column for 'Comment.reply_content' to match new field type.
        db.rename_column('canvas_comment', 'reply_content_id', 'reply_content')
        # Changing field 'Comment.reply_content'
        db.alter_column('canvas_comment', 'reply_content', self.gf('django.db.models.fields.CharField')(max_length=32)) 
開發者ID:canvasnetworks,項目名稱:canvas,代碼行數:19,代碼來源:0021_auto__chg_field_comment_parent_content__chg_field_comment_reply_conten.py

示例2: backwards

# 需要導入模塊: from south.db import db [as 別名]
# 或者: from south.db.db import delete_index [as 別名]
def backwards(self, orm):
        # Removing index on 'Instance', fields ['xform']
        db.delete_index('odk_logger_instance', ['xform_id', 'is_deleted'])
        # Deleting field 'Instance.is_deleted'
        db.delete_column('odk_logger_instance', 'is_deleted') 
開發者ID:awemulya,項目名稱:kobo-predict,代碼行數:7,代碼來源:0027_added_instance_is_deleted.py

示例3: backwards

# 需要導入模塊: from south.db import db [as 別名]
# 或者: from south.db.db import delete_index [as 別名]
def backwards(self, orm):
        # Removing index on 'Tweet', fields ['created_at']
        db.delete_index(u'twitter_stream_tweet', ['created_at'])

        # Removing index on 'Tweet', fields ['analyzed_by']
        db.delete_index(u'twitter_stream_tweet', ['analyzed_by']) 
開發者ID:michaelbrooks,項目名稱:django-twitter-stream,代碼行數:8,代碼來源:0002_auto__add_index_tweet_analyzed_by__add_index_tweet_created_at.py

示例4: backwards

# 需要導入模塊: from south.db import db [as 別名]
# 或者: from south.db.db import delete_index [as 別名]
def backwards(self, orm):
        # Deleting field 'Event.last_update'
        db.delete_index('backoffice_event', ['last_update'])
        db.delete_column(u'backoffice_event', 'last_update') 
開發者ID:Gandi,項目名稱:baobab,代碼行數:6,代碼來源:0007_auto__add_field_event_last_update.py

示例5: backwards

# 需要導入模塊: from south.db import db [as 別名]
# 或者: from south.db.db import delete_index [as 別名]
def backwards(self, orm):
        # Removing index on 'Speaker', fields ['email']
        db.delete_index(u'pyconkr_speaker', ['email']) 
開發者ID:pythonkr,項目名稱:pyconkr-2014,代碼行數:5,代碼來源:0014_auto__add_index_speaker_email.py

示例6: backwards

# 需要導入模塊: from south.db import db [as 別名]
# 或者: from south.db.db import delete_index [as 別名]
def backwards(self, orm):
        pass
        # Removing index on 'FollowCategory', fields ['user']
        #db.delete_index('canvas_followcategory', ['user_id']) 
開發者ID:canvasnetworks,項目名稱:canvas,代碼行數:6,代碼來源:0095_add_index_followcategory_user.py

示例7: backwards

# 需要導入模塊: from south.db import db [as 別名]
# 或者: from south.db.db import delete_index [as 別名]
def backwards(self, orm):
        db.delete_index('canvas_comment', ['category_id', 'score']) 
開發者ID:canvasnetworks,項目名稱:canvas,代碼行數:4,代碼來源:0099_add_category_score_index.py

示例8: backwards

# 需要導入模塊: from south.db import db [as 別名]
# 或者: from south.db.db import delete_index [as 別名]
def backwards(self, orm):
        
        # Removing index on 'CommentPin', fields ['comment_id', 'user_id']
        db.delete_index('canvas_commentpin', ['comment_id', 'user_id']) 
開發者ID:canvasnetworks,項目名稱:canvas,代碼行數:6,代碼來源:0089_add_index_CommentPin_comment.py


注:本文中的south.db.db.delete_index方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。