aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2018-09-27 16:52:30 +0900
committerGitHub <noreply@github.com>2018-09-27 16:52:30 +0900
commitff1b4eb35ecac420d71c552402e1192551413a5f (patch)
treec72fa52eed26784b150c47e46ecc16370fbdcfde /activerecord
parent8541394e71e961906daaea5961276892278c8a91 (diff)
parent0d6325cfb75796483cabf738f4d45abef7c0a33c (diff)
downloadrails-ff1b4eb35ecac420d71c552402e1192551413a5f.tar.gz
rails-ff1b4eb35ecac420d71c552402e1192551413a5f.tar.bz2
rails-ff1b4eb35ecac420d71c552402e1192551413a5f.zip
Merge pull request #33997 from MatthiasWinkelmann/pg_dump
Removed invalid -X flag for pg_dump, fixes #33996
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/tasks/postgresql_database_tasks.rb2
-rw-r--r--activerecord/test/cases/tasks/postgresql_rake_test.rb14
2 files changed, 8 insertions, 8 deletions
diff --git a/activerecord/lib/active_record/tasks/postgresql_database_tasks.rb b/activerecord/lib/active_record/tasks/postgresql_database_tasks.rb
index 4da918ada3..6d7dc05847 100644
--- a/activerecord/lib/active_record/tasks/postgresql_database_tasks.rb
+++ b/activerecord/lib/active_record/tasks/postgresql_database_tasks.rb
@@ -61,7 +61,7 @@ module ActiveRecord
ActiveRecord::Base.dump_schemas
end
- args = ["-s", "-X", "-x", "-O", "-f", filename]
+ args = ["-s", "-x", "-O", "-f", filename]
args.concat(Array(extra_flags)) if extra_flags
unless search_path.blank?
args += search_path.split(",").map do |part|
diff --git a/activerecord/test/cases/tasks/postgresql_rake_test.rb b/activerecord/test/cases/tasks/postgresql_rake_test.rb
index 0cb90781f1..8c6e8d79f3 100644
--- a/activerecord/test/cases/tasks/postgresql_rake_test.rb
+++ b/activerecord/test/cases/tasks/postgresql_rake_test.rb
@@ -366,7 +366,7 @@ if current_adapter?(:PostgreSQLAdapter)
assert_called_with(
Kernel,
:system,
- ["pg_dump", "-s", "-X", "-x", "-O", "-f", @filename, "my-app-db"],
+ ["pg_dump", "-s", "-x", "-O", "-f", @filename, "my-app-db"],
returns: true
) do
ActiveRecord::Tasks::DatabaseTasks.structure_dump(@configuration, @filename)
@@ -383,7 +383,7 @@ if current_adapter?(:PostgreSQLAdapter)
end
def test_structure_dump_with_extra_flags
- expected_command = ["pg_dump", "-s", "-X", "-x", "-O", "-f", @filename, "--noop", "my-app-db"]
+ expected_command = ["pg_dump", "-s", "-x", "-O", "-f", @filename, "--noop", "my-app-db"]
assert_called_with(Kernel, :system, expected_command, returns: true) do
with_structure_dump_flags(["--noop"]) do
@@ -401,7 +401,7 @@ if current_adapter?(:PostgreSQLAdapter)
assert_called_with(
Kernel,
:system,
- ["pg_dump", "-s", "-X", "-x", "-O", "-f", @filename, "-T", "foo", "-T", "bar", "my-app-db"],
+ ["pg_dump", "-s", "-x", "-O", "-f", @filename, "-T", "foo", "-T", "bar", "my-app-db"],
returns: true
) do
ActiveRecord::Tasks::DatabaseTasks.structure_dump(@configuration, @filename)
@@ -415,7 +415,7 @@ if current_adapter?(:PostgreSQLAdapter)
assert_called_with(
Kernel,
:system,
- ["pg_dump", "-s", "-X", "-x", "-O", "-f", @filename, "--schema=foo", "--schema=bar", "my-app-db"],
+ ["pg_dump", "-s", "-x", "-O", "-f", @filename, "--schema=foo", "--schema=bar", "my-app-db"],
returns: true
) do
ActiveRecord::Tasks::DatabaseTasks.structure_dump(@configuration, @filename)
@@ -428,7 +428,7 @@ if current_adapter?(:PostgreSQLAdapter)
assert_called_with(
Kernel,
:system,
- ["pg_dump", "-s", "-X", "-x", "-O", "-f", @filename, "my-app-db"],
+ ["pg_dump", "-s", "-x", "-O", "-f", @filename, "my-app-db"],
returns: true
) do
with_dump_schemas(:all) do
@@ -441,7 +441,7 @@ if current_adapter?(:PostgreSQLAdapter)
assert_called_with(
Kernel,
:system,
- ["pg_dump", "-s", "-X", "-x", "-O", "-f", @filename, "--schema=foo", "--schema=bar", "my-app-db"],
+ ["pg_dump", "-s", "-x", "-O", "-f", @filename, "--schema=foo", "--schema=bar", "my-app-db"],
returns: true
) do
with_dump_schemas("foo,bar") do
@@ -455,7 +455,7 @@ if current_adapter?(:PostgreSQLAdapter)
assert_called_with(
Kernel,
:system,
- ["pg_dump", "-s", "-X", "-x", "-O", "-f", filename, "my-app-db"],
+ ["pg_dump", "-s", "-x", "-O", "-f", filename, "my-app-db"],
returns: nil
) do
e = assert_raise(RuntimeError) do