From 1b859d269c8d79769d0aa9fee8a27aba2ef02c63 Mon Sep 17 00:00:00 2001 From: Dimitri Fontaine Date: Fri, 12 Dec 2014 15:12:54 +0100 Subject: [PATCH] When migrating from MySQL, add columns names to the COPY command. Fixes #132. --- src/sources/mysql.lisp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/sources/mysql.lisp b/src/sources/mysql.lisp index 47e76d6..4f67e61 100644 --- a/src/sources/mysql.lisp +++ b/src/sources/mysql.lisp @@ -149,6 +149,9 @@ ;; and start another task to push that data from the queue to PostgreSQL (lp:submit-task channel #'pgloader.pgsql:copy-from-queue (target-db mysql) (target mysql) queue + :columns (mapcar #'apply-identifier-case + (mapcar #'mysql-column-name + (fields mysql))) :truncate truncate) ;; now wait until both the tasks are over