mirror of
https://github.com/dimitri/pgloader.git
synced 2026-05-05 10:56:10 +02:00
Fix create schema handling in data only scenarios.
In b301aa93948f05b5189382f641cf1e040fc655f2 the "create schema" default changed to true, which is a good idea. As a consequence pgloader should consider this operation only when "create tables" is set: we don't want to start with creating target schemas in a target database that is said to be ready to host the data.
This commit is contained in:
parent
dfe5c38185
commit
2363d8845f
@ -30,16 +30,16 @@
|
||||
(setf (catalog-types-without-btree catalog)
|
||||
(list-typenames-without-btree-support))
|
||||
|
||||
(when create-schemas
|
||||
(with-stats-collection ("Create Schemas" :section :pre
|
||||
:use-result-as-read t
|
||||
:use-result-as-rows t)
|
||||
(create-schemas catalog
|
||||
:include-drop include-drop
|
||||
:client-min-messages :error)))
|
||||
|
||||
(if create-tables
|
||||
(progn
|
||||
(when create-schemas
|
||||
(with-stats-collection ("Create Schemas" :section :pre
|
||||
:use-result-as-read t
|
||||
:use-result-as-rows t)
|
||||
(create-schemas catalog
|
||||
:include-drop include-drop
|
||||
:client-min-messages :error)))
|
||||
|
||||
;; create new SQL types (ENUMs, SETs) if needed and before we
|
||||
;; get to the table definitions that will use them
|
||||
(with-stats-collection ("Create SQL Types" :section :pre
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user