Skip to content

Instantly share code, notes, and snippets.

@singingwolfboy
Created November 8, 2016 14:31
Show Gist options
  • Save singingwolfboy/7a12076520eccf19851ae00f461f5ab2 to your computer and use it in GitHub Desktop.
Save singingwolfboy/7a12076520eccf19851ae00f461f5ab2 to your computer and use it in GitHub Desktop.
Comparing `manage.py migrate --list` and `manage.py showmigrations --list`
➜ micromasters git:(manage-py-showmigrations) docker-compose run web ./manage.py showmigrations --list
[2016-11-08 14:21:46] DEBUG 1 [django.db.backends] utils.py:90 - [e06944c115f6] - (0.001) SELECT (1) AS "a" FROM "wagtailimages_rendition" WHERE "wagtailimages_rendition"."filter_spec" = '' LIMIT 1; args=('',)
[2016-11-08 14:21:46] DEBUG 1 [django.db.backends] utils.py:90 - [e06944c115f6] - (0.003)
SELECT c.relname, c.relkind
FROM pg_catalog.pg_class c
LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
WHERE c.relkind IN ('r', 'v')
AND n.nspname NOT IN ('pg_catalog', 'pg_toast')
AND pg_catalog.pg_table_is_visible(c.oid); args=None
[2016-11-08 14:21:46] DEBUG 1 [django.db.backends] utils.py:90 - [e06944c115f6] - (0.001) SELECT "django_migrations"."app", "django_migrations"."name" FROM "django_migrations"; args=()
admin
[X] 0001_initial
[X] 0002_logentry_remove_auto_add
auth
[X] 0001_initial
[X] 0002_alter_permission_name_max_length
[X] 0003_alter_user_email_max_length
[X] 0004_alter_user_username_opts
[X] 0005_alter_user_last_login_null
[X] 0006_require_contenttypes_0002
[X] 0007_alter_validators_add_error_messages
[X] 0008_alter_user_username_max_length
authtoken
[X] 0001_initial
[X] 0002_auto_20160226_1747
cms
[X] 0001_initial
[X] 0002_homepage
[X] 0003_programpage_program
[X] 0004_create_homepage
[X] 0005_add_homepage_image
[X] 0006_change_homepage_title
[X] 0007_programcourse
[X] 0008_frequentlyaskedquestion
[X] 0009_programpage_background_image
[X] 0010_programpage_contact_us
[X] 0011_programpage_title_over_image
[X] 0012_programpage_external_program_page_url
[X] 0013_programpage_thumbnail_image
[X] 0014_html_in_faq_answers
[X] 0015_add_home_page_and_email_to_program_page
[X] 0016_remove_programpage_contact_us
[X] 0017_programfaculty
[X] 0018_update_programfaculty
[X] 0019_removed_fields_cms_homepage
[X] 0020_add_faqs_page
[X] 0021_remove_frequentlyaskedquestion_faqs_page
[X] 0022_add_categorized_faqs_page
[X] 0023_programpage_title_program_home_page_url
[X] 0024_programtabpage
contenttypes
[X] 0001_initial
[X] 0002_remove_content_type_name
courses
[X] 0001_initial
[X] 0002_rename_course_to_courserun
[X] 0003_course
[X] 0004_courserun_course
[X] 0005_course_data_creation
[X] 0006_fuzzy_date__remove_program_from_course
[X] 0007_position_in_program
[X] 0008_new_date_fields
[X] 0009_courserun_fuzzy_enrollment_start_date
[X] 0010_program_description
[X] 0011_courserun_upgrade_deadline
[X] 0012_program_financial_aid_availability
[X] 0013_new_indexes
[X] 0014_program_ga_tracking_id
[X] 0015_position_in_program_required
[X] 0016_unique_course_run_edx_key
[X] 0017_indexes_in_courserun
[X] 0018_course_default_ordering
dashboard
[X] 0001_initial
[X] 0002_programenrollment
[X] 0003_current_grade
[X] 0004_switch_jsonfield
[X] 0005_usercacherefreshtime
ecommerce
[X] 0001_initial
[X] 0002_courseprice
[X] 0003_order_user
[X] 0004_create_receipt
[X] 0005_switch_jsonfield
[X] 0006_new_indexes
[X] 0007_orderaudit
[X] 0008_add_refunded_status
[X] 0009_protect_audit
financialaid
[X] 0001_initial
[X] 0002_altered_financialaid_and_tierprogram
[X] 0003_added_timestamps
[X] 0004_modified_financial_aid_audit
[X] 0005_switch_jsonfield
[X] 0006_update_tierprogram
[X] 0007_currencyexchangerate
[X] 0008_financialaid_date_documents_sent
[X] 0009_added_choice_to_financialaid_status
[X] 0010_add_skipped
[X] 0011_remove_rejected_choice
[X] 0012_modify_documents_sent
[X] 0013_financialaid_justification
[X] 0014_financial_aid_statuses
[X] 0015_countryincomethreshold
[X] 0016_load_country_income_thresholds
[X] 0017_countryincomethreshold_unique
[X] 0018_alter_audit_nullability
[X] 0019_protect_audit
[X] 0020_financialaid_country_of_residence
mail
[X] 0001_initial
[X] 0002_update_audit
[X] 0003_protect_audit
profiles
[X] 0001_initial
[X] 0002_fields_modified
[X] 0003_profiles_for_existing_users
[X] 0004_profile_linkedin
[X] 0005_personal_fields
[X] 0006_migrate_names
[X] 0007_city_and_birthplace
[X] 0008_rename_edx_fields
[X] 0009_profile_student_id
[X] 0010_profile_agreed_to_terms_of_service
[X] 0011_add_employment_history_table
[X] 0012_education
[X] 0013_profile_verified_micromaster_user
[X] 0014_removed_images
[X] 0015_allow_nulls_for_field_of_study
[X] 0016_change_default_of_account_privacy
[X] 0017_add_nationality
[X] 0018_profile_image
[X] 0019_switch_jsonfield
roles
[X] 0001_initial
sessions
[X] 0001_initial
social_auth
[X] 0001_initial (1 squashed migrations)
[X] 0002_add_related_name (1 squashed migrations)
[X] 0003_alter_email_max_length (1 squashed migrations)
[X] 0004_auto_20160423_0400 (1 squashed migrations)
[X] 0005_auto_20160727_2333
taggit
[X] 0001_initial
[X] 0002_auto_20150616_2121
wagtailadmin
[X] 0001_create_admin_access_permissions
wagtailcore
[X] 0001_squashed_0016_change_page_url_path_to_text_field (16 squashed migrations)
[X] 0017_change_edit_page_permission_description
[X] 0018_pagerevision_submitted_for_moderation_index
[X] 0019_verbose_names_cleanup
[X] 0020_add_index_on_page_first_published_at
[X] 0021_capitalizeverbose
[X] 0022_add_site_name
[X] 0023_alter_page_revision_on_delete_behaviour
[X] 0024_collection
[X] 0025_collection_initial_data
[X] 0026_group_collection_permission
[X] 0027_fix_collection_path_collation
[X] 0024_alter_page_content_type_on_delete_behaviour
[X] 0028_merge
[X] 0029_unicode_slugfield_dj19
[X] 0030_index_on_pagerevision_created_at
wagtaildocs
[X] 0001_initial
[X] 0002_initial_data
[X] 0003_add_verbose_names
[X] 0004_capitalizeverbose
[X] 0005_document_collection
[X] 0006_copy_document_permissions_to_collections
[X] 0005_alter_uploaded_by_user_on_delete_action
[X] 0007_merge
wagtailembeds
[X] 0001_initial
[X] 0002_add_verbose_names
[X] 0003_capitalizeverbose
wagtailforms
[X] 0001_initial
[X] 0002_add_verbose_names
[X] 0003_capitalizeverbose
wagtailimages
[X] 0001_initial
[X] 0002_initial_data
[X] 0003_fix_focal_point_fields
[X] 0004_make_focal_point_key_not_nullable
[X] 0005_make_filter_spec_unique
[X] 0006_add_verbose_names
[X] 0007_image_file_size
[X] 0008_image_created_at_index
[X] 0009_capitalizeverbose
[X] 0010_change_on_delete_behaviour
[X] 0011_image_collection
[X] 0012_copy_image_permissions_to_collections
[X] 0013_make_rendition_upload_callable
[X] 0014_add_filter_spec_field
[X] 0015_fill_filter_spec_field
wagtailredirects
[X] 0001_initial
[X] 0002_add_verbose_names
[X] 0003_make_site_field_editable
[X] 0004_set_unique_on_path_and_site
[X] 0005_capitalizeverbose
wagtailsearch
[X] 0001_initial
[X] 0002_add_verbose_names
[X] 0003_remove_editors_pick
wagtailusers
[X] 0001_initial
[X] 0002_add_verbose_name_on_userprofile
[X] 0003_add_verbose_names
[X] 0004_capitalizeverbose
[X] 0005_make_related_name_wagtail_specific
➜ micromasters git:((12af742...)) docker-compose run web ./manage.py migrate --list
[2016-11-08 14:30:54] DEBUG 1 [django.db.backends] utils.py:89 - [92ebed35af10] - (0.002) SELECT (1) AS "a" FROM "wagtailimages_rendition" WHERE "wagtailimages_rendition"."filter_spec" = '' LIMIT 1; args=('',)
[2016-11-08 14:30:54] DEBUG 1 [django.db.backends] utils.py:89 - [92ebed35af10] - (0.002)
SELECT c.relname, c.relkind
FROM pg_catalog.pg_class c
LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
WHERE c.relkind IN ('r', 'v')
AND n.nspname NOT IN ('pg_catalog', 'pg_toast')
AND pg_catalog.pg_table_is_visible(c.oid); args=None
[2016-11-08 14:30:54] DEBUG 1 [django.db.backends] utils.py:89 - [92ebed35af10] - (0.001) SELECT "django_migrations"."app", "django_migrations"."name" FROM "django_migrations"; args=()
admin
[X] 0001_initial
[X] 0002_logentry_remove_auto_add
auth
[X] 0001_initial
[X] 0002_alter_permission_name_max_length
[X] 0003_alter_user_email_max_length
[X] 0004_alter_user_username_opts
[X] 0005_alter_user_last_login_null
[X] 0006_require_contenttypes_0002
[X] 0007_alter_validators_add_error_messages
authtoken
[X] 0001_initial
[X] 0002_auto_20160226_1747
cms
[X] 0001_initial
[X] 0002_homepage
[X] 0003_programpage_program
[X] 0004_create_homepage
[X] 0005_add_homepage_image
[X] 0006_change_homepage_title
[X] 0007_programcourse
[X] 0008_frequentlyaskedquestion
[X] 0009_programpage_background_image
[X] 0010_programpage_contact_us
[X] 0011_programpage_title_over_image
[X] 0012_programpage_external_program_page_url
[X] 0013_programpage_thumbnail_image
[X] 0014_html_in_faq_answers
[X] 0015_add_home_page_and_email_to_program_page
[X] 0016_remove_programpage_contact_us
[X] 0017_programfaculty
[X] 0018_update_programfaculty
[X] 0019_removed_fields_cms_homepage
[X] 0020_add_faqs_page
[X] 0021_remove_frequentlyaskedquestion_faqs_page
[X] 0022_add_categorized_faqs_page
[X] 0023_programpage_title_program_home_page_url
[X] 0024_programtabpage
contenttypes
[X] 0001_initial
[X] 0002_remove_content_type_name
courses
[X] 0001_initial
[X] 0002_rename_course_to_courserun
[X] 0003_course
[X] 0004_courserun_course
[X] 0005_course_data_creation
[X] 0006_fuzzy_date__remove_program_from_course
[X] 0007_position_in_program
[X] 0008_new_date_fields
[X] 0009_courserun_fuzzy_enrollment_start_date
[X] 0010_program_description
[X] 0011_courserun_upgrade_deadline
[X] 0012_program_financial_aid_availability
[X] 0013_new_indexes
[X] 0014_program_ga_tracking_id
[X] 0015_position_in_program_required
[X] 0016_unique_course_run_edx_key
[X] 0017_indexes_in_courserun
[X] 0018_course_default_ordering
dashboard
[X] 0001_initial
[X] 0002_programenrollment
[X] 0003_current_grade
[X] 0004_switch_jsonfield
[X] 0005_usercacherefreshtime
ecommerce
[X] 0001_initial
[X] 0002_courseprice
[X] 0003_order_user
[X] 0004_create_receipt
[X] 0005_switch_jsonfield
[X] 0006_new_indexes
[X] 0007_orderaudit
[X] 0008_add_refunded_status
[X] 0009_protect_audit
financialaid
[X] 0001_initial
[X] 0002_altered_financialaid_and_tierprogram
[X] 0003_added_timestamps
[X] 0004_modified_financial_aid_audit
[X] 0005_switch_jsonfield
[X] 0006_update_tierprogram
[X] 0007_currencyexchangerate
[X] 0008_financialaid_date_documents_sent
[X] 0009_added_choice_to_financialaid_status
[X] 0010_add_skipped
[X] 0011_remove_rejected_choice
[X] 0012_modify_documents_sent
[X] 0013_financialaid_justification
[X] 0014_financial_aid_statuses
[X] 0015_countryincomethreshold
[X] 0016_load_country_income_thresholds
[X] 0017_countryincomethreshold_unique
[X] 0018_alter_audit_nullability
[X] 0019_protect_audit
[X] 0020_financialaid_country_of_residence
mail
[X] 0001_initial
[X] 0002_update_audit
[X] 0003_protect_audit
profiles
[X] 0001_initial
[X] 0002_fields_modified
[X] 0003_profiles_for_existing_users
[X] 0004_profile_linkedin
[X] 0005_personal_fields
[X] 0006_migrate_names
[X] 0007_city_and_birthplace
[X] 0008_rename_edx_fields
[X] 0009_profile_student_id
[X] 0010_profile_agreed_to_terms_of_service
[X] 0011_add_employment_history_table
[X] 0012_education
[X] 0013_profile_verified_micromaster_user
[X] 0014_removed_images
[X] 0015_allow_nulls_for_field_of_study
[X] 0016_change_default_of_account_privacy
[X] 0017_add_nationality
[X] 0018_profile_image
[X] 0019_switch_jsonfield
roles
[X] 0001_initial
sessions
[X] 0001_initial
social_auth
[X] 0001_initial (1 squashed migrations)
[X] 0002_add_related_name (1 squashed migrations)
[X] 0003_alter_email_max_length (1 squashed migrations)
[X] 0004_auto_20160423_0400 (1 squashed migrations)
[X] 0005_auto_20160727_2333
taggit
[X] 0001_initial
[X] 0002_auto_20150616_2121
wagtailadmin
[X] 0001_create_admin_access_permissions
wagtailcore
[X] 0001_squashed_0016_change_page_url_path_to_text_field (16 squashed migrations)
[X] 0017_change_edit_page_permission_description
[X] 0018_pagerevision_submitted_for_moderation_index
[X] 0019_verbose_names_cleanup
[X] 0020_add_index_on_page_first_published_at
[X] 0021_capitalizeverbose
[X] 0022_add_site_name
[X] 0023_alter_page_revision_on_delete_behaviour
[X] 0024_collection
[X] 0025_collection_initial_data
[X] 0026_group_collection_permission
[X] 0027_fix_collection_path_collation
[X] 0024_alter_page_content_type_on_delete_behaviour
[X] 0028_merge
[X] 0029_unicode_slugfield_dj19
[X] 0030_index_on_pagerevision_created_at
wagtaildocs
[X] 0001_initial
[X] 0002_initial_data
[X] 0003_add_verbose_names
[X] 0004_capitalizeverbose
[X] 0005_document_collection
[X] 0006_copy_document_permissions_to_collections
[X] 0005_alter_uploaded_by_user_on_delete_action
[X] 0007_merge
wagtailembeds
[X] 0001_initial
[X] 0002_add_verbose_names
[X] 0003_capitalizeverbose
wagtailforms
[X] 0001_initial
[X] 0002_add_verbose_names
[X] 0003_capitalizeverbose
wagtailimages
[X] 0001_initial
[X] 0002_initial_data
[X] 0003_fix_focal_point_fields
[X] 0004_make_focal_point_key_not_nullable
[X] 0005_make_filter_spec_unique
[X] 0006_add_verbose_names
[X] 0007_image_file_size
[X] 0008_image_created_at_index
[X] 0009_capitalizeverbose
[X] 0010_change_on_delete_behaviour
[X] 0011_image_collection
[X] 0012_copy_image_permissions_to_collections
[X] 0013_make_rendition_upload_callable
[X] 0014_add_filter_spec_field
[X] 0015_fill_filter_spec_field
wagtailredirects
[X] 0001_initial
[X] 0002_add_verbose_names
[X] 0003_make_site_field_editable
[X] 0004_set_unique_on_path_and_site
[X] 0005_capitalizeverbose
wagtailsearch
[X] 0001_initial
[X] 0002_add_verbose_names
[X] 0003_remove_editors_pick
wagtailusers
[X] 0001_initial
[X] 0002_add_verbose_name_on_userprofile
[X] 0003_add_verbose_names
[X] 0004_capitalizeverbose
[X] 0005_make_related_name_wagtail_specific
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment