1+ # -*- coding: utf-8 -*-
2+ import datetime
3+ from south .db import db
4+ from south .v2 import SchemaMigration
5+ from django .db import models
6+
7+
8+ class Migration (SchemaMigration ):
9+
10+ def forwards (self , orm ):
11+ # Adding model 'Job'
12+ db .create_table (u'dj_elastictranscoder_job' , (
13+ (u'id' , self .gf ('django.db.models.fields.AutoField' )(primary_key = True )),
14+ ('pipeline_id' , self .gf ('django.db.models.fields.CharField' )(default = '1402976603358-rwcmfz' , max_length = 32 )),
15+ ('upload' , self .gf ('django.db.models.fields.related.ForeignKey' )(to = orm ['dj_elastictranscoder.Upload' ])),
16+ ('et_job_id' , self .gf ('django.db.models.fields.CharField' )(max_length = 100 , blank = True )),
17+ ))
18+ db .send_create_signal (u'dj_elastictranscoder' , ['Job' ])
19+
20+ # Adding model 'Upload'
21+ db .create_table (u'dj_elastictranscoder_upload' , (
22+ (u'id' , self .gf ('django.db.models.fields.AutoField' )(primary_key = True )),
23+ ('video' , self .gf ('django.db.models.fields.files.FileField' )(max_length = 100 )),
24+ ))
25+ db .send_create_signal (u'dj_elastictranscoder' , ['Upload' ])
26+
27+ # Adding model 'Output'
28+ db .create_table (u'dj_elastictranscoder_output' , (
29+ (u'id' , self .gf ('django.db.models.fields.AutoField' )(primary_key = True )),
30+ ('job' , self .gf ('django.db.models.fields.related.ForeignKey' )(to = orm ['dj_elastictranscoder.Job' ])),
31+ ('preset' , self .gf ('django.db.models.fields.CharField' )(max_length = 20 )),
32+ ('video' , self .gf ('django.db.models.fields.files.FileField' )(max_length = 100 , blank = True )),
33+ ))
34+ db .send_create_signal (u'dj_elastictranscoder' , ['Output' ])
35+
36+ # Adding unique constraint on 'Output', fields ['job', 'preset']
37+ db .create_unique (u'dj_elastictranscoder_output' , ['job_id' , 'preset' ])
38+
39+
40+ def backwards (self , orm ):
41+ # Removing unique constraint on 'Output', fields ['job', 'preset']
42+ db .delete_unique (u'dj_elastictranscoder_output' , ['job_id' , 'preset' ])
43+
44+ # Deleting model 'Job'
45+ db .delete_table (u'dj_elastictranscoder_job' )
46+
47+ # Deleting model 'Upload'
48+ db .delete_table (u'dj_elastictranscoder_upload' )
49+
50+ # Deleting model 'Output'
51+ db .delete_table (u'dj_elastictranscoder_output' )
52+
53+
54+ models = {
55+ u'contenttypes.contenttype' : {
56+ 'Meta' : {'ordering' : "('name',)" , 'unique_together' : "(('app_label', 'model'),)" , 'object_name' : 'ContentType' , 'db_table' : "'django_content_type'" },
57+ 'app_label' : ('django.db.models.fields.CharField' , [], {'max_length' : '100' }),
58+ u'id' : ('django.db.models.fields.AutoField' , [], {'primary_key' : 'True' }),
59+ 'model' : ('django.db.models.fields.CharField' , [], {'max_length' : '100' }),
60+ 'name' : ('django.db.models.fields.CharField' , [], {'max_length' : '100' })
61+ },
62+ u'dj_elastictranscoder.encodejob' : {
63+ 'Meta' : {'object_name' : 'EncodeJob' },
64+ 'content_type' : ('django.db.models.fields.related.ForeignKey' , [], {'to' : u"orm['contenttypes.ContentType']" }),
65+ 'created_at' : ('django.db.models.fields.DateTimeField' , [], {'auto_now_add' : 'True' , 'blank' : 'True' }),
66+ 'id' : ('django.db.models.fields.CharField' , [], {'max_length' : '100' , 'primary_key' : 'True' }),
67+ 'last_modified' : ('django.db.models.fields.DateTimeField' , [], {'auto_now' : 'True' , 'blank' : 'True' }),
68+ 'message' : ('django.db.models.fields.TextField' , [], {}),
69+ 'object_id' : ('django.db.models.fields.PositiveIntegerField' , [], {}),
70+ 'state' : ('django.db.models.fields.PositiveIntegerField' , [], {'default' : '0' , 'db_index' : 'True' })
71+ },
72+ u'dj_elastictranscoder.job' : {
73+ 'Meta' : {'object_name' : 'Job' },
74+ 'et_job_id' : ('django.db.models.fields.CharField' , [], {'max_length' : '100' , 'blank' : 'True' }),
75+ u'id' : ('django.db.models.fields.AutoField' , [], {'primary_key' : 'True' }),
76+ 'pipeline_id' : ('django.db.models.fields.CharField' , [], {'default' : "'1402976603358-rwcmfz'" , 'max_length' : '32' }),
77+ 'upload' : ('django.db.models.fields.related.ForeignKey' , [], {'to' : u"orm['dj_elastictranscoder.Upload']" })
78+ },
79+ u'dj_elastictranscoder.output' : {
80+ 'Meta' : {'unique_together' : "(('job', 'preset'),)" , 'object_name' : 'Output' },
81+ u'id' : ('django.db.models.fields.AutoField' , [], {'primary_key' : 'True' }),
82+ 'job' : ('django.db.models.fields.related.ForeignKey' , [], {'to' : u"orm['dj_elastictranscoder.Job']" }),
83+ 'preset' : ('django.db.models.fields.CharField' , [], {'max_length' : '20' }),
84+ 'video' : ('django.db.models.fields.files.FileField' , [], {'max_length' : '100' , 'blank' : 'True' })
85+ },
86+ u'dj_elastictranscoder.upload' : {
87+ 'Meta' : {'object_name' : 'Upload' },
88+ u'id' : ('django.db.models.fields.AutoField' , [], {'primary_key' : 'True' }),
89+ 'video' : ('django.db.models.fields.files.FileField' , [], {'max_length' : '100' })
90+ }
91+ }
92+
93+ complete_apps = ['dj_elastictranscoder' ]
0 commit comments