<commit_before># encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models

class Migration(SchemaMigration):

    def forwards(self, orm):
        
        # Adding field 'Event.body'
        db.add_column('news_and_events_event', 'body', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['cms.Placeholder'], null=True), keep_default=False)

        # Adding field 'Event.external_url'
        db.add_column('news_and_events_event', 'external_url', self.gf('django.db.models.fields.related.ForeignKey')(related_name='event_item', blank=True, null=True, to=orm['links.ExternalLink']), keep_default=False)

        # Removing M2M table for field publishing_destinations on 'Event'
        # db.delete_table('news_and_events_event_publishing_destinations')
        # db.rename_table('news_and_events_event_publishing_destinations', 'news_and_events_event_publish_to')

        # Adding M2M table for field publish_to on 'Event'
        # db.create_table('news_and_events_event_publish_to', (
        #     ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
        #     ('event', models.ForeignKey(orm['news_and_events.event'], null=False)),
        #     ('entity', models.ForeignKey(orm['contacts_and_people.entity'], null=False))
        # ))
        # db.create_unique('news_and_events_event_publish_to', ['event_id', 'entity_id'])

        # Changing field 'Event.subtitle'
        db.alter_column('news_and_events_event', 'subtitle', self.gf('django.db.models.fields.TextField')(max_length=256, null=True))

        # Adding field 'NewsArticle.body'
        db.add_column('news_and_events_newsarticle', 'body', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['cms.Placeholder'], null=True), keep_default=False)

        # Adding field 'NewsArticle.external_url'
        db.add_column('news_and_events_newsarticle', 'external_url', self.gf('django.db.models.fields.related.ForeignKey')(related_name='newsarticle_item', blank=True, null=True, to=orm['links.ExternalLink']), keep_default=False)

        # Removing M2M table for field publishing_destinations on 'NewsArticle'
        # db.delete_table('news_and_events_newsarticle_publishing_destinations')
        # db.rename_table('news_and_events_newsarticle_publishing_destinations', 'news_and_events_newsarticle_publish_to')

        # Adding M2M table for field publish_to on 'NewsArticle'
        # db.create_table('news_and_events_newsarticle_publish_to', (
        #     ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
        #     ('newsarticle', models.ForeignKey(orm['news_and_events.newsarticle'], null=False)),
        #     ('entity', models.ForeignKey(orm['contacts_and_people.entity'], null=False))
        # ))
        # db.create_unique('news_and_events_newsarticle_publish_to', ['newsarticle_id', 'entity_id'])

        # Changing field 'NewsArticle.subtitle'
        db.alter_column('news_and_events_newsarticle', 'subtitle', self.gf('django.db.models.fields.TextField')(max_length=256, null=True))


    def backwards(self, orm):
        
        # Deleting field 'Event.body'
        db.delete_column('news_and_events_event', 'body_id')

        # Deleting field 'Event.external_url'
        db.delete_column('news_and_events_event', 'external_url_id')

        # Adding M2M table for field publishing_destinations on 'Event'
        # db.create_table('news_and_events_event_publishing_destinations', (
        #     ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
        #     ('event', models.ForeignKey(orm['news_and_events.event'], null=False)),
        #     ('entity', models.ForeignKey(orm['contacts_and_people.entity'], null=False))
        # ))
        # db.create_unique('news_and_events_event_publishing_destinations', ['event_id', 'entity_id'])

        # Removing M2M table for field publish_to on 'Event'
        # db.delete_table('news_and_events_event_publish_to')
        # db.rename_table('news_and_events_event_publish_to', 'news_and_events_event_publishing_destinations')

        # Changing field 'Event.subtitle'
        db.alter_column('news_and_events_event', 'subtitle', self.gf('django.db.models.fields.TextField')(max_length=350, null=True))

        # Deleting field 'NewsArticle.body'
        db.delete_column('news_and_events_newsarticle', 'body_id')

        # Deleting field 'NewsArticle.external_url'
        db.delete_column('news_and_events_newsarticle', 'external_url_id')

        # Adding M2M table for field publishing_destinations on 'NewsArticle'
        # db.create_table('news_and_events_newsarticle_publishing_destinations', (
        #     ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
        #     ('newsarticle', models.ForeignKey(orm['news_and_events.newsarticle'], null=False)),
        #     ('entity', models.ForeignKey(orm['contacts_and_people.entity'], null=False))
        # ))
        # db.create_unique('news_and_events_newsarticle_publishing_destinations', ['newsarticle_id', 'entity_id'])

        # Removing M2M table for field publish_to on 'NewsArticle'
        # db.rename_table('news_and_events_newsarticle_publish_to', 'news_and_events_newsarticle_publishing_destinations')
 
        # Changing field 'NewsArticle.subtitle'
        db.alter_column('news_and_events_newsarticle', 'subtitle', self.gf('django.db.models.fields.TextField')(max_length=350, null=True))


    models = {
        'auth.group': {
            'Meta': {'object_name': 'Group'},
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '80', 'unique': 'True'}),
            'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
        },
        'auth.permission': {
            'Meta': {'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
            'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
            'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),<commit_msg>fixed commented-out migrations in news_and_events/migrations/0031_nasty_manual_rename.py<commit_after># encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models

class Migration(SchemaMigration):

    def forwards(self, orm):
        
        # Adding field 'Event.body'
        db.add_column('news_and_events_event', 'body', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['cms.Placeholder'], null=True), keep_default=False)

        # Adding field 'Event.external_url'
        db.add_column('news_and_events_event', 'external_url', self.gf('django.db.models.fields.related.ForeignKey')(related_name='event_item', blank=True, null=True, to=orm['links.ExternalLink']), keep_default=False)

        # Removing M2M table for field publishing_destinations on 'Event'
        # db.delete_table('news_and_events_event_publishing_destinations')
        db.rename_table('news_and_events_event_publishing_destinations', 'news_and_events_event_publish_to')

        # Adding M2M table for field publish_to on 'Event'
        # db.create_table('news_and_events_event_publish_to', (
        #     ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
        #     ('event', models.ForeignKey(orm['news_and_events.event'], null=False)),
        #     ('entity', models.ForeignKey(orm['contacts_and_people.entity'], null=False))
        # ))
        # db.create_unique('news_and_events_event_publish_to', ['event_id', 'entity_id'])

        # Changing field 'Event.subtitle'
        db.alter_column('news_and_events_event', 'subtitle', self.gf('django.db.models.fields.TextField')(max_length=256, null=True))

        # Adding field 'NewsArticle.body'
        db.add_column('news_and_events_newsarticle', 'body', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['cms.Placeholder'], null=True), keep_default=False)

        # Adding field 'NewsArticle.external_url'
        db.add_column('news_and_events_newsarticle', 'external_url', self.gf('django.db.models.fields.related.ForeignKey')(related_name='newsarticle_item', blank=True, null=True, to=orm['links.ExternalLink']), keep_default=False)

        # Removing M2M table for field publishing_destinations on 'NewsArticle'
        # db.delete_table('news_and_events_newsarticle_publishing_destinations')
        db.rename_table('news_and_events_newsarticle_publishing_destinations', 'news_and_events_newsarticle_publish_to')

        # Adding M2M table for field publish_to on 'NewsArticle'
        # db.create_table('news_and_events_newsarticle_publish_to', (
        #     ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
        #     ('newsarticle', models.ForeignKey(orm['news_and_events.newsarticle'], null=False)),
        #     ('entity', models.ForeignKey(orm['contacts_and_people.entity'], null=False))
        # ))
        # db.create_unique('news_and_events_newsarticle_publish_to', ['newsarticle_id', 'entity_id'])

        # Changing field 'NewsArticle.subtitle'
        db.alter_column('news_and_events_newsarticle', 'subtitle', self.gf('django.db.models.fields.TextField')(max_length=256, null=True))


    def backwards(self, orm):
        
        # Deleting field 'Event.body'
        db.delete_column('news_and_events_event', 'body_id')

        # Deleting field 'Event.external_url'
        db.delete_column('news_and_events_event', 'external_url_id')

        # Adding M2M table for field publishing_destinations on 'Event'
        # db.create_table('news_and_events_event_publishing_destinations', (
        #     ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
        #     ('event', models.ForeignKey(orm['news_and_events.event'], null=False)),
        #     ('entity', models.ForeignKey(orm['contacts_and_people.entity'], null=False))
        # ))
        # db.create_unique('news_and_events_event_publishing_destinations', ['event_id', 'entity_id'])

        # Removing M2M table for field publish_to on 'Event'
        # db.delete_table('news_and_events_event_publish_to')
        db.rename_table('news_and_events_event_publish_to', 'news_and_events_event_publishing_destinations')

        # Changing field 'Event.subtitle'
        db.alter_column('news_and_events_event', 'subtitle', self.gf('django.db.models.fields.TextField')(max_length=350, null=True))

        # Deleting field 'NewsArticle.body'
        db.delete_column('news_and_events_newsarticle', 'body_id')

        # Deleting field 'NewsArticle.external_url'
        db.delete_column('news_and_events_newsarticle', 'external_url_id')

        # Adding M2M table for field publishing_destinations on 'NewsArticle'
        # db.create_table('news_and_events_newsarticle_publishing_destinations', (
        #     ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
        #     ('newsarticle', models.ForeignKey(orm['news_and_events.newsarticle'], null=False)),
        #     ('entity', models.ForeignKey(orm['contacts_and_people.entity'], null=False))
        # ))
        # db.create_unique('news_and_events_newsarticle_publishing_destinations', ['newsarticle_id', 'entity_id'])

        # Removing M2M table for field publish_to on 'NewsArticle'
        db.rename_table('news_and_events_newsarticle_publish_to', 'news_and_events_newsarticle_publishing_destinations')
 
        # Changing field 'NewsArticle.subtitle'
        db.alter_column('news_and_events_newsarticle', 'subtitle', self.gf('django.db.models.fields.TextField')(max_length=350, null=True))


    models = {
        'auth.group': {
            'Meta': {'object_name': 'Group'},
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '80', 'unique': 'True'}),
            'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
        },
        'auth.permission': {
            'Meta': {'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
            'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
            'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
{'fraction_non_alphanumeric': 0.14275749825621947, 'fraction_numerical': 0.004495078663876618, 'mean_word_length': 4.282030290626279, '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': '3397630', 'n_tokens_mistral': 4075, 'n_tokens_neox': 3943, 'n_words': 567}