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

Python db.delete_unique函数代码示例

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

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



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

示例1: backwards

    def backwards(self, orm):
        
        # Removing unique constraint on 'StateValueArgument', fields ['state_value', 'method_parameter']
        db.delete_unique('core_statevalueargument', ['state_value_id', 'method_parameter_id'])

        # Deleting model 'StateValueArgument'
        db.delete_table('core_statevalueargument')
开发者ID:socialdevices,项目名称:manager,代码行数:7,代码来源:0011_auto__add_statevalueargument__add_unique_statevalueargument_state_valu.py


示例2: forwards

    def forwards(self, orm):
        
        # Removing unique constraint on 'Task', fields ['model_solution']
        db.delete_unique('tasks_task', ['model_solution_id'])

        # Changing field 'Task.model_solution'
        db.alter_column('tasks_task', 'model_solution_id', self.gf('django.db.models.fields.related.ForeignKey')(null=True, to=orm['solutions.Solution']))
开发者ID:juliushaertl,项目名称:Praktomat,代码行数:7,代码来源:0005_auto__chg_field_task_model_solution__del_unique_task_model_solution.py


示例3: backwards

    def backwards(self, orm):
        
        # Removing unique constraint on 'LegMinutes', fields ['id']
        db.delete_unique('phillyleg_legminutes', ['id'])

        # Adding field 'LegAction.minutes'
        db.add_column('phillyleg_legaction', 'minutes', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['phillyleg.LegMinutes'], null=True), keep_default=False)
开发者ID:Alexander-M-Waldman,项目名称:councilmatic,代码行数:7,代码来源:0011_auto__del_field_legaction_minutes__add_field_legaction_minutes_tmpid__.py


示例4: backwards

    def backwards(self, orm):
        
        # Removing unique constraint on 'NewsTranslation', fields ['content_type', 'object_id', 'language']
        db.delete_unique('reviewapp_newstranslation', ['content_type_id', 'object_id', 'language'])

        # Deleting model 'NewsTranslation'
        db.delete_table('reviewapp_newstranslation')
开发者ID:AnaBiel,项目名称:opentrials,代码行数:7,代码来源:0002_news_translations.py


示例5: backwards

    def backwards(self, orm):

        # Removing unique constraint on 'GroupBookmark', fields ['project', 'user', 'group']
        db.delete_unique('sentry_groupbookmark', ['project_id', 'user_id', 'group_id'])

        # Deleting model 'GroupBookmark'
        db.delete_table('sentry_groupbookmark')
开发者ID:CaseCommonsDevOps,项目名称:sentry,代码行数:7,代码来源:0034_auto__add_groupbookmark__add_unique_groupbookmark_project_user_group.py


示例6: backwards

    def backwards(self, orm):

        # Removing unique constraint on 'ProjectDomain', fields ['project', 'domain']
        db.delete_unique('sentry_projectdomain', ['project_id', 'domain'])

        # Deleting model 'ProjectDomain'
        db.delete_table('sentry_projectdomain')
开发者ID:280185386,项目名称:sentry,代码行数:7,代码来源:0020_auto__add_projectdomain__add_unique_projectdomain_project_domain.py


示例7: forwards

    def forwards(self, orm):
        
        # Removing unique constraint on 'SMARTTest', fields ['smarttest_type', 'smarttest_disk']
        db.delete_unique('system_smarttest', ['smarttest_type', 'smarttest_disk_id'])

        # Deleting field 'SMARTTest.smarttest_disk'
        db.delete_column('system_smarttest', 'smarttest_disk_id')
开发者ID:650elx,项目名称:middleware,代码行数:7,代码来源:0039_auto__del_field_smarttest_smarttest_disk__del_unique_smarttest_smartte.py


示例8: backwards

    def backwards(self, orm):
        # Removing unique constraint on 'Cart', fields ['serial_number']
        db.delete_unique('cartmanager_cart', ['serial_number'])


        # Changing field 'Cart.serial_number'
        db.alter_column('cartmanager_cart', 'serial_number', self.gf('django.db.models.fields.CharField')(max_length=30, null=True))
