Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

[patch] fix db:structure:dump for multiple schemas in postgres

#2695

This patch fixes a bug in db:structure:dump for postgres when there are multiple schema_search_paths.

development:
  adapter: postgresql
  username: user
  schema_search_path: foo, bar
  password:

Currently in rails, if you have a database.yml with multiple values in schema_search_path, db:structure:dump blows up. This patch properly formats the above database.yml command like so:

@@@pg_dump -i -U "user" -s -x -O -f development_structure.sql --schema=bar --schema=foo my_database@@@

Postgres allows for multiple schemas to be passed to pgdump - for more information see:

Reported by Jeff Dean · May 22nd, 2009 @ 05:51 AM

State: committed
Milestone: 2.x
Assigned to: Michael Koziarski Michael Koziarski
Importance: none

Activity

  1. Joseph Palermo
    Joseph Palermo

    +1

    Seems to work to me. I see no way this could break anything either.

    May 28th, 2009 @ 08:28 PM

  2. Repository
    Repository
    • State changed from new to committed

    (from [b3839f1c98ab6824091c517f6e2e6e3a024c3e13]) Updated the db:structure:dump task to properly format the pgdump command when you have multiple schemas in your schema search path.

    Signed-off-by: Michael Koziarski michael@koziarski.com
    [#2695 [patch] fix db:structure:dump for multiple schemas in postgres state:committed] http://github.com/rails/rails/commit/b3839f1c98ab6824091c517f6e2e6e...

    June 1st, 2009 @ 01:13 AM