Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add task db:prepare:with_data #274

Closed
wants to merge 5 commits into from

Commits on Jun 20, 2024

  1. Move migrate code into DataMigrate::DatabaseTasks

    so that we can call it from other tasks directly without invoking rake
    Floppy committed Jun 20, 2024
    Configuration menu
    Copy the full SHA
    9f7a3c8 View commit details
    Browse the repository at this point in the history
  2. copy some private helper methods from ActiveRecord::Tasks::DatabaseTasks

    Ideally we should reference these directly, I will probably rewrite this commit when I get a moment to work out how.
    Floppy committed Jun 20, 2024
    Configuration menu
    Copy the full SHA
    cd8bae1 View commit details
    Browse the repository at this point in the history
  3. add DataMigrate::DatabaseTasks#prepare_all_with_data, an equivalent t…

    …o prepare_all in core Rails.
    
    This is basically a direct copy of ActiveRecord::Tasks::DatabaseTasks#prepare_all, but instead of calling migrate, it calls migrate_with_data, and adds data into schema loading and dumping code as well. Original code is at https://github.com/rails/rails/blob/5ed37b35d666b833aeccb14a4cacd2926251232d/activerecord/lib/active_record/tasks/database_tasks.rb#L176
    Floppy committed Jun 20, 2024
    Configuration menu
    Copy the full SHA
    553faef View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    880d94e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    9f3e76a View commit details
    Browse the repository at this point in the history