source: remit/vouchers/migrations/0002_documentation_support.py @ dc17b01

client
Last change on this file since dc17b01 was dc17b01, checked in by Alex Dehnert <adehnert@…>, 15 years ago

WIP WIP WIP: Start of doc upload

  • Property mode set to 100644
File size: 6.5 KB
Line 
1
2from south.db import db
3from django.db import models
4from vouchers.models import *
5
6class Migration:
7   
8    def forwards(self, orm):
9       
10        # Adding model 'Documentation'
11        db.create_table('vouchers_documentation', (
12            ('id', orm['vouchers.documentation:id']),
13            ('backing_file', orm['vouchers.documentation:backing_file']),
14            ('label', orm['vouchers.documentation:label']),
15        ))
16        db.send_create_signal('vouchers', ['Documentation'])
17       
18        # Adding field 'Voucher.documentation'
19        db.add_column('vouchers_voucher', 'documentation', orm['vouchers.voucher:documentation'])
20       
21        # Adding field 'ReimbursementRequest.documentation'
22        db.add_column('vouchers_reimbursementrequest', 'documentation', orm['vouchers.reimbursementrequest:documentation'])
23       
24   
25   
26    def backwards(self, orm):
27       
28        # Deleting model 'Documentation'
29        db.delete_table('vouchers_documentation')
30       
31        # Deleting field 'Voucher.documentation'
32        db.delete_column('vouchers_voucher', 'documentation_id')
33       
34        # Deleting field 'ReimbursementRequest.documentation'
35        db.delete_column('vouchers_reimbursementrequest', 'documentation_id')
36       
37   
38   
39    models = {
40        'finance_core.budgetarea': {
41            'account_number': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
42            'always': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
43            'budget_term': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['finance_core.BudgetTerm']"}),
44            'comment': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
45            'depth': ('django.db.models.fields.PositiveIntegerField', [], {}),
46            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
47            'interested': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
48            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
49            'numchild': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
50            'owner': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
51            'path': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
52            'use_owner': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'})
53        },
54        'finance_core.budgetterm': {
55            'end_date': ('django.db.models.fields.DateField', [], {}),
56            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
57            'name': ('django.db.models.fields.CharField', [], {'max_length': '20'}),
58            'slug': ('django.db.models.fields.SlugField', [], {'max_length': '20', 'db_index': 'True'}),
59            'start_date': ('django.db.models.fields.DateField', [], {}),
60            'submit_deadline': ('django.db.models.fields.DateField', [], {})
61        },
62        'vouchers.documentation': {
63            'backing_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
64            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
65            'label': ('django.db.models.fields.CharField', [], {'max_length': '50'})
66        },
67        'vouchers.reimbursementrequest': {
68            'amount': ('django.db.models.fields.DecimalField', [], {'max_digits': '7', 'decimal_places': '2'}),
69            'approval_status': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
70            'approval_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
71            'budget_area': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'as_budget_area'", 'to': "orm['finance_core.BudgetArea']"}),
72            'budget_term': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['finance_core.BudgetTerm']"}),
73            'check_to_addr': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
74            'check_to_email': ('django.db.models.fields.EmailField', [], {'max_length': '75'}),
75            'check_to_first_name': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
76            'check_to_last_name': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
77            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
78            'documentation': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['vouchers.Documentation']", 'null': 'True'}),
79            'expense_area': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'as_expense_area'", 'to': "orm['finance_core.BudgetArea']"}),
80            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
81            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
82            'printing_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
83            'request_time': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
84            'submitter': ('django.db.models.fields.CharField', [], {'max_length': '10'})
85        },
86        'vouchers.voucher': {
87            'account': ('django.db.models.fields.IntegerField', [], {}),
88            'amount': ('django.db.models.fields.DecimalField', [], {'max_digits': '7', 'decimal_places': '2'}),
89            'description': ('django.db.models.fields.TextField', [], {}),
90            'documentation': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['vouchers.Documentation']", 'null': 'True'}),
91            'email_address': ('django.db.models.fields.EmailField', [], {'max_length': '50'}),
92            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '20'}),
93            'gl': ('django.db.models.fields.IntegerField', [], {}),
94            'group_name': ('django.db.models.fields.CharField', [], {'max_length': '10'}),
95            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
96            'last_name': ('django.db.models.fields.CharField', [], {'max_length': '20'}),
97            'mailing_address': ('django.db.models.fields.TextField', [], {}),
98            'processed': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
99            'signatory': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
100            'signatory_email': ('django.db.models.fields.EmailField', [], {'max_length': '75'})
101        }
102    }
103   
104    complete_apps = ['vouchers']
Note: See TracBrowser for help on using the repository browser.