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


Python db.delete_table方法代碼示例

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


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

示例1: backwards

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

        # Deleting model 'FlickrUser'
        db.delete_table(u'photos_flickruser')

        # Deleting model 'PhotoLightStack'
        db.delete_table(u'photos_photolightstack')

        # Deleting model 'Photo'
        db.delete_table(u'photos_photo')

        # Deleting model 'PhotoSceneQualityLabel'
        db.delete_table(u'photos_photoscenequalitylabel')

        # Deleting model 'PhotoWhitebalanceLabel'
        db.delete_table(u'photos_photowhitebalancelabel') 
開發者ID:seanbell,項目名稱:opensurfaces,代碼行數:20,代碼來源:0001_initial.py

示例2: forwards

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

        # Deleting model 'ScagLandUse'
        db.delete_table(u'main_scaglanduse')

        # Adding model 'ScagDmLandUseDefinition'
        db.create_table(u'main_scagdmlandusedefinition', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('land_use_description', self.gf('django.db.models.fields.CharField')(max_length=100, null=True, blank=True)),
            ('land_use_type', self.gf('django.db.models.fields.CharField')(max_length=100, null=True, blank=True)),
            ('land_use', self.gf('django.db.models.fields.IntegerField')()),
        ))
        db.send_create_signal('main', ['ScagDmLandUseDefinition'])

        # Adding model 'ScagDmLandUse'
        db.create_table(u'main_scagdmlanduse', (
            (u'builtform_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['main.BuiltForm'], unique=True, primary_key=True)),
            ('land_use_definition', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['main.ScagDmLandUseDefinition'])),
        ))
        db.send_create_signal('main', ['ScagDmLandUse']) 
開發者ID:CalthorpeAnalytics,項目名稱:urbanfootprint,代碼行數:24,代碼來源:0009_auto__del_scaglandusedefinition__del_scaglanduse__add_scagdmlandusedef.py

示例3: backwards

# 需要導入模塊: from south.db import db [as 別名]
# 或者: from south.db.db import delete_table [as 別名]
def backwards(self, orm):
        # Adding model 'ScagLandUseDefinition'
        db.create_table(u'main_scaglandusedefinition', (
            ('land_use_description', self.gf('django.db.models.fields.CharField')(max_length=100, null=True, blank=True)),
            ('land_use_type', self.gf('django.db.models.fields.CharField')(max_length=100, null=True, blank=True)),
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('land_use', self.gf('django.db.models.fields.IntegerField')()),
        ))
        db.send_create_signal('main', ['ScagLandUseDefinition'])

        # Adding model 'ScagLandUse'
        db.create_table(u'main_scaglanduse', (
            (u'builtform_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['main.BuiltForm'], unique=True, primary_key=True)),
            ('land_use_definition', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['main.ScagLandUseDefinition'])),
        ))
        db.send_create_signal('main', ['ScagLandUse'])

        # Deleting model 'ScagDmLandUseDefinition'
        db.delete_table(u'main_scagdmlandusedefinition')

        # Deleting model 'ScagDmLandUse'
        db.delete_table(u'main_scagdmlanduse') 
開發者ID:CalthorpeAnalytics,項目名稱:urbanfootprint,代碼行數:24,代碼來源:0009_auto__del_scaglandusedefinition__del_scaglanduse__add_scagdmlandusedef.py

示例4: backwards

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

        # Deleting model 'Event'
        db.delete_table(u'backoffice_event')

        # Removing M2M table for field services on 'Event'
        db.delete_table('backoffice_event_services')

        # Deleting model 'EventLog'
        db.delete_table(u'backoffice_eventlog')

        # Deleting model 'TimeZoneEnum'
        db.delete_table(u'backoffice_timezoneenum')

        # Deleting model 'TimeZone'
        db.delete_table(u'backoffice_timezone') 
開發者ID:Gandi,項目名稱:baobab,代碼行數:20,代碼來源:0001_initial.py

示例5: backwards

