当前位置: 首页>>代码示例>>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;未经允许,请勿转载。