From 952e7da191d215e110e6ae007124dd2f2257e749 Mon Sep 17 00:00:00 2001 From: Dimitri Fontaine Date: Thu, 10 Aug 2017 21:19:25 +0200 Subject: [PATCH] Bug fix CREATE TYPE in schema (previous patch). The previous patch fixed CREATE TYPE so that ENUM types are created in the same schema than the table using them, but failed to update the DROP TYPE statements to also target this schema... --- src/pgsql/pgsql-ddl.lisp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/pgsql/pgsql-ddl.lisp b/src/pgsql/pgsql-ddl.lisp index 0182bd3..4fe2316 100644 --- a/src/pgsql/pgsql-ddl.lisp +++ b/src/pgsql/pgsql-ddl.lisp @@ -32,8 +32,11 @@ (sqltype-extra sqltype)))))) (defmethod format-drop-sql ((sqltype sqltype) &key (stream nil) cascade if-exists) - (format stream "DROP TYPE~:[~; IF EXISTS~] ~a~@[ CASCADE~];" - if-exists (sqltype-name sqltype) cascade)) + (format stream "DROP TYPE~:[~; IF EXISTS~] ~@[~a.~]~a~@[ CASCADE~];" + if-exists + (schema-name (sqltype-schema sqltype)) + (sqltype-name sqltype) + cascade)) ;;;