开发者ID:andytus,项目名称:cascade,代码行数:7,代码来源:0016_auto__chg_field_cart_serial_number__add_unique_cart_serial_number.py


示例9: backwards

    def backwards(self, orm):
        # Removing unique constraint on 'UnitStats', fields ['unit']
        db.delete_unique(u'Results_unitstats', ['unit_id'])


        # Changing field 'UnitStats.unit'
        db.alter_column(u'Results_unitstats', 'unit_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ScenarioCreator.Unit']))
开发者ID:sniperpj21,项目名称:SpreadModel,代码行数:7,代码来源:0011_auto__chg_field_unitstats_unit__add_unique_unitstats_unit.py


示例10: forwards

    def forwards(self, orm):
        # Removing unique constraint on 'Event', fields ['slug']
        db.delete_unique(u'aldryn_events_event', ['slug'])

        # Adding field 'EventTranslation.slug_new'
        db.add_column(u'aldryn_events_event_translation', 'slug_new',
                      self.gf('django.db.models.fields.SlugField')(default='', max_length=150, blank=True),
                      keep_default=False)

        # Adding field 'EventTranslation.description_new'
        db.add_column(u'aldryn_events_event_translation', 'description_new',
                      self.gf('django.db.models.fields.related.ForeignKey')(to=orm['cms.Placeholder'], null=True),
                      keep_default=False)

        # Adding field 'EventTranslation.image_new'
        db.add_column(u'aldryn_events_event_translation', 'image_new',
                      self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='event_images', null=True, on_delete=models.SET_NULL, to=orm['filer.Image']),
                      keep_default=False)

        # Adding field 'EventTranslation.flyer_new'
        db.add_column(u'aldryn_events_event_translation', 'flyer_new',
                      self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='event_flyers', null=True, on_delete=models.SET_NULL, to=orm['filer.File']),
                      keep_default=False)


        # Changing field 'Event.slug'
        db.alter_column(u'aldryn_events_event', 'slug', self.gf('django.db.models.fields.SlugField')(max_length=150, null=True))
开发者ID:Marketionist,项目名称:aldryn-events,代码行数:27,代码来源:0011_auto__add_field_eventtranslation_slug_new__add_field_eventtranslation_.py


示例11: backwards

    def backwards(self, orm):
        # Removing unique constraint on 'Field', fields ['_pass', 'key']
        db.delete_unique('passbook_field', ['_pass_id', 'key'])

        # Deleting model 'Signer'
        db.delete_table('passbook_signer')

        # Deleting model 'Pass'
        db.delete_table('passbook_pass')

        # Removing M2M table for field locations on 'Pass'
        db.delete_table('passbook_pass_locations')

        # Deleting model 'Barcode'
        db.delete_table('passbook_barcode')

        # Deleting model 'Field'
        db.delete_table('passbook_field')

        # Deleting model 'Location'
        db.delete_table('passbook_location')

        # Deleting model 'Device'
        db.delete_table('passbook_device')

        # Removing M2M table for field passes on 'Device'
        db.delete_table('passbook_device_passes')
开发者ID:timtan,项目名称:django-passbook,代码行数:27,代码来源:0001_initial.py


示例12: backwards

    def backwards(self, orm):
        
        # Removing unique constraint on 'SiteLeader', fields ['last_name', 'first_name']
        db.delete_unique('bhp_research_protocol_siteleader', ['last_name', 'first_name'])

        # Removing unique constraint on 'PrincipalInvestigator', fields ['last_name', 'first_name']
        db.delete_unique('bhp_research_protocol_principalinvestigator', ['last_name', 'first_name'])

        # Deleting model 'FundingSource'
        db.delete_table('bhp_research_protocol_fundingsource')

        # Deleting model 'PrincipalInvestigator'
        db.delete_table('bhp_research_protocol_principalinvestigator')

        # Deleting model 'SiteLeader'
        db.delete_table('bhp_research_protocol_siteleader')

        # Deleting model 'Protocol'
        db.delete_table('bhp_research_protocol_protocol')

        # Removing M2M table for field prinicipal_investigator on 'Protocol'
        db.delete_table('bhp_research_protocol_protocol_prinicipal_investigator')

        # Removing M2M table for field site_leader on 'Protocol'
        db.delete_table('bhp_research_protocol_protocol_site_leader')

        # Removing M2M table for field funding_source on 'Protocol'
        db.delete_table('bhp_research_protocol_protocol_funding_source')
