Statistics
| Branch: | Tag: | Revision:

root / snf-astakos-app / astakos / quotaholder_app / migrations / 0007_auto__del_field_commission_issue_time__del_field_provisionlog_log_time.py @ 164e64d5

History | View | Annotate | Download (4.7 kB)

1
# encoding: 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
class Migration(SchemaMigration):
8

    
9
    def forwards(self, orm):
10
        
11
        # Deleting field 'Commission.issue_time'
12
        db.delete_column('quotaholder_app_commission', 'issue_time')
13

    
14
        # Deleting field 'ProvisionLog.log_time'
15
        db.delete_column('quotaholder_app_provisionlog', 'log_time')
16

    
17
        # Deleting field 'ProvisionLog.issue_time'
18
        db.delete_column('quotaholder_app_provisionlog', 'issue_time')
19

    
20

    
21
    def backwards(self, orm):
22
        
23
        # User chose to not deal with backwards NULL issues for 'Commission.issue_time'
24
        raise RuntimeError("Cannot reverse this migration. 'Commission.issue_time' and its values cannot be restored.")
25

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

    
29
        # User chose to not deal with backwards NULL issues for 'ProvisionLog.issue_time'
30
        raise RuntimeError("Cannot reverse this migration. 'ProvisionLog.issue_time' and its values cannot be restored.")
31

    
32

    
33
    models = {
34
        'quotaholder_app.commission': {
35
            'Meta': {'object_name': 'Commission'},
36
            'clientkey': ('django.db.models.fields.CharField', [], {'max_length': '4096'}),
37
            'issue_datetime': ('django.db.models.fields.DateTimeField', [], {}),
38
            'name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '4096'}),
39
            'serial': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
40
        },
41
        'quotaholder_app.holding': {
42
            'Meta': {'unique_together': "(('holder', 'source', 'resource'),)", 'object_name': 'Holding'},
43
            'holder': ('django.db.models.fields.CharField', [], {'max_length': '4096', 'db_index': 'True'}),
44
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
45
            'limit': ('snf_django.lib.db.fields.IntDecimalField', [], {'max_digits': '38', 'decimal_places': '0'}),
46
            'resource': ('django.db.models.fields.CharField', [], {'max_length': '4096'}),
47
            'source': ('django.db.models.fields.CharField', [], {'max_length': '4096', 'null': 'True'}),
48
            'usage_max': ('snf_django.lib.db.fields.IntDecimalField', [], {'default': '0', 'max_digits': '38', 'decimal_places': '0'}),
49
            'usage_min': ('snf_django.lib.db.fields.IntDecimalField', [], {'default': '0', 'max_digits': '38', 'decimal_places': '0'})
50
        },
51
        'quotaholder_app.provision': {
52
            'Meta': {'object_name': 'Provision'},
53
            'holder': ('django.db.models.fields.CharField', [], {'max_length': '4096', 'db_index': 'True'}),
54
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
55
            'quantity': ('snf_django.lib.db.fields.IntDecimalField', [], {'max_digits': '38', 'decimal_places': '0'}),
56
            'resource': ('django.db.models.fields.CharField', [], {'max_length': '4096'}),
57
            'serial': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'provisions'", 'to': "orm['quotaholder_app.Commission']"}),
58
            'source': ('django.db.models.fields.CharField', [], {'max_length': '4096', 'null': 'True'})
59
        },
60
        'quotaholder_app.provisionlog': {
61
            'Meta': {'object_name': 'ProvisionLog'},
62
            'delta_quantity': ('snf_django.lib.db.fields.IntDecimalField', [], {'max_digits': '38', 'decimal_places': '0'}),
63
            'holder': ('django.db.models.fields.CharField', [], {'max_length': '4096'}),
64
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
65
            'issue_datetime': ('django.db.models.fields.DateTimeField', [], {}),
66
            'limit': ('snf_django.lib.db.fields.IntDecimalField', [], {'max_digits': '38', 'decimal_places': '0'}),
67
            'log_datetime': ('django.db.models.fields.DateTimeField', [], {}),
68
            'name': ('django.db.models.fields.CharField', [], {'max_length': '4096'}),
69
            'reason': ('django.db.models.fields.CharField', [], {'max_length': '4096'}),
70
            'resource': ('django.db.models.fields.CharField', [], {'max_length': '4096'}),
71
            'serial': ('django.db.models.fields.BigIntegerField', [], {}),
72
            'source': ('django.db.models.fields.CharField', [], {'max_length': '4096', 'null': 'True'}),
73
            'usage_max': ('snf_django.lib.db.fields.IntDecimalField', [], {'max_digits': '38', 'decimal_places': '0'}),
74
            'usage_min': ('snf_django.lib.db.fields.IntDecimalField', [], {'max_digits': '38', 'decimal_places': '0'})
75
        }
76
    }
77

    
78
    complete_apps = ['quotaholder_app']