~stylesen/lava-scheduler/multinode

« back to all changes in this revision

Viewing changes to lava_scheduler_app/migrations/0002_auto__chg_field_testjob_device_type.py

  • Committer: Neil Williams
  • Date: 2013-08-01 12:50:21 UTC
  • mfrom: (263.2.1 lava-scheduler)
  • Revision ID: neil.williams@linaro.org-20130801125021-i52wekktsfqtf331
Neil Williams 2013-07-17 PEP8 compliance changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# encoding: utf-8
2
 
import datetime
3
2
from south.db import db
4
3
from south.v2 import SchemaMigration
5
 
from django.db import models
 
4
 
6
5
 
7
6
class Migration(SchemaMigration):
8
7
 
9
8
    def forwards(self, orm):
10
 
        
 
9
 
11
10
        # Changing field 'TestJob.device_type'
12
11
        db.alter_column('lava_scheduler_app_testjob', 'device_type_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['lava_scheduler_app.DeviceType'], null=True))
13
12
 
14
 
 
15
13
    def backwards(self, orm):
16
 
        
 
14
 
17
15
        # User chose to not deal with backwards NULL issues for 'TestJob.device_type'
18
16
        raise RuntimeError("Cannot reverse this migration. 'TestJob.device_type' and its values cannot be restored.")
19
17
 
20
 
 
21
18
    models = {
22
19
        'auth.group': {
23
20
            'Meta': {'object_name': 'Group'},