Portail captif
[ongolaboy.git] / projets_django / bacgl_django / messagerie / migrations / 0003_copieDonneeAuth.py
1 # -*- coding: utf-8 -*-
2 import datetime
3 from south.db import db
4 from south.v2 import DataMigration
5 from django.db import models
6
7 class Migration(DataMigration):
8
9 def forwards(self, orm):
10 "Write your forwards methods here."
11 # Note: Remember to use orm['appname.ModelName'] rather than "from appname.models..."
12 for authentification in orm['ancien_messagerie.Auth'].objects.all():
13 orm['messagerie.Auth']().objects.get_or_create(id=authentification.id,
14 user=authentification.user,
15 password=authentification.password,
16 actif=authentification.actif,
17 expire=authentification.expire,
18 source=authentification.source)
19
20 def backwards(self, orm):
21 "Write your backwards methods here."
22
23 models = {
24 'ancien_messagerie.auth': {
25 'Meta': {'object_name': 'Auth', 'db_table': "u'auth'"},
26 'actif': ('django.db.models.fields.IntegerField', [], {}),
27 'expire': ('django.db.models.fields.IntegerField', [], {}),
28 'id': ('django.db.models.fields.IntegerField', [], {'primary_key': 'True'}),
29 'password': ('django.db.models.fields.CharField', [], {'max_length': '384'}),
30 'source': ('django.db.models.fields.CharField', [], {'max_length': '192'}),
31 'user': ('django.db.models.fields.CharField', [], {'max_length': '384'})
32 },
33 'ancien_messagerie.mailbox': {
34 'Meta': {'object_name': 'Mailbox', 'db_table': "u'mailbox'"},
35 'actif': ('django.db.models.fields.IntegerField', [], {}),
36 'domain': ('django.db.models.fields.CharField', [], {'max_length': '384'}),
37 'expire': ('django.db.models.fields.IntegerField', [], {}),
38 'homedir': ('django.db.models.fields.CharField', [], {'max_length': '768'}),
39 'id': ('django.db.models.fields.IntegerField', [], {'primary_key': 'True'}),
40 'source': ('django.db.models.fields.CharField', [], {'max_length': '192'}),
41 'user': ('django.db.models.fields.CharField', [], {'max_length': '384'})
42 },
43 'ancien_messagerie.virtual': {
44 'Meta': {'object_name': 'Virtual', 'db_table': "u'virtual'"},
45 'actif': ('django.db.models.fields.IntegerField', [], {}),
46 'destination': ('django.db.models.fields.CharField', [], {'max_length': '768'}),
47 'domain': ('django.db.models.fields.CharField', [], {'max_length': '384'}),
48 'expire': ('django.db.models.fields.IntegerField', [], {}),
49 'id': ('django.db.models.fields.IntegerField', [], {'primary_key': 'True'}),
50 'source': ('django.db.models.fields.CharField', [], {'max_length': '192'}),
51 'user': ('django.db.models.fields.CharField', [], {'max_length': '384'})
52 },
53 'messagerie.auth': {
54 'Meta': {'object_name': 'Auth'},
55 'actif': ('django.db.models.fields.IntegerField', [], {}),
56 'expire': ('django.db.models.fields.IntegerField', [], {}),
57 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
58 'password': ('django.db.models.fields.CharField', [], {'max_length': '384'}),
59 'source': ('django.db.models.fields.CharField', [], {'max_length': '192'}),
60 'user': ('django.db.models.fields.CharField', [], {'max_length': '384'})
61 }
62 }
63
64 complete_apps = ['ancien_messagerie', 'messagerie']
65 symmetrical = True