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


Python db.delete_column方法代碼示例

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


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

示例1: backwards

# 需要導入模塊: from south.db import db [as 別名]
# 或者: from south.db.db import delete_column [as 別名]
def backwards(self, orm):
        # Deleting model 'Organization'
        db.delete_table(u'crowdataapp_organization')

        # Removing M2M table for field users on 'Organization'
        db.delete_table(db.shorten_name(u'crowdataapp_organization_users'))

        # Deleting field 'DocumentSetFormEntry.organization'
        db.delete_column(u'crowdataapp_documentsetformentry', 'organization_id')

        # Deleting field 'UserProfile.current_organization'
        db.delete_column(u'crowdataapp_userprofile', 'current_organization_id') 
開發者ID:crowdata,項目名稱:crowdata,代碼行數:14,代碼來源:0028_auto__add_organization__add_field_documentsetformentry_organization__a.py

示例2: forwards

# 需要導入模塊: from south.db import db [as 別名]
# 或者: from south.db.db import delete_column [as 別名]
def forwards(self, orm):
        # Adding field 'Document.verified'
        db.add_column(u'crowdataapp_document', 'verified',
                      self.gf('django.db.models.fields.BooleanField')(default=False),
                      keep_default=False)

        # Deleting field 'DocumentSetFieldEntry.valid'
        db.delete_column(u'crowdataapp_documentsetfieldentry', 'valid')

        # Adding field 'DocumentSetFieldEntry.verified'
        db.add_column(u'crowdataapp_documentsetfieldentry', 'verified',
                      self.gf('django.db.models.fields.BooleanField')(default=False),
                      keep_default=False) 
開發者ID:crowdata,項目名稱:crowdata,代碼行數:15,代碼來源:0017_auto__add_field_document_verified__del_field_documentsetfieldentry_val.py

示例3: backwards

# 需要導入模塊: from south.db import db [as 別名]
# 或者: from south.db.db import delete_column [as 別名]
def backwards(self, orm):
        # Deleting field 'Document.verified'
        db.delete_column(u'crowdataapp_document', 'verified')

        # Adding field 'DocumentSetFieldEntry.valid'
        db.add_column(u'crowdataapp_documentsetfieldentry', 'valid',
                      self.gf('django.db.models.fields.BooleanField')(default=False),
                      keep_default=False)

        # Deleting field 'DocumentSetFieldEntry.verified'
        db.delete_column(u'crowdataapp_documentsetfieldentry', 'verified') 
開發者ID:crowdata,項目名稱:crowdata,代碼行數:13,代碼來源:0017_auto__add_field_document_verified__del_field_documentsetfieldentry_val.py

示例4: backwards

# 需要導入模塊: from south.db import db [as 別名]
# 或者: from south.db.db import delete_column [as 別名]
def backwards(self, orm):
        # Deleting field 'DocumentSet.tosum_field'
        db.delete_column(u'crowdataapp_documentset', 'tosum_field_id') 
開發者ID:crowdata,項目名稱:crowdata,代碼行數:5,代碼來源:0027_auto__add_field_documentset_tosum_field.py

示例5: forwards

# 需要導入模塊: from south.db import db [as 別名]
# 或者: from south.db.db import delete_column [as 別名]
def forwards(self, orm):
        # Deleting field 'Document.stored_validity_rate'
        db.delete_column(u'crowdataapp_document', 'stored_validity_rate')

        # Adding field 'Document.entries_threshold_override'
        db.add_column(u'crowdataapp_document', 'entries_threshold_override',
                      self.gf('django.db.models.fields.IntegerField')(null=True),
                      keep_default=False) 
開發者ID:crowdata,項目名稱:crowdata,代碼行數:10,代碼來源:0015_auto__del_field_document_stored_validity_rate__add_field_document_entr.py

示例6: backwards

# 需要導入模塊: from south.db import db [as 別名]
# 或者: from south.db.db import delete_column [as 別名]
def backwards(self, orm):
        # Deleting field 'Organization.slug'
        db.delete_column(u'crowdataapp_organization', 'slug') 
開發者ID:crowdata,項目名稱:crowdata,代碼行數:5,代碼來源:0030_auto__add_field_organization_slug.py

示例7: forwards

# 需要導入模塊: from south.db import db [as 別名]
# 或者: from south.db.db import delete_column [as 別名]
def forwards(self, orm):
        # Deleting field 'DocumentSetRankingDefinition.field'
        db.delete_column(u'crowdataapp_documentsetrankingdefinition', 'field_id')

        # Adding field 'DocumentSetRankingDefinition.label_field'
        db.add_column(u'crowdataapp_documentsetrankingdefinition', 'label_field',
                      self.gf('django.db.models.fields.related.ForeignKey')(default=1, related_name='label_fields', to=orm['crowdataapp.DocumentSetFormField']),
                      keep_default=False)

        # Adding field 'DocumentSetRankingDefinition.magnitude_field'
        db.add_column(u'crowdataapp_documentsetrankingdefinition', 'magnitude_field',
                      self.gf('django.db.models.fields.related.ForeignKey')(default=1, related_name='magnitude_fields', to=orm['crowdataapp.DocumentSetFormField']),
                      keep_default=False) 
開發者ID:crowdata,項目名稱:crowdata,代碼行數:15,代碼來源:0012_auto__del_field_documentsetrankingdefinition_field__add_field_document.py

