mirror of
https://github.com/dimitri/pgloader.git
synced 2026-05-05 10:56:10 +02:00
Find schema names unquoted.
When doing a MySQL to PostgreSQL migration in data only mode, pgloader matches schema names found on both source and target database, and much like with table names must do so ensuring unquoted schema names. Otherwise we fail to find the schema name again, because one spelling has the quotes, but not the other one, when using the “quote identifiers” option. Fix #659, at least some forms of it.
This commit is contained in:
parent
1d7706c045
commit
6964764fb4
@ -26,7 +26,7 @@
|
||||
;; MySQL schema map to PostgreSQL databases, so we might
|
||||
;; have NIL as a schema name here. Find the current
|
||||
;; PostgreSQL schema instead of NIL.
|
||||
(or (schema-name source-schema)
|
||||
(or (ensure-unquoted (schema-name source-schema))
|
||||
(pomo:query "select current_schema()" :single)))
|
||||
(target-schema
|
||||
(find-schema target-catalog schema-name)))
|
||||
|
||||
@ -71,7 +71,7 @@
|
||||
(loop :for table :in (append (table-list catalog)
|
||||
(view-list catalog))
|
||||
:do (let* ((schema-name
|
||||
(or (schema-name (table-schema table))
|
||||
(or (ensure-unquoted (schema-name (table-schema table)))
|
||||
current-schema
|
||||
(setf current-schema
|
||||
(pomo:query "select current_schema()" :single))))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user