<commit_before>
from south.db import db
from django.db import models
from ella.oldcomments.models import *

class Migration:
    
    def forwards(self, orm):
        "Write your forwards migration here"
        db.execute('''
            INSERT INTO django_comments (
                content_type_id, object_pk,
                user_id, user_name, user_email, user_url,
                submit_date,
                is_public, is_removed,
                site_id,
                comment,
                old_id
            ) SELECT
                target_ct_id, target_id,
                user_id, nickname, email, '',
                submit_date,
                is_public, not is_public,
                1,
                content,
                id
            FROM comments_comment
        ''')
    
    
    def backwards(self, orm):
        "Write your backwards migration here"
    
    
    models = {
        'oldcomments.comment': {
            'Meta': {'ordering': "('-path',)", 'db_table': "'comments_comment'"},
            'content': ('models.TextField', ["_('Comment content')"], {'max_length': 'defaults.COMMENT_LENGTH'}),
            'email': ('models.EmailField', ["_('Authors email (optional)')"], {'blank': 'True'}),
            'id': ('models.AutoField', [], {'primary_key': 'True'}),
            'ip_address': ('models.IPAddressField', ["_('IP address')"], {'null': 'True', 'blank': 'True'}),
            'is_public': ('models.BooleanField', ["_('Is public')"], {'default': 'True'}),
            'nickname': ('models.CharField', ['_("Anonymous author\'s nickname")'], {'max_length': 'defaults.NICKNAME_LENGTH', 'blank': 'True'}),
            'parent': ('models.ForeignKey', ["orm['oldcomments.Comment']"], {'null': 'True', 'verbose_name': "_('Tree structure parent')", 'blank': 'True'}),
            'path': ('models.CharField', ["_('Genealogy tree path')"], {'max_length': 'defaults.PATH_LENGTH', 'editable': 'False', 'blank': 'True'}),
            'subject': ('models.TextField', ["_('Comment subject')"], {'max_length': 'defaults.SUBJECT_LENGTH'}),
            'submit_date': ('models.DateTimeField', ["_('Time submitted')"], {'default': 'datetime.now', 'editable': 'True'}),
            'target_ct': ('models.ForeignKey', ["orm['contenttypes.ContentType']"], {'verbose_name': "_('Target content type')"}),
            'target_id': ('models.PositiveIntegerField', ["_('Target id')"], {}),
            'user': ('models.ForeignKey', ["orm['auth.User']"], {'null': 'True', 'verbose_name': "_('Authorized author')", 'blank': 'True'})
        },
        'auth.user': {<commit_msg>Add order by to be sure to move in correct order<commit_after>
from south.db import db
from django.db import models
from ella.oldcomments.models import *

class Migration:
    
    def forwards(self, orm):
        "Write your forwards migration here"
        db.execute('''
            INSERT INTO django_comments (
                content_type_id, object_pk,
                user_id, user_name, user_email, user_url,
                submit_date,
                is_public, is_removed,
                site_id,
                comment,
                old_id
            ) SELECT
                target_ct_id, target_id,
                user_id, nickname, email, '',
                submit_date,
                is_public, not is_public,
                1,
                content,
                id
            FROM comments_comment
            ORDER BY id
        ''')
    
    
    def backwards(self, orm):
        "Write your backwards migration here"
    
    
    models = {
        'oldcomments.comment': {
            'Meta': {'ordering': "('-path',)", 'db_table': "'comments_comment'"},
            'content': ('models.TextField', ["_('Comment content')"], {'max_length': 'defaults.COMMENT_LENGTH'}),
            'email': ('models.EmailField', ["_('Authors email (optional)')"], {'blank': 'True'}),
            'id': ('models.AutoField', [], {'primary_key': 'True'}),
            'ip_address': ('models.IPAddressField', ["_('IP address')"], {'null': 'True', 'blank': 'True'}),
            'is_public': ('models.BooleanField', ["_('Is public')"], {'default': 'True'}),
            'nickname': ('models.CharField', ['_("Anonymous author\'s nickname")'], {'max_length': 'defaults.NICKNAME_LENGTH', 'blank': 'True'}),
            'parent': ('models.ForeignKey', ["orm['oldcomments.Comment']"], {'null': 'True', 'verbose_name': "_('Tree structure parent')", 'blank': 'True'}),
            'path': ('models.CharField', ["_('Genealogy tree path')"], {'max_length': 'defaults.PATH_LENGTH', 'editable': 'False', 'blank': 'True'}),
            'subject': ('models.TextField', ["_('Comment subject')"], {'max_length': 'defaults.SUBJECT_LENGTH'}),
            'submit_date': ('models.DateTimeField', ["_('Time submitted')"], {'default': 'datetime.now', 'editable': 'True'}),
            'target_ct': ('models.ForeignKey', ["orm['contenttypes.ContentType']"], {'verbose_name': "_('Target content type')"}),
            'target_id': ('models.PositiveIntegerField', ["_('Target id')"], {}),
            'user': ('models.ForeignKey', ["orm['auth.User']"], {'null': 'True', 'verbose_name': "_('Authorized author')", 'blank': 'True'})
        },
        'auth.user': {
{'fraction_non_alphanumeric': 0.18962568877066313, 'fraction_numerical': 0.0003800114003420103, 'mean_word_length': 2.547169811320755, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '258809', 'n_tokens_mistral': 1515, 'n_tokens_neox': 1463, 'n_words': 345}