source: remit/finance_core/migrations/0004_socket_auth_password.py @ 38843de

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

Whoops, SocketAuth? not ScriptsSSLAuth

  • Property mode set to 100644
File size: 7.4 KB
Line 
1# encoding: utf-8
2import datetime
3from south.db import db
4from south.v2 import DataMigration
5from django.contrib.auth.hashers import UNUSABLE_PASSWORD
6from django.db import models
7
8class Migration(DataMigration):
9
10    def forwards(self, orm):
11        "Write your forwards methods here."
12        issues = orm['auth.user'].objects.filter(password__in=['', 'SocketAuth'])
13        issues.update(password=UNUSABLE_PASSWORD)
14
15    def backwards(self, orm):
16        "Write your backwards methods here."
17
18
19    models = {
20        'auth.group': {
21            'Meta': {'object_name': 'Group'},
22            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
23            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
24            'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
25        },
26        'auth.permission': {
27            'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
28            'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
29            'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
30            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
31            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
32        },
33        'auth.user': {
34            'Meta': {'object_name': 'User'},
35            'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2013, 1, 25, 17, 25, 58, 606126)'}),
36            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
37            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
38            'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
39            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
40            'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
41            'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
42            'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
43            'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2013, 1, 25, 17, 25, 58, 606042)'}),
44            'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
45            'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
46            'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
47            'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
48        },
49        'contenttypes.contenttype': {
50            'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
51            'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
52            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
53            'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
54            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
55        },
56        'finance_core.budgetarea': {
57            'Meta': {'ordering': "['path']", 'object_name': 'BudgetArea'},
58            'account_number': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
59            'always': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
60            'budget_term': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['finance_core.BudgetTerm']", 'through': "orm['finance_core.BudgetAreaTerm']", 'symmetrical': 'False'}),
61            'comment': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
62            'depth': ('django.db.models.fields.PositiveIntegerField', [], {}),
63            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
64            'interested': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
65            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
66            'numchild': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
67            'owner': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
68            'path': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
69            'use_owner': ('django.db.models.fields.BooleanField', [], {'default': 'False'})
70        },
71        'finance_core.budgetareaterm': {
72            'Meta': {'object_name': 'BudgetAreaTerm'},
73            'budget_area': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['finance_core.BudgetArea']"}),
74            'budget_term': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['finance_core.BudgetTerm']"}),
75            'comment': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
76            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
77        },
78        'finance_core.budgetterm': {
79            'Meta': {'object_name': 'BudgetTerm'},
80            'end_date': ('django.db.models.fields.DateField', [], {}),
81            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
82            'name': ('django.db.models.fields.CharField', [], {'max_length': '20'}),
83            'slug': ('django.db.models.fields.SlugField', [], {'max_length': '20', 'db_index': 'True'}),
84            'start_date': ('django.db.models.fields.DateField', [], {}),
85            'submit_deadline': ('django.db.models.fields.DateField', [], {})
86        },
87        'finance_core.lineitem': {
88            'Meta': {'object_name': 'LineItem'},
89            'amount': ('django.db.models.fields.DecimalField', [], {'max_digits': '7', 'decimal_places': '2'}),
90            'budget_area': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['finance_core.BudgetArea']"}),
91            'budget_term': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['finance_core.BudgetTerm']"}),
92            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
93            'label': ('django.db.models.fields.CharField', [], {'max_length': '60'}),
94            'layer': ('django.db.models.fields.IntegerField', [], {}),
95            'tx': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['finance_core.Transaction']"})
96        },
97        'finance_core.transaction': {
98            'Meta': {'object_name': 'Transaction'},
99            'desc': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
100            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
101            'incurred_time': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
102            'name': ('django.db.models.fields.CharField', [], {'max_length': '60'}),
103            'tx_create_time': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'})
104        }
105    }
106
107    complete_apps = ['auth', 'finance_core']
Note: See TracBrowser for help on using the repository browser.