0002_auto__add_field_emission_duration.py 3.77 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
# -*- coding: 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 'Emission.duration'
        db.add_column(u'emissions_emission', 'duration',
                      self.gf('django.db.models.fields.IntegerField')(default=60),
                      keep_default=False)


    def backwards(self, orm):
        # Deleting field 'Emission.duration'
        db.delete_column(u'emissions_emission', 'duration')


    models = {
        u'emissions.category': {
            'Meta': {'object_name': 'Category'},
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'title': ('django.db.models.fields.CharField', [], {'max_length': '50'})
        },
        u'emissions.diffusion': {
            'Meta': {'object_name': 'Diffusion'},
            'datetime': ('django.db.models.fields.DateTimeField', [], {}),
            'episode': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['emissions.Episode']"}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
        },
        u'emissions.emission': {
            'Meta': {'object_name': 'Emission'},
            'archived': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
            'categories': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['emissions.Category']", 'symmetrical': 'False'}),
            'description': ('ckeditor.fields.RichTextField', [], {'null': 'True', 'blank': 'True'}),
            'duration': ('django.db.models.fields.IntegerField', [], {'default': '60'}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'}),
            'text': ('ckeditor.fields.RichTextField', [], {'null': 'True'}),
            'title': ('django.db.models.fields.CharField', [], {'max_length': '50'})
        },
        u'emissions.episode': {
            'Meta': {'object_name': 'Episode'},
            'description': ('ckeditor.fields.RichTextField', [], {'null': 'True', 'blank': 'True'}),
            'emission': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['emissions.Emission']"}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'}),
            'text': ('ckeditor.fields.RichTextField', [], {'null': 'True'}),
            'title': ('django.db.models.fields.CharField', [], {'max_length': '50'})
        },
        u'emissions.schedule': {
            'Meta': {'object_name': 'Schedule'},
            'datetime': ('django.db.models.fields.DateTimeField', [], {}),
            'emission': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['emissions.Emission']"}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'rerun': ('django.db.models.fields.BooleanField', [], {'default': 'False'})
        },
        u'emissions.soundfile': {
            'Meta': {'object_name': 'SoundFile'},
            'episode': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['emissions.Episode']"}),
            'file': ('django.db.models.fields.files.FileField', [], {'max_length': '250'}),
            'fragment': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'podcastable': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
            'title': ('django.db.models.fields.CharField', [], {'max_length': '50'})
        }
    }

    complete_apps = ['emissions']