<commit_before>from django.db import models

class MigrationHistory(models.Model):
    app_name = models.CharField(max_length=255)
    migration = models.CharField(max_length=255)
    applied = models.DateTimeField(blank=True)

    class Meta:
        unique_together = (('app_name', 'migration'),)

    @classmethod
    def for_migration(cls, migration):
        try:
            return cls.objects.get(app_name=migration.app_label(),
                                   migration=migration.name())
        except cls.DoesNotExist:
            return cls(app_name=migration.app_label(),
                       migration=migration.name())

    def get_migrations(self):
        from south.migration.base import Migrations
        return Migrations(self.app_name)

    def get_migration(self):
        return self.get_migrations().migration(self.migration)<commit_msg>Remove unique_together on the model; the key length was too long on wide-character MySQL installs.<commit_after>from django.db import models

class MigrationHistory(models.Model):
    app_name = models.CharField(max_length=255)
    migration = models.CharField(max_length=255)
    applied = models.DateTimeField(blank=True)

    @classmethod
    def for_migration(cls, migration):
        try:
            return cls.objects.get(app_name=migration.app_label(),
                                   migration=migration.name())
        except cls.DoesNotExist:
            return cls(app_name=migration.app_label(),
                       migration=migration.name())

    def get_migrations(self):
        from south.migration.base import Migrations
        return Migrations(self.app_name)

    def get_migration(self):
        return self.get_migrations().migration(self.migration)
{'fraction_non_alphanumeric': 0.09226361031518625, 'fraction_numerical': 0.006876790830945559, 'mean_word_length': 2.8122270742358078, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1597163', 'n_tokens_mistral': 505, 'n_tokens_neox': 495, 'n_words': 92}