Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mappings/templates/user_mappings/sql/default/create.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mappings/templates/user_mappings/sql/default/create.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mappings/templates/user_mappings/sql/default/create.sql	(date 1632822697201)
@@ -3,4 +3,4 @@
 CREATE USER MAPPING FOR {% if data.name == "CURRENT_USER" or data.name == "PUBLIC" %}{{ data.name }}{% else %}{{ conn|qtIdent(data.name) }}{% endif %} SERVER {{ conn|qtIdent(fdwdata.name) }}{%endif%}{% if data.umoptions %}{% if is_valid_options %}
 
     OPTIONS ({% for variable in data.umoptions %}{% if loop.index != 1 %}, {% endif %}
-{{ conn|qtIdent(variable.umoption) }} {{ variable.umvalue|qtLiteral }}{% endfor %}){% endif %}{% endif %};
\ No newline at end of file
+{{ conn|qtIdent(variable.umoption) }} {{ variable.umvalue|qtLiteral }}{% endfor %}){% endif %}{% endif %};
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/domains/__init__.py
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/domains/__init__.py	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/domains/__init__.py	(date 1632822697316)
@@ -768,7 +768,7 @@
         sql_header = """-- DOMAIN: {0}.{1}\n\n""".format(
             data['basensp'], data['name'])
 
-        sql_header += """-- DROP DOMAIN {0};\n
+        sql_header += """-- DROP DOMAIN IF EXISTS {0};\n
 """.format(self.qtIdent(self.conn, data['basensp'], data['name']))
         SQL = sql_header + SQL
 
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/create_sequence_ownedby_remove.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/create_sequence_ownedby_remove.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/create_sequence_ownedby_remove.sql	(date 1632822697713)
@@ -1,6 +1,6 @@
 -- SEQUENCE: public.Seq1_$%{}[]()&*^!@"'`\/#
 
--- DROP SEQUENCE public."Seq1_$%{}[]()&*^!@""'`\/#";
+-- DROP SEQUENCE IF EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#";
 
 CREATE SEQUENCE IF NOT EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#"
     INCREMENT 5
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/pg/default/alter_domain_comment.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/pg/default/alter_domain_comment.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/pg/default/alter_domain_comment.sql	(date 1632822697322)
@@ -1,6 +1,6 @@
 -- DOMAIN: public.Dom1_$%{}[]()&*^!@"'`\/#
 
--- DROP DOMAIN public."Dom1_$%{}[]()&*^!@""'`\/#";
+-- DROP DOMAIN IF EXISTS public."Dom1_$%{}[]()&*^!@""'`\/#";
 
 CREATE DOMAIN public."Dom1_$%{}[]()&*^!@""'`\/#"
     AS text
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/pg/default/alter_domain_null_type.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/pg/default/alter_domain_null_type.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/pg/default/alter_domain_null_type.sql	(date 1632822697340)
@@ -1,6 +1,6 @@
 -- DOMAIN: public.Dom1_$%{}[]()&*^!@"'`\/#
 
--- DROP DOMAIN public."Dom1_$%{}[]()&*^!@""'`\/#";
+-- DROP DOMAIN IF EXISTS public."Dom1_$%{}[]()&*^!@""'`\/#";
 
 CREATE DOMAIN public."Dom1_$%{}[]()&*^!@""'`\/#"
     AS text
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/pg/default/create_domain.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/pg/default/create_domain.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/pg/default/create_domain.sql	(date 1632822697346)
@@ -1,6 +1,6 @@
 -- DOMAIN: public.Dom1_$%{}[]()&*^!@"'`\/#
 
--- DROP DOMAIN public."Dom1_$%{}[]()&*^!@""'`\/#";
+-- DROP DOMAIN IF EXISTS public."Dom1_$%{}[]()&*^!@""'`\/#";
 
 CREATE DOMAIN public."Dom1_$%{}[]()&*^!@""'`\/#"
     AS text
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/pg/default/alter_domain_default_expression.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/pg/default/alter_domain_default_expression.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/pg/default/alter_domain_default_expression.sql	(date 1632822697328)
@@ -1,6 +1,6 @@
 -- DOMAIN: public.Dom1_$%{}[]()&*^!@"'`\/#
 
--- DROP DOMAIN public."Dom1_$%{}[]()&*^!@""'`\/#";
+-- DROP DOMAIN IF EXISTS public."Dom1_$%{}[]()&*^!@""'`\/#";
 
 CREATE DOMAIN public."Dom1_$%{}[]()&*^!@""'`\/#"
     AS text
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/pg/default/alter_domain_name.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/pg/default/alter_domain_name.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/pg/default/alter_domain_name.sql	(date 1632822697334)
@@ -1,6 +1,6 @@
 -- DOMAIN: public.Dom2_$%{}[]()&*^!@"'`\/#
 
--- DROP DOMAIN public."Dom2_$%{}[]()&*^!@""'`\/#";
+-- DROP DOMAIN IF EXISTS public."Dom2_$%{}[]()&*^!@""'`\/#";
 
 CREATE DOMAIN public."Dom2_$%{}[]()&*^!@""'`\/#"
     AS text
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/pg/default/create_domain_numeric.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/pg/default/create_domain_numeric.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/pg/default/create_domain_numeric.sql	(date 1632822697352)
@@ -1,6 +1,6 @@
 -- DOMAIN: public.Dom1_$%{}[]()&*^!@"'`\/#
 
--- DROP DOMAIN public."Dom1_$%{}[]()&*^!@""'`\/#";
+-- DROP DOMAIN IF EXISTS public."Dom1_$%{}[]()&*^!@""'`\/#";
 
 CREATE DOMAIN public."Dom1_$%{}[]()&*^!@""'`\/#"
     AS numeric(5,2)
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/ppas/9.2_plus/sql/create.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/ppas/9.2_plus/sql/create.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/ppas/9.2_plus/sql/create.sql	(date 1632822697793)
@@ -2,7 +2,7 @@
 {% import 'macros/privilege.macros' as PRIVILEGE %}
 {% import 'macros/default_privilege.macros' as DEFAULT_PRIVILEGE %}
 {% if data.name %}
-CREATE SCHEMA IF NOT EXISTS {{ conn|qtIdent(data.name) }}{% if data.namespaceowner %}
+CREATE SCHEMA{% if add_not_exists_clause %} IF NOT EXISTS{% endif %} {{ conn|qtIdent(data.name) }}{% if data.namespaceowner %}
 
     AUTHORIZATION {{ conn|qtIdent(data.namespaceowner) }}{% endif %}{% endif %};
 {#  Alter the comment/description #}
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/ppas/default/alter_domain_comment.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/ppas/default/alter_domain_comment.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/ppas/default/alter_domain_comment.sql	(date 1632822697358)
@@ -1,6 +1,6 @@
 -- DOMAIN: public.Dom1_$%{}[]()&*^!@"'`\/#
 
--- DROP DOMAIN public."Dom1_$%{}[]()&*^!@""'`\/#";
+-- DROP DOMAIN IF EXISTS public."Dom1_$%{}[]()&*^!@""'`\/#";
 
 CREATE DOMAIN public."Dom1_$%{}[]()&*^!@""'`\/#"
     AS text
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/ppas/default/alter_domain_null_type.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/ppas/default/alter_domain_null_type.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/ppas/default/alter_domain_null_type.sql	(date 1632822697377)
@@ -1,6 +1,6 @@
 -- DOMAIN: public.Dom1_$%{}[]()&*^!@"'`\/#
 
--- DROP DOMAIN public."Dom1_$%{}[]()&*^!@""'`\/#";
+-- DROP DOMAIN IF EXISTS public."Dom1_$%{}[]()&*^!@""'`\/#";
 
 CREATE DOMAIN public."Dom1_$%{}[]()&*^!@""'`\/#"
     AS text
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/ppas/default/create_domain.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/ppas/default/create_domain.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/ppas/default/create_domain.sql	(date 1632822697383)
@@ -1,6 +1,6 @@
 -- DOMAIN: public.Dom1_$%{}[]()&*^!@"'`\/#
 
--- DROP DOMAIN public."Dom1_$%{}[]()&*^!@""'`\/#";
+-- DROP DOMAIN IF EXISTS public."Dom1_$%{}[]()&*^!@""'`\/#";
 
 CREATE DOMAIN public."Dom1_$%{}[]()&*^!@""'`\/#"
     AS text
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/ppas/default/alter_domain_default_expression.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/ppas/default/alter_domain_default_expression.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/ppas/default/alter_domain_default_expression.sql	(date 1632822697364)
@@ -1,6 +1,6 @@
 -- DOMAIN: public.Dom1_$%{}[]()&*^!@"'`\/#
 
--- DROP DOMAIN public."Dom1_$%{}[]()&*^!@""'`\/#";
+-- DROP DOMAIN IF EXISTS public."Dom1_$%{}[]()&*^!@""'`\/#";
 
 CREATE DOMAIN public."Dom1_$%{}[]()&*^!@""'`\/#"
     AS text
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/ppas/default/alter_domain_name.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/ppas/default/alter_domain_name.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/ppas/default/alter_domain_name.sql	(date 1632822697371)
@@ -1,6 +1,6 @@
 -- DOMAIN: public.Dom2_$%{}[]()&*^!@"'`\/#
 
--- DROP DOMAIN public."Dom2_$%{}[]()&*^!@""'`\/#";
+-- DROP DOMAIN IF EXISTS public."Dom2_$%{}[]()&*^!@""'`\/#";
 
 CREATE DOMAIN public."Dom2_$%{}[]()&*^!@""'`\/#"
     AS text
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/ppas/default/create_domain_numeric.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/ppas/default/create_domain_numeric.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/ppas/default/create_domain_numeric.sql	(date 1632822697389)
@@ -1,6 +1,6 @@
 -- DOMAIN: public.Dom1_$%{}[]()&*^!@"'`\/#
 
--- DROP DOMAIN public."Dom1_$%{}[]()&*^!@""'`\/#";
+-- DROP DOMAIN IF EXISTS public."Dom1_$%{}[]()&*^!@""'`\/#";
 
 CREATE DOMAIN public."Dom1_$%{}[]()&*^!@""'`\/#"
     AS numeric(5,2)
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/__init__.py
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/__init__.py	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/__init__.py	(date 1632822697310)
@@ -1055,7 +1055,7 @@
         sql_header = """
 -- CATALOG: {0}
 
