diff --git a/common/djangoapps/third_party_auth/migrations/0002_schema__provider_icon_image.py b/common/djangoapps/third_party_auth/migrations/0002_schema__provider_icon_image.py
index 073cddf69c575ae4ff24bf3ec32fa54f4a7fb66b..32d54802f668318cf90a176f9e613955b2f7bcd1 100644
--- a/common/djangoapps/third_party_auth/migrations/0002_schema__provider_icon_image.py
+++ b/common/djangoapps/third_party_auth/migrations/0002_schema__provider_icon_image.py
@@ -1,5 +1,5 @@
 # -*- coding: utf-8 -*-
-from __future__ import unicode_literals
+from __future__ import absolute_import, unicode_literals
 
 from django.db import migrations, models
 
diff --git a/common/djangoapps/third_party_auth/migrations/0003_samlproviderconfig_debug_mode.py b/common/djangoapps/third_party_auth/migrations/0003_samlproviderconfig_debug_mode.py
index 9c36731700565f5742610ce191bae1f73f6782bf..1716aa52859f2ba922190c921198675e05ee69c4 100644
--- a/common/djangoapps/third_party_auth/migrations/0003_samlproviderconfig_debug_mode.py
+++ b/common/djangoapps/third_party_auth/migrations/0003_samlproviderconfig_debug_mode.py
@@ -1,5 +1,5 @@
 # -*- coding: utf-8 -*-
-from __future__ import unicode_literals
+from __future__ import absolute_import, unicode_literals
 
 from django.db import migrations, models
 
diff --git a/common/djangoapps/third_party_auth/migrations/0004_add_visible_field.py b/common/djangoapps/third_party_auth/migrations/0004_add_visible_field.py
index 736e01ceecb56305ea71bd2c7d359b89d166c0d6..5fff768bae332129f41c6e8e38afaa3b3cbe9a14 100644
--- a/common/djangoapps/third_party_auth/migrations/0004_add_visible_field.py
+++ b/common/djangoapps/third_party_auth/migrations/0004_add_visible_field.py
@@ -1,5 +1,5 @@
 # -*- coding: utf-8 -*-
-from __future__ import unicode_literals
+from __future__ import absolute_import, unicode_literals
 
 from django.db import migrations, models
 
diff --git a/common/djangoapps/third_party_auth/migrations/0011_auto_20170616_0112.py b/common/djangoapps/third_party_auth/migrations/0011_auto_20170616_0112.py
index 954205d321d9d666ef401e02efec15d0815ef2fa..5e948c324df8c9222bb3d940c3dccb8b3183f57f 100644
--- a/common/djangoapps/third_party_auth/migrations/0011_auto_20170616_0112.py
+++ b/common/djangoapps/third_party_auth/migrations/0011_auto_20170616_0112.py
@@ -1,5 +1,5 @@
 # -*- coding: utf-8 -*-
-from __future__ import unicode_literals
+from __future__ import absolute_import, unicode_literals
 
 from django.db import migrations, models
 
diff --git a/common/djangoapps/third_party_auth/migrations/0015_samlproviderconfig_archived.py b/common/djangoapps/third_party_auth/migrations/0015_samlproviderconfig_archived.py
index fe0b4ebfb5775651b0c259aab3c8d87cf9b315e9..70f10344cfa074d0522e72bdd34ec046685c0a23 100644
--- a/common/djangoapps/third_party_auth/migrations/0015_samlproviderconfig_archived.py
+++ b/common/djangoapps/third_party_auth/migrations/0015_samlproviderconfig_archived.py
@@ -1,5 +1,5 @@
 # -*- coding: utf-8 -*-
-from __future__ import unicode_literals
+from __future__ import absolute_import, unicode_literals
 
 from django.db import migrations, models
 
