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.

New Rake tasks: db:structure:load and db:test:load_structure

#2711

In the current rake tasks, dealing with schema.rb and with development_structure.sql works slightly different, e.g. the db:test:prepare task uses an existing schema.rb (db:test:load) whereas, when we're using config.active_record.schema_format = :sql, it dumps and then loads the development database using db:test:clone_structure).
This seems to be a little confusing and is a problem, when you want to run a CI server only having test evnironment (and no development). We want to check in development_structure.sql and would like rake to use it (like it does with schema.rb).

I applied a patch adding two rake tasks to databases.rake:
* db:test:load_structure * db:structure:load and changed db:test:prepare to use the new load_structure task now

Reported by Matthias Marschall · May 25th, 2009 @ 08:54 AM

State: stale
Milestone: 3.x
Assigned to: nobody
Importance: Low

Activity

  1. Matthias Marschall
  2. Matthias Marschall
    Matthias Marschall
    • Title changed from [PATCH] Rake tasks for loading structure to Rake tasks for loading structure

    May 25th, 2009 @ 08:59 AM

  3. Matthias Marschall
    Matthias Marschall
    • Title changed from Rake tasks for loading structure to New Rake tasks for databases: db:structure:load and db:test:load_structure

    May 25th, 2009 @ 03:47 PM

  4. Matthias Marschall
    Matthias Marschall
    • Title changed from New Rake tasks for databases: db:structure:load and db:test:load_structure to New Rake tasks: db:structure:load and db:test:load_structure

    May 25th, 2009 @ 03:47 PM

  5. Joe Van Dyk
  6. Jeremy Kemper
    Jeremy Kemper
    • Milestone changed from 2.x to 3.x

    May 4th, 2010 @ 06:48 PM

  7. Nick Gauthier
    Nick Gauthier

    I like the idea, but I'd rather the task names stayed the same, so we could continue to use db:reset and such to load structure files.

    Please consider a +1 to my patch here, which toggles the actions based on the schema format:

    https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets...

    Thanks!
    Nick Gauthier

    August 19th, 2010 @ 07:46 PM

  8. Ryan Bigg
    Ryan Bigg
    • Tag cleared.
    • Importance changed from to Low

    Automatic cleanup of spam.

    November 8th, 2010 @ 01:53 AM

  9. Santiago Pastorino
    Santiago Pastorino
    • State changed from new to open

    This issue has been automatically marked as stale because it has not been commented on for at least three months.

    The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.

    Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.

    February 9th, 2011 @ 12:32 AM

  10. Santiago Pastorino
    Santiago Pastorino
    • State changed from open to stale

    February 9th, 2011 @ 12:32 AM