src/hp/migrations/0003_auto__add_field_videokcrel_content_title.py
author ymh <ymh.work@gmail.com>
Sat, 01 Dec 2012 02:20:06 +0100
changeset 104 7643c6aea04b
parent 91 eb2aa2a469e2
permissions -rw-r--r--
Added tag V00.13 for changeset 329e6650ee4e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
91
eb2aa2a469e2 add content title to relations
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
# -*- coding: utf-8 -*-
eb2aa2a469e2 add content title to relations
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
from south.db import db
eb2aa2a469e2 add content title to relations
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
from south.v2 import SchemaMigration
eb2aa2a469e2 add content title to relations
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
eb2aa2a469e2 add content title to relations
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
eb2aa2a469e2 add content title to relations
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
class Migration(SchemaMigration):
eb2aa2a469e2 add content title to relations
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
eb2aa2a469e2 add content title to relations
ymh <ymh.work@gmail.com>
parents:
diff changeset
     8
    def forwards(self, orm):
eb2aa2a469e2 add content title to relations
ymh <ymh.work@gmail.com>
parents:
diff changeset
     9
        # Adding field 'VideoKCRel.content_title'        
eb2aa2a469e2 add content title to relations
ymh <ymh.work@gmail.com>
parents:
diff changeset
    10
        db.add_column('hp_videokcrel', 'content_title', #@UndefinedVariable
eb2aa2a469e2 add content title to relations
ymh <ymh.work@gmail.com>
parents:
diff changeset
    11
                      self.gf('django.db.models.fields.CharField')(max_length=1024, null=True, blank=True),
eb2aa2a469e2 add content title to relations
ymh <ymh.work@gmail.com>
parents:
diff changeset
    12
                      keep_default=False)
eb2aa2a469e2 add content title to relations
ymh <ymh.work@gmail.com>
parents:
diff changeset
    13
eb2aa2a469e2 add content title to relations
ymh <ymh.work@gmail.com>
parents:
diff changeset
    14
eb2aa2a469e2 add content title to relations
ymh <ymh.work@gmail.com>
parents:
diff changeset
    15
    def backwards(self, orm):
eb2aa2a469e2 add content title to relations
ymh <ymh.work@gmail.com>
parents:
diff changeset
    16
        # Deleting field 'VideoKCRel.content_title'
eb2aa2a469e2 add content title to relations
ymh <ymh.work@gmail.com>
parents:
diff changeset
    17
        db.delete_column('hp_videokcrel', 'content_title') #@UndefinedVariable
eb2aa2a469e2 add content title to relations
ymh <ymh.work@gmail.com>
parents:
diff changeset
    18
eb2aa2a469e2 add content title to relations
ymh <ymh.work@gmail.com>
parents:
diff changeset
    19
eb2aa2a469e2 add content title to relations
ymh <ymh.work@gmail.com>
parents:
diff changeset
    20
    models = {
eb2aa2a469e2 add content title to relations
ymh <ymh.work@gmail.com>
parents:
diff changeset
    21
        'hp.videokcrel': {
eb2aa2a469e2 add content title to relations
ymh <ymh.work@gmail.com>
parents:
diff changeset
    22
            'Meta': {'object_name': 'VideoKCRel'},
eb2aa2a469e2 add content title to relations
ymh <ymh.work@gmail.com>
parents:
diff changeset
    23
            'content_title': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'null': 'True', 'blank': 'True'}),
eb2aa2a469e2 add content title to relations
ymh <ymh.work@gmail.com>
parents:
diff changeset
    24
            'graph_id': ('django.db.models.fields.CharField', [], {'max_length': '1024'}),
eb2aa2a469e2 add content title to relations
ymh <ymh.work@gmail.com>
parents:
diff changeset
    25
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
eb2aa2a469e2 add content title to relations
ymh <ymh.work@gmail.com>
parents:
diff changeset
    26
            'iri_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
eb2aa2a469e2 add content title to relations
ymh <ymh.work@gmail.com>
parents:
diff changeset
    27
            'project_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
eb2aa2a469e2 add content title to relations
ymh <ymh.work@gmail.com>
parents:
diff changeset
    28
            'topic_id': ('django.db.models.fields.CharField', [], {'max_length': '1024'})
eb2aa2a469e2 add content title to relations
ymh <ymh.work@gmail.com>
parents:
diff changeset
    29
        }
eb2aa2a469e2 add content title to relations
ymh <ymh.work@gmail.com>
parents:
diff changeset
    30
    }
eb2aa2a469e2 add content title to relations
ymh <ymh.work@gmail.com>
parents:
diff changeset
    31
eb2aa2a469e2 add content title to relations
ymh <ymh.work@gmail.com>
parents:
diff changeset
    32
    complete_apps = ['hp']