Statistics
| Branch: | Revision:

root / crm / robocrm / migrations / 0003_auto__chg_field_machine_dstart__chg_field_machine_dend__chg_field_robo.py @ 63244bd1

History | View | Annotate | Download (9.39 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 'Machine.dstart'
13
        db.alter_column('robocrm_machine', 'dstart', self.gf('django.db.models.fields.DateTimeField')(null=True))
14

    
15
        # Changing field 'Machine.dend'
16
        db.alter_column('robocrm_machine', 'dend', self.gf('django.db.models.fields.DateTimeField')(null=True))
17

    
18
        # Changing field 'RoboResource.time_due'
19
        db.alter_column('robocrm_roboresource', 'time_due', self.gf('django.db.models.fields.DateTimeField')(null=True))
20

    
21
        # Changing field 'RoboResource.time_out'
22
        db.alter_column('robocrm_roboresource', 'time_out', self.gf('django.db.models.fields.DateTimeField')(null=True))
23

    
24
    def backwards(self, orm):
25

    
26
        # Changing field 'Machine.dstart'
27
        db.alter_column('robocrm_machine', 'dstart', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2013, 1, 5, 0, 0)))
28

    
29
        # Changing field 'Machine.dend'
30
        db.alter_column('robocrm_machine', 'dend', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2013, 1, 5, 0, 0)))
31

    
32
        # Changing field 'RoboResource.time_due'
33
        db.alter_column('robocrm_roboresource', 'time_due', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2013, 1, 5, 0, 0)))
34

    
35
        # User chose to not deal with backwards NULL issues for 'RoboResource.time_out'
36
        raise RuntimeError("Cannot reverse this migration. 'RoboResource.time_out' and its values cannot be restored.")
37

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

    
134
    complete_apps = ['robocrm']