method

structure_dump

Importance_0
structure_dump(filename, extra_flags) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/tasks/mysql_database_tasks.rb, line 42
      def structure_dump(filename, extra_flags)
        args = prepare_command_options
        args.concat(["--result-file", "#{filename}"])
        args.concat(["--no-data"])
        args.concat(["--routines"])
        args.concat(["--skip-comments"])

        ignore_tables = ActiveRecord::SchemaDumper.ignore_tables
        if ignore_tables.any?
          args += ignore_tables.map { |table| "--ignore-table=#{configuration['database']}.#{table}" }
        end

        args.concat(["#{configuration['database']}"])
        args.unshift(*extra_flags) if extra_flags

        run_cmd("mysqldump", args, "dumping")
      end
Register or log in to add new notes.