开发者ID:botswana-harvard,项目名称:lis,代码行数:28,代码来源:0001_initial.py


示例13: forwards

    def forwards(self, orm):

        # Removing unique constraint on 'ProductStockUnit', fields ['product', 'stock']
        db.delete_unique('catalog_productstockunit', ['product_id', 'stock'])

        # Adding unique constraint on 'ProductStockUnit', fields ['product', 'pending', 'stock']
        db.create_unique('catalog_productstockunit', ['product_id', 'pending', 'stock'])
开发者ID:alexgula,项目名称:django_sites,代码行数:7,代码来源:0006_auto__del_unique_productstockunit_product_stock__add_unique_productsto.py


示例14: forwards

    def forwards(self, orm):
        # Removing unique constraint on 'Child', fields ['child']
        db.delete_unique("profile_child", ["child_id"])

        # Adding field 'UserProfile.scribblar_id'
        db.add_column(
            "profile_userprofile",
            "scribblar_id",
            self.gf("django.db.models.fields.CharField")(max_length=30, null=True, blank=True),
            keep_default=False,
        )

        # Adding field 'Child.active'
        db.add_column(
            "profile_child",
            "active",
            self.gf("django.db.models.fields.BooleanField")(default=False),
            keep_default=False,
        )

        # Adding field 'Child.key'
        db.add_column(
            "profile_child",
            "key",
            self.gf("django.db.models.fields.CharField")(default=None, max_length=30, null=True, blank=True),
            keep_default=False,
        )
开发者ID:alonslotky,项目名称:universal_tutors,代码行数:27,代码来源:0006_auto__add_field_userprofile_scribblar_id__add_field_child_active__add_.py


示例15: backwards

 def backwards(self, orm):
     
     # Deleting model 'Vote'
     db.delete_table('votes')
     
     # Deleting unique_together for [user, content_type, object_id] on Vote.
     db.delete_unique('votes', ['user_id', 'content_type_id', 'object_id'])
开发者ID:andyzsf,项目名称:ConMan,代码行数:7,代码来源:0001_initial.py


示例16: backwards

    def backwards(self, orm):
        # Removing unique constraint on 'Certificate', fields ['common_name', 'parent']
        db.delete_unique('pki_certificate', ['common_name', 'parent_id'])

        # Removing unique constraint on 'Certificate', fields ['name', 'parent']
        db.delete_unique('pki_certificate', ['name', 'parent_id'])

        # Deleting model 'CertificateAuthority'
        db.delete_table('pki_certificateauthority')

        # Deleting model 'Certificate'
        db.delete_table('pki_certificate')

        # Deleting model 'PkiChangelog'
        db.delete_table('pki_changelog')

        # Deleting model 'x509Extension'
        db.delete_table('pki_x509extension')

        # Removing M2M table for field key_usage on 'x509Extension'
        db.delete_table('pki_x509extension_key_usage')

        # Removing M2M table for field extended_key_usage on 'x509Extension'
        db.delete_table('pki_x509extension_extended_key_usage')

        # Deleting model 'KeyUsage'
        db.delete_table('pki_keyusage')

        # Deleting model 'ExtendedKeyUsage'
        db.delete_table('pki_extendedkeyusage')
开发者ID:adieu,项目名称:django-pki,代码行数:30,代码来源:0001_initial.py


