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
+ # Adding model 'LineItemType'
12
+ db .create_table ('accounting_core_lineitemtype' , (
13
+ ('id' , self .gf ('django.db.models.fields.AutoField' )(primary_key = True )),
14
+ ('text' , self .gf ('django.db.models.fields.TextField' )()),
15
+ ('amount' , self .gf ('django.db.models.fields.DecimalField' )(default = '0.0' , max_digits = 9 , decimal_places = 2 )),
16
+ ('anchor' , self .gf ('django.db.models.fields.related.ForeignKey' )(related_name = 'accounting_lineitemtype' , null = True , to = orm ['datatree.DataTree' ])),
17
+ ('finaid_amount' , self .gf ('django.db.models.fields.DecimalField' )(default = '0.0' , max_digits = 9 , decimal_places = 2 )),
18
+ ('finaid_anchor' , self .gf ('django.db.models.fields.related.ForeignKey' )(related_name = 'accounting_finaiditemtype' , null = True , to = orm ['datatree.DataTree' ])),
19
+ ))
20
+ db .send_create_signal ('accounting_core' , ['LineItemType' ])
21
+
22
+ # Adding model 'Balance'
23
+ db .create_table ('accounting_core_balance' , (
24
+ ('id' , self .gf ('django.db.models.fields.AutoField' )(primary_key = True )),
25
+ ('anchor' , self .gf ('django.db.models.fields.related.ForeignKey' )(related_name = 'balance' , to = orm ['datatree.DataTree' ])),
26
+ ('user' , self .gf ('django.db.models.fields.related.ForeignKey' )(related_name = 'balance' , to = orm ['auth.User' ])),
27
+ ('timestamp' , self .gf ('django.db.models.fields.DateTimeField' )()),
28
+ ('amount' , self .gf ('django.db.models.fields.DecimalField' )(max_digits = 16 , decimal_places = 2 )),
29
+ ('past' , self .gf ('django.db.models.fields.related.ForeignKey' )(to = orm ['accounting_core.Balance' ], null = True )),
30
+ ('_order' , self .gf ('django.db.models.fields.IntegerField' )(default = 0 )),
31
+ ))
32
+ db .send_create_signal ('accounting_core' , ['Balance' ])
33
+
34
+ # Adding model 'Transaction'
35
+ db .create_table ('accounting_core_transaction' , (
36
+ ('id' , self .gf ('django.db.models.fields.AutoField' )(primary_key = True )),
37
+ ('timestamp' , self .gf ('django.db.models.fields.DateTimeField' )()),
38
+ ('text' , self .gf ('django.db.models.fields.TextField' )()),
39
+ ('complete' , self .gf ('django.db.models.fields.BooleanField' )(default = False )),
40
+ ))
41
+ db .send_create_signal ('accounting_core' , ['Transaction' ])
42
+
43
+ # Adding model 'LineItem'
44
+ db .create_table ('accounting_core_lineitem' , (
45
+ ('id' , self .gf ('django.db.models.fields.AutoField' )(primary_key = True )),
46
+ ('transaction' , self .gf ('django.db.models.fields.related.ForeignKey' )(to = orm ['accounting_core.Transaction' ])),
47
+ ('user' , self .gf ('django.db.models.fields.related.ForeignKey' )(related_name = 'accounting_lineitem' , to = orm ['auth.User' ])),
48
+ ('anchor' , self .gf ('django.db.models.fields.related.ForeignKey' )(related_name = 'accounting_lineitem' , to = orm ['datatree.DataTree' ])),
49
+ ('amount' , self .gf ('django.db.models.fields.DecimalField' )(max_digits = 9 , decimal_places = 2 )),
50
+ ('text' , self .gf ('django.db.models.fields.TextField' )()),
51
+ ('li_type' , self .gf ('django.db.models.fields.related.ForeignKey' )(to = orm ['accounting_core.LineItemType' ])),
52
+ ('posted_to' , self .gf ('django.db.models.fields.related.ForeignKey' )(to = orm ['accounting_core.Balance' ], null = True , blank = True )),
53
+ ))
54
+ db .send_create_signal ('accounting_core' , ['LineItem' ])
55
+
56
+
57
+ def backwards (self , orm ):
58
+ # Deleting model 'LineItemType'
59
+ db .delete_table ('accounting_core_lineitemtype' )
60
+
61
+ # Deleting model 'Balance'
62
+ db .delete_table ('accounting_core_balance' )
63
+
64
+ # Deleting model 'Transaction'
65
+ db .delete_table ('accounting_core_transaction' )
66
+
67
+ # Deleting model 'LineItem'
68
+ db .delete_table ('accounting_core_lineitem' )
69
+
70
+
71
+ models = {
72
+ 'accounting_core.balance' : {
73
+ 'Meta' : {'ordering' : "('_order',)" , 'object_name' : 'Balance' },
74
+ '_order' : ('django.db.models.fields.IntegerField' , [], {'default' : '0' }),
75
+ 'amount' : ('django.db.models.fields.DecimalField' , [], {'max_digits' : '16' , 'decimal_places' : '2' }),
76
+ 'anchor' : ('django.db.models.fields.related.ForeignKey' , [], {'related_name' : "'balance'" , 'to' : "orm['datatree.DataTree']" }),
77
+ 'id' : ('django.db.models.fields.AutoField' , [], {'primary_key' : 'True' }),
78
+ 'past' : ('django.db.models.fields.related.ForeignKey' , [], {'to' : "orm['accounting_core.Balance']" , 'null' : 'True' }),
79
+ 'timestamp' : ('django.db.models.fields.DateTimeField' , [], {}),
80
+ 'user' : ('django.db.models.fields.related.ForeignKey' , [], {'related_name' : "'balance'" , 'to' : "orm['auth.User']" })
81
+ },
82
+ 'accounting_core.lineitem' : {
83
+ 'Meta' : {'object_name' : 'LineItem' },
84
+ 'amount' : ('django.db.models.fields.DecimalField' , [], {'max_digits' : '9' , 'decimal_places' : '2' }),
85
+ 'anchor' : ('django.db.models.fields.related.ForeignKey' , [], {'related_name' : "'accounting_lineitem'" , 'to' : "orm['datatree.DataTree']" }),
86
+ 'id' : ('django.db.models.fields.AutoField' , [], {'primary_key' : 'True' }),
87
+ 'li_type' : ('django.db.models.fields.related.ForeignKey' , [], {'to' : "orm['accounting_core.LineItemType']" }),
88
+ 'posted_to' : ('django.db.models.fields.related.ForeignKey' , [], {'to' : "orm['accounting_core.Balance']" , 'null' : 'True' , 'blank' : 'True' }),
89
+ 'text' : ('django.db.models.fields.TextField' , [], {}),
90
+ 'transaction' : ('django.db.models.fields.related.ForeignKey' , [], {'to' : "orm['accounting_core.Transaction']" }),
91
+ 'user' : ('django.db.models.fields.related.ForeignKey' , [], {'related_name' : "'accounting_lineitem'" , 'to' : "orm['auth.User']" })
92
+ },
93
+ 'accounting_core.lineitemtype' : {
94
+ 'Meta' : {'object_name' : 'LineItemType' },
95
+ 'amount' : ('django.db.models.fields.DecimalField' , [], {'default' : "'0.0'" , 'max_digits' : '9' , 'decimal_places' : '2' }),
96
+ 'anchor' : ('django.db.models.fields.related.ForeignKey' , [], {'related_name' : "'accounting_lineitemtype'" , 'null' : 'True' , 'to' : "orm['datatree.DataTree']" }),
97
+ 'finaid_amount' : ('django.db.models.fields.DecimalField' , [], {'default' : "'0.0'" , 'max_digits' : '9' , 'decimal_places' : '2' }),
98
+ 'finaid_anchor' : ('django.db.models.fields.related.ForeignKey' , [], {'related_name' : "'accounting_finaiditemtype'" , 'null' : 'True' , 'to' : "orm['datatree.DataTree']" }),
99
+ 'id' : ('django.db.models.fields.AutoField' , [], {'primary_key' : 'True' }),
100
+ 'text' : ('django.db.models.fields.TextField' , [], {})
101
+ },
102
+ 'accounting_core.transaction' : {
103
+ 'Meta' : {'object_name' : 'Transaction' },
104
+ 'complete' : ('django.db.models.fields.BooleanField' , [], {'default' : 'False' }),
105
+ 'id' : ('django.db.models.fields.AutoField' , [], {'primary_key' : 'True' }),
106
+ 'text' : ('django.db.models.fields.TextField' , [], {}),
107
+ 'timestamp' : ('django.db.models.fields.DateTimeField' , [], {})
108
+ },
109
+ 'auth.group' : {
110
+ 'Meta' : {'object_name' : 'Group' },
111
+ 'id' : ('django.db.models.fields.AutoField' , [], {'primary_key' : 'True' }),
112
+ 'name' : ('django.db.models.fields.CharField' , [], {'unique' : 'True' , 'max_length' : '80' }),
113
+ 'permissions' : ('django.db.models.fields.related.ManyToManyField' , [], {'to' : "orm['auth.Permission']" , 'symmetrical' : 'False' , 'blank' : 'True' })
114
+ },
115
+ 'auth.permission' : {
116
+ 'Meta' : {'ordering' : "('content_type__app_label', 'content_type__model', 'codename')" , 'unique_together' : "(('content_type', 'codename'),)" , 'object_name' : 'Permission' },
117
+ 'codename' : ('django.db.models.fields.CharField' , [], {'max_length' : '100' }),
118
+ 'content_type' : ('django.db.models.fields.related.ForeignKey' , [], {'to' : "orm['contenttypes.ContentType']" }),
119
+ 'id' : ('django.db.models.fields.AutoField' , [], {'primary_key' : 'True' }),
120
+ 'name' : ('django.db.models.fields.CharField' , [], {'max_length' : '50' })
121
+ },
122
+ 'auth.user' : {
123
+ 'Meta' : {'object_name' : 'User' },
124
+ 'date_joined' : ('django.db.models.fields.DateTimeField' , [], {'default' : 'datetime.datetime.now' }),
125
+ 'email' : ('django.db.models.fields.EmailField' , [], {'max_length' : '75' , 'blank' : 'True' }),
126
+ 'first_name' : ('django.db.models.fields.CharField' , [], {'max_length' : '30' , 'blank' : 'True' }),
127
+ 'groups' : ('django.db.models.fields.related.ManyToManyField' , [], {'to' : "orm['auth.Group']" , 'symmetrical' : 'False' , 'blank' : 'True' }),
128
+ 'id' : ('django.db.models.fields.AutoField' , [], {'primary_key' : 'True' }),
129
+ 'is_active' : ('django.db.models.fields.BooleanField' , [], {'default' : 'True' }),
130
+ 'is_staff' : ('django.db.models.fields.BooleanField' , [], {'default' : 'False' }),
131
+ 'is_superuser' : ('django.db.models.fields.BooleanField' , [], {'default' : 'False' }),
132
+ 'last_login' : ('django.db.models.fields.DateTimeField' , [], {'default' : 'datetime.datetime.now' }),
133
+ 'last_name' : ('django.db.models.fields.CharField' , [], {'max_length' : '30' , 'blank' : 'True' }),
134
+ 'password' : ('django.db.models.fields.CharField' , [], {'max_length' : '128' }),
135
+ 'user_permissions' : ('django.db.models.fields.related.ManyToManyField' , [], {'to' : "orm['auth.Permission']" , 'symmetrical' : 'False' , 'blank' : 'True' }),
136
+ 'username' : ('django.db.models.fields.CharField' , [], {'unique' : 'True' , 'max_length' : '30' })
137
+ },
138
+ 'contenttypes.contenttype' : {
139
+ 'Meta' : {'ordering' : "('name',)" , 'unique_together' : "(('app_label', 'model'),)" , 'object_name' : 'ContentType' , 'db_table' : "'django_content_type'" },
140
+ 'app_label' : ('django.db.models.fields.CharField' , [], {'max_length' : '100' }),
141
+ 'id' : ('django.db.models.fields.AutoField' , [], {'primary_key' : 'True' }),
142
+ 'model' : ('django.db.models.fields.CharField' , [], {'max_length' : '100' }),
143
+ 'name' : ('django.db.models.fields.CharField' , [], {'max_length' : '100' })
144
+ },
145
+ 'datatree.datatree' : {
146
+ 'Meta' : {'unique_together' : "(('name', 'parent'),)" , 'object_name' : 'DataTree' },
147
+ 'friendly_name' : ('django.db.models.fields.TextField' , [], {}),
148
+ 'id' : ('django.db.models.fields.AutoField' , [], {'primary_key' : 'True' }),
149
+ 'lock_table' : ('django.db.models.fields.IntegerField' , [], {'default' : '0' }),
150
+ 'name' : ('django.db.models.fields.CharField' , [], {'max_length' : '64' }),
151
+ 'parent' : ('django.db.models.fields.related.ForeignKey' , [], {'blank' : 'True' , 'related_name' : "'child_set'" , 'null' : 'True' , 'to' : "orm['datatree.DataTree']" }),
152
+ 'range_correct' : ('django.db.models.fields.BooleanField' , [], {'default' : 'True' }),
153
+ 'rangeend' : ('django.db.models.fields.IntegerField' , [], {}),
154
+ 'rangestart' : ('django.db.models.fields.IntegerField' , [], {}),
155
+ 'uri' : ('django.db.models.fields.CharField' , [], {'max_length' : '1024' }),
156
+ 'uri_correct' : ('django.db.models.fields.BooleanField' , [], {'default' : 'False' })
157
+ }
158
+ }
159
+
160
+ complete_apps = ['accounting_core' ]
0 commit comments