# 需要導入模塊: from south.db import db [as 別名]
# 或者: from south.db.db import delete_table [as 別名]
def backwards(self, orm):
        # Removing unique constraint on 'EventLogData', fields ['eventlog',
        # 'lang']
        db.delete_unique('translate_eventlogdata', ['eventlog_id', 'lang_id'])

        # Removing unique constraint on 'EventData', fields ['event', 'lang']
        db.delete_unique('translate_eventdata', ['event_id', 'lang_id'])

        # Deleting model 'Lang'
        db.delete_table('translate_lang')

        # Deleting model 'EventData'
        db.delete_table('translate_eventdata')

        # Deleting model 'EventLogData'
        db.delete_table('translate_eventlogdata') 
開發者ID:Gandi,項目名稱:baobab,代碼行數:18,代碼來源:0001_initial.py

示例6: backwards

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

        # Deleting model 'ForumThread'
        db.delete_table('forums_forumthread')

        # Removing M2M table for field tags on 'ForumThread'
        db.delete_table('forums_forumthread_tags')

        # Deleting model 'ForumMessage'
        db.delete_table('forums_forummessage')

        # Removing M2M table for field tags on 'ForumMessage'
        db.delete_table('forums_forummessage_tags')

        # Deleting model 'ForumTag'
        db.delete_table('forums_forumtag') 
開發者ID:hacktoolkit,項目名稱:django-htk,代碼行數:20,代碼來源:0001_initial.py

示例7: backwards

# 需要導入模塊: from south.db import db [as 別名]
# 或者: from south.db.db import delete_table [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

示例8: backwards

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

示例9: backwards

# 需要導入模塊: from south.db import db [as 別名]
# 或者: from south.db.db import delete_table [as 別名]
def backwards(self, orm):
        # Deleting model 'UserProfile'
        db.delete_table(u'crowdataapp_userprofile') 
開發者ID:crowdata,項目名稱:crowdata,代碼行數:5,代碼來源:0010_auto__add_userprofile.py

示例10: backwards

# 需要導入模塊: from south.db import db [as 別名]
# 或者: from south.db.db import delete_table [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_table [as 別名]
def backwards(self, orm):
        # Deleting model 'DocumentSetFieldEntry'
        db.delete_table(u'crowdataapp_documentsetfieldentry') 
開發者ID:crowdata,項目名稱:crowdata,代碼行數:5,代碼來源:0002_auto__add_documentsetfieldentry.py

示例12: forwards

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

        # Adding field 'DocumentSetFormEntry.document'
        db.add_column(u'crowdataapp_documentsetformentry', 'document',
                      self.gf('django.db.models.fields.related.ForeignKey')(default=1, related_name='form_entries', to=orm['crowdataapp.Document']),
                      keep_default=False)

        # Adding field 'DocumentSetFormEntry.user'
        db.add_column(u'crowdataapp_documentsetformentry', 'user',
                      self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True),
                      keep_default=False) 
開發者ID:crowdata,項目名稱:crowdata,代碼行數:15,代碼來源:0003_auto__del_documentuserformentry__add_field_documentsetformentry_docume.py

示例13: backwards

# 需要導入模塊: from south.db import db [as 別名]
# 或者: from south.db.db import delete_table [as 別名]
def backwards(self, orm):
        # Deleting model 'AccessAttempt'
        db.delete_table("defender_accessattempt") 
開發者ID:jazzband,項目名稱:django-defender,代碼行數:5,代碼來源:0001_initial.py

示例14: backwards

# 需要導入模塊: from south.db import db [as 別名]
# 或者: from south.db.db import delete_table [as 別名]
def backwards(self, orm):
        # Deleting model 'ForeignModel'
        db.delete_table(u'test_app_foreignmodel') 
開發者ID:plumdog,項目名稱:django_migration_testcase,代碼行數:5,代碼來源:0005_auto__add_foreignmodel.py

示例15: backwards

# 需要導入模塊: from south.db import db [as 別名]
# 或者: from south.db.db import delete_table [as 別名]
def backwards(self, orm):
        # Deleting model 'MySecondModel'
        db.delete_table('test_app_mysecondmodel') 
開發者ID:plumdog,項目名稱:django_migration_testcase,代碼行數:5,代碼來源:0006_auto__add_mysecondmodel.py


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