diff --git a/web/pgadmin/browser/server_groups/servers/databases/subscriptions/templates/subscriptions/sql/14_plus/create.sql b/web/pgadmin/browser/server_groups/servers/databases/subscriptions/templates/subscriptions/sql/14_plus/create.sql index 705c3b5bd45..154d602df58 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/subscriptions/templates/subscriptions/sql/14_plus/create.sql +++ b/web/pgadmin/browser/server_groups/servers/databases/subscriptions/templates/subscriptions/sql/14_plus/create.sql @@ -19,6 +19,6 @@ CREATE SUBSCRIPTION {{ conn|qtIdent(data.name) }} PUBLICATION {% for pub in data.pub %}{% if loop.index != 1 %},{% endif %}{{ conn|qtIdent(pub) }}{% endfor %} {% endif %} - WITH ({% if data.connect is defined %}connect = {{ data.connect|lower}}, {% endif %}enabled = {{ data.enabled|lower}}, {% if data.copy_data %}copy_data = {{ data.copy_data|lower}}{% if add_semicolon_after_copy_data == 'copy_data' %}, {% endif %}{% endif %} + WITH ({% if data.connect is defined %}connect = {{ data.connect|lower}}, {% endif %}enabled = {{ data.enabled|lower}}, {% if data.copy_data is defined %}copy_data = {{ data.copy_data|lower}}{% if add_semicolon_after_copy_data == 'copy_data' %}, {% endif %}{% endif %} {% if data.create_slot is defined %}create_slot = {{ data.create_slot|lower }}{% if add_semicolon_after_create_slot == 'create_slot' %}, {% endif %}{% endif %} {% if data.slot_name is defined and data.slot_name != ''%}slot_name = {{ data.slot_name }}{% if add_semicolon_after_slot_name == 'slot_name' %}, {% endif %}{% endif %}{% if data.sync %}synchronous_commit = '{{ data.sync }}', {% endif %}binary = {{ data.binary|lower}}, streaming = '{{ data.streaming}}'); diff --git a/web/pgadmin/browser/server_groups/servers/databases/subscriptions/templates/subscriptions/sql/15_plus/create.sql b/web/pgadmin/browser/server_groups/servers/databases/subscriptions/templates/subscriptions/sql/15_plus/create.sql index ef25a2a5d8f..4e419370935 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/subscriptions/templates/subscriptions/sql/15_plus/create.sql +++ b/web/pgadmin/browser/server_groups/servers/databases/subscriptions/templates/subscriptions/sql/15_plus/create.sql @@ -19,6 +19,6 @@ CREATE SUBSCRIPTION {{ conn|qtIdent(data.name) }} PUBLICATION {% for pub in data.pub %}{% if loop.index != 1 %},{% endif %}{{ conn|qtIdent(pub) }}{% endfor %} {% endif %} - WITH ({% if data.connect is defined %}connect = {{ data.connect|lower}}, {% endif %}enabled = {{ data.enabled|lower}}, {% if data.copy_data %}copy_data = {{ data.copy_data|lower}}{% if add_semicolon_after_copy_data == 'copy_data' %}, {% endif %}{% endif %} + WITH ({% if data.connect is defined %}connect = {{ data.connect|lower}}, {% endif %}enabled = {{ data.enabled|lower}}, {% if data.copy_data is defined %}copy_data = {{ data.copy_data|lower}}{% if add_semicolon_after_copy_data == 'copy_data' %}, {% endif %}{% endif %} {% if data.create_slot is defined %}create_slot = {{ data.create_slot|lower }}{% if add_semicolon_after_create_slot == 'create_slot' %}, {% endif %}{% endif %} {% if data.slot_name is defined and data.slot_name != ''%}slot_name = {{ data.slot_name }}{% if add_semicolon_after_slot_name == 'slot_name' %}, {% endif %}{% endif %}{% if data.sync %}synchronous_commit = '{{ data.sync }}', {% endif %}binary = {{ data.binary|lower}}, streaming = '{{ data.streaming}}', two_phase = {{ data.two_phase|lower}}, disable_on_error = {{ data.disable_on_error|lower}}); diff --git a/web/pgadmin/browser/server_groups/servers/databases/subscriptions/templates/subscriptions/sql/16_plus/create.sql b/web/pgadmin/browser/server_groups/servers/databases/subscriptions/templates/subscriptions/sql/16_plus/create.sql index 8052a4782da..10694aa992b 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/subscriptions/templates/subscriptions/sql/16_plus/create.sql +++ b/web/pgadmin/browser/server_groups/servers/databases/subscriptions/templates/subscriptions/sql/16_plus/create.sql @@ -19,6 +19,6 @@ CREATE SUBSCRIPTION {{ conn|qtIdent(data.name) }} PUBLICATION {% for pub in data.pub %}{% if loop.index != 1 %},{% endif %}{{ conn|qtIdent(pub) }}{% endfor %} {% endif %} - WITH ({% if data.connect is defined %}connect = {{ data.connect|lower}}, {% endif %}enabled = {{ data.enabled|lower}}, {% if data.copy_data %}copy_data = {{ data.copy_data|lower}}{% if add_semicolon_after_copy_data == 'copy_data' %}, {% endif %}{% endif %} + WITH ({% if data.connect is defined %}connect = {{ data.connect|lower}}, {% endif %}enabled = {{ data.enabled|lower}}, {% if data.copy_data is defined %}copy_data = {{ data.copy_data|lower}}{% if add_semicolon_after_copy_data == 'copy_data' %}, {% endif %}{% endif %} {% if data.create_slot is defined %}create_slot = {{ data.create_slot|lower }}{% if add_semicolon_after_create_slot == 'create_slot' %}, {% endif %}{% endif %} {% if data.slot_name is defined and data.slot_name != ''%}slot_name = {{ data.slot_name }}{% if add_semicolon_after_slot_name == 'slot_name' %}, {% endif %}{% endif %}{% if data.sync %}synchronous_commit = '{{ data.sync }}', {% endif %}binary = {{ data.binary|lower}}, streaming = '{{ data.streaming}}', two_phase = {{ data.two_phase|lower}}, disable_on_error = {{ data.disable_on_error|lower}}, run_as_owner = {{ data.run_as_owner|lower}}, password_required = {{ data.password_required|lower}}, origin = '{{ data.origin}}'); diff --git a/web/pgadmin/browser/server_groups/servers/databases/subscriptions/templates/subscriptions/sql/default/create.sql b/web/pgadmin/browser/server_groups/servers/databases/subscriptions/templates/subscriptions/sql/default/create.sql index 31bf109f507..46029421a76 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/subscriptions/templates/subscriptions/sql/default/create.sql +++ b/web/pgadmin/browser/server_groups/servers/databases/subscriptions/templates/subscriptions/sql/default/create.sql @@ -19,6 +19,6 @@ CREATE SUBSCRIPTION {{ conn|qtIdent(data.name) }} PUBLICATION {% for pub in data.pub %}{% if loop.index != 1 %},{% endif %}{{ conn|qtIdent(pub) }}{% endfor %} {% endif %} - WITH ({% if data.connect is defined %}connect = {{ data.connect|lower}}, {% endif %}enabled = {{ data.enabled|lower}}, {% if data.copy_data %}copy_data = {{ data.copy_data|lower}}{% if add_semicolon_after_copy_data == 'copy_data' %}, {% endif %}{% endif %} + WITH ({% if data.connect is defined %}connect = {{ data.connect|lower}}, {% endif %}enabled = {{ data.enabled|lower}}, {% if data.copy_data is defined %}copy_data = {{ data.copy_data|lower}}{% if add_semicolon_after_copy_data == 'copy_data' %}, {% endif %}{% endif %} {% if data.create_slot is defined %}create_slot = {{ data.create_slot|lower }}{% if add_semicolon_after_create_slot == 'create_slot' %}, {% endif %}{% endif %} {% if data.slot_name is defined and data.slot_name != ''%}slot_name = {{ data.slot_name }}{% if add_semicolon_after_slot_name == 'slot_name' %}, {% endif %}{% endif %}{% if data.sync %}synchronous_commit = '{{ data.sync }}'{% endif %}); diff --git a/web/pgadmin/browser/server_groups/servers/databases/subscriptions/tests/14_plus/create_subscription_msql.sql b/web/pgadmin/browser/server_groups/servers/databases/subscriptions/tests/14_plus/create_subscription_msql.sql index ac86bc2876b..4283809e179 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/subscriptions/tests/14_plus/create_subscription_msql.sql +++ b/web/pgadmin/browser/server_groups/servers/databases/subscriptions/tests/14_plus/create_subscription_msql.sql @@ -1,4 +1,4 @@ CREATE SUBSCRIPTION test_create_subscription CONNECTION 'host=localhost port=5434 user=postgres dbname=postgres connect_timeout=10 password=xxxxxx sslmode=prefer' PUBLICATION test_pub - WITH (connect = false, enabled = false, create_slot = false, slot_name = None, synchronous_commit = 'remote_apply', binary = true, streaming = 'True'); + WITH (connect = false, enabled = false, copy_data = false, create_slot = false, slot_name = None, synchronous_commit = 'remote_apply', binary = true, streaming = 'True'); diff --git a/web/pgadmin/browser/server_groups/servers/databases/subscriptions/tests/14_plus/test.json b/web/pgadmin/browser/server_groups/servers/databases/subscriptions/tests/14_plus/test.json index 7d18237231d..b0b3ce080ec 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/subscriptions/tests/14_plus/test.json +++ b/web/pgadmin/browser/server_groups/servers/databases/subscriptions/tests/14_plus/test.json @@ -36,11 +36,13 @@ "name": "Alter parameters of subscription", "endpoint": "NODE-subscription.obj_id", "sql_endpoint": "NODE-subscription.sql_id", + "msql_endpoint": "NODE-subscription.msql", "data": { "binary": false, "streaming": false }, - "expected_sql_file": "alter_parameters.sql" + "expected_sql_file": "alter_parameters.sql", + "expected_msql_file": "alter_parameters_msql.sql" }, { "type": "delete", diff --git a/web/pgadmin/browser/server_groups/servers/databases/subscriptions/tests/15_plus/create_subscription_msql.sql b/web/pgadmin/browser/server_groups/servers/databases/subscriptions/tests/15_plus/create_subscription_msql.sql index d795022934e..7efd2be773f 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/subscriptions/tests/15_plus/create_subscription_msql.sql +++ b/web/pgadmin/browser/server_groups/servers/databases/subscriptions/tests/15_plus/create_subscription_msql.sql @@ -1,4 +1,4 @@ CREATE SUBSCRIPTION test_create_subscription CONNECTION 'host=localhost port=5434 user=postgres dbname=postgres connect_timeout=10 password=xxxxxx sslmode=prefer' PUBLICATION test_pub - WITH (connect = false, enabled = false, create_slot = false, slot_name = None, synchronous_commit = 'remote_apply', binary = true, streaming = 'True', two_phase = true, disable_on_error = true); + WITH (connect = false, enabled = false, copy_data = false, create_slot = false, slot_name = None, synchronous_commit = 'remote_apply', binary = true, streaming = 'True', two_phase = true, disable_on_error = true); diff --git a/web/pgadmin/browser/server_groups/servers/databases/subscriptions/tests/15_plus/test.json b/web/pgadmin/browser/server_groups/servers/databases/subscriptions/tests/15_plus/test.json index e954d9c3d48..fc3c1e2fc6b 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/subscriptions/tests/15_plus/test.json +++ b/web/pgadmin/browser/server_groups/servers/databases/subscriptions/tests/15_plus/test.json @@ -37,6 +37,7 @@ "name": "Alter parameters of subscription", "endpoint": "NODE-subscription.obj_id", "sql_endpoint": "NODE-subscription.sql_id", + "msql_endpoint": "NODE-subscription.msql", "data": { "sync": "off", "binary": false, diff --git a/web/pgadmin/browser/server_groups/servers/databases/subscriptions/tests/16_plus/create_subscription_msql.sql b/web/pgadmin/browser/server_groups/servers/databases/subscriptions/tests/16_plus/create_subscription_msql.sql index 9951523a568..b9cb24256cf 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/subscriptions/tests/16_plus/create_subscription_msql.sql +++ b/web/pgadmin/browser/server_groups/servers/databases/subscriptions/tests/16_plus/create_subscription_msql.sql @@ -1,4 +1,4 @@ CREATE SUBSCRIPTION test_create_subscription CONNECTION 'host=localhost port=5434 user=postgres dbname=postgres connect_timeout=10 password=xxxxxx sslmode=prefer' PUBLICATION test_pub - WITH (connect = false, enabled = false, create_slot = false, slot_name = None, synchronous_commit = 'remote_apply', binary = true, streaming = 'True', two_phase = true, disable_on_error = true, run_as_owner = true, password_required = true, origin = 'any'); + WITH (connect = false, enabled = false, copy_data = false, create_slot = false, slot_name = None, synchronous_commit = 'remote_apply', binary = true, streaming = 'True', two_phase = true, disable_on_error = true, run_as_owner = true, password_required = true, origin = 'any'); diff --git a/web/pgadmin/browser/server_groups/servers/databases/subscriptions/tests/16_plus/test.json b/web/pgadmin/browser/server_groups/servers/databases/subscriptions/tests/16_plus/test.json index 86b66982a5e..5421ff1d214 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/subscriptions/tests/16_plus/test.json +++ b/web/pgadmin/browser/server_groups/servers/databases/subscriptions/tests/16_plus/test.json @@ -40,6 +40,7 @@ "name": "Alter parameters of subscription", "endpoint": "NODE-subscription.obj_id", "sql_endpoint": "NODE-subscription.sql_id", + "msql_endpoint": "NODE-subscription.msql", "data": { "sync": "off", "binary": false, diff --git a/web/pgadmin/browser/server_groups/servers/databases/subscriptions/tests/default/create_subscription_msql.sql b/web/pgadmin/browser/server_groups/servers/databases/subscriptions/tests/default/create_subscription_msql.sql index a67a288078b..79b20170650 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/subscriptions/tests/default/create_subscription_msql.sql +++ b/web/pgadmin/browser/server_groups/servers/databases/subscriptions/tests/default/create_subscription_msql.sql @@ -1,4 +1,4 @@ CREATE SUBSCRIPTION test_create_subscription CONNECTION 'host=localhost port=5432 user=postgres dbname=postgres password=xxxxxx' PUBLICATION sample__1 - WITH (connect = false, enabled = false, create_slot = false, slot_name = None, synchronous_commit = 'off'); + WITH (connect = false, enabled = false, copy_data = false, create_slot = false, slot_name = None, synchronous_commit = 'off');