move over the relevant logs migrations/417-migrate-logs.py (bug 760464)
This commit is contained in:
Родитель
8884d85fad
Коммит
95586b8f58
|
@ -0,0 +1,14 @@
|
|||
from django.db import connection, transaction
|
||||
|
||||
|
||||
def run():
|
||||
cursor = connection.cursor()
|
||||
cursor.execute('select activity_log_id from log_activity_app;')
|
||||
ids = [r[0] for r in cursor.fetch_all()]
|
||||
|
||||
cursor.execute('insert into log_activity_app_mkt '
|
||||
'select * from log_activity_app;')
|
||||
cursor.execute('insert into log_activity_mkt '
|
||||
'select * from log_activity where id IN %(ids)s;',
|
||||
{'ids':ids})
|
||||
transaction.commit()
|
Загрузка…
Ссылка в новой задаче