diff --git a/src/macaw/rewrite.clj b/src/macaw/rewrite.clj index e3a9da4..44767fb 100644 --- a/src/macaw/rewrite.clj +++ b/src/macaw/rewrite.clj @@ -73,11 +73,11 @@ [])))) (defn- rename-table - [updated-nodes table-renames schema-renames known-tables ^Table t _ctx] + [updated-nodes table-renames schema-renames known-tables ^Table t opts] (when-let [rename (u/find-relevant table-renames (get known-tables t) [:table :schema])] (vswap! updated-nodes conj [t rename]) (.setName t (val rename))) - (let [schema-name (collect/normalize-reference (.getSchemaName t) _ctx)] + (let [schema-name (collect/normalize-reference (.getSchemaName t) opts)] (when-let [schema-rename (find schema-renames schema-name)] (vswap! updated-nodes conj [schema-name schema-rename]) (.setSchemaName t (val schema-rename))))) diff --git a/test/macaw/core_test.clj b/test/macaw/core_test.clj index 2ace532..c4bdd34 100644 --- a/test/macaw/core_test.clj +++ b/test/macaw/core_test.clj @@ -1,6 +1,5 @@ (ns ^:parallel macaw.core-test (:require - [clojure.string :as str] [clojure.test :refer [deftest is testing]] [macaw.core :as m] [macaw.test.util :refer [ws=]]