Source

Ochs / ochs_media / migrations / 0003_add_width_height.py

Full commit

from south.db import db
from django.db import models
from ochs_media.models import *

class Migration:
    
    def forwards(self, orm):
        
        # Adding field 'MediaEmbed.height'
        db.add_column('ochs_media_mediaembed', 'height', orm['ochs_media.mediaembed:height'])
        
        # Adding field 'MediaEmbed.width'
        db.add_column('ochs_media_mediaembed', 'width', orm['ochs_media.mediaembed:width'])
        
        # Deleting field 'MediaEmbed.type'
        db.delete_column('ochs_media_mediaembed', 'type')
        
    
    
    def backwards(self, orm):
        
        # Deleting field 'MediaEmbed.height'
        db.delete_column('ochs_media_mediaembed', 'height')
        
        # Deleting field 'MediaEmbed.width'
        db.delete_column('ochs_media_mediaembed', 'width')
        
        # Adding field 'MediaEmbed.type'
        db.add_column('ochs_media_mediaembed', 'type', orm['ochs_media.mediaembed:type'])
        
    
    
    models = {
        'ochs_media.mediaembed': {
            'caption': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
            'embed_object': ('django.db.models.fields.TextField', [], {}),
            'file': ('FileBrowseField', [], {'max_length': '255'}),
            'height': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'media_type': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
            'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
            'width': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'})
        }
    }
    
    complete_apps = ['ochs_media']