--- DROP SCHEMA {0};
+-- DROP SCHEMA IF EXISTS {0};
 
 """.format(old_data['name'])
 
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/alter_seq_change_grantee_privs.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/alter_seq_change_grantee_privs.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/alter_seq_change_grantee_privs.sql	(date 1632822697601)
@@ -1,6 +1,6 @@
 -- SEQUENCE: public.Seq1_$%{}[]()&*^!@"'`\/#
 
--- DROP SEQUENCE public."Seq1_$%{}[]()&*^!@""'`\/#";
+-- DROP SEQUENCE IF EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#";
 
 CREATE SEQUENCE IF NOT EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#"
     CYCLE
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/alter_seq_change_grantee_privs.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/alter_seq_change_grantee_privs.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/alter_seq_change_grantee_privs.sql	(date 1632822697669)
@@ -1,6 +1,6 @@
 -- SEQUENCE: public.Seq1_$%{}[]()&*^!@"'`\/#
 
--- DROP SEQUENCE public."Seq1_$%{}[]()&*^!@""'`\/#";
+-- DROP SEQUENCE IF EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#";
 
 CREATE SEQUENCE IF NOT EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#"
     CYCLE
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/__init__.py
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/__init__.py	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/__init__.py	(date 1632822697553)
@@ -860,7 +860,7 @@
 
         sql_header = """-- Text Search Dictionary: {0}.{1}\n\n""".format(
             res['rows'][0]['schema'], res['rows'][0]['name'])
-        sql_header += """-- DROP TEXT SEARCH DICTIONARY {0};\n
+        sql_header += """-- DROP TEXT SEARCH DICTIONARY IF EXISTS {0};\n
 """.format(self.qtIdent(self.conn, res['rows'][0]['schema'],
                         res['rows'][0]['name']))
 
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/alter_ownedby_remove.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/alter_ownedby_remove.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/alter_ownedby_remove.sql	(date 1632822697662)
@@ -1,6 +1,6 @@
 -- SEQUENCE: public.Seq1_$%{}[]()&*^!@"'`\/#
 
--- DROP SEQUENCE public."Seq1_$%{}[]()&*^!@""'`\/#";
+-- DROP SEQUENCE IF EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#";
 
 CREATE SEQUENCE IF NOT EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#"
     INCREMENT 5
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/tests/default/create_fts_dictionary.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/tests/default/create_fts_dictionary.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/tests/default/create_fts_dictionary.sql	(date 1632822697571)
@@ -1,6 +1,6 @@
 -- Text Search Dictionary: public.Dictionary1_$%{}[]()&*^!@"'`\/#
 
