root / snf-astakos-app / astakos / quotaholder_app / migrations / 0002_auto__add_field_provisionlog_holder__add_field_provisionlog_limit__add.py @ 69c1afae
History | View | Annotate | Download (12.8 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 |
# Adding field 'ProvisionLog.holder'
|
12 |
db.add_column('quotaholder_app_provisionlog', 'holder', self.gf('django.db.models.fields.CharField')(default='', max_length=4096), keep_default=False) |
13 |
|
14 |
# Adding field 'ProvisionLog.limit'
|
15 |
db.add_column('quotaholder_app_provisionlog', 'limit', self.gf('snf_django.lib.db.fields.IntDecimalField')(default=0, max_digits=38, decimal_places=0), keep_default=False) |
16 |
|
17 |
# Adding field 'ProvisionLog.usage_min'
|
18 |
db.add_column('quotaholder_app_provisionlog', 'usage_min', self.gf('snf_django.lib.db.fields.IntDecimalField')(default=0, max_digits=38, decimal_places=0), keep_default=False) |
19 |
|
20 |
# Adding field 'ProvisionLog.usage_max'
|
21 |
db.add_column('quotaholder_app_provisionlog', 'usage_max', self.gf('snf_django.lib.db.fields.IntDecimalField')(default=0, max_digits=38, decimal_places=0), keep_default=False) |
22 |
|
23 |
# Adding field 'Holding.holder'
|
24 |
db.add_column('quotaholder_app_holding', 'holder', self.gf('django.db.models.fields.CharField')(default='', max_length=4096, db_index=True), keep_default=False) |
25 |
|
26 |
# Adding field 'Holding.source'
|
27 |
db.add_column('quotaholder_app_holding', 'source', self.gf('django.db.models.fields.CharField')(max_length=4096, null=True), keep_default=False) |
28 |
|
29 |
# Adding field 'Holding.limit'
|
30 |
db.add_column('quotaholder_app_holding', 'limit', self.gf('snf_django.lib.db.fields.IntDecimalField')(default=0, max_digits=38, decimal_places=0), keep_default=False) |
31 |
|
32 |
# Adding field 'Holding.usage_min'
|
33 |
db.add_column('quotaholder_app_holding', 'usage_min', self.gf('snf_django.lib.db.fields.IntDecimalField')(default=0, max_digits=38, decimal_places=0), keep_default=False) |
34 |
|
35 |
# Adding field 'Holding.usage_max'
|
36 |
db.add_column('quotaholder_app_holding', 'usage_max', self.gf('snf_django.lib.db.fields.IntDecimalField')(default=0, max_digits=38, decimal_places=0), keep_default=False) |
37 |
|
38 |
# Adding field 'Provision.holder'
|
39 |
db.add_column('quotaholder_app_provision', 'holder', self.gf('django.db.models.fields.CharField')(default='', max_length=4096, db_index=True), keep_default=False) |
40 |
|
41 |
# Adding field 'Provision.source'
|
42 |
db.add_column('quotaholder_app_provision', 'source', self.gf('django.db.models.fields.CharField')(max_length=4096, null=True), keep_default=False) |
43 |
|
44 |
|
45 |
def backwards(self, orm): |
46 |
|
47 |
# Deleting field 'ProvisionLog.holder'
|
48 |
db.delete_column('quotaholder_app_provisionlog', 'holder') |
49 |
|
50 |
# Deleting field 'ProvisionLog.limit'
|
51 |
db.delete_column('quotaholder_app_provisionlog', 'limit') |
52 |
|
53 |
# Deleting field 'ProvisionLog.usage_min'
|
54 |
db.delete_column('quotaholder_app_provisionlog', 'usage_min') |
55 |
|
56 |
# Deleting field 'ProvisionLog.usage_max'
|
57 |
db.delete_column('quotaholder_app_provisionlog', 'usage_max') |
58 |
|
59 |
# Deleting field 'Holding.holder'
|
60 |
db.delete_column('quotaholder_app_holding', 'holder') |
61 |
|
62 |
# Deleting field 'Holding.source'
|
63 |
db.delete_column('quotaholder_app_holding', 'source') |
64 |
|
65 |
# Deleting field 'Holding.limit'
|
66 |
db.delete_column('quotaholder_app_holding', 'limit') |
67 |
|
68 |
# Deleting field 'Holding.usage_min'
|
69 |
db.delete_column('quotaholder_app_holding', 'usage_min') |
70 |
|
71 |
# Deleting field 'Holding.usage_max'
|
72 |
db.delete_column('quotaholder_app_holding', 'usage_max') |
73 |
|
74 |
# Deleting field 'Provision.holder'
|
75 |
db.delete_column('quotaholder_app_provision', 'holder') |
76 |
|
77 |
# Deleting field 'Provision.source'
|
78 |
db.delete_column('quotaholder_app_provision', 'source') |
79 |
|
80 |
|
81 |
models = { |
82 |
'quotaholder_app.callserial': {
|
83 |
'Meta': {'unique_together': "(('serial', 'clientkey'),)", 'object_name': 'CallSerial'}, |
84 |
'clientkey': ('django.db.models.fields.CharField', [], {'max_length': '4096'}), |
85 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
86 |
'serial': ('django.db.models.fields.BigIntegerField', [], {}) |
87 |
}, |
88 |
'quotaholder_app.commission': {
|
89 |
'Meta': {'object_name': 'Commission'}, |
90 |
'clientkey': ('django.db.models.fields.CharField', [], {'max_length': '4096'}), |
91 |
'entity': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['quotaholder_app.Entity']"}), |
92 |
'issue_time': ('django.db.models.fields.CharField', [], {'default': "'2013-04-29T09:16:51.7763'", 'max_length': '24'}), |
93 |
'name': ('django.db.models.fields.CharField', [], {'max_length': '4096', 'null': 'True'}), |
94 |
'serial': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) |
95 |
}, |
96 |
'quotaholder_app.entity': {
|
97 |
'Meta': {'object_name': 'Entity'}, |
98 |
'entity': ('django.db.models.fields.CharField', [], {'max_length': '4096', 'primary_key': 'True'}), |
99 |
'key': ('django.db.models.fields.CharField', [], {'max_length': '4096'}), |
100 |
'owner': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'entities'", 'to': "orm['quotaholder_app.Entity']"}) |
101 |
}, |
102 |
'quotaholder_app.holder': {
|
103 |
'Meta': {'object_name': 'Holder'}, |
104 |
'attribute': ('django.db.models.fields.CharField', [], {'max_length': '4096', 'primary_key': 'True'}), |
105 |
'intval': ('django.db.models.fields.BigIntegerField', [], {}), |
106 |
'strval': ('django.db.models.fields.CharField', [], {'max_length': '4096'}) |
107 |
}, |
108 |
'quotaholder_app.holding': {
|
109 |
'Meta': {'unique_together': "(('entity', 'resource'),)", 'object_name': 'Holding'}, |
110 |
'entity': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['quotaholder_app.Entity']"}), |
111 |
'exported': ('snf_django.lib.db.fields.IntDecimalField', [], {'default': '0', 'max_digits': '38', 'decimal_places': '0'}), |
112 |
'exporting': ('snf_django.lib.db.fields.IntDecimalField', [], {'default': '0', 'max_digits': '38', 'decimal_places': '0'}), |
113 |
'flags': ('django.db.models.fields.BigIntegerField', [], {'default': '0'}), |
114 |
'holder': ('django.db.models.fields.CharField', [], {'max_length': '4096', 'db_index': 'True'}), |
115 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
116 |
'imported': ('snf_django.lib.db.fields.IntDecimalField', [], {'default': '0', 'max_digits': '38', 'decimal_places': '0'}), |
117 |
'importing': ('snf_django.lib.db.fields.IntDecimalField', [], {'default': '0', 'max_digits': '38', 'decimal_places': '0'}), |
118 |
'limit': ('snf_django.lib.db.fields.IntDecimalField', [], {'max_digits': '38', 'decimal_places': '0'}), |
119 |
'policy': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['quotaholder_app.Policy']"}), |
120 |
'released': ('snf_django.lib.db.fields.IntDecimalField', [], {'default': '0', 'max_digits': '38', 'decimal_places': '0'}), |
121 |
'releasing': ('snf_django.lib.db.fields.IntDecimalField', [], {'default': '0', 'max_digits': '38', 'decimal_places': '0'}), |
122 |
'resource': ('django.db.models.fields.CharField', [], {'max_length': '4096'}), |
123 |
'returned': ('snf_django.lib.db.fields.IntDecimalField', [], {'default': '0', 'max_digits': '38', 'decimal_places': '0'}), |
124 |
'returning': ('snf_django.lib.db.fields.IntDecimalField', [], {'default': '0', 'max_digits': '38', 'decimal_places': '0'}), |
125 |
'source': ('django.db.models.fields.CharField', [], {'max_length': '4096', 'null': 'True'}), |
126 |
'usage_max': ('snf_django.lib.db.fields.IntDecimalField', [], {'default': '0', 'max_digits': '38', 'decimal_places': '0'}), |
127 |
'usage_min': ('snf_django.lib.db.fields.IntDecimalField', [], {'default': '0', 'max_digits': '38', 'decimal_places': '0'}) |
128 |
}, |
129 |
'quotaholder_app.policy': {
|
130 |
'Meta': {'object_name': 'Policy'}, |
131 |
'capacity': ('snf_django.lib.db.fields.IntDecimalField', [], {'max_digits': '38', 'decimal_places': '0'}), |
132 |
'export_limit': ('snf_django.lib.db.fields.IntDecimalField', [], {'max_digits': '38', 'decimal_places': '0'}), |
133 |
'import_limit': ('snf_django.lib.db.fields.IntDecimalField', [], {'max_digits': '38', 'decimal_places': '0'}), |
134 |
'policy': ('django.db.models.fields.CharField', [], {'max_length': '4096', 'primary_key': 'True'}), |
135 |
'quantity': ('snf_django.lib.db.fields.IntDecimalField', [], {'max_digits': '38', 'decimal_places': '0'}) |
136 |
}, |
137 |
'quotaholder_app.provision': {
|
138 |
'Meta': {'object_name': 'Provision'}, |
139 |
'entity': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['quotaholder_app.Entity']"}), |
140 |
'holder': ('django.db.models.fields.CharField', [], {'max_length': '4096', 'db_index': 'True'}), |
141 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
142 |
'quantity': ('snf_django.lib.db.fields.IntDecimalField', [], {'max_digits': '38', 'decimal_places': '0'}), |
143 |
'resource': ('django.db.models.fields.CharField', [], {'max_length': '4096'}), |
144 |
'serial': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'provisions'", 'to': "orm['quotaholder_app.Commission']"}), |
145 |
'source': ('django.db.models.fields.CharField', [], {'max_length': '4096', 'null': 'True'}) |
146 |
}, |
147 |
'quotaholder_app.provisionlog': {
|
148 |
'Meta': {'object_name': 'ProvisionLog'}, |
149 |
'delta_quantity': ('snf_django.lib.db.fields.IntDecimalField', [], {'max_digits': '38', 'decimal_places': '0'}), |
150 |
'holder': ('django.db.models.fields.CharField', [], {'max_length': '4096'}), |
151 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
152 |
'issue_time': ('django.db.models.fields.CharField', [], {'max_length': '4096'}), |
153 |
'limit': ('snf_django.lib.db.fields.IntDecimalField', [], {'max_digits': '38', 'decimal_places': '0'}), |
154 |
'log_time': ('django.db.models.fields.CharField', [], {'max_length': '4096'}), |
155 |
'name': ('django.db.models.fields.CharField', [], {'max_length': '4096'}), |
156 |
'reason': ('django.db.models.fields.CharField', [], {'max_length': '4096'}), |
157 |
'resource': ('django.db.models.fields.CharField', [], {'max_length': '4096'}), |
158 |
'serial': ('django.db.models.fields.BigIntegerField', [], {}), |
159 |
'source': ('django.db.models.fields.CharField', [], {'max_length': '4096'}), |
160 |
'source_capacity': ('snf_django.lib.db.fields.IntDecimalField', [], {'max_digits': '38', 'decimal_places': '0'}), |
161 |
'source_export_limit': ('snf_django.lib.db.fields.IntDecimalField', [], {'max_digits': '38', 'decimal_places': '0'}), |
162 |
'source_exported': ('snf_django.lib.db.fields.IntDecimalField', [], {'max_digits': '38', 'decimal_places': '0'}), |
163 |
'source_import_limit': ('snf_django.lib.db.fields.IntDecimalField', [], {'max_digits': '38', 'decimal_places': '0'}), |
164 |
'source_imported': ('snf_django.lib.db.fields.IntDecimalField', [], {'max_digits': '38', 'decimal_places': '0'}), |
165 |
'source_quantity': ('snf_django.lib.db.fields.IntDecimalField', [], {'max_digits': '38', 'decimal_places': '0'}), |
166 |
'source_released': ('snf_django.lib.db.fields.IntDecimalField', [], {'max_digits': '38', 'decimal_places': '0'}), |
167 |
'source_returned': ('snf_django.lib.db.fields.IntDecimalField', [], {'max_digits': '38', 'decimal_places': '0'}), |
168 |
'target': ('django.db.models.fields.CharField', [], {'max_length': '4096'}), |
169 |
'target_capacity': ('snf_django.lib.db.fields.IntDecimalField', [], {'max_digits': '38', 'decimal_places': '0'}), |
170 |
'target_export_limit': ('snf_django.lib.db.fields.IntDecimalField', [], {'max_digits': '38', 'decimal_places': '0'}), |
171 |
'target_exported': ('snf_django.lib.db.fields.IntDecimalField', [], {'max_digits': '38', 'decimal_places': '0'}), |
172 |
'target_import_limit': ('snf_django.lib.db.fields.IntDecimalField', [], {'max_digits': '38', 'decimal_places': '0'}), |
173 |
'target_imported': ('snf_django.lib.db.fields.IntDecimalField', [], {'max_digits': '38', 'decimal_places': '0'}), |
174 |
'target_quantity': ('snf_django.lib.db.fields.IntDecimalField', [], {'max_digits': '38', 'decimal_places': '0'}), |
175 |
'target_released': ('snf_django.lib.db.fields.IntDecimalField', [], {'max_digits': '38', 'decimal_places': '0'}), |
176 |
'target_returned': ('snf_django.lib.db.fields.IntDecimalField', [], {'max_digits': '38', 'decimal_places': '0'}), |
177 |
'usage_max': ('snf_django.lib.db.fields.IntDecimalField', [], {'max_digits': '38', 'decimal_places': '0'}), |
178 |
'usage_min': ('snf_django.lib.db.fields.IntDecimalField', [], {'max_digits': '38', 'decimal_places': '0'}) |
179 |
} |
180 |
} |
181 |
|
182 |
complete_apps = ['quotaholder_app']
|