diff --git a/common/djangoapps/third_party_auth/migrations/0016_auto_20180130_0938.py b/common/djangoapps/third_party_auth/migrations/0016_auto_20180130_0938.py
index 631788a82ca7fc3344d1fd3fef0daf0586c9945a..01a7e0bbde2e1bdfbb88d18b351c29568a262880 100644
--- a/common/djangoapps/third_party_auth/migrations/0016_auto_20180130_0938.py
+++ b/common/djangoapps/third_party_auth/migrations/0016_auto_20180130_0938.py
@@ -1,8 +1,8 @@
 # -*- coding: utf-8 -*-
-from __future__ import unicode_literals
+from __future__ import absolute_import, unicode_literals
 
-from django.db import migrations, models
 import django.db.models.deletion
+from django.db import migrations, models
 
 
 class Migration(migrations.Migration):
diff --git a/common/djangoapps/third_party_auth/migrations/0018_auto_20180327_1631.py b/common/djangoapps/third_party_auth/migrations/0018_auto_20180327_1631.py
index c5f00b8d4d567a0be6bb36566b8bff6fdf9ec2c6..0406ea6a4a313b1919d8d0b7c04948ec0b7d20a9 100644
--- a/common/djangoapps/third_party_auth/migrations/0018_auto_20180327_1631.py
+++ b/common/djangoapps/third_party_auth/migrations/0018_auto_20180327_1631.py
@@ -1,5 +1,5 @@
 # -*- coding: utf-8 -*-
-from __future__ import unicode_literals
+from __future__ import absolute_import, unicode_literals
 
 from django.db import migrations, models
 
diff --git a/common/djangoapps/third_party_auth/migrations/0020_cleanup_slug_fields.py b/common/djangoapps/third_party_auth/migrations/0020_cleanup_slug_fields.py
index 05b4692d656843b4d8e4ad742f2173bbd526bd53..132f173b698bbd396838d5b059a05d11572d0eeb 100644
--- a/common/djangoapps/third_party_auth/migrations/0020_cleanup_slug_fields.py
+++ b/common/djangoapps/third_party_auth/migrations/0020_cleanup_slug_fields.py
@@ -1,6 +1,6 @@
 # -*- coding: utf-8 -*-
 # Generated by Django 1.11.12 on 2018-04-10 13:57
-from __future__ import unicode_literals
+from __future__ import absolute_import, unicode_literals
 
 from django.db import migrations
 
diff --git a/common/djangoapps/third_party_auth/migrations/0022_auto_20181012_0307.py b/common/djangoapps/third_party_auth/migrations/0022_auto_20181012_0307.py
index ae5b10c946db91c29e649f0fd860adcd69f3d448..e95f34e48318b9811c6abecaaa3675008046d8bc 100644
--- a/common/djangoapps/third_party_auth/migrations/0022_auto_20181012_0307.py
+++ b/common/djangoapps/third_party_auth/migrations/0022_auto_20181012_0307.py
@@ -1,6 +1,6 @@
 # -*- coding: utf-8 -*-
 # Generated by Django 1.11.15 on 2018-10-12 07:07
-from __future__ import unicode_literals
+from __future__ import absolute_import, unicode_literals
 
 from django.db import migrations, models
 
diff --git a/common/djangoapps/third_party_auth/migrations/0024_fix_edit_disallowed.py b/common/djangoapps/third_party_auth/migrations/0024_fix_edit_disallowed.py
index 1b06689573173acd28023f324b1230b2d3722292..a25ab8047aab76d4b4b50c0ddef0a8d3c6f1b8d2 100644
--- a/common/djangoapps/third_party_auth/migrations/0024_fix_edit_disallowed.py
+++ b/common/djangoapps/third_party_auth/migrations/0024_fix_edit_disallowed.py
@@ -1,9 +1,9 @@
 # -*- coding: utf-8 -*-
 # Generated by Django 1.11.20 on 2019-05-20 20:13
-from __future__ import unicode_literals
+from __future__ import absolute_import, unicode_literals
 
-from django.db import migrations, models
 import django.db.models.deletion
+from django.db import migrations, models
 
 
 class Migration(migrations.Migration):