本文整理汇总了Python中south.db.db.delete_column函数的典型用法代码示例。如果您正苦于以下问题:Python delete_column函数的具体用法?Python delete_column怎么用?Python delete_column使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了delete_column函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: forwards
def forwards(self, orm):
# Adding model 'Field'
db.create_table(u'oil_and_gas_field', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('name', self.gf('django.db.models.fields.CharField')(default='', unique=True, max_length=50)),
('country', self.gf('django.db.models.fields.CharField')(default='', unique=True, max_length=50)),
('production_oil', self.gf('django.db.models.fields.TextField')(default='')),
('production_gas', self.gf('django.db.models.fields.TextField')(default='')),
('production', self.gf('django.db.models.fields.TextField')(default='')),
('production_oil_smooth', self.gf('django.db.models.fields.TextField')(default='')),
('production_gas_smooth', self.gf('django.db.models.fields.TextField')(default='')),
('production_smooth', self.gf('django.db.models.fields.TextField')(default='')),
))
db.send_create_signal(u'oil_and_gas', ['Field'])
# Deleting field 'CountryProduction.depth'
db.delete_column(u'oil_and_gas_countryproduction', 'depth')
# Adding unique constraint on 'CountryProduction', fields ['date', 'name']
db.create_unique(u'oil_and_gas_countryproduction', ['date', 'name'])
# Adding unique constraint on 'FieldProduction', fields ['date', 'name']
db.create_unique(u'oil_and_gas_fieldproduction', ['date', 'name'])
# Adding unique constraint on 'WellProduction', fields ['date', 'name']
db.create_unique(u'oil_and_gas_wellproduction', ['date', 'name'])
开发者ID:LucasFievet,项目名称:Tomorrow,代码行数:26,代码来源:0002_auto__add_field__del_field_countryproduction_depth__add_unique_country.py
示例2: backwards
def backwards(self, orm):
# Deleting field 'Image.textPosition'
db.delete_column('cmsplugin_s3slider_image', 'textPosition')
# Deleting field 'Image.text'
db.delete_column('cmsplugin_s3slider_image', 'text')
开发者ID:Lacrymology,项目名称:cmsplugin_s3slider,代码行数:7,代码来源:0003_auto__add_field_image_textPosition__add_field_image_text.py
示例3: forwards
def forwards(self, orm):
# Changing field 'Ingredient.name'
db.alter_column(u'dishes_ingredient', 'name', self.gf('django.db.models.fields.CharField')(max_length=200))
# Deleting field 'Dish.new'
db.delete_column(u'dishes_dish', 'new')
# Adding field 'Dish.photo'
db.add_column(u'dishes_dish', 'photo',
self.gf('django.db.models.fields.files.FileField')(max_length=100, null=True),
keep_default=False)
# Adding field 'Dish.likes'
db.add_column(u'dishes_dish', 'likes',
self.gf('django.db.models.fields.IntegerField')(default=0),
keep_default=False)
# Changing field 'Dish.flavors'
db.alter_column(u'dishes_dish', 'flavors', self.gf('django.db.models.fields.CharField')(max_length=200))
# Changing field 'Dish.cuisine'
db.alter_column(u'dishes_dish', 'cuisine', self.gf('django.db.models.fields.CharField')(max_length=200))
# Changing field 'Dish.name'
db.alter_column(u'dishes_dish', 'name', self.gf('django.db.models.fields.CharField')(max_length=200))
# Changing field 'Dish.prep_time'
db.alter_column(u'dishes_dish', 'prep_time', self.gf('django.db.models.fields.IntegerField')())
开发者ID:AzizHarrington,项目名称:recipebook,代码行数:29,代码来源:0002_auto__chg_field_ingredient_name__del_field_dish_new__add_field_dish_ph.py
示例4: backwards
def backwards(self, orm):
# Deleting field 'Product.price'
db.delete_column(u'products_product', 'price_id')
# Deleting field 'Product.employee_price'
db.delete_column(u'products_product', 'employee_price_id')
# Changing field 'Sale.size'
db.alter_column(u'products_sale', 'size_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['products.Size']))
# Changing field 'Sale.color'
db.alter_column(u'products_sale', 'color_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['products.Color']))
# Changing field 'Sale.price'
db.alter_column(u'products_sale', 'price_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['products.Price']))
# Changing field 'Sale.sex'
db.alter_column(u'products_sale', 'sex_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['products.Sex']))
# Changing field 'Delivery.color'
db.alter_column(u'products_delivery', 'color_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['products.Color']))
# Changing field 'Delivery.sex'
db.alter_column(u'products_delivery', 'sex_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['products.Sex']))
# Changing field 'Delivery.size'
db.alter_column(u'products_delivery', 'size_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['products.Size']))
开发者ID:kakulukia,项目名称:merch36,代码行数:28,代码来源:0005_auto__add_field_product_price__add_field_product_employee_price__chg_f.py
示例5: forwards
def forwards(self, orm):
# Changing field 'Customer.user'
db.alter_column(u'core_customer', 'user_id', self.gf('ppars.apps.core.fields.BigForeignKey')(to=orm['auth.User'], null=True, on_delete=models.SET_NULL))
# Changing field 'PlanDiscount.user'
db.alter_column(u'core_plandiscount', 'user_id', self.gf('ppars.apps.core.fields.BigForeignKey')(to=orm['auth.User'], null=True, on_delete=models.SET_NULL))
# Changing field 'Transaction.user'
db.alter_column(u'core_transaction', 'user_id', self.gf('ppars.apps.core.fields.BigForeignKey')(to=orm['auth.User'], null=True, on_delete=models.SET_NULL))
# Changing field 'Log.user'
db.alter_column(u'core_log', 'user_id', self.gf('ppars.apps.core.fields.BigForeignKey')(to=orm['auth.User'], null=True, on_delete=models.SET_NULL))
# Changing field 'UnusedPin.user'
db.alter_column(u'core_unusedpin', 'user_id', self.gf('ppars.apps.core.fields.BigForeignKey')(to=orm['auth.User'], null=True, on_delete=models.SET_NULL))
# Deleting field 'CarrierAdmin.user'
db.delete_column(u'core_carrieradmin', 'user_id')
# Changing field 'CaptchaLogs.user'
db.alter_column(u'core_captchalogs', 'user_id', self.gf('ppars.apps.core.fields.BigForeignKey')(to=orm['auth.User'], null=True, on_delete=models.SET_NULL))
# Changing field 'AutoRefill.user'
db.alter_column(u'core_autorefill', 'user_id', self.gf('ppars.apps.core.fields.BigForeignKey')(to=orm['auth.User'], null=True, on_delete=models.SET_NULL))
开发者ID:adulenzy,项目名称:Auto-phone-recharge-system,代码行数:25,代码来源:0037_auto__chg_field_customer_user__chg_field_plandiscount_user__chg_field_.py
示例6: forwards
def forwards(self, orm):
# Deleting field 'StorageItem.date'
db.delete_column('recipemonkeyapp_storageitem', 'date')
# Adding field 'StorageItem.date_added'
db.add_column('recipemonkeyapp_storageitem', 'date_added', self.gf('django.db.models.fields.DateField')(auto_now_add=True, null=True, blank=True), keep_default=False)
开发者ID:vanessacochrane,项目名称:Recipe-Monkey,代码行数:7,代码来源:0005_auto__del_field_storageitem_date__add_field_storageitem_date_added.py
示例7: backwards
def backwards(self, orm):
# Deleting field 'ScheduledTask.last_execution'
db.delete_column('scheduler_scheduledtask', 'last_execution')
# Changing field 'ScheduledTask.next_execution'
db.alter_column('scheduler_scheduledtask', 'next_execution', self.gf('django.db.models.fields.DateTimeField')())
开发者ID:Betriebsrat,项目名称:ecm,代码行数:7,代码来源:0002_auto__add_field_scheduledtask_last_execution__chg_field_scheduledtask_.py
示例8: forwards
def forwards(self, orm):
# Adding model 'DynamicPage'
db.create_table(u'main_dynamicpage', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('slug', self.gf('django.db.models.fields.SlugField')(max_length=50)),
('template', self.gf('django.db.models.fields.CharField')(max_length=256)),
('content_hebrew', self.gf('django.db.models.fields.TextField')()),
('content_english', self.gf('django.db.models.fields.TextField')()),
))
db.send_create_signal(u'main', ['DynamicPage'])
# Deleting field 'NavbarLink.url'
db.delete_column(u'main_navbarlink', 'url')
# Adding field 'NavbarLink.link_type'
db.add_column(u'main_navbarlink', 'link_type',
self.gf('django.db.models.fields.CharField')(default='category', max_length=256),
keep_default=False)
# Adding field 'NavbarLink.category'
db.add_column(u'main_navbarlink', 'category',
self.gf('django.db.models.fields.related.ForeignKey')(to=orm['main.Category'], null=True, blank=True),
keep_default=False)
# Adding field 'NavbarLink.page'
db.add_column(u'main_navbarlink', 'page',
self.gf('django.db.models.fields.related.ForeignKey')(to=orm['main.DynamicPage'], null=True, blank=True),
keep_default=False)
开发者ID:hochbergg,项目名称:petulant-avenger,代码行数:28,代码来源:0013_auto__add_dynamicpage__del_field_navbarlink_url__add_field_navbarlink_.py
示例9: backwards
def backwards(self, orm):
# Deleting field 'StudentTeam.member5'
db.delete_column('hedgefunds_studentteam', 'member5_id')
# User chose to not deal with backwards NULL issues for 'StudentTeam.member4'
raise RuntimeError("Cannot reverse this migration. 'StudentTeam.member4' and its values cannot be restored.")
开发者ID:aaksham,项目名称:HFMG2012V1,代码行数:7,代码来源:0002_auto__add_field_studentteam_member5__chg_field_studentteam_member4.py
示例10: forwards
def forwards(self, orm):
# Deleting field 'File.public'
db.delete_column('cmsplugin_file', 'public_id')
# Deleting model 'filepublic'
db.delete_table('cmsplugin_filepublic')
示例11: forwards
def forwards(self, orm):
# Deleting field 'Project.private'
db.delete_column('gitlog_project', 'private')
# Deleting field 'Project.source'
db.delete_column('gitlog_project', 'source')
# Adding field 'Project.public'
db.add_column('gitlog_project', 'public', self.gf('django.db.models.fields.BooleanField')(default=False), keep_default=False)
# Adding field 'Project.url'
db.add_column('gitlog_project', 'url', self.gf('django.db.models.fields.URLField')(max_length=30, null=True, blank=True), keep_default=False)
# Adding field 'Project.description'
db.add_column('gitlog_project', 'description', self.gf('django.db.models.fields.TextField')(null=True, blank=True), keep_default=False)
# Adding M2M table for field writable on 'Project'
db.create_table('gitlog_project_writable', (
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
('project', models.ForeignKey(orm['gitlog.project'], null=False)),
('user', models.ForeignKey(orm['auth.user'], null=False))
))
db.create_unique('gitlog_project_writable', ['project_id', 'user_id'])
# Adding M2M table for field readonly on 'Project'
db.create_table('gitlog_project_readonly', (
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
('project', models.ForeignKey(orm['gitlog.project'], null=False)),
('user', models.ForeignKey(orm['auth.user'], null=False))
))
db.create_unique('gitlog_project_readonly', ['project_id', 'user_id'])
# Changing field 'Project.owner'
db.alter_column('gitlog_project', 'owner_id', self.gf('django.db.models.fields.related.ForeignKey')(null=True, to=orm['auth.User']))
开发者ID:masarliev,项目名称:gitlog,代码行数:35,代码来源:0002_auto__del_field_project_private__del_field_project_source__add_field_p.py
示例12: backwards
def backwards(self, orm):
# Deleting field 'RoundupBugTracker.name'
db.delete_column('customs_roundupbugtracker', 'name')
# Deleting field 'RoundupBugTracker.components'
db.delete_column('customs_roundupbugtracker', 'components')
示例13: backwards
def backwards(self, orm):
# Changing field 'Ingredient.name'
db.alter_column(u'dishes_ingredient', 'name', self.gf('django.db.models.fields.CharField')(max_length=30))
# Adding field 'Dish.new'
db.add_column(u'dishes_dish', 'new',
self.gf('django.db.models.fields.BooleanField')(default=False),
keep_default=False)
# Deleting field 'Dish.photo'
db.delete_column(u'dishes_dish', 'photo')
# Deleting field 'Dish.likes'
db.delete_column(u'dishes_dish', 'likes')
# Changing field 'Dish.flavors'
db.alter_column(u'dishes_dish', 'flavors', self.gf('django.db.models.fields.CharField')(max_length=50))
# Changing field 'Dish.cuisine'
db.alter_column(u'dishes_dish', 'cuisine', self.gf('django.db.models.fields.CharField')(max_length=30))
# Changing field 'Dish.name'
db.alter_column(u'dishes_dish', 'name', self.gf('django.db.models.fields.CharField')(max_length=30))
# Changing field 'Dish.prep_time'
db.alter_column(u'dishes_dish', 'prep_time', self.gf('django.db.models.fields.FloatField')())
开发者ID:AzizHarrington,项目名称:recipebook,代码行数:27,代码来源:0002_auto__chg_field_ingredient_name__del_field_dish_new__add_field_dish_ph.py
示例14: backwards
def backwards(self, orm):
# Deleting field 'BugzillaUrl.tracker'
db.delete_column('customs_bugzillaurl', 'tracker_id')
# Adding field 'BugzillaUrl.bugzilla_tracker'
db.add_column('customs_bugzillaurl', 'bugzilla_tracker', orm['customs.bugzillaurl:bugzilla_tracker'])
示例15: forwards
def forwards(self, orm):
# Deleting field 'LegAction.minutes'
db.delete_column('phillyleg_legaction', 'minutes_id')
# Adding unique constraint on 'LegMinutes', fields ['id']
db.create_unique('phillyleg_legminutes', ['id'])
开发者ID:Alexander-M-Waldman,项目名称:councilmatic,代码行数:7,代码来源:0011_auto__del_field_legaction_minutes__add_field_legaction_minutes_tmpid__.py