diff --git a/common/djangoapps/student/migrations/0044_rename_linkedin_config_field.py b/common/djangoapps/student/migrations/0044_linkedin_add_company_identifier.py similarity index 96% rename from common/djangoapps/student/migrations/0044_rename_linkedin_config_field.py rename to common/djangoapps/student/migrations/0044_linkedin_add_company_identifier.py index d656c9c683..0f6b749591 100644 --- a/common/djangoapps/student/migrations/0044_rename_linkedin_config_field.py +++ b/common/djangoapps/student/migrations/0044_linkedin_add_company_identifier.py @@ -8,9 +8,6 @@ from django.db import models class Migration(SchemaMigration): def forwards(self, orm): - # Deleting field 'LinkedInAddToProfileConfiguration.dashboard_tracking_code' - db.delete_column('student_linkedinaddtoprofileconfiguration', 'dashboard_tracking_code') - # Adding field 'LinkedInAddToProfileConfiguration.company_identifier' db.add_column('student_linkedinaddtoprofileconfiguration', 'company_identifier', self.gf('django.db.models.fields.TextField')(default=''), @@ -18,11 +15,6 @@ class Migration(SchemaMigration): def backwards(self, orm): - # Adding field 'LinkedInAddToProfileConfiguration.dashboard_tracking_code' - db.add_column('student_linkedinaddtoprofileconfiguration', 'dashboard_tracking_code', - self.gf('django.db.models.fields.TextField')(default='', blank=True), - keep_default=False) - # Deleting field 'LinkedInAddToProfileConfiguration.company_identifier' db.delete_column('student_linkedinaddtoprofileconfiguration', 'company_identifier') @@ -109,6 +101,7 @@ class Migration(SchemaMigration): 'change_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), 'changed_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'on_delete': 'models.PROTECT'}), 'company_identifier': ('django.db.models.fields.TextField', [], {}), + 'dashboard_tracking_code': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}), 'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) }, diff --git a/common/djangoapps/student/models.py b/common/djangoapps/student/models.py index c92736608c..7af3830650 100644 --- a/common/djangoapps/student/models.py +++ b/common/djangoapps/student/models.py @@ -1464,6 +1464,9 @@ class LinkedInAddToProfileConfiguration(ConfigurationModel): ) ) + # Deprecated + dashboard_tracking_code = models.TextField(default="", blank=True) + def add_to_profile_url(self, course_name, enrollment_mode, cert_url, source="o"): """Construct the URL for the "add to profile" button.