recopie ancien Auth
authorWilly MANGA <willy.manga@auf.org>
Thu, 29 May 2014 16:56:06 +0000 (17:56 +0100)
committerWilly MANGA <willy.manga@auf.org>
Thu, 29 May 2014 16:56:06 +0000 (17:56 +0100)
projets_django/bacgl_django/messagerie/migrations/0003_copieDonneeAuth.py

index 783a6bc..296decd 100644 (file)
@@ -9,6 +9,13 @@ class Migration(DataMigration):
     def forwards(self, orm):
         "Write your forwards methods here."
         # Note: Remember to use orm['appname.ModelName'] rather than "from appname.models..."
+        for authentification in orm['ancien_messagerie.Auth'].objects.all():
+            orm['messagerie.Auth']().objects.get_or_create(id=authentification.id,
+                    user=authentification.user,
+                    password=authentification.password,
+                    actif=authentification.actif,
+                    expire=authentification.expire,
+                    source=authentification.source)
 
     def backwards(self, orm):
         "Write your backwards methods here."