diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2017-06-26 13:44:22 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-26 13:44:22 -0400 |
commit | 229d8b2a7e30761054ca2eb5b359f4db4fadb7e2 (patch) | |
tree | 09484c7cd6e224f8256d799280d29875609d3a4d /activerecord/lib/active_record | |
parent | 9105a8ee43ea5c528a7d9468cec61c320670a185 (diff) | |
parent | 8f1486f2697095749777c7896ab5bf9211a4b8d3 (diff) | |
download | rails-229d8b2a7e30761054ca2eb5b359f4db4fadb7e2.tar.gz rails-229d8b2a7e30761054ca2eb5b359f4db4fadb7e2.tar.bz2 rails-229d8b2a7e30761054ca2eb5b359f4db4fadb7e2.zip |
Merge pull request #29519 from Edouard-chin/ec-structure-flags-order
Pass `structure_dump_flags` / `structure_load_flags` options before any other:
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/tasks/mysql_database_tasks.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/tasks/mysql_database_tasks.rb b/activerecord/lib/active_record/tasks/mysql_database_tasks.rb index 541165b3d1..c25d87dd3e 100644 --- a/activerecord/lib/active_record/tasks/mysql_database_tasks.rb +++ b/activerecord/lib/active_record/tasks/mysql_database_tasks.rb @@ -59,7 +59,6 @@ module ActiveRecord args.concat(["--no-data"]) args.concat(["--routines"]) args.concat(["--skip-comments"]) - args.concat(Array(extra_flags)) if extra_flags ignore_tables = ActiveRecord::SchemaDumper.ignore_tables if ignore_tables.any? @@ -67,6 +66,7 @@ module ActiveRecord end args.concat(["#{configuration['database']}"]) + args.unshift(*extra_flags) if extra_flags run_cmd("mysqldump", args, "dumping") end @@ -75,7 +75,7 @@ module ActiveRecord args = prepare_command_options args.concat(["--execute", %{SET FOREIGN_KEY_CHECKS = 0; SOURCE #{filename}; SET FOREIGN_KEY_CHECKS = 1}]) args.concat(["--database", "#{configuration['database']}"]) - args.concat(Array(extra_flags)) if extra_flags + args.unshift(*extra_flags) if extra_flags run_cmd("mysql", args, "loading") end |