示例8: backwards

# 需要導入模塊: from south.db import db [as 別名]
# 或者: from south.db.db import delete_column [as 別名]
def backwards(self, orm):
        # Adding field 'DocumentSetRankingDefinition.field'
        db.add_column(u'crowdataapp_documentsetrankingdefinition', 'field',
                      self.gf('django.db.models.fields.related.ForeignKey')(default=1, related_name='fields', to=orm['crowdataapp.DocumentSetFormField']),
                      keep_default=False)

        # Deleting field 'DocumentSetRankingDefinition.label_field'
        db.delete_column(u'crowdataapp_documentsetrankingdefinition', 'label_field_id')

        # Deleting field 'DocumentSetRankingDefinition.magnitude_field'
        db.delete_column(u'crowdataapp_documentsetrankingdefinition', 'magnitude_field_id') 
開發者ID:crowdata,項目名稱:crowdata,代碼行數:13,代碼來源:0012_auto__del_field_documentsetrankingdefinition_field__add_field_document.py

示例9: backwards

# 需要導入模塊: from south.db import db [as 別名]
# 或者: from south.db.db import delete_column [as 別名]
def backwards(self, orm):
        # Deleting field 'DocumentSetRankingDefinition.amount_rows_on_home'
        db.delete_column(u'crowdataapp_documentsetrankingdefinition', 'amount_rows_on_home') 
開發者ID:crowdata,項目名稱:crowdata,代碼行數:5,代碼來源:0021_auto__add_field_documentsetrankingdefinition_amount_rows_on_home__add_.py

示例10: backwards

# 需要導入模塊: from south.db import db [as 別名]
# 或者: from south.db.db import delete_column [as 別名]
def backwards(self, orm):
        # Deleting model 'CanonicalFieldEntryLabel'
        db.delete_table(u'crowdataapp_canonicalfieldentrylabel')

        # Deleting field 'DocumentSetFieldEntry.canonical_label'
        db.delete_column(u'crowdataapp_documentsetfieldentry', 'canonical_label_id') 
開發者ID:crowdata,項目名稱:crowdata,代碼行數:8,代碼來源:0022_auto__add_canonicalfieldentrylabel__add_field_documentsetfieldentry_ca.py

示例11: backwards

# 需要導入模塊: from south.db import db [as 別名]
# 或者: from south.db.db import delete_column [as 別名]
def backwards(self, orm):
        # Deleting field 'DocumentSet.head_html'
        db.delete_column(u'crowdataapp_documentset', 'head_html') 
開發者ID:crowdata,項目名稱:crowdata,代碼行數:5,代碼來源:0005_auto__add_field_documentset_head_html.py

示例12: backwards

# 需要導入模塊: from south.db import db [as 別名]
# 或者: from south.db.db import delete_column [as 別名]
def backwards(self, orm):
        # Deleting field 'DocumentSet.header_image'
        db.delete_column(u'crowdataapp_documentset', 'header_image') 
開發者ID:crowdata,項目名稱:crowdata,代碼行數:5,代碼來源:0020_auto__add_field_documentset_header_image.py

示例13: backwards

# 需要導入模塊: from south.db import db [as 別名]
# 或者: from south.db.db import delete_column [as 別名]
def backwards(self, orm):
        # Adding model 'DocumentUserFormEntry'
        db.create_table(u'crowdataapp_documentuserformentry', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True)),
            ('document', self.gf('django.db.models.fields.related.ForeignKey')(related_name='entries', to=orm['crowdataapp.Document'])),
            ('form_entry', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['forms.FormEntry'])),
        ))
        db.send_create_signal(u'crowdataapp', ['DocumentUserFormEntry'])

        # Deleting field 'DocumentSetFormEntry.document'
        db.delete_column(u'crowdataapp_documentsetformentry', 'document_id')

        # Deleting field 'DocumentSetFormEntry.user'
        db.delete_column(u'crowdataapp_documentsetformentry', 'user_id') 
開發者ID:crowdata,項目名稱:crowdata,代碼行數:17,代碼來源:0003_auto__del_documentuserformentry__add_field_documentsetformentry_docume.py

示例14: backwards

# 需要導入模塊: from south.db import db [as 別名]
# 或者: from south.db.db import delete_column [as 別名]
def backwards(self, orm):
        # Deleting field 'DocumentSetFieldEntry.created_at'
        db.delete_column(u'crowdataapp_documentsetfieldentry', 'created_at')

        # Deleting field 'DocumentSetFieldEntry.updated_at'
        db.delete_column(u'crowdataapp_documentsetfieldentry', 'updated_at') 
開發者ID:crowdata,項目名稱:crowdata,代碼行數:8,代碼來源:0024_auto__add_field_documentsetfieldentry_created_at__add_field_documentse.py

示例15: backwards

# 需要導入模塊: from south.db import db [as 別名]
# 或者: from south.db.db import delete_column [as 別名]
def backwards(self, orm):
        # Deleting field 'CanonicalFieldEntryLabel.document_set'
        db.delete_column(u'crowdataapp_canonicalfieldentrylabel', 'document_set_id') 
開發者ID:crowdata,項目名稱:crowdata,代碼行數:5,代碼來源:0023_auto__add_field_canonicalfieldentrylabel_document_set.py


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