示例17: backwards

    def backwards(self, orm):
        # Removing unique constraint on 'ProjectStep', fields ['name', 'project']
        db.delete_unique(u'inhouse_projectstep', ['name', 'project_id'])

        # Removing unique constraint on 'Day', fields ['user', 'date']
        db.delete_unique(u'inhouse_day', ['user_id', 'date'])

        # Deleting model 'AddressGroup'
        db.delete_table(u'inhouse_addressgroup')

        # Deleting model 'Address'
        db.delete_table(u'inhouse_address')

        # Deleting model 'BankAccount'
        db.delete_table(u'inhouse_bankaccount')

        # Deleting model 'Booking'
        db.delete_table(u'inhouse_booking')

        # Deleting model 'Communication'
        db.delete_table(u'inhouse_communication')

        # Deleting model 'Company'
        db.delete_table(u'inhouse_company')

        # Removing M2M table for field bank_accounts on 'Company'
        db.delete_table('inhouse_company_bank_accounts')

        # Deleting model 'Day'
        db.delete_table(u'inhouse_day')

        # Deleting model 'Department'
        db.delete_table(u'inhouse_department')

        # Deleting model 'Invoice'
        db.delete_table(u'inhouse_invoice')

        # Deleting model 'Person'
        db.delete_table(u'inhouse_person')

        # Removing M2M table for field departments on 'Person'
        db.delete_table('inhouse_person_departments')

        # Deleting model 'Project'
        db.delete_table(u'inhouse_project')

        # Removing M2M table for field members on 'Project'
        db.delete_table('inhouse_project_members')

        # Deleting model 'ProjectStep'
        db.delete_table(u'inhouse_projectstep')

        # Deleting model 'ProjectStepTemplate'
        db.delete_table(u'inhouse_projectsteptemplate')

        # Deleting model 'ProjectType'
        db.delete_table(u'inhouse_projecttype')

        # Deleting model 'Timer'
        db.delete_table(u'inhouse_timer')
开发者ID:hkage,项目名称:inhouse-web,代码行数:60,代码来源:0001_initial.py


示例18: forwards

    def forwards(self, orm):
        
        # Removing unique constraint on 'TaskBlacklist', fields ['user', 'task']
        db.delete_unique('tasks_taskblacklist', ['user_id', 'task_id'])

        # Deleting model 'TaskBlacklist'
        db.delete_table('tasks_taskblacklist')
开发者ID:BooleT37,项目名称:anytask,代码行数:7,代码来源:0003_auto__del_taskblacklist__del_unique_taskblacklist_user_task.py


示例19: backwards

    def backwards(self, orm):
        
        # Removing unique constraint on 'Lab', fields ['num', 'semester']
        db.delete_unique('tutorials_lab', ['num', 'semester'])

        # Removing unique constraint on 'Quiz', fields ['semester', 'num']
        db.delete_unique('tutorials_quiz', ['semester', 'num'])

        # Deleting model 'Quiz'
        db.delete_table('tutorials_quiz')

        # Deleting model 'Lab'
        db.delete_table('tutorials_lab')

        # Deleting model 'PublicVideo'
        db.delete_table('tutorials_publicvideo')

        # Deleting model 'TopicAssignment'
        db.delete_table('tutorials_topicassignment')

        # Deleting model 'Comment'
        db.delete_table('tutorials_comment')

        # Deleting model 'LinkedWebPage'
        db.delete_table('tutorials_linkedwebpage')

        # Deleting model 'UserProfile'
        db.delete_table('tutorials_userprofile')

        # Removing M2M table for field favorites on 'UserProfile'
        db.delete_table('tutorials_userprofile_favorites')
开发者ID:mit6004,项目名称:usersite_code_only,代码行数:31,代码来源:0001_initial.py


示例20: backwards

    def backwards(self, orm):
        
        # Removing unique constraint on 'PostShell', fields ['slug']
        db.delete_unique('collins_postshell', ['slug'])

        # Adding field 'Blog.custom_domain'
        db.add_column('collins_blog', 'custom_domain', self.gf('django.db.models.fields.related.OneToOneField')(related_name='Primary Blog', unique=True, null=True, to=orm['sites.Site'], blank=True), keep_default=False)
开发者ID:harrislapiroff,项目名称:django-collins,代码行数:7,代码来源:0002_auto__del_field_blog_custom_domain__add_unique_postshell_slug.py



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Python db.drop_primary_key函数代码示例发布时间:2022-05-27
下一篇:
Python db.delete_table函数代码示例发布时间: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