1
1
# -*- coding: utf-8 -*-
2
- from south .utils import datetime_utils as 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 'EncodeJob'
12
- db .create_table (u'dj_elastictranscoder_encodejob' , (
13
- ('id' , self .gf ('django.db.models.fields.CharField' )(max_length = 100 , primary_key = True )),
14
- ('content_type' , self .gf ('django.db.models.fields.related.ForeignKey' )(to = orm ['contenttypes.ContentType' ])),
15
- ('object_id' , self .gf ('django.db.models.fields.PositiveIntegerField' )()),
16
- ('state' , self .gf ('django.db.models.fields.PositiveIntegerField' )(default = 0 , db_index = True )),
17
- ('message' , self .gf ('django.db.models.fields.TextField' )()),
18
- ('created_at' , self .gf ('django.db.models.fields.DateTimeField' )(auto_now_add = True , blank = True )),
19
- ('last_modified' , self .gf ('django.db.models.fields.DateTimeField' )(auto_now = True , blank = True )),
20
- ))
21
- db .send_create_signal (u'dj_elastictranscoder' , ['EncodeJob' ])
22
-
23
-
24
- def backwards (self , orm ):
25
- # Deleting model 'EncodeJob'
26
- db .delete_table (u'dj_elastictranscoder_encodejob' )
27
-
28
-
29
- models = {
30
- u'contenttypes.contenttype' : {
31
- 'Meta' : {'ordering' : "('name',)" , 'unique_together' : "(('app_label', 'model'),)" , 'object_name' : 'ContentType' , 'db_table' : "'django_content_type'" },
32
- 'app_label' : ('django.db.models.fields.CharField' , [], {'max_length' : '100' }),
33
- u'id' : ('django.db.models.fields.AutoField' , [], {'primary_key' : 'True' }),
34
- 'model' : ('django.db.models.fields.CharField' , [], {'max_length' : '100' }),
35
- 'name' : ('django.db.models.fields.CharField' , [], {'max_length' : '100' })
36
- },
37
- u'dj_elastictranscoder.encodejob' : {
38
- 'Meta' : {'object_name' : 'EncodeJob' },
39
- 'content_type' : ('django.db.models.fields.related.ForeignKey' , [], {'to' : u"orm['contenttypes.ContentType']" }),
40
- 'created_at' : ('django.db.models.fields.DateTimeField' , [], {'auto_now_add' : 'True' , 'blank' : 'True' }),
41
- 'id' : ('django.db.models.fields.CharField' , [], {'max_length' : '100' , 'primary_key' : 'True' }),
42
- 'last_modified' : ('django.db.models.fields.DateTimeField' , [], {'auto_now' : 'True' , 'blank' : 'True' }),
43
- 'message' : ('django.db.models.fields.TextField' , [], {}),
44
- 'object_id' : ('django.db.models.fields.PositiveIntegerField' , [], {}),
45
- 'state' : ('django.db.models.fields.PositiveIntegerField' , [], {'default' : '0' , 'db_index' : 'True' })
46
- }
47
- }
48
-
49
- complete_apps = ['dj_elastictranscoder' ]
2
+ from __future__ import unicode_literals
3
+
4
+ from django .db import models , migrations
5
+
6
+
7
+ class Migration (migrations .Migration ):
8
+
9
+ dependencies = [
10
+ ('contenttypes' , '0001_initial' ),
11
+ ]
12
+
13
+ operations = [
14
+ migrations .CreateModel (
15
+ name = 'EncodeJob' ,
16
+ fields = [
17
+ ('id' , models .CharField (max_length = 100 , serialize = False , primary_key = True )),
18
+ ('object_id' , models .PositiveIntegerField ()),
19
+ ('state' , models .PositiveIntegerField (default = 0 , db_index = True , choices = [(0 , b'Submitted' ), (1 , b'Progressing' ), (2 , b'Error' ), (3 , b'Warning' ), (4 , b'Complete' )])),
20
+ ('message' , models .TextField ()),
21
+ ('created_at' , models .DateTimeField (auto_now_add = True )),
22
+ ('last_modified' , models .DateTimeField (auto_now = True )),
23
+ ('content_type' , models .ForeignKey (to = 'contenttypes.ContentType' )),
24
+ ],
25
+ ),
26
+ ]
0 commit comments