def _get_current_migration_number(self, database):
        try:
            result = Migration.objects.using(
                database
            ).order_by('-migration_label')[0]
        except __HOLE__:
            return 0
        match = MIGRATION_NAME_RE.match(result.migration_label)
        return int(match.group(1))
dataset/ETHPy150Open paltman-archive/nashvegas/nashvegas/management/commands/upgradedb.py/Command._get_current_migration_number