          start_migration_name = options['start_migration_name']
          migration_name = options['migration_name']
          no_optimize = options['no_optimize']
  
          # Load the current graph state, check the app and migration they asked for exists
          loader = MigrationLoader(connections[DEFAULT_DB_ALIAS])
          if app_label not in loader.migrated_apps:
              raise CommandError(
 
</s> remove             new_migration = subclass("%s_squashed_%s" % (start_migration.name, migration.name), app_label)
 </s> add             if squashed_name:
                # Use the name from --squashed-name.
                prefix, _ = start_migration.name.split('_', 1)
                name = '%s_%s' % (prefix, squashed_name)
            else:
                # Generate a name.
                name = '%s_squashed_%s' % (start_migration.name, migration.name)
            new_migration = subclass(name, app_label) </s> remove             new_migration = subclass("0001_squashed_%s" % migration.name, app_label)
 </s> add             name = '0001_%s' % (squashed_name or 'squashed_%s' % migration.name)
            new_migration = subclass(name, app_label)
        squashed_name = options['squashed_name']
          start_migration_name = options['start_migration_name']
          migration_name = options['migration_name']
          no_optimize = options['no_optimize']
        squashed_name = options['squashed_name']
  
          # Load the current graph state, check the app and migration they asked for exists
          loader = MigrationLoader(connections[DEFAULT_DB_ALIAS])
          if app_label not in loader.migrated_apps:
              raise CommandError(
keep keep add keep keep keep keep keep
 Fixed #28363 -- Allowed naming the migration generated by squashmigrations. 
django/core/management/commands/squashmigrations.py