Python south.db.db.add_column() Examples
The following are 30
code examples of south.db.db.add_column().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
south.db.db
, or try the search function
.
Example #1
Source File: 0029_auto__add_field_organization_logo__add_field_organization_email__add_f.py From crowdata with MIT License | 6 votes |
def forwards(self, orm): # Adding field 'Organization.logo' db.add_column(u'crowdataapp_organization', 'logo', self.gf('django.db.models.fields.files.ImageField')(default='hola.png', max_length=100), keep_default=False) # Adding field 'Organization.email' db.add_column(u'crowdataapp_organization', 'email', self.gf('django.db.models.fields.EmailField')(default='email@email.com', max_length='128'), keep_default=False) # Adding field 'Organization.twitter' db.add_column(u'crowdataapp_organization', 'twitter', self.gf('django.db.models.fields.CharField')(max_length='128', null=True, blank=True), keep_default=False) # Adding field 'Organization.facebook' db.add_column(u'crowdataapp_organization', 'facebook', self.gf('django.db.models.fields.CharField')(max_length='128', null=True, blank=True), keep_default=False) # Adding field 'Organization.url' db.add_column(u'crowdataapp_organization', 'url', self.gf('django.db.models.fields.CharField')(max_length='128', null=True, blank=True), keep_default=False)
Example #2
Source File: 0034_add_field_Instance_json.py From kobo-predict with BSD 2-Clause "Simplified" License | 5 votes |
def forwards(self, orm): # Adding field 'Instance.json' db.add_column(u'odk_logger_instance', 'json', self.gf('jsonfield.fields.JSONField')(default={}), keep_default=False)
Example #3
Source File: 0003_auto__add_field_xform_deleted.py From kobo-predict with BSD 2-Clause "Simplified" License | 5 votes |
def forwards(self, orm): # Adding field 'XForm.deleted' db.add_column('odk_logger_xform', 'deleted', self.gf('django.db.models.fields.BooleanField')(default=False), keep_default=False)
Example #4
Source File: 0011_auto__del_field_export_filepath__add_field_export_filedir.py From kobo-predict with BSD 2-Clause "Simplified" License | 5 votes |
def forwards(self, orm): # Deleting field 'Export.filepath' db.delete_column('odk_viewer_export', 'filepath') # Adding field 'Export.filedir' db.add_column('odk_viewer_export', 'filedir', self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True), keep_default=False)
Example #5
Source File: 0011_auto__del_field_export_filepath__add_field_export_filedir.py From kobo-predict with BSD 2-Clause "Simplified" License | 5 votes |
def backwards(self, orm): # Adding field 'Export.filepath' db.add_column('odk_viewer_export', 'filepath', self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True), keep_default=False) # Deleting field 'Export.filedir' db.delete_column('odk_viewer_export', 'filedir')
Example #6
Source File: 0007_auto__add_field_export_export_type.py From kobo-predict with BSD 2-Clause "Simplified" License | 5 votes |
def forwards(self, orm): # Adding field 'Export.export_type' db.add_column('odk_viewer_export', 'export_type', self.gf('django.db.models.fields.CharField')(default='xls', max_length=10), keep_default=False)
Example #7
Source File: 0015_auto__del_field_export__status__add_field_export_internal_status.py From kobo-predict with BSD 2-Clause "Simplified" License | 5 votes |
def forwards(self, orm): # Deleting field 'Export._status' db.delete_column('odk_viewer_export', '_status') # Adding field 'Export.internal_status' db.add_column('odk_viewer_export', 'internal_status', self.gf('django.db.models.fields.SmallIntegerField')(default=0, max_length=1), keep_default=False)
Example #8
Source File: 0003_auto__add_field_datadictionary_user.py From kobo-predict with BSD 2-Clause "Simplified" License | 5 votes |
def forwards(self, orm): # Adding field 'DataDictionary.user' db.add_column('odk_viewer_datadictionary', 'user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True), keep_default=False)
Example #9
Source File: 0014_auto__add_field_export__status.py From kobo-predict with BSD 2-Clause "Simplified" License | 5 votes |
def forwards(self, orm): # Adding field 'Export._status' db.add_column('odk_viewer_export', '_status', self.gf('django.db.models.fields.SmallIntegerField')(default=0, max_length=1), keep_default=False)
Example #10
Source File: 0044_auto__del_field_xform_is_crowd_form.py From kobo-predict with BSD 2-Clause "Simplified" License | 5 votes |
def backwards(self, orm): # Adding field 'XForm.is_crowd_form' db.add_column(u'logger_xform', 'is_crowd_form', self.gf('django.db.models.fields.BooleanField')(default=False), keep_default=False)
Example #11
Source File: 0015_auto__del_field_export__status__add_field_export_internal_status.py From kobo-predict with BSD 2-Clause "Simplified" License | 5 votes |
def backwards(self, orm): # Adding field 'Export._status' db.add_column('odk_viewer_export', '_status', self.gf('django.db.models.fields.SmallIntegerField')(default=0, max_length=1), keep_default=False) # Deleting field 'Export.internal_status' db.delete_column('odk_viewer_export', 'internal_status')
Example #12
Source File: 0025_auto__add_field_xform_encrypted.py From kobo-predict with BSD 2-Clause "Simplified" License | 5 votes |
def forwards(self, orm): # Adding field 'XForm.encrypted' db.add_column('odk_logger_xform', 'encrypted', self.gf('django.db.models.fields.BooleanField')(default=False), keep_default=False)
Example #13
Source File: 0016_auto__add_field_xform_bamboo_dataset.py From kobo-predict with BSD 2-Clause "Simplified" License | 5 votes |
def forwards(self, orm): # Adding field 'XForm.bamboo_dataset' db.add_column('odk_logger_xform', 'bamboo_dataset', self.gf('django.db.models.fields.CharField')(default=u'', max_length=60), keep_default=False)
Example #14
Source File: 0045_auto__add_field_xform_require_auth.py From kobo-predict with BSD 2-Clause "Simplified" License | 5 votes |
def forwards(self, orm): # Adding field 'XForm.require_auth' db.add_column(u'logger_xform', 'require_auth', self.gf('django.db.models.fields.BooleanField')(default=False), keep_default=False)
Example #15
Source File: 0031_auto__add_field_xform_last_submission_time.py From kobo-predict with BSD 2-Clause "Simplified" License | 5 votes |
def forwards(self, orm): # Adding field 'XForm.last_submission_time' db.add_column(u'odk_logger_xform', 'last_submission_time', self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True), keep_default=False)
Example #16
Source File: 0038_auto__del_field_instance_is_deleted.py From kobo-predict with BSD 2-Clause "Simplified" License | 5 votes |
def backwards(self, orm): # Adding field 'Instance.is_deleted' db.add_column(u'odk_logger_instance', 'is_deleted', self.gf('django.db.models.fields.BooleanField')(default=False), keep_default=False)
Example #17
Source File: 0013_auto__add_field_instance_uuid.py From kobo-predict with BSD 2-Clause "Simplified" License | 5 votes |
def forwards(self, orm): # Adding field 'Instance.uuid' db.add_column('odk_logger_instance', 'uuid', self.gf('django.db.models.fields.CharField')(default=u'', max_length=32), keep_default=False)
Example #18
Source File: 0032_added_xform_to_ziggy_submissions.py From kobo-predict with BSD 2-Clause "Simplified" License | 5 votes |
def forwards(self, orm): # Adding field 'ZiggyInstance.xform' db.add_column(u'odk_logger_ziggyinstance', 'xform', self.gf('django.db.models.fields.related.ForeignKey')(related_name='ziggy_submissions', null=True, to=orm['odk_logger.XForm']), keep_default=False)
Example #19
Source File: 0021_auto__add_field_instancehistory_uuid.py From kobo-predict with BSD 2-Clause "Simplified" License | 5 votes |
def forwards(self, orm): # Adding field 'InstanceHistory.uuid' db.add_column('odk_logger_instancehistory', 'uuid', self.gf('django.db.models.fields.CharField')(default=u'', max_length=249), keep_default=False)
Example #20
Source File: 0039_auto__del_field_xform_surveys_with_geopoints__add_field_xform_instance.py From kobo-predict with BSD 2-Clause "Simplified" License | 5 votes |
def forwards(self, orm): # Deleting field 'XForm.surveys_with_geopoints' db.delete_column(u'odk_logger_xform', 'surveys_with_geopoints') # Adding field 'XForm.instances_with_geopoints' db.add_column(u'odk_logger_xform', 'instances_with_geopoints', self.gf('django.db.models.fields.BooleanField')(default=False), keep_default=False)
Example #21
Source File: 0040_auto__add_field_instance_geom.py From kobo-predict with BSD 2-Clause "Simplified" License | 5 votes |
def forwards(self, orm): # Adding field 'Instance.geom' db.add_column(u'odk_logger_instance', 'geom', self.gf('django.contrib.gis.db.models.fields.GeometryCollectionField')(null=True), keep_default=False)
Example #22
Source File: 0007_auto__add_field_xform_has_start_time.py From kobo-predict with BSD 2-Clause "Simplified" License | 5 votes |
def forwards(self, orm): # Adding field 'XForm.has_start_time' db.add_column('odk_logger_xform', 'has_start_time', self.gf('django.db.models.fields.BooleanField')(default=False), keep_default=False)
Example #23
Source File: 0027_added_instance_is_deleted.py From kobo-predict with BSD 2-Clause "Simplified" License | 5 votes |
def forwards(self, orm): # Adding field 'Instance.is_deleted' db.add_column('odk_logger_instance', 'is_deleted', self.gf('django.db.models.fields.BooleanField')(default=False), keep_default=True) # Adding index on 'Instance', fields ['xform'] db.create_index('odk_logger_instance', ['xform_id', 'is_deleted'])
Example #24
Source File: 0037_auto__del_field_instance_start_time__del_field_instance_date.py From kobo-predict with BSD 2-Clause "Simplified" License | 5 votes |
def backwards(self, orm): # Adding field 'Instance.start_time' db.add_column(u'odk_logger_instance', 'start_time', self.gf('django.db.models.fields.DateTimeField')(null=True), keep_default=False) # Adding field 'Instance.date' db.add_column(u'odk_logger_instance', 'date', self.gf('django.db.models.fields.DateField')(null=True), keep_default=False)
Example #25
Source File: 0005_auto__add_field_project_metadata.py From kobo-predict with BSD 2-Clause "Simplified" License | 5 votes |
def forwards(self, orm): # Adding field 'Project.metadata' db.add_column(u'api_project', 'metadata', self.gf('jsonfield.fields.JSONField')(null=True), keep_default=False)
Example #26
Source File: 0006_auto__add_field_project_shared.py From kobo-predict with BSD 2-Clause "Simplified" License | 5 votes |
def forwards(self, orm): # Adding field 'Project.shared' db.add_column(u'api_project', 'shared', self.gf('django.db.models.fields.BooleanField')(default=False), keep_default=False)
Example #27
Source File: 0014_added_metadata_field_to_user_profile.py From kobo-predict with BSD 2-Clause "Simplified" License | 5 votes |
def forwards(self, orm): # Adding field 'UserProfile.metadata' db.add_column(u'main_userprofile', 'metadata', self.gf('jsonfield.fields.JSONField')(default={}, blank=True), keep_default=False)
Example #28
Source File: 0006_auto__add_field_userprofile_require_auth.py From kobo-predict with BSD 2-Clause "Simplified" License | 5 votes |
def forwards(self, orm): # Adding field 'UserProfile.require_auth' db.add_column('main_userprofile', 'require_auth', self.gf('django.db.models.fields.BooleanField')(default=False), keep_default=False)
Example #29
Source File: 0007_auto__add_field_metadata_data_file_type.py From kobo-predict with BSD 2-Clause "Simplified" License | 5 votes |
def forwards(self, orm): # Adding field 'MetaData.data_file_type' db.add_column('main_metadata', 'data_file_type', self.gf('django.db.models.fields.CharField')(max_length=255, null=True), keep_default=False)
Example #30
Source File: 0010_auto__add_field_userprofile_created_by.py From kobo-predict with BSD 2-Clause "Simplified" License | 5 votes |
def forwards(self, orm): # Adding field 'UserProfile.created_by' db.add_column(u'main_userprofile', 'created_by', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True), keep_default=False)