From 51992e1c30254d0df0c6de5a845e3d4af07202be Mon Sep 17 00:00:00 2001 From: klmp200 Date: Sat, 19 Aug 2017 17:17:16 +0200 Subject: [PATCH] Mailing migration --- migrate.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/migrate.py b/migrate.py index 005e17b9..18202b40 100644 --- a/migrate.py +++ b/migrate.py @@ -1335,6 +1335,13 @@ def migrate_forum(): def migrate_mailings(): cur = db.cursor(MySQLdb.cursors.SSDictCursor) + + print("Delete all mailings") + + Mailing.objects.all().delete() + + print("Migrating old database") + mailing_db = cur.execute(""" SELECT * FROM mailing """) @@ -1384,6 +1391,7 @@ def main(): # reset_sas_moderators() # migrate_forum() # reset_index('forum') + migrate_mailings() end = datetime.datetime.now() print("End at %s" % end) print("Running time: %s" % (end - start))