Statistics
| Branch: | Revision:

root / crm / robocrm / migrations / 0004_auto__chg_field_robouser_sec_major_one__chg_field_robouser_cell__chg_f.py @ 63244bd1

History | View | Annotate | Download (9.13 KB)

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

    
12
        # Changing field 'RoboUser.sec_major_one'
13
        db.alter_column('robocrm_robouser', 'sec_major_one', self.gf('django.db.models.fields.CharField')(max_length=20, null=True))
14

    
15
        # Changing field 'RoboUser.cell'
16
        db.alter_column('robocrm_robouser', 'cell', self.gf('django.db.models.fields.DecimalField')(null=True, max_digits=10, decimal_places=0))
17

    
18
        # Changing field 'RoboUser.sec_major_two'
19
        db.alter_column('robocrm_robouser', 'sec_major_two', self.gf('django.db.models.fields.CharField')(max_length=20, null=True))
20

    
21
    def backwards(self, orm):
22

    
23
        # Changing field 'RoboUser.sec_major_one'
24
        db.alter_column('robocrm_robouser', 'sec_major_one', self.gf('django.db.models.fields.CharField')(default='', max_length=20))
25

    
26
        # User chose to not deal with backwards NULL issues for 'RoboUser.cell'
27
        raise RuntimeError("Cannot reverse this migration. 'RoboUser.cell' and its values cannot be restored.")
28

    
29
        # Changing field 'RoboUser.sec_major_two'
30
        db.alter_column('robocrm_robouser', 'sec_major_two', self.gf('django.db.models.fields.CharField')(default='', max_length=20))
31

    
32
    models = {
33
        'auth.group': {
34
            'Meta': {'object_name': 'Group'},
35
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
36
            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
37
            'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
38
        },
39
        'auth.permission': {
40
            'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
41
            'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
42
            'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
43
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
44
            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
45
        },
46
        'auth.user': {
47
            'Meta': {'object_name': 'User'},
48
            'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
49
            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
50
            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
51
            'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
52
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
53
            'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
54
            'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
55
            'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
56
            'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
57
            'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
58
            'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
59
            'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
60
            'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
61
        },
62
        'contenttypes.contenttype': {
63
            'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
64
            'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
65
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
66
            'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
67
            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
68
        },
69
        'robocrm.event': {
70
            'Meta': {'object_name': 'Event'},
71
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
72
            'imgurl': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
73
            'machine': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['robocrm.Machine']"}),
74
            'matuse': ('django.db.models.fields.TextField', [], {}),
75
            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['robocrm.Project']"}),
76
            'succ': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
77
            'tend': ('django.db.models.fields.DateTimeField', [], {}),
78
            'tstart': ('django.db.models.fields.DateTimeField', [], {}),
79
            'type': ('django.db.models.fields.CharField', [], {'max_length': '30'}),
80
            'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['robocrm.RoboUser']"})
81
        },
82
        'robocrm.machine': {
83
            'Meta': {'object_name': 'Machine'},
84
            'dend': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
85
            'dstart': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
86
            'id': ('django.db.models.fields.CharField', [], {'max_length': '10', 'primary_key': 'True'}),
87
            'maint': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
88
            'type': ('django.db.models.fields.CharField', [], {'max_length': '20'})
89
        },
90
        'robocrm.project': {
91
            'Meta': {'object_name': 'Project'},
92
            'charge': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
93
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
94
            'name': ('django.db.models.fields.CharField', [], {'max_length': '30'}),
95
            'primuser': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'pri+'", 'to': "orm['robocrm.RoboUser']"}),
96
            'users': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'u+'", 'symmetrical': 'False', 'to': "orm['robocrm.RoboUser']"})
97
        },
98
        'robocrm.roboresource': {
99
            'Meta': {'object_name': 'RoboResource'},
100
            'checked_out': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
101
            'id': ('django.db.models.fields.CharField', [], {'max_length': '20', 'primary_key': 'True'}),
102
            'officer': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'o+'", 'blank': 'True', 'to': "orm['robocrm.RoboUser']"}),
103
            'time_due': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
104
            'time_out': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
105
            'type': ('django.db.models.fields.CharField', [], {'max_length': '30'}),
106
            'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'u+'", 'blank': 'True', 'to': "orm['robocrm.RoboUser']"})
107
        },
108
        'robocrm.robouser': {
109
            'Meta': {'object_name': 'RoboUser'},
110
            'bench_status': ('django.db.models.fields.CharField', [], {'default': "'GD'", 'max_length': '2'}),
111
            'cell': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '10', 'decimal_places': '0', 'blank': 'True'}),
112
            'class_level': ('django.db.models.fields.CharField', [], {'default': "'FR'", 'max_length': '2'}),
113
            'club_rank': ('django.db.models.fields.CharField', [], {'default': "'JM'", 'max_length': '2'}),
114
            'dues_paid': ('django.db.models.fields.DateField', [], {}),
115
            'grad_year': ('django.db.models.fields.DecimalField', [], {'max_digits': '4', 'decimal_places': '0'}),
116
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
117
            'machines': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['robocrm.Machine']", 'symmetrical': 'False'}),
118
            'major': ('django.db.models.fields.CharField', [], {'max_length': '20'}),
119
            'rfid': ('django.db.models.fields.DecimalField', [], {'default': '0', 'max_digits': '10', 'decimal_places': '0', 'blank': 'True'}),
120
            'sec_major_one': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}),
121
            'sec_major_two': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}),
122
            'shop_status': ('django.db.models.fields.CharField', [], {'default': "'GD'", 'max_length': '2'}),
123
            'tshirt_rec': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
124
            'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'})
125
        }
126
    }
127

    
128
    complete_apps = ['robocrm']