--- DROP TEXT SEARCH DICTIONARY public."Dictionary1_$%{}[]()&*^!@""'`\/#";
+-- DROP TEXT SEARCH DICTIONARY IF EXISTS public."Dictionary1_$%{}[]()&*^!@""'`\/#";
 
 CREATE TEXT SEARCH DICTIONARY public."Dictionary1_$%{}[]()&*^!@""'`\/#" (
     TEMPLATE = simple
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/tests/default/alter_fts_dictionary_delete_options.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/tests/default/alter_fts_dictionary_delete_options.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/tests/default/alter_fts_dictionary_delete_options.sql	(date 1632822697559)
@@ -1,6 +1,6 @@
 -- Text Search Dictionary: public.Test Dictionary Edit#1
 
--- DROP TEXT SEARCH DICTIONARY public."Test Dictionary Edit#1";
+-- DROP TEXT SEARCH DICTIONARY IF EXISTS public."Test Dictionary Edit#1";
 
 CREATE TEXT SEARCH DICTIONARY public."Test Dictionary Edit#1" (
     TEMPLATE = simple
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/tests/default/alter_fts_dictionary_options.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/tests/default/alter_fts_dictionary_options.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/tests/default/alter_fts_dictionary_options.sql	(date 1632822697565)
@@ -1,6 +1,6 @@
 -- Text Search Dictionary: public.Test Dictionary Edit#1
 
--- DROP TEXT SEARCH DICTIONARY public."Test Dictionary Edit#1";
+-- DROP TEXT SEARCH DICTIONARY IF EXISTS public."Test Dictionary Edit#1";
 
 CREATE TEXT SEARCH DICTIONARY public."Test Dictionary Edit#1" (
     TEMPLATE = simple,
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/tests/ppas/9.2_plus/create_schema_all_options_msql.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/tests/ppas/9.2_plus/create_schema_all_options_msql.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/tests/ppas/9.2_plus/create_schema_all_options_msql.sql	(date 1632822697794)
@@ -1,4 +1,4 @@
-CREATE SCHEMA IF NOT EXISTS "test_schema_$%{}[]()&*^!@""""'`\/#";
+CREATE SCHEMA "test_schema_$%{}[]()&*^!@""""'`\/#";
 
 COMMENT ON SCHEMA "test_schema_$%{}[]()&*^!@""""'`\/#"
     IS 'This is a test comment';
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/tests/ppas/9.2_plus/create_schema_with_comment_msql.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/tests/ppas/9.2_plus/create_schema_with_comment_msql.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/tests/ppas/9.2_plus/create_schema_with_comment_msql.sql	(date 1632822697794)
@@ -1,4 +1,4 @@
-CREATE SCHEMA IF NOT EXISTS "test_schema_$%{}[]()&*^!@""""'`\/#";
+CREATE SCHEMA "test_schema_$%{}[]()&*^!@""""'`\/#";
 
 COMMENT ON SCHEMA "test_schema_$%{}[]()&*^!@""""'`\/#"
     IS 'This is a test comment';
Index: web/pgadmin/browser/server_groups/servers/databases/subscriptions/tests/10_plus/alter_sync.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/subscriptions/tests/10_plus/alter_sync.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/subscriptions/tests/10_plus/alter_sync.sql	(date 1632822697818)
@@ -1,6 +1,6 @@
 -- Subscription: test_alter_subscription
 
--- DROP SUBSCRIPTION test_alter_subscription;
+-- DROP SUBSCRIPTION IF EXISTS test_alter_subscription;
 
 CREATE SUBSCRIPTION test_alter_subscription
     CONNECTION 'host=localhost port=5432 user=postgres dbname=postgres'
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/__init__.py
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/__init__.py	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/__init__.py	(date 1632822697577)
@@ -755,7 +755,7 @@
         sql_header = """-- SEQUENCE: {0}.{1}\n\n""".format(
             result['schema'], result['name'])
 
-        sql_header += """-- DROP SEQUENCE {0};
+        sql_header += """-- DROP SEQUENCE IF EXISTS {0};
 
 """.format(self.qtIdent(self.conn, result['schema'], result['name']))
 
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/__init__.py
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/__init__.py	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/__init__.py	(date 1632822697860)
@@ -840,7 +840,7 @@
         sql_header = """-- Foreign Data Wrapper: {0}\n\n""".format(
             res['rows'][0]['name'])
 
-        sql_header += """-- DROP FOREIGN DATA WRAPPER {0}
+        sql_header += """-- DROP FOREIGN DATA WRAPPER IF EXISTS {0}
 
 """.format(self.qtIdent(self.conn, res['rows'][0]['name']))
 
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/alter_seq_privs_add.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/alter_seq_privs_add.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/alter_seq_privs_add.sql	(date 1632822697614)
@@ -1,6 +1,6 @@
 -- SEQUENCE: public.Seq1_$%{}[]()&*^!@"'`\/#
 
--- DROP SEQUENCE public."Seq1_$%{}[]()&*^!@""'`\/#";
+-- DROP SEQUENCE IF EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#";
 
 CREATE SEQUENCE IF NOT EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#"
     CYCLE
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/tests/default/create_fts_dictionary.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/tests/default/create_fts_dictionary.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/tests/default/create_fts_dictionary.sql	(date 1632822697548)
@@ -1,6 +1,6 @@
 -- Text Search Dictionary: test.test_dic
 
--- DROP TEXT SEARCH DICTIONARY test.test_dic;
+-- DROP TEXT SEARCH DICTIONARY IF EXISTS test.test_dic;
 
 CREATE TEXT SEARCH DICTIONARY test.test_dic (
     TEMPLATE = simple
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/alter_seq_comment.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/alter_seq_comment.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/alter_seq_comment.sql	(date 1632822697607)
@@ -1,6 +1,6 @@
 -- SEQUENCE: public.Seq1_$%{}[]()&*^!@"'`\/#
 
--- DROP SEQUENCE public."Seq1_$%{}[]()&*^!@""'`\/#";
+-- DROP SEQUENCE IF EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#";
 
 CREATE SEQUENCE IF NOT EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#"
     INCREMENT 5
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/alter_seq_privs_remove.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/alter_seq_privs_remove.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/alter_seq_privs_remove.sql	(date 1632822697620)
@@ -1,6 +1,6 @@
 -- SEQUENCE: public.Seq1_$%{}[]()&*^!@"'`\/#
 
--- DROP SEQUENCE public."Seq1_$%{}[]()&*^!@""'`\/#";
+-- DROP SEQUENCE IF EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#";
 
 CREATE SEQUENCE IF NOT EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#"
     CYCLE
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/alter_neg_seq_props.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/alter_neg_seq_props.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/alter_neg_seq_props.sql	(date 1632822697583)
@@ -1,6 +1,6 @@
 -- SEQUENCE: public.Seq1_$%{}[]()&*^!@"'`\/#
 
--- DROP SEQUENCE public."Seq1_$%{}[]()&*^!@""'`\/#";
+-- DROP SEQUENCE IF EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#";
 
 CREATE SEQUENCE IF NOT EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#"
     INCREMENT -7
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/alter_seq_privs_update.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/alter_seq_privs_update.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/alter_seq_privs_update.sql	(date 1632822697626)
@@ -1,6 +1,6 @@
 -- SEQUENCE: public.Seq1_$%{}[]()&*^!@"'`\/#
 
--- DROP SEQUENCE public."Seq1_$%{}[]()&*^!@""'`\/#";
+-- DROP SEQUENCE IF EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#";
 
 CREATE SEQUENCE IF NOT EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#"
     CYCLE
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/pg/9.3_plus/alter_fdw_comment.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/pg/9.3_plus/alter_fdw_comment.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/pg/9.3_plus/alter_fdw_comment.sql	(date 1632822697249)
@@ -1,6 +1,6 @@
 -- Foreign Data Wrapper: Fdw1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
+-- DROP FOREIGN DATA WRAPPER IF EXISTS "Fdw1_$%{}[]()&*^!@""'`\/#"
 
 CREATE FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#";
 
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/pg/9.3_plus/alter_fdw_opt1.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/pg/9.3_plus/alter_fdw_opt1.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/pg/9.3_plus/alter_fdw_opt1.sql	(date 1632822697255)
@@ -1,6 +1,6 @@
 -- Foreign Data Wrapper: Fdw1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
+-- DROP FOREIGN DATA WRAPPER IF EXISTS "Fdw1_$%{}[]()&*^!@""'`\/#"
 
 CREATE FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
     OPTIONS (opt1 'val1');
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/create_negative_sequence.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/create_negative_sequence.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/create_negative_sequence.sql	(date 1632822697633)
@@ -1,6 +1,6 @@
 -- SEQUENCE: public.Seq1_$%{}[]()&*^!@"'`\/#
 
--- DROP SEQUENCE public."Seq1_$%{}[]()&*^!@""'`\/#";
+-- DROP SEQUENCE IF EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#";
 
 CREATE SEQUENCE IF NOT EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#"
     INCREMENT -5
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/pg/9.3_plus/alter_fdw_change_opt2.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/pg/9.3_plus/alter_fdw_change_opt2.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/pg/9.3_plus/alter_fdw_change_opt2.sql	(date 1632822697243)
@@ -1,6 +1,6 @@
 -- Foreign Data Wrapper: Fdw1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
+-- DROP FOREIGN DATA WRAPPER IF EXISTS "Fdw1_$%{}[]()&*^!@""'`\/#"
 
 CREATE FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
     OPTIONS (opt1 'val1', opt2 'valopt2');
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/alter_seq_props.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/alter_seq_props.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/alter_seq_props.sql	(date 1632822697627)
@@ -1,6 +1,6 @@
 -- SEQUENCE: public.Seq1_$%{}[]()&*^!@"'`\/#
 
--- DROP SEQUENCE public."Seq1_$%{}[]()&*^!@""'`\/#";
+-- DROP SEQUENCE IF EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#";
 
 CREATE SEQUENCE IF NOT EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#"
     CYCLE
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/pg/9.3_plus/alter_fdw_privileges.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/pg/9.3_plus/alter_fdw_privileges.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/pg/9.3_plus/alter_fdw_privileges.sql	(date 1632822697268)
@@ -1,6 +1,6 @@
 -- Foreign Data Wrapper: Fdw2_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN DATA WRAPPER "Fdw2_$%{}[]()&*^!@""'`\/#"
+-- DROP FOREIGN DATA WRAPPER IF EXISTS "Fdw2_$%{}[]()&*^!@""'`\/#"
 
 CREATE FOREIGN DATA WRAPPER "Fdw2_$%{}[]()&*^!@""'`\/#"
     VALIDATOR pg_catalog.postgresql_fdw_validator
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/create_sequence.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/create_sequence.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/create_sequence.sql	(date 1632822697638)
@@ -1,6 +1,6 @@
 -- SEQUENCE: public.Seq1_$%{}[]()&*^!@"'`\/#
 
--- DROP SEQUENCE public."Seq1_$%{}[]()&*^!@""'`\/#";
+-- DROP SEQUENCE IF EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#";
 
 CREATE SEQUENCE IF NOT EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#"
     INCREMENT 5
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/pg/9.3_plus/alter_fdw_opt2.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/pg/9.3_plus/alter_fdw_opt2.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/pg/9.3_plus/alter_fdw_opt2.sql	(date 1632822697261)
@@ -1,6 +1,6 @@
 -- Foreign Data Wrapper: Fdw1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
+-- DROP FOREIGN DATA WRAPPER IF EXISTS "Fdw1_$%{}[]()&*^!@""'`\/#"
 
 CREATE FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
     OPTIONS (opt1 'val1', opt2 'val2');
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/pg/9.3_plus/alter_fdw_rename.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/pg/9.3_plus/alter_fdw_rename.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/pg/9.3_plus/alter_fdw_rename.sql	(date 1632822697277)
@@ -1,6 +1,6 @@
 -- Foreign Data Wrapper: Fdw2_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN DATA WRAPPER "Fdw2_$%{}[]()&*^!@""'`\/#"
+-- DROP FOREIGN DATA WRAPPER IF EXISTS "Fdw2_$%{}[]()&*^!@""'`\/#"
 
 CREATE FOREIGN DATA WRAPPER "Fdw2_$%{}[]()&*^!@""'`\/#"
     VALIDATOR pg_catalog.postgresql_fdw_validator
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/alter_seq_privs_add.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/alter_seq_privs_add.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/alter_seq_privs_add.sql	(date 1632822697681)
@@ -1,6 +1,6 @@
 -- SEQUENCE: public.Seq1_$%{}[]()&*^!@"'`\/#
 
--- DROP SEQUENCE public."Seq1_$%{}[]()&*^!@""'`\/#";
+-- DROP SEQUENCE IF EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#";
 
 CREATE SEQUENCE IF NOT EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#"
     CYCLE
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/pg/9.3_plus/alter_fdw_validator.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/pg/9.3_plus/alter_fdw_validator.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/pg/9.3_plus/alter_fdw_validator.sql	(date 1632822697291)
@@ -1,6 +1,6 @@
 -- Foreign Data Wrapper: Fdw1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
+-- DROP FOREIGN DATA WRAPPER IF EXISTS "Fdw1_$%{}[]()&*^!@""'`\/#"
 
 CREATE FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
     VALIDATOR pg_catalog.postgresql_fdw_validator
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/pg/9.3_plus/create_fdw.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/pg/9.3_plus/create_fdw.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/pg/9.3_plus/create_fdw.sql	(date 1632822697297)
@@ -1,6 +1,6 @@
 -- Foreign Data Wrapper: Fdw1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
+-- DROP FOREIGN DATA WRAPPER IF EXISTS "Fdw1_$%{}[]()&*^!@""'`\/#"
 
 CREATE FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#";
 
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/ppas/9.3_plus/alter_fdw_comment.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/ppas/9.3_plus/alter_fdw_comment.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/ppas/9.3_plus/alter_fdw_comment.sql	(date 1632822697298)
@@ -1,6 +1,6 @@
 -- Foreign Data Wrapper: Fdw1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
+-- DROP FOREIGN DATA WRAPPER IF EXISTS "Fdw1_$%{}[]()&*^!@""'`\/#"
 
 CREATE FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#";
 
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/alter_seq_comment.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/alter_seq_comment.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/alter_seq_comment.sql	(date 1632822697675)
@@ -1,6 +1,6 @@
 -- SEQUENCE: public.Seq1_$%{}[]()&*^!@"'`\/#
 
--- DROP SEQUENCE public."Seq1_$%{}[]()&*^!@""'`\/#";
+-- DROP SEQUENCE IF EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#";
 
 CREATE SEQUENCE IF NOT EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#"
     INCREMENT 5
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/ppas/9.3_plus/alter_fdw_opt1.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/ppas/9.3_plus/alter_fdw_opt1.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/ppas/9.3_plus/alter_fdw_opt1.sql	(date 1632822697298)
@@ -1,6 +1,6 @@
 -- Foreign Data Wrapper: Fdw1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
+-- DROP FOREIGN DATA WRAPPER IF EXISTS "Fdw1_$%{}[]()&*^!@""'`\/#"
 
 CREATE FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
     OPTIONS (opt1 'val1');
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/ppas/9.3_plus/alter_fdw_change_opt2.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/ppas/9.3_plus/alter_fdw_change_opt2.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/ppas/9.3_plus/alter_fdw_change_opt2.sql	(date 1632822697297)
@@ -1,6 +1,6 @@
 -- Foreign Data Wrapper: Fdw1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
+-- DROP FOREIGN DATA WRAPPER IF EXISTS "Fdw1_$%{}[]()&*^!@""'`\/#"
 
 CREATE FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
     OPTIONS (opt1 'val1', opt2 'valopt2');
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/alter_seq_privs_remove.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/alter_seq_privs_remove.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/alter_seq_privs_remove.sql	(date 1632822697687)
@@ -1,6 +1,6 @@
 -- SEQUENCE: public.Seq1_$%{}[]()&*^!@"'`\/#
 
--- DROP SEQUENCE public."Seq1_$%{}[]()&*^!@""'`\/#";
+-- DROP SEQUENCE IF EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#";
 
 CREATE SEQUENCE IF NOT EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#"
     CYCLE
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/ppas/9.3_plus/alter_fdw_privileges.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/ppas/9.3_plus/alter_fdw_privileges.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/ppas/9.3_plus/alter_fdw_privileges.sql	(date 1632822697304)
@@ -1,6 +1,6 @@
 -- Foreign Data Wrapper: Fdw2_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN DATA WRAPPER "Fdw2_$%{}[]()&*^!@""'`\/#"
+-- DROP FOREIGN DATA WRAPPER IF EXISTS "Fdw2_$%{}[]()&*^!@""'`\/#"
 
 CREATE FOREIGN DATA WRAPPER "Fdw2_$%{}[]()&*^!@""'`\/#"
     VALIDATOR pg_catalog.postgresql_fdw_validator
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/alter_neg_seq_props.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/alter_neg_seq_props.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/alter_neg_seq_props.sql	(date 1632822697650)
@@ -1,6 +1,6 @@
 -- SEQUENCE: public.Seq1_$%{}[]()&*^!@"'`\/#
 
--- DROP SEQUENCE public."Seq1_$%{}[]()&*^!@""'`\/#";
+-- DROP SEQUENCE IF EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#";
 
 CREATE SEQUENCE IF NOT EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#"
     INCREMENT -7
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/ppas/9.3_plus/alter_fdw_opt2.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/ppas/9.3_plus/alter_fdw_opt2.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/ppas/9.3_plus/alter_fdw_opt2.sql	(date 1632822697298)
@@ -1,6 +1,6 @@
 -- Foreign Data Wrapper: Fdw1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
+-- DROP FOREIGN DATA WRAPPER IF EXISTS "Fdw1_$%{}[]()&*^!@""'`\/#"
 
 CREATE FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
     OPTIONS (opt1 'val1', opt2 'val2');
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/alter_seq_privs_update.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/alter_seq_privs_update.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/alter_seq_privs_update.sql	(date 1632822697694)
@@ -1,6 +1,6 @@
 -- SEQUENCE: public.Seq1_$%{}[]()&*^!@"'`\/#
 
--- DROP SEQUENCE public."Seq1_$%{}[]()&*^!@""'`\/#";
+-- DROP SEQUENCE IF EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#";
 
 CREATE SEQUENCE IF NOT EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#"
     CYCLE
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/ppas/9.3_plus/alter_fdw_rename.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/ppas/9.3_plus/alter_fdw_rename.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/ppas/9.3_plus/alter_fdw_rename.sql	(date 1632822697304)
@@ -1,6 +1,6 @@
 -- Foreign Data Wrapper: Fdw2_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN DATA WRAPPER "Fdw2_$%{}[]()&*^!@""'`\/#"
+-- DROP FOREIGN DATA WRAPPER IF EXISTS "Fdw2_$%{}[]()&*^!@""'`\/#"
 
 CREATE FOREIGN DATA WRAPPER "Fdw2_$%{}[]()&*^!@""'`\/#"
     VALIDATOR pg_catalog.postgresql_fdw_validator
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/ppas/9.3_plus/alter_fdw_validator.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/ppas/9.3_plus/alter_fdw_validator.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/ppas/9.3_plus/alter_fdw_validator.sql	(date 1632822697304)
@@ -1,6 +1,6 @@
 -- Foreign Data Wrapper: Fdw1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
+-- DROP FOREIGN DATA WRAPPER IF EXISTS "Fdw1_$%{}[]()&*^!@""'`\/#"
 
 CREATE FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
     VALIDATOR pg_catalog.postgresql_fdw_validator
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/ppas/9.3_plus/create_fdw.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/ppas/9.3_plus/create_fdw.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/ppas/9.3_plus/create_fdw.sql	(date 1632822697305)
@@ -1,6 +1,6 @@
 -- Foreign Data Wrapper: Fdw1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
+-- DROP FOREIGN DATA WRAPPER IF EXISTS "Fdw1_$%{}[]()&*^!@""'`\/#"
 
 CREATE FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#";
 
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/create_negative_sequence.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/create_negative_sequence.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/create_negative_sequence.sql	(date 1632822697701)
@@ -1,6 +1,6 @@
 -- SEQUENCE: public.Seq1_$%{}[]()&*^!@"'`\/#
 
--- DROP SEQUENCE public."Seq1_$%{}[]()&*^!@""'`\/#";
+-- DROP SEQUENCE IF EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#";
 
 CREATE SEQUENCE IF NOT EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#"
     INCREMENT -5
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/alter_seq_props.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/alter_seq_props.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/alter_seq_props.sql	(date 1632822697694)
@@ -1,6 +1,6 @@
 -- SEQUENCE: public.Seq1_$%{}[]()&*^!@"'`\/#
 
--- DROP SEQUENCE public."Seq1_$%{}[]()&*^!@""'`\/#";
+-- DROP SEQUENCE IF EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#";
 
 CREATE SEQUENCE IF NOT EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#"
     CYCLE
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/alter_ownedby_column.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/alter_ownedby_column.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/alter_ownedby_column.sql	(date 1632822697656)
@@ -1,6 +1,6 @@
 -- SEQUENCE: public.Seq1_$%{}[]()&*^!@"'`\/#
 
--- DROP SEQUENCE public."Seq1_$%{}[]()&*^!@""'`\/#";
+-- DROP SEQUENCE IF EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#";
 
 CREATE SEQUENCE IF NOT EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#"
     INCREMENT 5
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/create_sequence.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/create_sequence.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/create_sequence.sql	(date 1632822697706)
@@ -1,6 +1,6 @@
 -- SEQUENCE: public.Seq1_$%{}[]()&*^!@"'`\/#
 
--- DROP SEQUENCE public."Seq1_$%{}[]()&*^!@""'`\/#";
+-- DROP SEQUENCE IF EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#";
 
 CREATE SEQUENCE IF NOT EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#"
     INCREMENT 5
Index: web/pgadmin/browser/server_groups/servers/databases/subscriptions/tests/10_plus/alter_subscription.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/subscriptions/tests/10_plus/alter_subscription.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/subscriptions/tests/10_plus/alter_subscription.sql	(date 1632822697812)
@@ -1,6 +1,6 @@
 -- Subscription: test_alter_subscription
 
--- DROP SUBSCRIPTION test_alter_subscription;
+-- DROP SUBSCRIPTION IF EXISTS test_alter_subscription;
 
 CREATE SUBSCRIPTION test_alter_subscription
     CONNECTION 'host=localhost port=5432 user=postgres dbname=postgres'
Index: web/pgadmin/browser/server_groups/servers/databases/subscriptions/__init__.py
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/subscriptions/__init__.py	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/subscriptions/__init__.py	(date 1632822697800)
@@ -785,7 +785,8 @@
         sql_header = "-- Subscription: {}".format(old_data['name'])
         sql_header += "\n\n"
 
-        sql_header += "-- DROP SUBSCRIPTION {};".format(old_data['name'])
+        sql_header += "-- DROP SUBSCRIPTION IF EXISTS {};".format(
+            old_data['name'])
 
         sql_header += render_template(
             "/".join([self.template_path, self._DELETE_SQL]),
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/__init__.py
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/__init__.py	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/__init__.py	(date 1632822697126)
@@ -848,7 +848,7 @@
 
         sql_header = """-- Foreign Server: {0}
 
--- DROP SERVER {0}
+-- DROP SERVER IF EXISTS {0}
 
 """.format(res['rows'][0]['name'])
 
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/__init__.py
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/__init__.py	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/__init__.py	(date 1632822697396)
@@ -911,7 +911,7 @@
         sql_header = """-- FOREIGN TABLE: {0}.{1}\n\n""".format(
             data['basensp'], data['name'])
 
-        sql_header += """-- DROP FOREIGN TABLE {0};
+        sql_header += """-- DROP FOREIGN TABLE IF EXISTS {0};
 
 """.format(self.qtIdent(self.conn, data['basensp'], data['name']))
 
Index: web/pgadmin/browser/server_groups/servers/databases/subscriptions/tests/10_plus/alter_maintenance_db.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/subscriptions/tests/10_plus/alter_maintenance_db.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/subscriptions/tests/10_plus/alter_maintenance_db.sql	(date 1632822697806)
@@ -1,6 +1,6 @@
 -- Subscription: test_alter_subscription
 
--- DROP SUBSCRIPTION test_alter_subscription;
+-- DROP SUBSCRIPTION IF EXISTS test_alter_subscription;
 
 CREATE SUBSCRIPTION test_alter_subscription
     CONNECTION 'host=localhost port=5432 user=postgres dbname=edb'
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/rules/sql/create.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/rules/sql/create.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/rules/sql/create.sql	(date 1632822697786)
@@ -2,7 +2,7 @@
 {% if display_comments %}
 -- Rule: {{ conn|qtIdent(data.name) }} ON {{ conn|qtIdent(data.schema, data.view) }}
 
--- DROP Rule {{ conn|qtIdent(data.name) }} ON {{ conn|qtIdent(data.schema, data.view) }};
+-- DROP Rule IF EXISTS {{ conn|qtIdent(data.name) }} ON {{ conn|qtIdent(data.schema, data.view) }};
 
 {% endif %}
 {% if data.name and data.schema and data.view %}
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/pg/9.3_plus/alter_remove_options_priv.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/pg/9.3_plus/alter_remove_options_priv.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/pg/9.3_plus/alter_remove_options_priv.sql	(date 1632822697143)
@@ -1,6 +1,6 @@
 -- Foreign Server: FS_$%{}[]()&*^!@"'`\/#
 
--- DROP SERVER FS_$%{}[]()&*^!@"'`\/#
+-- DROP SERVER IF EXISTS FS_$%{}[]()&*^!@"'`\/#
 
 CREATE SERVER "FS_$%{}[]()&*^!@""'`\/#"
     VERSION '1.1'
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/pg/9.3_plus/alter_options_privileges.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/pg/9.3_plus/alter_options_privileges.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/pg/9.3_plus/alter_options_privileges.sql	(date 1632822697137)
@@ -1,6 +1,6 @@
 -- Foreign Server: FS_$%{}[]()&*^!@"'`\/#
 
--- DROP SERVER FS_$%{}[]()&*^!@"'`\/#
+-- DROP SERVER IF EXISTS FS_$%{}[]()&*^!@"'`\/#
 
 CREATE SERVER "FS_$%{}[]()&*^!@""'`\/#"
     VERSION '1.1'
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.2_plus/alter_remove_opts_priv.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.2_plus/alter_remove_opts_priv.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.2_plus/alter_remove_opts_priv.sql	(date 1632822697425)
@@ -1,6 +1,6 @@
 -- FOREIGN TABLE: public.FT1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#";
+-- DROP FOREIGN TABLE IF EXISTS public."FT1_$%{}[]()&*^!@""'`\/#";
 
 CREATE FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#"(
     col1 integer NULL
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/create_sequence_ownedby.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/create_sequence_ownedby.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/create_sequence_ownedby.sql	(date 1632822697712)
@@ -1,6 +1,6 @@
 -- SEQUENCE: public.Seq1_$%{}[]()&*^!@"'`\/#
 
--- DROP SEQUENCE public."Seq1_$%{}[]()&*^!@""'`\/#";
+-- DROP SEQUENCE IF EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#";
 
 CREATE SEQUENCE IF NOT EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#"
     INCREMENT 5
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/pg/9.3_plus/create_fs_all_options.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/pg/9.3_plus/create_fs_all_options.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/pg/9.3_plus/create_fs_all_options.sql	(date 1632822697149)
@@ -1,6 +1,6 @@
 -- Foreign Server: FS_$%{}[]()&*^!@"'`\/#
 
--- DROP SERVER FS_$%{}[]()&*^!@"'`\/#
+-- DROP SERVER IF EXISTS FS_$%{}[]()&*^!@"'`\/#
 
 CREATE SERVER "FS_$%{}[]()&*^!@""'`\/#"
     TYPE 'oracle'
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.2_plus/alter_add_opts.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.2_plus/alter_add_opts.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.2_plus/alter_add_opts.sql	(date 1632822697401)
@@ -1,6 +1,6 @@
 -- FOREIGN TABLE: public.FT1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#";
+-- DROP FOREIGN TABLE IF EXISTS public."FT1_$%{}[]()&*^!@""'`\/#";
 
 CREATE FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#"(
     col1 bigint NULL,
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/__init__.py
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/__init__.py	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/__init__.py	(date 1632822697721)
@@ -485,7 +485,9 @@
         res_data = parse_rule_definition(res)
         SQL = render_template("/".join(
             [self.template_path, self._CREATE_SQL]),
-            data=res_data, display_comments=True)
+            data=res_data, display_comments=True,
+            add_replace_clause=True
+        )
 
         return ajax_response(response=SQL)
 
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/pg/9.3_plus/alter_comment_version.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/pg/9.3_plus/alter_comment_version.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/pg/9.3_plus/alter_comment_version.sql	(date 1632822697131)
@@ -1,6 +1,6 @@
 -- Foreign Server: FS_$%{}[]()&*^!@"'`\/#
 
--- DROP SERVER FS_$%{}[]()&*^!@"'`\/#
+-- DROP SERVER IF EXISTS FS_$%{}[]()&*^!@"'`\/#
 
 CREATE SERVER "FS_$%{}[]()&*^!@""'`\/#"
     VERSION '1.1'
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.2_plus/alter_comment_add_columns.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.2_plus/alter_comment_add_columns.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.2_plus/alter_comment_add_columns.sql	(date 1632822697419)
@@ -1,6 +1,6 @@
 -- FOREIGN TABLE: public.FT1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#";
+-- DROP FOREIGN TABLE IF EXISTS public."FT1_$%{}[]()&*^!@""'`\/#";
 
 CREATE FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#"(
     col1 bigint NULL,
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.2_plus/create_foreign_table_with_all_options.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.2_plus/create_foreign_table_with_all_options.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.2_plus/create_foreign_table_with_all_options.sql	(date 1632822697431)
@@ -1,6 +1,6 @@
 -- FOREIGN TABLE: public.FT1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#";
+-- DROP FOREIGN TABLE IF EXISTS public."FT1_$%{}[]()&*^!@""'`\/#";
 
 CREATE FOREIGN TABLE IF NOT EXISTS public."FT1_$%{}[]()&*^!@""'`\/#"(
     col1 bigint NULL,
Index: web/pgadmin/browser/server_groups/servers/databases/subscriptions/tests/10_plus/create_subscription.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/subscriptions/tests/10_plus/create_subscription.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/subscriptions/tests/10_plus/create_subscription.sql	(date 1632822697824)
@@ -1,6 +1,6 @@
 -- Subscription: test_create_subscription
 
--- DROP SUBSCRIPTION test_create_subscription;
+-- DROP SUBSCRIPTION IF EXISTS test_create_subscription;
 
 CREATE SUBSCRIPTION test_create_subscription
     CONNECTION 'host=localhost port=5432 user=postgres dbname=postgres'
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.2_plus/alter_col_opts.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.2_plus/alter_col_opts.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.2_plus/alter_col_opts.sql	(date 1632822697413)
@@ -1,6 +1,6 @@
 -- FOREIGN TABLE: public.FT1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#";
+-- DROP FOREIGN TABLE IF EXISTS public."FT1_$%{}[]()&*^!@""'`\/#";
 
 CREATE FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#"(
     col1 integer NULL
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/ppas/9.3_plus/alter_remove_options_priv.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/ppas/9.3_plus/alter_remove_options_priv.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/ppas/9.3_plus/alter_remove_options_priv.sql	(date 1632822697167)
@@ -1,6 +1,6 @@
 -- Foreign Server: FS_$%{}[]()&*^!@"'`\/#
 
--- DROP SERVER FS_$%{}[]()&*^!@"'`\/#
+-- DROP SERVER IF EXISTS FS_$%{}[]()&*^!@"'`\/#
 
 CREATE SERVER "FS_$%{}[]()&*^!@""'`\/#"
     VERSION '1.1'
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/ppas/9.3_plus/alter_options_privileges.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/ppas/9.3_plus/alter_options_privileges.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/ppas/9.3_plus/alter_options_privileges.sql	(date 1632822697161)
@@ -1,6 +1,6 @@
 -- Foreign Server: FS_$%{}[]()&*^!@"'`\/#
 
--- DROP SERVER FS_$%{}[]()&*^!@"'`\/#
+-- DROP SERVER IF EXISTS FS_$%{}[]()&*^!@"'`\/#
 
 CREATE SERVER "FS_$%{}[]()&*^!@""'`\/#"
     VERSION '1.1'
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.2_plus/alter_add_priv.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.2_plus/alter_add_priv.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.2_plus/alter_add_priv.sql	(date 1632822697407)
@@ -1,6 +1,6 @@
 -- FOREIGN TABLE: public.FT1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#";
+-- DROP FOREIGN TABLE IF EXISTS public."FT1_$%{}[]()&*^!@""'`\/#";
 
 CREATE FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#"(
     col1 bigint NULL,
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/ppas/9.3_plus/create_fs_all_options.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/ppas/9.3_plus/create_fs_all_options.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/ppas/9.3_plus/create_fs_all_options.sql	(date 1632822697183)
@@ -1,6 +1,6 @@
 -- Foreign Server: FS_$%{}[]()&*^!@"'`\/#
 
--- DROP SERVER FS_$%{}[]()&*^!@"'`\/#
+-- DROP SERVER IF EXISTS FS_$%{}[]()&*^!@"'`\/#
 
 CREATE SERVER "FS_$%{}[]()&*^!@""'`\/#"
     TYPE 'oracle'
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/ppas/9.3_plus/alter_comment_version.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/ppas/9.3_plus/alter_comment_version.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/ppas/9.3_plus/alter_comment_version.sql	(date 1632822697156)
@@ -1,6 +1,6 @@
 -- Foreign Server: FS_$%{}[]()&*^!@"'`\/#
 
--- DROP SERVER FS_$%{}[]()&*^!@"'`\/#
+-- DROP SERVER IF EXISTS FS_$%{}[]()&*^!@"'`\/#
 
 CREATE SERVER "FS_$%{}[]()&*^!@""'`\/#"
     VERSION '1.1'
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/default/alter_update_event_rule.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/default/alter_update_event_rule.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/default/alter_update_event_rule.sql	(date 1632822697758)
@@ -1,8 +1,8 @@
 -- Rule: "test_update_rule1_$%{}[]()&*^!@""'`\/#" ON public.test_emp_rule
 
--- DROP Rule "test_update_rule1_$%{}[]()&*^!@""'`\/#" ON public.test_emp_rule;
+-- DROP Rule IF EXISTS "test_update_rule1_$%{}[]()&*^!@""'`\/#" ON public.test_emp_rule;
 
-CREATE RULE "test_update_rule1_$%{}[]()&*^!@""'`\/#" AS
+CREATE OR REPLACE RULE "test_update_rule1_$%{}[]()&*^!@""'`\/#" AS
     ON UPDATE TO public.test_emp_rule
     WHERE (old.name = 'Sam'::text)
     DO INSTEAD
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.6_plus/alter_col_opts.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.6_plus/alter_col_opts.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.6_plus/alter_col_opts.sql	(date 1632822697449)
@@ -1,6 +1,6 @@
 -- FOREIGN TABLE: public.FT1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#";
+-- DROP FOREIGN TABLE IF EXISTS public."FT1_$%{}[]()&*^!@""'`\/#";
 
 CREATE FOREIGN TABLE IF NOT EXISTS public."FT1_$%{}[]()&*^!@""'`\/#"(
     col1 integer NULL
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/default/alter_insert_event_rule_nothing_update.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/default/alter_insert_event_rule_nothing_update.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/default/alter_insert_event_rule_nothing_update.sql	(date 1632822697752)
@@ -1,8 +1,8 @@
 -- Rule: "test_insert_rule1_$%{}[]()&*^!@""'`\/#" ON public.test_emp_rule
 
--- DROP Rule "test_insert_rule1_$%{}[]()&*^!@""'`\/#" ON public.test_emp_rule;
+-- DROP Rule IF EXISTS "test_insert_rule1_$%{}[]()&*^!@""'`\/#" ON public.test_emp_rule;
 
-CREATE RULE "test_insert_rule1_$%{}[]()&*^!@""'`\/#" AS
+CREATE OR REPLACE RULE "test_insert_rule1_$%{}[]()&*^!@""'`\/#" AS
     ON UPDATE TO public.test_emp_rule
     WHERE (new.salary > 8000)
     DO INSTEAD NOTHING;
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/default/alter_insert_event_rule_complex.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/default/alter_insert_event_rule_complex.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/default/alter_insert_event_rule_complex.sql	(date 1632822697740)
@@ -1,8 +1,8 @@
 -- Rule: "test_insert_rule1_$%{}[]()&*^!@""'`\/#" ON public.test_emp_rule
 
--- DROP Rule "test_insert_rule1_$%{}[]()&*^!@""'`\/#" ON public.test_emp_rule;
+-- DROP Rule IF EXISTS "test_insert_rule1_$%{}[]()&*^!@""'`\/#" ON public.test_emp_rule;
 
-CREATE RULE "test_insert_rule1_$%{}[]()&*^!@""'`\/#" AS
+CREATE OR REPLACE RULE "test_insert_rule1_$%{}[]()&*^!@""'`\/#" AS
     ON INSERT TO public.test_emp_rule
     WHERE (new.salary > 8000)
     DO INSTEAD
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/alter_ownedby_remove.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/alter_ownedby_remove.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/alter_ownedby_remove.sql	(date 1632822697596)
@@ -1,6 +1,6 @@
 -- SEQUENCE: public.Seq1_$%{}[]()&*^!@"'`\/#
 
--- DROP SEQUENCE public."Seq1_$%{}[]()&*^!@""'`\/#";
+-- DROP SEQUENCE IF EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#";
 
 CREATE SEQUENCE IF NOT EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#"
     INCREMENT 5
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/create_sequence_ownedby_remove.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/create_sequence_ownedby_remove.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/create_sequence_ownedby_remove.sql	(date 1632822697645)
@@ -1,6 +1,6 @@
 -- SEQUENCE: public.Seq1_$%{}[]()&*^!@"'`\/#
 
--- DROP SEQUENCE public."Seq1_$%{}[]()&*^!@""'`\/#";
+-- DROP SEQUENCE IF EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#";
 
 CREATE SEQUENCE IF NOT EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#"
     INCREMENT 5
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/default/create_insert_event_rule.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/default/create_insert_event_rule.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/default/create_insert_event_rule.sql	(date 1632822697773)
@@ -1,8 +1,8 @@
 -- Rule: "test_insert_rule_$%{}[]()&*^!@""'`\/#" ON public.test_emp_rule
 
--- DROP Rule "test_insert_rule_$%{}[]()&*^!@""'`\/#" ON public.test_emp_rule;
+-- DROP Rule IF EXISTS "test_insert_rule_$%{}[]()&*^!@""'`\/#" ON public.test_emp_rule;
 
-CREATE RULE "test_insert_rule_$%{}[]()&*^!@""'`\/#" AS
+CREATE OR REPLACE RULE "test_insert_rule_$%{}[]()&*^!@""'`\/#" AS
     ON INSERT TO public.test_emp_rule
     WHERE (new.salary > 5000)
     DO
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.6_plus/alter_comment_add_columns.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.6_plus/alter_comment_add_columns.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.6_plus/alter_comment_add_columns.sql	(date 1632822697455)
@@ -1,6 +1,6 @@
 -- FOREIGN TABLE: public.FT1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#";
+-- DROP FOREIGN TABLE IF EXISTS public."FT1_$%{}[]()&*^!@""'`\/#";
 
 CREATE FOREIGN TABLE IF NOT EXISTS public."FT1_$%{}[]()&*^!@""'`\/#"(
     col1 bigint NULL,
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/default/alter_insert_event_rule.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/default/alter_insert_event_rule.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/default/alter_insert_event_rule.sql	(date 1632822697733)
@@ -1,8 +1,8 @@
 -- Rule: "test_insert_rule1_$%{}[]()&*^!@""'`\/#" ON public.test_emp_rule
 
--- DROP Rule "test_insert_rule1_$%{}[]()&*^!@""'`\/#" ON public.test_emp_rule;
+-- DROP Rule IF EXISTS "test_insert_rule1_$%{}[]()&*^!@""'`\/#" ON public.test_emp_rule;
 
-CREATE RULE "test_insert_rule1_$%{}[]()&*^!@""'`\/#" AS
+CREATE OR REPLACE RULE "test_insert_rule1_$%{}[]()&*^!@""'`\/#" AS
     ON INSERT TO public.test_emp_rule
     WHERE (new.salary > 8000)
     DO INSTEAD
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.6_plus/create_foreign_table_with_all_options.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.6_plus/create_foreign_table_with_all_options.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.6_plus/create_foreign_table_with_all_options.sql	(date 1632822697474)
@@ -1,6 +1,6 @@
 -- FOREIGN TABLE: public.FT1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#";
+-- DROP FOREIGN TABLE IF EXISTS public."FT1_$%{}[]()&*^!@""'`\/#";
 
 CREATE FOREIGN TABLE IF NOT EXISTS public."FT1_$%{}[]()&*^!@""'`\/#"(
     col1 bigint NULL,
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/create_sequence_ownedby.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/create_sequence_ownedby.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/create_sequence_ownedby.sql	(date 1632822697644)
@@ -1,6 +1,6 @@
 -- SEQUENCE: public.Seq1_$%{}[]()&*^!@"'`\/#
 
--- DROP SEQUENCE public."Seq1_$%{}[]()&*^!@""'`\/#";
+-- DROP SEQUENCE IF EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#";
 
 CREATE SEQUENCE IF NOT EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#"
     INCREMENT 5
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.6_plus/alter_add_cons_opts.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.6_plus/alter_add_cons_opts.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.6_plus/alter_add_cons_opts.sql	(date 1632822697437)
@@ -1,6 +1,6 @@
 -- FOREIGN TABLE: public.FT1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#";
+-- DROP FOREIGN TABLE IF EXISTS public."FT1_$%{}[]()&*^!@""'`\/#";
 
 CREATE FOREIGN TABLE IF NOT EXISTS public."FT1_$%{}[]()&*^!@""'`\/#"(
     col1 bigint NULL,
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.6_plus/alter_add_priv.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.6_plus/alter_add_priv.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.6_plus/alter_add_priv.sql	(date 1632822697443)
@@ -1,6 +1,6 @@
 -- FOREIGN TABLE: public.FT1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#";
+-- DROP FOREIGN TABLE IF EXISTS public."FT1_$%{}[]()&*^!@""'`\/#";
 
 CREATE FOREIGN TABLE IF NOT EXISTS public."FT1_$%{}[]()&*^!@""'`\/#"(
     col1 bigint NULL,
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.6_plus/alter_remove_opts_priv_cons.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.6_plus/alter_remove_opts_priv_cons.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.6_plus/alter_remove_opts_priv_cons.sql	(date 1632822697461)
@@ -1,6 +1,6 @@
 -- FOREIGN TABLE: public.FT1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#";
+-- DROP FOREIGN TABLE IF EXISTS public."FT1_$%{}[]()&*^!@""'`\/#";
 
 CREATE FOREIGN TABLE IF NOT EXISTS public."FT1_$%{}[]()&*^!@""'`\/#"(
     col1 integer NULL
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/default/alter_insert_event_rule_nothing.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/default/alter_insert_event_rule_nothing.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/default/alter_insert_event_rule_nothing.sql	(date 1632822697746)
@@ -1,8 +1,8 @@
 -- Rule: "test_insert_rule1_$%{}[]()&*^!@""'`\/#" ON public.test_emp_rule
 
--- DROP Rule "test_insert_rule1_$%{}[]()&*^!@""'`\/#" ON public.test_emp_rule;
+-- DROP Rule IF EXISTS "test_insert_rule1_$%{}[]()&*^!@""'`\/#" ON public.test_emp_rule;
 
-CREATE RULE "test_insert_rule1_$%{}[]()&*^!@""'`\/#" AS
+CREATE OR REPLACE RULE "test_insert_rule1_$%{}[]()&*^!@""'`\/#" AS
     ON INSERT TO public.test_emp_rule
     WHERE (new.salary > 8000)
     DO INSTEAD NOTHING;
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/default/create_delete_event_rule.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/default/create_delete_event_rule.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/default/create_delete_event_rule.sql	(date 1632822697764)
@@ -1,7 +1,7 @@
 -- Rule: "test_delete_rule_$%{}[]()&*^!@""'`\/#" ON public.test_emp_rule
 
--- DROP Rule "test_delete_rule_$%{}[]()&*^!@""'`\/#" ON public.test_emp_rule;
+-- DROP Rule IF EXISTS "test_delete_rule_$%{}[]()&*^!@""'`\/#" ON public.test_emp_rule;
 
-CREATE RULE "test_delete_rule_$%{}[]()&*^!@""'`\/#" AS
+CREATE OR REPLACE RULE "test_delete_rule_$%{}[]()&*^!@""'`\/#" AS
     ON DELETE TO public.test_emp_rule
     DO NOTHING;
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/alter_ownedby_column.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/alter_ownedby_column.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/alter_ownedby_column.sql	(date 1632822697589)
@@ -1,6 +1,6 @@
 -- SEQUENCE: public.Seq1_$%{}[]()&*^!@"'`\/#
 
--- DROP SEQUENCE public."Seq1_$%{}[]()&*^!@""'`\/#";
+-- DROP SEQUENCE IF EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#";
 
 CREATE SEQUENCE IF NOT EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#"
     INCREMENT 5
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/default/alter_delete_event_rule.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/default/alter_delete_event_rule.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/default/alter_delete_event_rule.sql	(date 1632822697727)
@@ -1,8 +1,8 @@
 -- Rule: "test_delete_rule1_$%{}[]()&*^!@""'`\/#" ON public.test_emp_rule
 
--- DROP Rule "test_delete_rule1_$%{}[]()&*^!@""'`\/#" ON public.test_emp_rule;
+-- DROP Rule IF EXISTS "test_delete_rule1_$%{}[]()&*^!@""'`\/#" ON public.test_emp_rule;
 
-CREATE RULE "test_delete_rule1_$%{}[]()&*^!@""'`\/#" AS
+CREATE OR REPLACE RULE "test_delete_rule1_$%{}[]()&*^!@""'`\/#" AS
     ON DELETE TO public.test_emp_rule
     DO INSTEAD
 (DELETE FROM test_emp_rule
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.2_plus/alter_column.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.2_plus/alter_column.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.2_plus/alter_column.sql	(date 1632822697486)
@@ -1,6 +1,6 @@
 -- FOREIGN TABLE: public.FT1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#";
+-- DROP FOREIGN TABLE IF EXISTS public."FT1_$%{}[]()&*^!@""'`\/#";
 
 CREATE FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#"(
     col1 integer NULL,
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.2_plus/alter_remove_priv.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.2_plus/alter_remove_priv.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.2_plus/alter_remove_priv.sql	(date 1632822697499)
@@ -1,6 +1,6 @@
 -- FOREIGN TABLE: public.FT1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#";
+-- DROP FOREIGN TABLE IF EXISTS public."FT1_$%{}[]()&*^!@""'`\/#";
 
 CREATE FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#"(
     col1 integer NULL,
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/default/create_update_event_rule.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/default/create_update_event_rule.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/default/create_update_event_rule.sql	(date 1632822697780)
@@ -1,8 +1,8 @@
 -- Rule: "test_update_rule_$%{}[]()&*^!@""'`\/#" ON public.test_emp_rule
 
--- DROP Rule "test_update_rule_$%{}[]()&*^!@""'`\/#" ON public.test_emp_rule;
+-- DROP Rule IF EXISTS "test_update_rule_$%{}[]()&*^!@""'`\/#" ON public.test_emp_rule;
 
-CREATE RULE "test_update_rule_$%{}[]()&*^!@""'`\/#" AS
+CREATE OR REPLACE RULE "test_update_rule_$%{}[]()&*^!@""'`\/#" AS
     ON UPDATE TO public.test_emp_rule
     WHERE (old.name = 'Joe'::text)
     DO
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.2_plus/alter_comment_add_columns.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.2_plus/alter_comment_add_columns.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.2_plus/alter_comment_add_columns.sql	(date 1632822697492)
@@ -1,6 +1,6 @@
 -- FOREIGN TABLE: public.FT1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#";
+-- DROP FOREIGN TABLE IF EXISTS public."FT1_$%{}[]()&*^!@""'`\/#";
 
 CREATE FOREIGN TABLE IF NOT EXISTS public."FT1_$%{}[]()&*^!@""'`\/#"(
     col1 bigint NULL,
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.2_plus/create_foreign_table_with_all_options.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.2_plus/create_foreign_table_with_all_options.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.2_plus/create_foreign_table_with_all_options.sql	(date 1632822697505)
@@ -1,6 +1,6 @@
 -- FOREIGN TABLE: public.FT1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#";
+-- DROP FOREIGN TABLE IF EXISTS public."FT1_$%{}[]()&*^!@""'`\/#";
 
 CREATE FOREIGN TABLE IF NOT EXISTS public."FT1_$%{}[]()&*^!@""'`\/#"(
     col1 bigint NULL,
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mappings/__init__.py
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mappings/__init__.py	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mappings/__init__.py	(date 1632822697192)
@@ -839,7 +839,7 @@
 
         sql_header = """-- User Mapping : {0}
 
--- DROP USER MAPPING FOR {0} SERVER {1}
+-- DROP USER MAPPING IF EXISTS FOR {0} SERVER {1}
 
 """.format(res['rows'][0]['name'], fdw_data['name'])
 
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.2_plus/alter_add_priv.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.2_plus/alter_add_priv.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.2_plus/alter_add_priv.sql	(date 1632822697480)
@@ -1,6 +1,6 @@
 -- FOREIGN TABLE: public.FT1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#";
+-- DROP FOREIGN TABLE IF EXISTS public."FT1_$%{}[]()&*^!@""'`\/#";
 
 CREATE FOREIGN TABLE IF NOT EXISTS public."FT1_$%{}[]()&*^!@""'`\/#"(
     col1 bigint NULL,
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.6_plus/alter_col_opts.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.6_plus/alter_col_opts.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.6_plus/alter_col_opts.sql	(date 1632822697523)
@@ -1,6 +1,6 @@
 -- FOREIGN TABLE: public.FT1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#";
+-- DROP FOREIGN TABLE IF EXISTS public."FT1_$%{}[]()&*^!@""'`\/#";
 
 CREATE FOREIGN TABLE IF NOT EXISTS public."FT1_$%{}[]()&*^!@""'`\/#"(
     col1 integer NULL
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.6_plus/alter_comment_add_columns.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.6_plus/alter_comment_add_columns.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.6_plus/alter_comment_add_columns.sql	(date 1632822697529)
@@ -1,6 +1,6 @@
 -- FOREIGN TABLE: public.FT1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#";
+-- DROP FOREIGN TABLE IF EXISTS public."FT1_$%{}[]()&*^!@""'`\/#";
 
 CREATE FOREIGN TABLE IF NOT EXISTS public."FT1_$%{}[]()&*^!@""'`\/#"(
     col1 bigint NULL,
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.6_plus/create_foreign_table_with_all_options.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.6_plus/create_foreign_table_with_all_options.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.6_plus/create_foreign_table_with_all_options.sql	(date 1632822697542)
@@ -1,6 +1,6 @@
 -- FOREIGN TABLE: public.FT1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#";
+-- DROP FOREIGN TABLE IF EXISTS public."FT1_$%{}[]()&*^!@""'`\/#";
 
 CREATE FOREIGN TABLE IF NOT EXISTS public."FT1_$%{}[]()&*^!@""'`\/#"(
     col1 bigint NULL,
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.6_plus/alter_add_cons_opts.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.6_plus/alter_add_cons_opts.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.6_plus/alter_add_cons_opts.sql	(date 1632822697511)
@@ -1,6 +1,6 @@
 -- FOREIGN TABLE: public.FT1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#";
+-- DROP FOREIGN TABLE IF EXISTS public."FT1_$%{}[]()&*^!@""'`\/#";
 
 CREATE FOREIGN TABLE IF NOT EXISTS public."FT1_$%{}[]()&*^!@""'`\/#"(
     col1 bigint NULL,
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mappings/tests/pg/default/alter_options.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mappings/tests/pg/default/alter_options.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mappings/tests/pg/default/alter_options.sql	(date 1632822697208)
@@ -1,6 +1,6 @@
 -- User Mapping : postgres
 
--- DROP USER MAPPING FOR postgres SERVER test_fs_for_user_mapping
+-- DROP USER MAPPING IF EXISTS FOR postgres SERVER test_fs_for_user_mapping
 
 CREATE USER MAPPING FOR postgres SERVER test_fs_for_user_mapping
     OPTIONS ("user" 'test_user12', password 'secret123');
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.6_plus/alter_add_priv.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.6_plus/alter_add_priv.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.6_plus/alter_add_priv.sql	(date 1632822697517)
@@ -1,6 +1,6 @@
 -- FOREIGN TABLE: public.FT1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#";
+-- DROP FOREIGN TABLE IF EXISTS public."FT1_$%{}[]()&*^!@""'`\/#";
 
 CREATE FOREIGN TABLE IF NOT EXISTS public."FT1_$%{}[]()&*^!@""'`\/#"(
     col1 bigint NULL,
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.6_plus/alter_remove_opts_priv_cons.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.6_plus/alter_remove_opts_priv_cons.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.6_plus/alter_remove_opts_priv_cons.sql	(date 1632822697536)
@@ -1,6 +1,6 @@
 -- FOREIGN TABLE: public.FT1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#";
+-- DROP FOREIGN TABLE IF EXISTS public."FT1_$%{}[]()&*^!@""'`\/#";
 
 CREATE FOREIGN TABLE IF NOT EXISTS public."FT1_$%{}[]()&*^!@""'`\/#"(
     col1 integer NULL
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mappings/tests/pg/default/alter_options_deleted.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mappings/tests/pg/default/alter_options_deleted.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mappings/tests/pg/default/alter_options_deleted.sql	(date 1632822697213)
@@ -1,5 +1,5 @@
 -- User Mapping : postgres
 
--- DROP USER MAPPING FOR postgres SERVER test_fs_for_user_mapping
+-- DROP USER MAPPING IF EXISTS FOR postgres SERVER test_fs_for_user_mapping
 
 CREATE USER MAPPING FOR postgres SERVER test_fs_for_user_mapping;
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mappings/tests/pg/default/create_user_mapping.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mappings/tests/pg/default/create_user_mapping.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mappings/tests/pg/default/create_user_mapping.sql	(date 1632822697219)
@@ -1,6 +1,6 @@
 -- User Mapping : postgres
 
--- DROP USER MAPPING FOR postgres SERVER test_fs_for_user_mapping
+-- DROP USER MAPPING IF EXISTS FOR postgres SERVER test_fs_for_user_mapping
 
 CREATE USER MAPPING FOR postgres SERVER test_fs_for_user_mapping
     OPTIONS ("user" 'test_user', password 'secret');
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mappings/tests/ppas/default/alter_options.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mappings/tests/ppas/default/alter_options.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mappings/tests/ppas/default/alter_options.sql	(date 1632822697225)
@@ -1,6 +1,6 @@
 -- User Mapping : enterprisedb
 
--- DROP USER MAPPING FOR enterprisedb SERVER test_fs_for_user_mapping
+-- DROP USER MAPPING IF EXISTS FOR enterprisedb SERVER test_fs_for_user_mapping
 
 CREATE USER MAPPING FOR enterprisedb SERVER test_fs_for_user_mapping
     OPTIONS ("user" 'test_user12', password 'secret123');
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mappings/tests/ppas/default/alter_options_deleted.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mappings/tests/ppas/default/alter_options_deleted.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mappings/tests/ppas/default/alter_options_deleted.sql	(date 1632822697231)
@@ -1,5 +1,5 @@
 -- User Mapping : enterprisedb
 
--- DROP USER MAPPING FOR enterprisedb SERVER test_fs_for_user_mapping
+-- DROP USER MAPPING IF EXISTS FOR enterprisedb SERVER test_fs_for_user_mapping
 
 CREATE USER MAPPING FOR enterprisedb SERVER test_fs_for_user_mapping;
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mappings/tests/ppas/default/create_user_mapping.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mappings/tests/ppas/default/create_user_mapping.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mappings/tests/ppas/default/create_user_mapping.sql	(date 1632822697237)
@@ -1,6 +1,6 @@
 -- User Mapping : enterprisedb
 
--- DROP USER MAPPING FOR enterprisedb SERVER test_fs_for_user_mapping
+-- DROP USER MAPPING IF EXISTS FOR enterprisedb SERVER test_fs_for_user_mapping
 
 CREATE USER MAPPING FOR enterprisedb SERVER test_fs_for_user_mapping
     OPTIONS ("user" 'test_user', password 'secret');
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/pg/default/sql/create.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/pg/default/sql/create.sql	(revision 31c7f3eabab2e9eb9c352d2a6d260420125d56f9)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/pg/default/sql/create.sql	(date 1632822697792)
@@ -2,7 +2,7 @@
 {% import 'macros/privilege.macros' as PRIVILEGE %}
 {% import 'macros/default_privilege.macros' as DEFAULT_PRIVILEGE %}
 {% if data.name %}
-CREATE SCHEMA{% if add_not_exists_clause %} IF NOT EXISTS {% endif %} {{ conn|qtIdent(data.name) }}{% if data.namespaceowner %}
+CREATE SCHEMA{% if add_not_exists_clause %} IF NOT EXISTS{% endif %} {{ conn|qtIdent(data.name) }}{% if data.namespaceowner %}
 
     AUTHORIZATION {{ conn|qtIdent(data.namespaceowner) }}{% endif %}{% endif %};
 {#  Alter the comment/description #}
